facter 2.0.1.rc1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of facter might be problematic. Click here for more details.

Files changed (379) hide show
  1. checksums.yaml +7 -0
  2. data/COMMITTERS.md +194 -0
  3. data/CONTRIBUTING.md +65 -0
  4. data/Gemfile +43 -0
  5. data/LICENSE +15 -0
  6. data/README.md +33 -0
  7. data/Rakefile +79 -0
  8. data/bin/facter +16 -0
  9. data/etc/facter.conf +5 -0
  10. data/ext/build_defaults.yaml +24 -0
  11. data/ext/debian/changelog.erb +59 -0
  12. data/ext/debian/compat +1 -0
  13. data/ext/debian/control +14 -0
  14. data/ext/debian/copyright +19 -0
  15. data/ext/debian/docs +1 -0
  16. data/ext/debian/lintian-overrides +0 -0
  17. data/ext/debian/rules +10 -0
  18. data/ext/debian/source/format +1 -0
  19. data/ext/facter-diff +74 -0
  20. data/ext/ips/facter.p5m.erb +10 -0
  21. data/ext/ips/rules +7 -0
  22. data/ext/ips/transforms +18 -0
  23. data/ext/osx/file_mapping.yaml +27 -0
  24. data/ext/osx/preflight.erb +33 -0
  25. data/ext/osx/prototype.plist.erb +38 -0
  26. data/ext/project_data.yaml +33 -0
  27. data/ext/redhat/facter.spec.erb +220 -0
  28. data/ext/solaris/pkginfo +7 -0
  29. data/install.rb +380 -0
  30. data/lib/facter.rb +262 -0
  31. data/lib/facter/Cfkey.rb +42 -0
  32. data/lib/facter/application.rb +204 -0
  33. data/lib/facter/architecture.rb +50 -0
  34. data/lib/facter/augeasversion.rb +28 -0
  35. data/lib/facter/blockdevices.rb +105 -0
  36. data/lib/facter/core/aggregate.rb +220 -0
  37. data/lib/facter/core/directed_graph.rb +46 -0
  38. data/lib/facter/core/execution.rb +100 -0
  39. data/lib/facter/core/execution/base.rb +73 -0
  40. data/lib/facter/core/execution/posix.rb +50 -0
  41. data/lib/facter/core/execution/windows.rb +57 -0
  42. data/lib/facter/core/logging.rb +169 -0
  43. data/lib/facter/core/resolvable.rb +94 -0
  44. data/lib/facter/core/suitable.rb +117 -0
  45. data/lib/facter/domain.rb +99 -0
  46. data/lib/facter/ec2.rb +37 -0
  47. data/lib/facter/facterversion.rb +15 -0
  48. data/lib/facter/filesystems.rb +38 -0
  49. data/lib/facter/fqdn.rb +22 -0
  50. data/lib/facter/hardwareisa.rb +20 -0
  51. data/lib/facter/hardwaremodel.rb +67 -0
  52. data/lib/facter/hostname.rb +33 -0
  53. data/lib/facter/id.rb +21 -0
  54. data/lib/facter/interfaces.rb +46 -0
  55. data/lib/facter/ipaddress.rb +171 -0
  56. data/lib/facter/ipaddress6.rb +82 -0
  57. data/lib/facter/iphostnumber.rb +29 -0
  58. data/lib/facter/kernel.rb +22 -0
  59. data/lib/facter/kernelmajversion.rb +15 -0
  60. data/lib/facter/kernelrelease.rb +42 -0
  61. data/lib/facter/kernelversion.rb +22 -0
  62. data/lib/facter/ldom.rb +47 -0
  63. data/lib/facter/lsbdistcodename.rb +18 -0
  64. data/lib/facter/lsbdistdescription.rb +21 -0
  65. data/lib/facter/lsbdistid.rb +18 -0
  66. data/lib/facter/lsbdistrelease.rb +18 -0
  67. data/lib/facter/lsbmajdistrelease.rb +27 -0
  68. data/lib/facter/lsbrelease.rb +18 -0
  69. data/lib/facter/macaddress.rb +97 -0
  70. data/lib/facter/macosx.rb +56 -0
  71. data/lib/facter/manufacturer.rb +68 -0
  72. data/lib/facter/memory.rb +162 -0
  73. data/lib/facter/netmask.rb +42 -0
  74. data/lib/facter/network.rb +20 -0
  75. data/lib/facter/operatingsystem.rb +121 -0
  76. data/lib/facter/operatingsystemmajrelease.rb +33 -0
  77. data/lib/facter/operatingsystemrelease.rb +226 -0
  78. data/lib/facter/osfamily.rb +35 -0
  79. data/lib/facter/path.rb +14 -0
  80. data/lib/facter/physicalprocessorcount.rb +84 -0
  81. data/lib/facter/processor.rb +183 -0
  82. data/lib/facter/ps.rb +30 -0
  83. data/lib/facter/puppetversion.rb +20 -0
  84. data/lib/facter/rubysitedir.rb +12 -0
  85. data/lib/facter/rubyversion.rb +12 -0
  86. data/lib/facter/selinux.rb +99 -0
  87. data/lib/facter/ssh.rb +72 -0
  88. data/lib/facter/timezone.rb +14 -0
  89. data/lib/facter/uniqueid.rb +4 -0
  90. data/lib/facter/uptime.rb +34 -0
  91. data/lib/facter/uptime_days.rb +15 -0
  92. data/lib/facter/uptime_hours.rb +15 -0
  93. data/lib/facter/uptime_seconds.rb +24 -0
  94. data/lib/facter/util/architecture.rb +19 -0
  95. data/lib/facter/util/collection.rb +161 -0
  96. data/lib/facter/util/composite_loader.rb +12 -0
  97. data/lib/facter/util/config.rb +61 -0
  98. data/lib/facter/util/confine.rb +66 -0
  99. data/lib/facter/util/directory_loader.rb +83 -0
  100. data/lib/facter/util/ec2.rb +101 -0
  101. data/lib/facter/util/fact.rb +204 -0
  102. data/lib/facter/util/file_read.rb +37 -0
  103. data/lib/facter/util/formatter.rb +38 -0
  104. data/lib/facter/util/ip.rb +285 -0
  105. data/lib/facter/util/ip/windows.rb +215 -0
  106. data/lib/facter/util/loader.rb +146 -0
  107. data/lib/facter/util/macaddress.rb +43 -0
  108. data/lib/facter/util/macosx.rb +73 -0
  109. data/lib/facter/util/manufacturer.rb +104 -0
  110. data/lib/facter/util/memory.rb +228 -0
  111. data/lib/facter/util/monkey_patches.rb +8 -0
  112. data/lib/facter/util/netmask.rb +40 -0
  113. data/lib/facter/util/normalization.rb +94 -0
  114. data/lib/facter/util/nothing_loader.rb +12 -0
  115. data/lib/facter/util/parser.rb +158 -0
  116. data/lib/facter/util/plist.rb +24 -0
  117. data/lib/facter/util/plist/generator.rb +228 -0
  118. data/lib/facter/util/plist/parser.rb +226 -0
  119. data/lib/facter/util/processor.rb +291 -0
  120. data/lib/facter/util/registry.rb +11 -0
  121. data/lib/facter/util/resolution.rb +152 -0
  122. data/lib/facter/util/solaris_zones.rb +158 -0
  123. data/lib/facter/util/unix_root.rb +5 -0
  124. data/lib/facter/util/uptime.rb +81 -0
  125. data/lib/facter/util/values.rb +80 -0
  126. data/lib/facter/util/virtual.rb +151 -0
  127. data/lib/facter/util/vlans.rb +24 -0
  128. data/lib/facter/util/windows_root.rb +37 -0
  129. data/lib/facter/util/wmi.rb +16 -0
  130. data/lib/facter/util/xendomains.rb +10 -0
  131. data/lib/facter/version.rb +86 -0
  132. data/lib/facter/virtual.rb +262 -0
  133. data/lib/facter/vlans.rb +17 -0
  134. data/lib/facter/xendomains.rb +20 -0
  135. data/lib/facter/zfs_version.rb +10 -0
  136. data/lib/facter/zonename.rb +6 -0
  137. data/lib/facter/zones.rb +17 -0
  138. data/lib/facter/zpool_version.rb +10 -0
  139. data/spec/fixtures/cpuinfo/amd64dual +57 -0
  140. data/spec/fixtures/cpuinfo/amd64quad +79 -0
  141. data/spec/fixtures/cpuinfo/amd64solo +23 -0
  142. data/spec/fixtures/cpuinfo/amd64tri +86 -0
  143. data/spec/fixtures/cpuinfo/amd64twentyfour +600 -0
  144. data/spec/fixtures/cpuinfo/bbg3-armel +12 -0
  145. data/spec/fixtures/cpuinfo/beaglexm-armel +12 -0
  146. data/spec/fixtures/cpuinfo/panda-armel +17 -0
  147. data/spec/fixtures/cpuinfo/ppc64 +19 -0
  148. data/spec/fixtures/cpuinfo/sparc +10 -0
  149. data/spec/fixtures/hpux/machinfo/hppa-rp4440 +26 -0
  150. data/spec/fixtures/hpux/machinfo/ia64-rx2620 +49 -0
  151. data/spec/fixtures/hpux/machinfo/ia64-rx6600 +26 -0
  152. data/spec/fixtures/hpux/machinfo/ia64-rx8640 +53 -0
  153. data/spec/fixtures/hpux/machinfo/superdome-server-SD32B +53 -0
  154. data/spec/fixtures/hpux/machinfo/superdome2-16s +31 -0
  155. data/spec/fixtures/hpux/sched.models +174 -0
  156. data/spec/fixtures/hpux/unistd.h +1534 -0
  157. data/spec/fixtures/ifconfig/bsd_ifconfig_all_with_multiple_interfaces +18 -0
  158. data/spec/fixtures/ifconfig/centos_5_5 +17 -0
  159. data/spec/fixtures/ifconfig/centos_5_5_eth0 +8 -0
  160. data/spec/fixtures/ifconfig/darwin_10_3_0 +26 -0
  161. data/spec/fixtures/ifconfig/darwin_10_3_0_en0 +6 -0
  162. data/spec/fixtures/ifconfig/darwin_10_6_4 +28 -0
  163. data/spec/fixtures/ifconfig/darwin_10_6_4_en1 +6 -0
  164. data/spec/fixtures/ifconfig/darwin_10_6_6_dualstack +8 -0
  165. data/spec/fixtures/ifconfig/darwin_10_6_6_dualstack_en1 +7 -0
  166. data/spec/fixtures/ifconfig/darwin_9_8_0 +26 -0
  167. data/spec/fixtures/ifconfig/darwin_9_8_0_en0 +6 -0
  168. data/spec/fixtures/ifconfig/darwin_ifconfig_all_with_multiple_interfaces +23 -0
  169. data/spec/fixtures/ifconfig/fedora_10 +36 -0
  170. data/spec/fixtures/ifconfig/fedora_10_eth0 +9 -0
  171. data/spec/fixtures/ifconfig/fedora_13 +18 -0
  172. data/spec/fixtures/ifconfig/fedora_13_eth0 +9 -0
  173. data/spec/fixtures/ifconfig/fedora_8 +38 -0
  174. data/spec/fixtures/ifconfig/fedora_8_eth0 +9 -0
  175. data/spec/fixtures/ifconfig/freebsd_6_0 +12 -0
  176. data/spec/fixtures/ifconfig/ifconfig_net_tools_1.60.txt +19 -0
  177. data/spec/fixtures/ifconfig/ifconfig_ubuntu_1204.txt +16 -0
  178. data/spec/fixtures/ifconfig/linux_ifconfig_all_with_multiple_interfaces +19 -0
  179. data/spec/fixtures/ifconfig/linux_ifconfig_no_addr +19 -0
  180. data/spec/fixtures/ifconfig/linux_ifconfig_no_mac +8 -0
  181. data/spec/fixtures/ifconfig/linux_ifconfig_venet +24 -0
  182. data/spec/fixtures/ifconfig/open_solaris_10 +12 -0
  183. data/spec/fixtures/ifconfig/open_solaris_b132 +20 -0
  184. data/spec/fixtures/ifconfig/sunos_ifconfig_all_with_multiple_interfaces +10 -0
  185. data/spec/fixtures/ifconfig/ubuntu_7_04 +38 -0
  186. data/spec/fixtures/ifconfig/ubuntu_7_04_eth0 +9 -0
  187. data/spec/fixtures/ldom/ldom_v1 +6 -0
  188. data/spec/fixtures/netstat/centos_5_5 +5 -0
  189. data/spec/fixtures/netstat/darwin_10_3_0 +35 -0
  190. data/spec/fixtures/netstat/darwin_10_6_4 +29 -0
  191. data/spec/fixtures/netstat/darwin_10_6_6_dualstack +34 -0
  192. data/spec/fixtures/netstat/darwin_9_8_0 +28 -0
  193. data/spec/fixtures/netstat/fedora_10 +7 -0
  194. data/spec/fixtures/netstat/open_solaris_10 +16 -0
  195. data/spec/fixtures/netstat/open_solaris_b132 +17 -0
  196. data/spec/fixtures/netstat/ubuntu_7_04 +7 -0
  197. data/spec/fixtures/processorcount/solaris-psrinfo +24 -0
  198. data/spec/fixtures/processorcount/solaris-sparc-kstat-cpu-info +1216 -0
  199. data/spec/fixtures/processorcount/solaris-x86_64-kstat-cpu-info +225 -0
  200. data/spec/fixtures/unit/filesystems/linux +28 -0
  201. data/spec/fixtures/unit/interfaces/ifconfig_net_tools_1.60.txt +19 -0
  202. data/spec/fixtures/unit/interfaces/ifconfig_net_tools_1.60.txt.em1 +10 -0
  203. data/spec/fixtures/unit/interfaces/ifconfig_net_tools_1.60.txt.lo +8 -0
  204. data/spec/fixtures/unit/ipaddress/ifconfig_multiple_127_addresses.txt +20 -0
  205. data/spec/fixtures/unit/ipaddress/ifconfig_net_tools_1.60.txt +19 -0
  206. data/spec/fixtures/unit/ipaddress/ifconfig_non_english_locale.txt +18 -0
  207. data/spec/fixtures/unit/ipaddress/ifconfig_ubuntu_1204.txt +16 -0
  208. data/spec/fixtures/unit/netmask/darwin_10_8_5.txt +30 -0
  209. data/spec/fixtures/unit/netmask/ifconfig_net_tools_1.60.txt +19 -0
  210. data/spec/fixtures/unit/netmask/ifconfig_ubuntu_1204.txt +16 -0
  211. data/spec/fixtures/unit/selinux/selinux_sestatus +6 -0
  212. data/spec/fixtures/unit/util/ec2/centos-arp-ec2.out +1 -0
  213. data/spec/fixtures/unit/util/ec2/linux-arp-ec2.out +1 -0
  214. data/spec/fixtures/unit/util/ec2/linux-arp-not-ec2.out +5 -0
  215. data/spec/fixtures/unit/util/ec2/solaris8_arp_a_not_ec2.out +7 -0
  216. data/spec/fixtures/unit/util/ec2/windows-2008-arp-a-not-ec2.out +6 -0
  217. data/spec/fixtures/unit/util/ec2/windows-2008-arp-a.out +10 -0
  218. data/spec/fixtures/unit/util/ip/6.0-STABLE_FreeBSD_ifconfig +12 -0
  219. data/spec/fixtures/unit/util/ip/Mac_OS_X_10.5.5_ifconfig +26 -0
  220. data/spec/fixtures/unit/util/ip/darwin_ifconfig_all_with_multiple_interfaces +10 -0
  221. data/spec/fixtures/unit/util/ip/darwin_ifconfig_single_interface +6 -0
  222. data/spec/fixtures/unit/util/ip/debian_kfreebsd_ifconfig +40 -0
  223. data/spec/fixtures/unit/util/ip/hpux_1111_ifconfig_lan0 +2 -0
  224. data/spec/fixtures/unit/util/ip/hpux_1111_ifconfig_lan1 +2 -0
  225. data/spec/fixtures/unit/util/ip/hpux_1111_ifconfig_lo0 +2 -0
  226. data/spec/fixtures/unit/util/ip/hpux_1111_lanscan +5 -0
  227. data/spec/fixtures/unit/util/ip/hpux_1111_netstat_in +4 -0
  228. data/spec/fixtures/unit/util/ip/hpux_1131_asterisk_ifconfig_lan0 +2 -0
  229. data/spec/fixtures/unit/util/ip/hpux_1131_asterisk_ifconfig_lan1 +2 -0
  230. data/spec/fixtures/unit/util/ip/hpux_1131_asterisk_ifconfig_lo0 +2 -0
  231. data/spec/fixtures/unit/util/ip/hpux_1131_asterisk_lanscan +5 -0
  232. data/spec/fixtures/unit/util/ip/hpux_1131_asterisk_netstat_in +4 -0
  233. data/spec/fixtures/unit/util/ip/hpux_1131_ifconfig_lan0 +2 -0
  234. data/spec/fixtures/unit/util/ip/hpux_1131_ifconfig_lan1 +2 -0
  235. data/spec/fixtures/unit/util/ip/hpux_1131_ifconfig_lo0 +2 -0
  236. data/spec/fixtures/unit/util/ip/hpux_1131_lanscan +4 -0
  237. data/spec/fixtures/unit/util/ip/hpux_1131_netstat_in +4 -0
  238. data/spec/fixtures/unit/util/ip/hpux_1131_nic_bonding_ifconfig_lan1 +2 -0
  239. data/spec/fixtures/unit/util/ip/hpux_1131_nic_bonding_ifconfig_lan4 +2 -0
  240. data/spec/fixtures/unit/util/ip/hpux_1131_nic_bonding_ifconfig_lan4_1 +2 -0
  241. data/spec/fixtures/unit/util/ip/hpux_1131_nic_bonding_ifconfig_lo0 +2 -0
  242. data/spec/fixtures/unit/util/ip/hpux_1131_nic_bonding_lanscan +9 -0
  243. data/spec/fixtures/unit/util/ip/hpux_1131_nic_bonding_netstat_in +6 -0
  244. data/spec/fixtures/unit/util/ip/linux_2_6_35_proc_net_bonding_bond0 +19 -0
  245. data/spec/fixtures/unit/util/ip/linux_get_single_interface_eth0 +10 -0
  246. data/spec/fixtures/unit/util/ip/linux_get_single_interface_ib0 +8 -0
  247. data/spec/fixtures/unit/util/ip/linux_get_single_interface_lo +9 -0
  248. data/spec/fixtures/unit/util/ip/linux_ifconfig_all_with_single_interface +18 -0
  249. data/spec/fixtures/unit/util/ip/linux_ifconfig_ib0 +8 -0
  250. data/spec/fixtures/unit/util/ip/solaris_ifconfig_all_with_multiple_interfaces +8 -0
  251. data/spec/fixtures/unit/util/ip/solaris_ifconfig_single_interface +3 -0
  252. data/spec/fixtures/unit/util/ip/windows_netsh_all_interfaces +12 -0
  253. data/spec/fixtures/unit/util/ip/windows_netsh_single_interface +7 -0
  254. data/spec/fixtures/unit/util/ip/windows_netsh_single_interface6 +18 -0
  255. data/spec/fixtures/unit/util/loader/nosuchfact.rb +1 -0
  256. data/spec/fixtures/unit/util/manufacturer/freebsd_dmidecode +42 -0
  257. data/spec/fixtures/unit/util/manufacturer/intel_linux_dmidecode +549 -0
  258. data/spec/fixtures/unit/util/manufacturer/linux_dmidecode_with_spaces +60 -0
  259. data/spec/fixtures/unit/util/manufacturer/opensolaris_smbios +33 -0
  260. data/spec/fixtures/unit/util/manufacturer/solaris_sunfire_v120_prtdiag +33 -0
  261. data/spec/fixtures/unit/util/manufacturer/solaris_t5220_prtdiag +136 -0
  262. data/spec/fixtures/unit/util/processor/solaris-i86pc +28 -0
  263. data/spec/fixtures/unit/util/processor/solaris-sun4u +151 -0
  264. data/spec/fixtures/unit/util/processor/x86-pentium2 +41 -0
  265. data/spec/fixtures/unit/util/uptime/kstat_boot_time +1 -0
  266. data/spec/fixtures/unit/util/uptime/sysctl_kern_boottime_darwin +1 -0
  267. data/spec/fixtures/unit/util/uptime/sysctl_kern_boottime_openbsd +1 -0
  268. data/spec/fixtures/unit/util/uptime/ubuntu_proc_uptime +1 -0
  269. data/spec/fixtures/unit/util/virtual/invalid_unicode_dmi_entries +0 -0
  270. data/spec/fixtures/unit/util/virtual/solaris10_proc_self_status1 +0 -0
  271. data/spec/fixtures/unit/util/vlans/linux_vlan_config +6 -0
  272. data/spec/fixtures/unit/util/xendomains/xendomains +4 -0
  273. data/spec/fixtures/unit/virtual/sysfs_dmi_entries_raw.txt +0 -0
  274. data/spec/fixtures/unit/zfs_version/freebsd_8.2 +14 -0
  275. data/spec/fixtures/unit/zfs_version/freebsd_9.0 +13 -0
  276. data/spec/fixtures/unit/zfs_version/linux-fuse_0.6.9 +14 -0
  277. data/spec/fixtures/unit/zfs_version/solaris_10 +10 -0
  278. data/spec/fixtures/unit/zfs_version/solaris_11 +12 -0
  279. data/spec/fixtures/unit/zpool_version/freebsd_8.2 +26 -0
  280. data/spec/fixtures/unit/zpool_version/freebsd_9.0 +38 -0
  281. data/spec/fixtures/unit/zpool_version/linux-fuse_0.6.9 +35 -0
  282. data/spec/fixtures/unit/zpool_version/solaris_10 +31 -0
  283. data/spec/fixtures/unit/zpool_version/solaris_11 +43 -0
  284. data/spec/fixtures/virtual/proc_self_status/vserver_2_1/guest +37 -0
  285. data/spec/fixtures/virtual/proc_self_status/vserver_2_1/host +36 -0
  286. data/spec/fixtures/virtual/proc_self_status/vserver_2_3/guest +39 -0
  287. data/spec/fixtures/virtual/proc_self_status/vserver_2_3/host +39 -0
  288. data/spec/integration/facter_spec.rb +39 -0
  289. data/spec/lib/facter_spec/cpuinfo.rb +15 -0
  290. data/spec/lib/facter_spec/windows_network.rb +64 -0
  291. data/spec/puppetlabs_spec/files.rb +57 -0
  292. data/spec/puppetlabs_spec/fixtures.rb +49 -0
  293. data/spec/puppetlabs_spec/matchers.rb +87 -0
  294. data/spec/puppetlabs_spec/verbose.rb +9 -0
  295. data/spec/puppetlabs_spec_helper.rb +26 -0
  296. data/spec/shared_contexts/platform.rb +55 -0
  297. data/spec/shared_formats/parses.rb +3 -0
  298. data/spec/spec_helper.rb +75 -0
  299. data/spec/unit/application_spec.rb +101 -0
  300. data/spec/unit/architecture_spec.rb +63 -0
  301. data/spec/unit/blockdevices_spec.rb +109 -0
  302. data/spec/unit/core/aggregate_spec.rb +125 -0
  303. data/spec/unit/core/directed_graph_spec.rb +79 -0
  304. data/spec/unit/core/execution/base_spec.rb +119 -0
  305. data/spec/unit/core/execution/posix_spec.rb +86 -0
  306. data/spec/unit/core/execution/windows_spec.rb +106 -0
  307. data/spec/unit/core/execution_spec.rb +37 -0
  308. data/spec/unit/core/logging_spec.rb +104 -0
  309. data/spec/unit/core/resolvable_spec.rb +81 -0
  310. data/spec/unit/core/suitable_spec.rb +96 -0
  311. data/spec/unit/domain_spec.rb +310 -0
  312. data/spec/unit/ec2_spec.rb +187 -0
  313. data/spec/unit/facter_spec.rb +108 -0
  314. data/spec/unit/filesystems_spec.rb +50 -0
  315. data/spec/unit/hardwareisa_spec.rb +41 -0
  316. data/spec/unit/hardwaremodel_spec.rb +56 -0
  317. data/spec/unit/hostname_spec.rb +40 -0
  318. data/spec/unit/id_spec.rb +29 -0
  319. data/spec/unit/interfaces_spec.rb +57 -0
  320. data/spec/unit/ipaddress6_spec.rb +161 -0
  321. data/spec/unit/ipaddress_spec.rb +114 -0
  322. data/spec/unit/kernel_spec.rb +24 -0
  323. data/spec/unit/kernelmajversion_spec.rb +17 -0
  324. data/spec/unit/kernelrelease_spec.rb +53 -0
  325. data/spec/unit/kernelversion_spec.rb +32 -0
  326. data/spec/unit/ldom_spec.rb +74 -0
  327. data/spec/unit/lsbdistcodename_spec.rb +25 -0
  328. data/spec/unit/lsbdistdescription_spec.rb +25 -0
  329. data/spec/unit/lsbdistid_spec.rb +25 -0
  330. data/spec/unit/lsbdistrelease_spec.rb +25 -0
  331. data/spec/unit/lsbmajdistrelease_spec.rb +13 -0
  332. data/spec/unit/lsbrelease_spec.rb +25 -0
  333. data/spec/unit/macaddress_spec.rb +61 -0
  334. data/spec/unit/manufacturer_spec.rb +115 -0
  335. data/spec/unit/memory_spec.rb +539 -0
  336. data/spec/unit/netmask_spec.rb +95 -0
  337. data/spec/unit/operatingsystem_spec.rb +141 -0
  338. data/spec/unit/operatingsystemmajrelease_spec.rb +16 -0
  339. data/spec/unit/operatingsystemrelease_spec.rb +226 -0
  340. data/spec/unit/physicalprocessorcount_spec.rb +76 -0
  341. data/spec/unit/processor_spec.rb +393 -0
  342. data/spec/unit/ps_spec.rb +42 -0
  343. data/spec/unit/selinux_spec.rb +114 -0
  344. data/spec/unit/ssh_spec.rb +77 -0
  345. data/spec/unit/uniqueid_spec.rb +27 -0
  346. data/spec/unit/uptime_spec.rb +110 -0
  347. data/spec/unit/util/collection_spec.rb +258 -0
  348. data/spec/unit/util/config_spec.rb +84 -0
  349. data/spec/unit/util/confine_spec.rb +148 -0
  350. data/spec/unit/util/directory_loader_spec.rb +88 -0
  351. data/spec/unit/util/ec2_spec.rb +180 -0
  352. data/spec/unit/util/fact_spec.rb +142 -0
  353. data/spec/unit/util/file_read_spec.rb +29 -0
  354. data/spec/unit/util/ip/windows_spec.rb +80 -0
  355. data/spec/unit/util/ip_spec.rb +463 -0
  356. data/spec/unit/util/loader_spec.rb +286 -0
  357. data/spec/unit/util/macaddress_spec.rb +141 -0
  358. data/spec/unit/util/macosx_spec.rb +113 -0
  359. data/spec/unit/util/manufacturer_spec.rb +179 -0
  360. data/spec/unit/util/normalization_spec.rb +113 -0
  361. data/spec/unit/util/parser_spec.rb +200 -0
  362. data/spec/unit/util/processor_spec.rb +92 -0
  363. data/spec/unit/util/registry_spec.rb +76 -0
  364. data/spec/unit/util/resolution_spec.rb +129 -0
  365. data/spec/unit/util/solaris_zones_spec.rb +127 -0
  366. data/spec/unit/util/uptime_spec.rb +126 -0
  367. data/spec/unit/util/values_spec.rb +131 -0
  368. data/spec/unit/util/virtual_spec.rb +294 -0
  369. data/spec/unit/util/vlans_spec.rb +12 -0
  370. data/spec/unit/util/wmi_spec.rb +19 -0
  371. data/spec/unit/util/xendomains_spec.rb +21 -0
  372. data/spec/unit/version_spec.rb +42 -0
  373. data/spec/unit/virtual_spec.rb +470 -0
  374. data/spec/unit/zfs_version_spec.rb +75 -0
  375. data/spec/unit/zonename_spec.rb +14 -0
  376. data/spec/unit/zones_spec.rb +55 -0
  377. data/spec/unit/zpool_version_spec.rb +75 -0
  378. data/spec/watchr.rb +125 -0
  379. metadata +758 -0
@@ -0,0 +1,1534 @@
1
+ /* @(#) unistd.h $Date: 2008/08/13 14:45:21 $Revision: r11.31/2 PATCH_11.31 (B11.31.0903LR) */
2
+
3
+ /*
4
+ * (C) Copyright 1996-2008 Hewlett-Packard Development Company, L.P.
5
+ *
6
+ * BEGIN_DESC
7
+ *
8
+ * File:
9
+ * @(#) common/include/sys/unistd.h $Revision: $
10
+ *
11
+ * END_DESC
12
+ */
13
+
14
+ #ifndef _SYS_UNISTD_INCLUDED
15
+ #define _SYS_UNISTD_INCLUDED
16
+
17
+ #ifndef _SYS_STDSYMS_INCLUDED
18
+ # include <sys/stdsyms.h>
19
+ #endif /* _SYS_STDSYMS_INCLUDED */
20
+
21
+ # include <sys/_inttypes.h>
22
+
23
+ /* Types */
24
+
25
+ #ifdef _INCLUDE_POSIX_SOURCE
26
+ # ifndef NULL
27
+ # include <sys/_null.h>
28
+ # endif /* NULL */
29
+ #endif /* _INCLUDE_POSIX_SOURCE */
30
+
31
+ #if !defined(_INCLUDE_XOPEN_SOURCE) && !defined(_INCLUDE_XOPEN_SOURCE_EXTENDED)
32
+ /* The return value on failure of the sbrk(2) system call */
33
+ #define SBRK_FAILED (void *)-1L
34
+ #endif
35
+
36
+ /* HP-UX supports 64-bit files on 32-bit systems */
37
+ #define _LFS64_STDIO 1
38
+ #define _LFS64_ASYNCHRONOUS_IO 1
39
+ #define _LFS_ASYNCHRONOUS_IO 1
40
+ #define _LFS_LARGEFILE 1
41
+ #define _LFS64_LARGEFILE 1
42
+
43
+ #if defined(_INCLUDE_XOPEN_SOURCE_EXTENDED) || defined(_INCLUDE_POSIX_SOURCE)
44
+ # include <sys/types.h>
45
+ #endif /* _INCLUDE_XOPEN_SOURCE_EXTENDED || _INCLUDE_POSIX_SOURCE */
46
+
47
+ #ifdef _INCLUDE_HPUX_SOURCE
48
+ # ifdef _KERNEL
49
+ /* Structure for "utime" function moved to the unsupported section */
50
+ # else /* ! _KERNEL */
51
+ # include <utime.h>
52
+ # endif /* ! _KERNEL */
53
+ #endif /* _INCLUDE_HPUX_SOURCE */
54
+
55
+ /* Function prototypes */
56
+
57
+ #ifndef _KERNEL
58
+ #ifdef __cplusplus
59
+ extern "C" {
60
+ #endif /* __cplusplus */
61
+
62
+ #ifdef _INCLUDE_POSIX_SOURCE
63
+ #if defined(__ia64) && !defined(_LIBC)
64
+ /* pragmas needed to support -B protected */
65
+ #pragma extern _exit, access, chdir, chown, close, ctermid
66
+ #pragma extern dup, dup2, execl, execle, execlp, execv, execve, execvp
67
+ #pragma extern fpathconf, getcwd, getgroups, getlogin
68
+ #ifdef _INCLUDE_XOPEN_SOURCE_PRE_600
69
+ #pragma extern cuserid
70
+ #endif /* _INCLUDE_XOPEN_SOURCE_PRE_600 */
71
+ # ifdef _REENTRANT
72
+ # pragma extern getlogin_r
73
+ # endif /* _REENTRANT */
74
+ #pragma extern isatty, link
75
+ # if !defined(__cplusplus) || !defined(_APP32_64BIT_OFF_T)
76
+ # pragma extern lseek
77
+ # endif /* !__cplusplus || !_APP32_64BIT_OFF_T */
78
+ #pragma builtin read
79
+ #pragma extern pathconf, pause, pipe, read, rmdir, setgid, setpgid
80
+ #pragma extern setsid, setuid, sleep, sysconf, tcgetpgrp, tcsetpgrp
81
+ #pragma extern ttyname
82
+ # ifdef _REENTRANT
83
+ # pragma extern ttyname_r
84
+ # endif /* _REENTRANT */
85
+ #pragma builtin write
86
+ #pragma extern unlink, write, alarm, fork, getuid, geteuid, getgid
87
+ #pragma extern getegid, getpid, getpgrp, getppid
88
+ #endif /* __ia64 && ! _LIBC */
89
+
90
+ extern void _exit __((int));
91
+ extern int access __((const char *, int));
92
+ extern int chdir __((const char *));
93
+ extern int chown __((const char *, uid_t, gid_t));
94
+ extern int close __((int));
95
+ extern char *ctermid __((char *));
96
+ #ifdef _INCLUDE_XOPEN_SOURCE_PRE_600
97
+ extern char *cuserid __((char *));
98
+ #endif /* _INCLUDE_XOPEN_SOURCE_PRE_600 */
99
+ extern int dup __((int));
100
+ extern int dup2 __((int, int));
101
+ extern int execl __((const char *, const char *, ...));
102
+ extern int execle __((const char *, const char *, ...));
103
+ extern int execlp __((const char *, const char *, ...));
104
+ extern int execv __((const char *, char *const []));
105
+ extern int execve __((const char *, char *const [], char *const []));
106
+ extern int execvp __((const char *, char *const []));
107
+ extern long fpathconf __((int, int));
108
+ extern char *getcwd __((char *, __size_t));
109
+ extern int getgroups __((int, gid_t []));
110
+ extern char *getlogin __((void));
111
+ # ifdef _REENTRANT
112
+ # ifndef _PTHREADS_DRAFT4
113
+ extern int getlogin_r __((char *, __size_t));
114
+ # else /* _PTHREADS_DRAFT4 */
115
+ extern int getlogin_r __((char *, int));
116
+ # endif /* _PTHREADS_DRAFT4 */
117
+ # endif
118
+ extern int isatty __((int));
119
+ extern int link __((const char *, const char *));
120
+ # if !defined(__cplusplus) || !defined(_APP32_64BIT_OFF_T)
121
+ _LF_EXTERN off_t lseek __((int, off_t, int));
122
+ # endif /* !__cplusplus || !_APP32_64BIT_OFF_T */
123
+ extern long pathconf __((const char *, int));
124
+ extern int pause __((void));
125
+ extern int pipe __((int *));
126
+ extern ssize_t read __((int, void *, __size_t));
127
+ extern int rmdir __((const char *));
128
+ extern int setgid __((gid_t));
129
+ extern int setpgid __((pid_t, pid_t));
130
+ extern pid_t setsid __((void));
131
+ extern int setuid __((uid_t));
132
+ extern unsigned int sleep __((unsigned int));
133
+ extern long sysconf __((int));
134
+ extern pid_t tcgetpgrp __((int));
135
+ extern int tcsetpgrp __((int, pid_t));
136
+ extern char *ttyname __((int));
137
+ # ifdef _REENTRANT
138
+ # ifndef _PTHREADS_DRAFT4
139
+ extern int ttyname_r __((int, char *, __size_t));
140
+ # else /* _PTHREADS_DRAFT4 */
141
+ extern int ttyname_r __((int, char *, int));
142
+ # endif /* _PTHREADS_DRAFT4 */
143
+ # endif
144
+ extern int unlink __((const char *));
145
+ extern ssize_t write __((int, const void *, __size_t));
146
+
147
+ # ifdef _CLASSIC_POSIX_TYPES
148
+ unsigned long alarm();
149
+ extern int fork();
150
+ extern unsigned short getuid();
151
+ extern unsigned short geteuid();
152
+ extern unsigned short getgid();
153
+ extern unsigned short getegid();
154
+ extern int getpid();
155
+ extern int getpgrp();
156
+ extern int getppid();
157
+ # else
158
+ extern unsigned int alarm __((unsigned int));
159
+ extern pid_t fork __((void));
160
+ extern gid_t getegid __((void));
161
+ extern uid_t geteuid __((void));
162
+ extern gid_t getgid __((void));
163
+ extern pid_t getpgrp __((void));
164
+ extern pid_t getpid __((void));
165
+ extern pid_t getppid __((void));
166
+ extern uid_t getuid __((void));
167
+ # endif /* _CLASSIC_POSIX_TYPES */
168
+ #endif /* _INCLUDE_POSIX_SOURCE */
169
+
170
+
171
+ #ifdef _INCLUDE_POSIX2_SOURCE
172
+ #if defined(__ia64) && !defined(_LIBC)
173
+ /* pragmas needed to support -B protected */
174
+ # pragma extern optarg, opterr, optind, optopt, getopt, confstr
175
+ #endif /* __ia64 && ! _LIBC */
176
+
177
+ extern char *optarg;
178
+ extern int opterr;
179
+ extern int optind;
180
+ extern int optopt;
181
+ /* fnmatch() has moved to <fnmatch.h> */
182
+ extern int getopt __((int, char * const [], const char *));/* was <stdio.h> */
183
+ extern __size_t confstr __((int, char *, __size_t));
184
+ #endif /* _INCLUDE_POSIX2_SOURCE */
185
+
186
+ #ifdef _INCLUDE_POSIX1C_SOURCE
187
+ # if defined(__ia64) && !defined(_LIBC)
188
+ /* pragmas needed to support -B protected */
189
+ # pragma extern pthread_atfork
190
+ # endif /* __ia64 && ! _LIBC */
191
+ # ifdef _PROTOTYPES
192
+ extern int pthread_atfork(void (*)(void), void (*)(void),
193
+ void (*)(void));
194
+ # else /* not _PROTOTYPES */
195
+ extern int pthread_atfork();
196
+ # endif /* _PROTOTYPES */
197
+ #endif /* _INCLUDE_POSIX1C_SOURCE */
198
+
199
+
200
+ #ifdef _INCLUDE_XOPEN_SOURCE
201
+ # if defined(__ia64) && !defined(_LIBC)
202
+ # /* pragmas needed to support -B protected */
203
+ # pragma extern crypt, encrypt, fsync, nice
204
+ # ifdef _INCLUDE_XOPEN_SOURCE_PRE_600
205
+ # pragma extern chroot, getpass
206
+ # endif /* _INCLUDE_XOPEN_SOURCE_PRE_600 */
207
+ # if defined(_XPG3) || defined(_INCLUDE_HPUX_SOURCE) || defined(_SVID3)
208
+ # pragma extern rename
209
+ # endif /* _XPG3 || _INCLUDE_HPUX_SOURCE || _SVID3 */
210
+ # if !defined(_INCLUDE_AES_SOURCE) || defined(_INCLUDE_XOPEN_SOURCE_EXTENDED)
211
+ # ifdef _BIND_LIBCALLS
212
+ # pragma builtin_milli swab
213
+ # endif /* _BIND_LIBCALLS */
214
+ # pragma extern swab
215
+ # endif /* not _INCLUDE_AES_SOURCE || _INCLUDE_XOPEN_SOURCE_EXTENDED */
216
+ # endif /* __ia64 && ! _LIBC */
217
+
218
+ # ifdef _INCLUDE_XOPEN_SOURCE_PRE_600
219
+ extern int chroot __((const char *));
220
+ extern char *getpass __((const char *));
221
+ # endif /* _INCLUDE_XOPEN_SOURCE_PRE_600 */
222
+ extern char *crypt __((const char *, const char *));
223
+ extern void encrypt __((char [64], int));
224
+ extern int fsync __((int));
225
+ extern int nice __((int));
226
+ # if defined(_XPG3) || defined(_INCLUDE_HPUX_SOURCE) || defined(_SVID3)
227
+ # ifdef _NAMESPACE_STD
228
+ namespace std {
229
+ extern int rename __((const char *, const char *)); /* now in <stdio.h> */
230
+ }
231
+ using std::rename;
232
+ # else /* !_NAMESPACE_STD */
233
+ extern int rename __((const char *, const char *)); /* now in <stdio.h> */
234
+ # endif /* _NAMESPACE_STD */
235
+ # endif /* _XPG3 || _INCLUDE_HPUX_SOURCE || _SVID3 */
236
+ # if !defined(_INCLUDE_AES_SOURCE) || defined(_INCLUDE_XOPEN_SOURCE_EXTENDED)
237
+ extern void swab __((const void * __restrict, void * __restrict, ssize_t));
238
+ # endif /* not _INCLUDE_AES_SOURCE || _INCLUDE_XOPEN_SOURCE_EXTENDED */
239
+ #endif /* _INCLUDE_XOPEN_SOURCE */
240
+
241
+
242
+ #ifdef _INCLUDE_AES_SOURCE
243
+ # if !defined(_XPG4_EXTENDED) || defined(_INCLUDE_HPUX_SOURCE)
244
+ /* Exclude from CASPEC but keep in HPUX */
245
+ # if defined(__ia64) && !defined(_LIBC)
246
+ /* pragmas needed to support -B protected */
247
+ # pragma extern environ
248
+ # endif /* __ia64 && ! _LIBC */
249
+ extern char **environ;
250
+ # endif /* !_XPG4_EXTENDED || _INCLUDE_HPUX_SOURCE */
251
+
252
+ # if defined(__ia64) && !defined(_LIBC)
253
+ /* pragmas needed to support -B protected */
254
+ # pragma extern readlink, fchown, symlink
255
+ # endif /* __ia64 && ! _LIBC */
256
+
257
+ # ifdef _INCLUDE_XOPEN_SOURCE_EXTENDED
258
+ # ifdef _INCLUDE_XOPEN_SOURCE_PRE_600
259
+ extern int readlink __((const char *, char *, __size_t)); /*XPG4_EXT, HPUX*/
260
+ # else /* _INCLUDE_XOPEN_SOURCE_600 */
261
+ extern ssize_t readlink __((const char * __restrict, char * __restrict, __size_t)); /*Unix 2003, HPUX*/
262
+ # endif /* _INCLUDE_XOPEN_SOURCE_PRE_600 */
263
+ # else /* ! _INCLUDE_XOPEN_SOURCE_EXTENDED */
264
+ extern int readlink __((const char *, char *, int)); /* AES */
265
+ # endif /* _INCLUDE_XOPEN_SOURCE_EXTENDED */
266
+ extern int fchown __((int, uid_t, gid_t));
267
+ # if !defined(__cplusplus) || !defined(_APP32_64BIT_OFF_T)
268
+ # if defined(__ia64) && !defined(_LIBC)
269
+ /* pragmas needed to support -B protected */
270
+ # pragma extern ftruncate, truncate
271
+ # endif /* __ia64 && ! _LIBC */
272
+ _LF_EXTERN int ftruncate __((int, off_t));
273
+ _LF_EXTERN int truncate __((const char *, off_t));
274
+ # endif /* !__cplusplus || !_APP32_64BIT_OFF_T */
275
+ # if !defined(_XPG4_EXTENDED) || defined(_INCLUDE_HPUX_SOURCE)
276
+ /* Exclude from CASPEC but keep in HPUX */
277
+ # if defined(__ia64) && !defined(_LIBC)
278
+ /* pragmas needed to support -B protected */
279
+ # pragma extern setgroups
280
+ # endif /* __ia64 && ! _LIBC */
281
+ extern int setgroups __((int, gid_t []));
282
+ # endif /* !_XPG4_EXTENDED || _INCLUDE_HPUX_SOURCE */
283
+ extern int symlink __((const char *, const char *));
284
+ #endif /* _INCLUDE_AES_SOURCE */
285
+
286
+ #ifdef _INCLUDE_XOPEN_SOURCE_EXTENDED
287
+ # ifdef _XPG4_EXTENDED
288
+ # if defined(__ia64) && !defined(_LIBC)
289
+ /* pragmas needed to support -B protected */
290
+ # pragma extern setpgrp
291
+ # endif /* __ia64 && ! _LIBC */
292
+ extern pid_t setpgrp __((void));
293
+ # else /* !_XPG4_EXTENDED */
294
+ # ifndef _SVID3
295
+ # if defined(__ia64) && !defined(_LIBC)
296
+ /* pragmas needed to support -B protected */
297
+ # pragma extern setpgrp
298
+ # endif /* __ia64 && ! _LIBC */
299
+
300
+ # ifdef _CLASSIC_ID_TYPES
301
+ extern int setpgrp();
302
+ # else /* ! _CLASSIC_ID_TYPES */
303
+ extern pid_t setpgrp __((void));
304
+ # endif /* _CLASSIC_ID_TYPES */
305
+ # endif /* ! _SVID3 */
306
+ # endif /* _XPG4_EXTENDED */
307
+
308
+ #if defined(__ia64) && !defined(_LIBC)
309
+ /* pragmas needed to support -B protected */
310
+ # pragma extern vfork
311
+ #endif /* __ia64 && ! _LIBC */
312
+ # ifdef _CLASSIC_ID_TYPES
313
+ extern int vfork();
314
+ # else /* not _CLASSIC_ID_TYPES */
315
+ extern pid_t vfork __((void));
316
+ # endif /* not _CLASSIC_ID_TYPES */
317
+
318
+ # if defined(_XPG4_EXTENDED) && !defined(_INCLUDE_HPUX_SOURCE)
319
+ /* For CASPEC, look in stdlib.h for the _XPG4_EXTENDED definition */
320
+ /* But for _INCLUDE_HPUX_SOURCE, maintain definitions here */
321
+ # else /* !_XPG4_EXTENDED || _INCLUDE_HPUX_SOURCE*/
322
+ # ifndef _MKTEMP_DEFINED
323
+ # define _MKTEMP_DEFINED
324
+ # if defined(__ia64) && !defined(_LIBC)
325
+ /* pragmas needed to support -B protected */
326
+ # pragma extern mkstemp, mktemp, ttyslot
327
+ # endif /* __ia64 && ! _LIBC */
328
+ extern int mkstemp __((char *));
329
+ extern char *mktemp __((char *));
330
+ extern int ttyslot __((void));
331
+ # endif /*_MKTEMP_DEFINED */
332
+ # endif /* _XPG4_EXTENDED && !_INCLUDE_HPUX_SOURCE */
333
+
334
+ #if defined(__ia64) && !defined(_LIBC)
335
+ /* pragmas needed to support -B protected */
336
+ # pragma extern fchdir, gethostid, gethostname
337
+ # pragma extern getpgid, getsid, getwd
338
+ # if !defined(__cplusplus) || !defined(_APP32_64BIT_OFF_T)
339
+ # pragma extern lockf
340
+ # endif /* !__cplusplus || !_APP32_64BIT_OFF_T */
341
+ # pragma extern lchown, setregid, setreuid, sync
342
+ # pragma extern ualarm, usleep
343
+ # ifdef _INCLUDE_XOPEN_SOURCE_PRE_600
344
+ # pragma extern brk, sbrk, getdtablesize, getpagesize
345
+ # endif /* _INCLUD_XOPEN_SOURCE_PRE_600 */
346
+ #endif /* __ia64 && ! _LIBC */
347
+
348
+ #ifdef _INCLUDE_XOPEN_SOURCE_PRE_600
349
+ extern int brk __((void *));
350
+ extern int getdtablesize __((void));
351
+ extern int getpagesize __((void));
352
+ #endif /* _INCLUDE_XOPEN_SOURCE_PRE_600 */
353
+ extern int fchdir __((int));
354
+ # ifdef _XPG4_EXTENDED
355
+ extern long gethostid __((void));
356
+ # else /* !_XPG4_EXTENDED */
357
+ extern int gethostid __((void));
358
+ # endif /* _XPG4_EXTENDED */
359
+ extern int gethostname __((char *, __size_t));
360
+ extern pid_t getpgid __((pid_t));
361
+ extern pid_t getsid __((pid_t));
362
+ extern char *getwd __((char *));
363
+ # if !defined(__cplusplus) || !defined(_APP32_64BIT_OFF_T)
364
+ _LF_EXTERN int lockf __((int, int, off_t));
365
+ # endif /* !__cplusplus || !_APP32_64BIT_OFF_T */
366
+ extern int lchown __((const char *, uid_t, gid_t));
367
+ # ifdef _INCLUDE_XOPEN_SOURCE_PRE_600
368
+ # ifdef _CLASSIC_XOPEN_TYPES
369
+ extern char *sbrk __((int));
370
+ # else /* not _CLASSIC_XOPEN_TYPES */
371
+ # ifdef _INCLUDE_XOPEN_SOURCE_PRE_500
372
+ extern void *sbrk __((int));
373
+ # else /* _INCLUDE_XOPEN_SOURCE_500 */
374
+ extern void *sbrk __((intptr_t));
375
+ # endif /* _INCLUDE_XOPEN_SOURCE_PRE_500 */
376
+ # endif /* not _CLASSIC_XOPEN_TYPES */
377
+ # endif /* _INCLUDE_XOPEN_SOURCE_PRE_600 */
378
+ extern int setregid __((gid_t, gid_t));
379
+ extern int setreuid __((uid_t, uid_t));
380
+ extern void sync __((void));
381
+ # ifdef _XPG4_EXTENDED
382
+ extern useconds_t ualarm __((useconds_t, useconds_t));
383
+ extern int usleep __((useconds_t));
384
+ # else /* !_XPG4_EXTENDED */
385
+ extern unsigned int ualarm __((unsigned int, unsigned int));
386
+ extern int usleep __((unsigned int));
387
+ # endif /* _XPG4_EXTENDED */
388
+ #endif /* _INCLUDE_XOPEN_SOURCE_EXTENDED */
389
+
390
+ #if defined(_INCLUDE_XOPEN_SOURCE_500)
391
+ # if defined(__ia64) && !defined(_LIBC)
392
+ /* pragmas needed to support -B protected */
393
+ # pragma extern fdatasync
394
+ # if !defined(_APP32_64BIT_OFF_T)
395
+ # pragma extern pread, pwrite
396
+ # endif /* !_APP32_64BIT_OFF_T */
397
+ # endif /* __ia64 && ! _LIBC */
398
+ # if !defined(__cplusplus) || !defined(_APP32_64BIT_OFF_T)
399
+ _LF_EXTERN ssize_t pread __((int, void *, size_t, off_t));
400
+ _LF_EXTERN ssize_t pwrite __((int, const void *, size_t, off_t));
401
+ # endif /* !__cplusplus || !_APP32_64BIT_OFF_T */
402
+ extern int fdatasync __((int));
403
+ # if defined(_LARGEFILE64_SOURCE)
404
+ # ifdef __LP64__
405
+ # define pread64 pread
406
+ # define pwrite64 pwrite
407
+ # else /* __LP64__ */
408
+ # if defined(__ia64) && !defined(_LIBC)
409
+ /* pragmas needed to support -B protected */
410
+ # pragma extern pread64, pwrite64
411
+ # endif /* __ia64 && ! _LIBC */
412
+ extern ssize_t pread64 __((int, void *, size_t, off64_t));
413
+ extern ssize_t pwrite64 __((int, const void *, size_t, off64_t));
414
+ # endif /* __LP64__ */
415
+ # endif /* _LARGEFILE64_SOURCE */
416
+ #endif /* _INCLUDE_XOPEN_SOURCE_500 */
417
+
418
+
419
+ #ifdef _INCLUDE_XOPEN_SOURCE_600
420
+ # if defined(__ia64) && !defined(_LIBC)
421
+ /* pragmas needed to support -B protected */
422
+ # pragma extern setegid, seteuid
423
+ # endif /* __ia64 && ! _LIBC */
424
+ extern int setegid __((gid_t));
425
+ extern int seteuid __((uid_t));
426
+ #endif /* _INCLUDE_XOPEN_SOURCE_600 */
427
+
428
+
429
+ #ifdef _INCLUDE_HPUX_SOURCE
430
+ # if defined(__ia64) && !defined(_LIBC)
431
+ /* pragmas needed to support -B protected */
432
+ # pragma extern endusershell, fsctl, getcdf, gethcwd, getpgrp2
433
+ # pragma extern getusershell, getresgid, getresuid, hidecdf, initgroups
434
+ # ifndef _XPG4_EXTENDED
435
+ # pragma extern ioctl
436
+ # endif /* !_XPG4_EXTENDED */
437
+ # pragma extern logname, lsync
438
+ # if !defined(__cplusplus) || !defined(_APP32_64BIT_OFF_T)
439
+ # pragma extern prealloc
440
+ # endif /* !__cplusplus || !_APP32_64BIT_OFF_T */
441
+ # pragma extern sethostname, setpgrp2, setresgid, setresuid
442
+ # pragma extern setusershell, sgetl, sputl, swapon, swapoff, ttyname
443
+ # ifndef __STDC_32_MODE__
444
+ # pragma extern __sysconfx
445
+ # endif /* __STDC_32_MODE__ */
446
+ # ifdef _REENTRANT
447
+ # ifndef _PTHREADS_DRAFT4
448
+ # pragma extern ttyname_r
449
+ # else
450
+ # pragma extern ttyname_r, endusershell_r, getusershell_r
451
+ # pragma extern setusershell_r
452
+ # endif /* _PTHREADS_DRAFT4 */
453
+ # endif /* _REENTRANT */
454
+ # pragma extern set_userthreadid
455
+ # endif /* __ia64 && ! _LIBC */
456
+
457
+ extern void endusershell __((void));
458
+ extern int fsctl __((int, int, void *, __size_t));
459
+ extern char *getcdf __((const char *, char *, __size_t));
460
+ extern char *gethcwd __((char *, __size_t));
461
+ extern int getpgrp2 __((pid_t));
462
+ extern char *getusershell __((void));
463
+ extern int getresgid __((gid_t *, gid_t *, gid_t *));
464
+ extern int getresuid __((uid_t *, uid_t *, uid_t *));
465
+ extern char *hidecdf __((const char *, char *, __size_t));
466
+ extern int initgroups __((const char *, gid_t));
467
+ # ifndef _XPG4_EXTENDED
468
+ extern int ioctl __((int, int, ...));
469
+ # endif /* !_XPG4_EXTENDED */
470
+ extern char *logname __((void));
471
+ extern void lsync __((void));
472
+ # if !defined(__cplusplus) || !defined(_APP32_64BIT_OFF_T)
473
+ _LF_EXTERN int prealloc __((int, off_t));
474
+ # endif /* !__cplusplus || !_APP32_64BIT_OFF_T */
475
+ extern int sethostname __((const char *, __size_t));
476
+ extern int setpgrp2 __((pid_t, pid_t));
477
+ extern int setresgid __((gid_t, gid_t, gid_t));
478
+ extern int setresuid __((uid_t, uid_t, uid_t));
479
+ extern void setusershell __((void));
480
+ extern long sgetl __((const char *));
481
+ extern void sputl __((long, char *));
482
+ extern int swapon __((const char *, ...));
483
+ extern int swapoff __((const char *, int));
484
+ extern char *ttyname __((int));
485
+ #ifndef __STDC_32_MODE__
486
+ extern int64_t __sysconfx __((int, int));
487
+ #endif /* __STDC_32_MODE__ */
488
+ # ifdef _REENTRANT
489
+ # ifndef _PTHREADS_DRAFT4
490
+ extern int ttyname_r __((int, char *, __size_t));
491
+ # else /* _PTHREADS_DRAFT4 */
492
+ extern int ttyname_r __((int, char *, int));
493
+ extern void endusershell_r __((char **));
494
+ extern char *getusershell_r __((char **));
495
+ extern void setusershell_r __((char **));
496
+ # endif /* _PTHREADS_DRAFT4 */
497
+ # endif
498
+ extern int set_userthreadid __((int));
499
+
500
+ #if defined(__ia64) && !defined(_LIBC)
501
+ /* pragmas needed to support -B protected */
502
+ # ifdef _SVID3
503
+ # pragma extern gettxt
504
+ # else
505
+ # pragma extern setpgrp3
506
+ # endif /* _SVID3 */
507
+ #endif /* __ia64 && ! _LIBC */
508
+
509
+ # ifdef _CLASSIC_ID_TYPES
510
+ # ifdef _SVID3
511
+ extern char *gettxt();
512
+ # endif /* _SVID3 */
513
+ # ifndef _SVID3
514
+ extern int setpgrp3();
515
+ # endif /* _SVID3 */
516
+ # else /* not _CLASSIC_ID_TYPES */
517
+ # ifdef _SVID3
518
+ extern char *gettxt __((const char *, const char *));
519
+ # endif /* _SVID3 */
520
+ # ifndef _SVID3
521
+ extern pid_t setpgrp3 __((void));
522
+ # endif /* _SVID3 */
523
+ # endif /* not _CLASSIC_ID_TYPES */
524
+ #endif /* _INCLUDE_HPUX_SOURCE */
525
+
526
+ # if defined(_LARGEFILE64_SOURCE)
527
+ # ifdef __LP64__
528
+ # define prealloc64 prealloc
529
+ # define lockf64 lockf
530
+ # define truncate64 truncate
531
+ # define ftruncate64 ftruncate
532
+ # define lseek64 lseek
533
+ # else /* __LP64__ */
534
+ # if defined(__ia64) && !defined(_LIBC)
535
+ /* pragmas needed to support -B protected */
536
+ # pragma extern prealloc64, lockf64, truncate64, ftruncate64
537
+ # pragma extern lseek64
538
+ # endif /* __ia64 && ! _LIBC */
539
+ extern int prealloc64 __((int, off64_t));
540
+ extern int lockf64 __((int, int, off64_t));
541
+ extern int truncate64 __((const char *, off64_t));
542
+ extern int ftruncate64 __((int, off64_t));
543
+ extern off64_t lseek64 __((int, off64_t, int));
544
+ # endif /* __LP64 */
545
+ # endif /* _LARGEFILE64_SOURCE */
546
+
547
+ # ifdef _APP32_64BIT_OFF_T
548
+ # if defined(__ia64) && !defined(_LIBC)
549
+ /* pragmas needed to support -B protected */
550
+ # pragma extern __prealloc64, __lockf64, __truncate64, __ftruncate64
551
+ # pragma extern __lseek64, __pread64, __pwrite64
552
+ # endif /* __ia64 && ! _LIBC */
553
+ extern int __prealloc64 __((int, off_t));
554
+ extern int __lockf64 __((int, int, off_t));
555
+ extern int __truncate64 __((const char *, off_t));
556
+ extern int __ftruncate64 __((int, off_t));
557
+ extern off64_t __lseek64 __((int, off_t, int));
558
+ extern ssize_t __pread64 __((int, void *, size_t, off64_t));
559
+ extern ssize_t __pwrite64 __((int, const void *, size_t, off64_t));
560
+ # ifndef __cplusplus
561
+ static int truncate(a,b) __const char *a; off_t b; { return __truncate64(a,b); }
562
+ static int prealloc(a,b) int a; off_t b; { return __prealloc64(a,b); }
563
+ static int lockf(a,b,c) int a, b; off_t c; { return __lockf64(a,b,c); }
564
+ static int ftruncate(a,b) int a; off_t b; { return __ftruncate64(a,b); }
565
+ static off_t lseek(a,b,c) int a, c; off_t b; { return __lseek64(a,b,c); }
566
+ static ssize_t pread(a,b,c,d) int a; void *b; size_t c; off64_t d;
567
+ { return __pread64(a,b,c,d); }
568
+ static ssize_t pwrite(a,b,c,d) int a; const void *b; size_t c; off64_t d;
569
+ { return __pwrite64(a,b,c,d); }
570
+ # endif /* __cplusplus */
571
+ # endif /* _APP32_64BIT_OFF_T */
572
+
573
+ #ifdef __cplusplus
574
+ }
575
+ #endif /* __cplusplus */
576
+
577
+ #if defined(__cplusplus) && defined(_APP32_64BIT_OFF_T)
578
+ inline int prealloc __((int, off_t));
579
+ inline off_t lseek __((int, off_t, int));
580
+ inline int ftruncate __((int, off_t));
581
+ inline int truncate __((const char *, off_t));
582
+ inline int lockf __((int, int, off_t));
583
+ inline ssize_t pread __((int, void *, size_t, off64_t));
584
+ inline ssize_t pwrite __((int, const void *, size_t, off64_t));
585
+
586
+ inline int truncate(const char *a, off_t b) { return __truncate64(a,b); }
587
+ inline int prealloc(int a, off_t b) { return __prealloc64(a,b); }
588
+ inline int lockf(int a, int b, off_t c) { return __lockf64(a,b,c); }
589
+ inline int ftruncate(int a, off_t b) { return __ftruncate64(a,b); }
590
+ inline off_t lseek(int a, off_t b, int c) { return __lseek64(a,b,c); }
591
+ inline ssize_t pread(int a, void *b, size_t c, off64_t d)
592
+ { return __pread64(a,b,c,d); }
593
+ inline ssize_t pwrite(int a, const void *b, size_t c, off64_t d)
594
+ { return __pwrite64(a,b,c,d); }
595
+ # endif /* __cplusplus && _APP32_64BIT_OFF_T */
596
+
597
+ #endif /* not _KERNEL */
598
+
599
+
600
+ /* Symbolic constants */
601
+
602
+ #if defined(_INCLUDE_POSIX_SOURCE) || defined(_INCLUDE_POSIX2_SOURCE)
603
+
604
+ /* Symbolic constants for the access() function */
605
+ /* These must match the values found in <sys/file.h> */
606
+ # ifndef R_OK
607
+ # define R_OK 4 /* Test for read permission */
608
+ # define W_OK 2 /* Test for write permission */
609
+ # define X_OK 1 /* Test for execute (search) permission */
610
+ # define F_OK 0 /* Test for existence of file */
611
+ # endif /* R_OK */
612
+
613
+ /* Symbolic constants for the lseek() function */
614
+ # ifndef SEEK_SET
615
+ # define SEEK_SET 0 /* Set file pointer to "offset" */
616
+ # define SEEK_CUR 1 /* Set file pointer to current plus "offset" */
617
+ # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
618
+ # endif /* SEEK_SET */
619
+
620
+ /* Versions of POSIX.1 we support */
621
+ # define _POSIX1_VERSION_88 198808L /* We support POSIX.1-1988 */
622
+ # define _POSIX1_VERSION_90 199009L /* We support POSIX.1-1990 */
623
+ # define _POSIX1_VERSION_93 199309L /* We support POSIX.1b-1993 */
624
+ # define _POSIX1_VERSION_95 199506L /* We support POSIX.1-1995 */
625
+ # define _POSIX1_VERSION_01 200112L /* We support POSIX.1-2001 */
626
+
627
+ # ifdef _POSIX1_1988
628
+ # define _POSIX_VERSION _POSIX1_VERSION_88
629
+ # else /* not _POSIX1_1988 */
630
+ # if !defined(_POSIX_C_SOURCE) || (_POSIX_C_SOURCE < 199309L)
631
+ # define _POSIX_VERSION _POSIX1_VERSION_90
632
+ # else /* _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 199309L */
633
+ # if _POSIX_C_SOURCE < 199506L
634
+ # define _POSIX_VERSION _POSIX1_VERSION_93
635
+ # else /* _POSIX_C_SOURCE >= 199506L */
636
+ # if _POSIX_C_SOURCE < 200112L
637
+ # define _POSIX_VERSION _POSIX1_VERSION_95
638
+ # else /* _POSIX_C_SOURCE >= 200112L */
639
+ # define _POSIX_VERSION _POSIX1_VERSION_01
640
+ # endif /* _POSIX_C_SOURCE < 200112L */
641
+ # endif /* _POSIX_C_SOURCE < 199506L */
642
+ # endif /* _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 199309L */
643
+ # endif /* not _POSIX1_1988 */
644
+
645
+ # define STDIN_FILENO 0
646
+ # define STDOUT_FILENO 1
647
+ # define STDERR_FILENO 2
648
+
649
+ /* Compile-time symbolic constants */
650
+ # define _POSIX_SAVED_IDS 1 /* If defined, each process has a
651
+ * saved set-user-ID and a saved
652
+ * set_group-ID
653
+ */
654
+ # define _POSIX_JOB_CONTROL 2 /* If defined, it indicates that
655
+ the implementation supports job
656
+ control */
657
+ # define _POSIX_VDISABLE 0xff /* Character which disables local
658
+ TTY control character functions */
659
+ /* All the following macros are defined as 1 for Unix95 environment and 200112 for others */
660
+ #if defined(_INCLUDE_XOPEN_SOURCE_600)
661
+ # define _POSIX_PRIORITY_SCHEDULING 200112L /* If defined, POSIX.1b Priority
662
+ Scheduler extensions are
663
+ supported */
664
+ # define _POSIX_TIMERS 200112L /* If defined, POSIX.1b Clocks & Timers
665
+ extensions are supported */
666
+ # define _POSIX_SEMAPHORES 200112L /* If defined, POSIX.1b Semaphores
667
+ are supported */
668
+ # define _POSIX_SYNCHRONIZED_IO 200112L /* If defined, POSIX.1b Synchronized
669
+ IO option is supported */
670
+ # define _POSIX_FSYNC 200112L /* If defined, POSIX.1b File
671
+ Synchronization option is
672
+ supported. Must be defined if
673
+ _POSIX_SYNCHRONIZED_IO is */
674
+ # define _POSIX_ASYNCHRONOUS_IO 200112L /* If defined, POSIX.1b Asynchronous
675
+ IO option is supported */
676
+ # define _POSIX_MEMLOCK 200112L /* If defined, POSIX.1b mlockall and
677
+ munlockall are supported */
678
+ # define _POSIX_MEMLOCK_RANGE 200112L /* If defined, POSIX.1b mlock and
679
+ munlock are supported */
680
+ # define _POSIX_SHARED_MEMORY_OBJECTS 200112L /* If defined, POSIX.1b shm_open and
681
+ shm_unlink are supported */
682
+ # define _POSIX_REALTIME_SIGNALS 200112L /* If defined, POSIX.1b Realtime
683
+ Signals extension option
684
+ is supported */
685
+ # define _POSIX_MESSAGE_PASSING 200112L /* if defined, POSIX.1b Message Passing
686
+ extensions are supported */
687
+
688
+ # define _POSIX_THREAD_ATTR_STACKADDR 200112L /* if defined, thread stack address
689
+ attribute option is supported */
690
+ # define _POSIX_THREAD_ATTR_STACKSIZE 200112L /* if defined, thread stack size
691
+ attribute option is supported */
692
+ # define _POSIX_THREAD_PROCESS_SHARED 200112L /* if defined, process-shared
693
+ synchronization is supported */
694
+ # define _POSIX_THREAD_SAFE_FUNCTIONS 200112L /* if defined, thread-safe
695
+ functions are supported */
696
+ # define _POSIX_THREADS 200112L /* Base pthread functions are supported */
697
+
698
+ # define _POSIX_BARRIERS -1
699
+ # define _POSIX_CLOCK_SELECTION -1
700
+ # define _POSIX_IPV6 200112L
701
+ # define _POSIX_MONOTONIC_CLOCK -1
702
+ # define _POSIX_RAW_SOCKETS -1
703
+ # define _POSIX_READER_WRITER_LOCKS 200112L
704
+ # define _POSIX_SPAWN -1
705
+ # define _POSIX_SPIN_LOCKS -1
706
+ # define _POSIX_TIMEOUTS -1
707
+
708
+ # define _POSIX_ADVISORY_INFO -1
709
+ # define _POSIX_CPUTIME -1
710
+ # define _POSIX_THREAD_CPUTIME -1
711
+ # define _POSIX_MAPPED_FILES 200112L
712
+ # define _POSIX_MEMORY_PROTECTION 200112L
713
+ # define _POSIX_TYPED_MEMORY_OBJECTS -1
714
+
715
+ # define _POSIX_PRIORITIZED_IO -1
716
+ # define _POSIX_SPORADIC_SERVER -1
717
+ # define _POSIX_THREAD_PRIO_PROTECT -1
718
+ # define _POSIX_THREAD_PRIO_INHERIT -1
719
+ # define _POSIX_THREAD_SPORADIC_SERVER -1
720
+
721
+ /* Constants for tracing option */
722
+ # define _POSIX_TRACE -1
723
+ # define _POSIX_TRACE_EVENT_FILTER -1
724
+ # define _POSIX_TRACE_INHERIT -1
725
+ # define _POSIX_TRACE_LOG -1
726
+
727
+ /* Constants for the Batch Environment Services and Utilities option */
728
+ # define _POSIX2_PBS -1
729
+ # define _POSIX2_PBS_ACCOUNTING -1
730
+ # define _POSIX2_PBS_CHECKPOINT -1
731
+ # define _POSIX2_PBS_LOCATE -1
732
+ # define _POSIX2_PBS_MESSAGE -1
733
+ # define _POSIX2_PBS_TRACK -1
734
+
735
+ # define _POSIX_REGEXP 1 /* Supports POSIX Regular Expressions */
736
+ # define _POSIX_SHELL 1 /* Supports POSIX shell */
737
+
738
+ #else
739
+
740
+ # define _POSIX_PRIORITY_SCHEDULING 1 /* If defined, POSIX.1b Priority
741
+ Scheduler extensions are
742
+ supported */
743
+ # define _POSIX_TIMERS 1 /* If defined, POSIX.1b Clocks & Timers
744
+ extensions are supported */
745
+ # define _POSIX_SEMAPHORES 1 /* If defined, POSIX.1b Semaphores
746
+ are supported */
747
+ # define _POSIX_SYNCHRONIZED_IO 1 /* If defined, POSIX.1b Synchronized
748
+ IO option is supported */
749
+ # define _POSIX_FSYNC 1 /* If defined, POSIX.1b File
750
+ Synchronization option is
751
+ supported. Must be defined if
752
+ _POSIX_SYNCHRONIZED_IO is */
753
+ # define _POSIX_ASYNCHRONOUS_IO 1 /* If defined, POSIX.1b Asynchronous
754
+ IO option is supported */
755
+ # define _POSIX_MEMLOCK 1 /* If defined, POSIX.1b mlockall and
756
+ munlockall are supported */
757
+ # define _POSIX_MEMLOCK_RANGE 1 /* If defined, POSIX.1b mlock and
758
+ munlock are supported */
759
+ # define _POSIX_SHARED_MEMORY_OBJECTS 1 /* If defined, POSIX.1b shm_open and
760
+ shm_unlink are supported */
761
+ # define _POSIX_REALTIME_SIGNALS 1 /* If defined, POSIX.1b Realtime
762
+ Signals extension option
763
+ is supported */
764
+ # define _POSIX_MESSAGE_PASSING 1 /* if defined, POSIX.1b Message Passing
765
+ extensions are supported */
766
+
767
+ /* Added for POSIX.1c (threads extensions) */
768
+ # define _POSIX_THREAD_ATTR_STACKADDR 1 /* if defined, thread stack address
769
+ attribute option is supported */
770
+ # define _POSIX_THREAD_ATTR_STACKSIZE 1 /* if defined, thread stack size
771
+ attribute option is supported */
772
+ # define _POSIX_THREAD_PROCESS_SHARED 1 /* if defined, process-shared
773
+ synchronization is supported */
774
+ # define _POSIX_THREAD_SAFE_FUNCTIONS 1 /* if defined, thread-safe
775
+ functions are supported */
776
+ # define _POSIX_THREADS 1 /* Base pthread functions are supported */
777
+
778
+ #endif
779
+
780
+ # ifdef _INCLUDE_XOPEN_SOURCE_PRE_600
781
+ # define _POSIX_THREAD_PRIORITY_SCHEDULING 1 /* thread execution
782
+ scheduling is supported */
783
+ # else
784
+ # define _POSIX_THREAD_PRIORITY_SCHEDULING -1
785
+ # endif /*_INCLUDE_XOPEN_SOURCE_PRE_600 */
786
+
787
+ /* _POSIX_CHOWN_RESTRICTED, _POSIX_NO_TRUNC and _POSIX_SYNC_IO are not
788
+ * defined here since they are pathname-dependent. Use the pathconf() or
789
+ * fpathconf() functions to query for these values.
790
+ */
791
+
792
+
793
+ /* Symbolic constants for sysconf() variables defined by POSIX.1-1988: 0-7 */
794
+
795
+ # define _SC_ARG_MAX 0 /* ARG_MAX: Max length of argument to exec()
796
+ including environment data */
797
+ # define _SC_CHILD_MAX 1 /* CHILD_MAX: Max # of processes per userid */
798
+ # define _SC_CLK_TCK 2 /* Number of clock ticks per second */
799
+ # define _SC_NGROUPS_MAX 3 /* NGROUPS_MAX: Max # of simultaneous
800
+ supplementary group IDs per process */
801
+ # define _SC_OPEN_MAX 4 /* OPEN_MAX: Max # of files that one process
802
+ can have open at any one time */
803
+ # define _SC_JOB_CONTROL 5 /* _POSIX_JOB_CONTROL: 1 iff supported */
804
+ # define _SC_SAVED_IDS 6 /* _POSIX_SAVED_IDS: 1 iff supported */
805
+ # define _SC_1_VERSION_88 7 /* _POSIX_VERSION: Date of POSIX.1-1988 */
806
+
807
+ /* Symbolic constants for sysconf() variables added by POSIX.1-1990: 100-199 */
808
+
809
+ # define _SC_STREAM_MAX 100 /* STREAM_MAX: Max # of open stdio FILEs */
810
+ # define _SC_TZNAME_MAX 101 /* TZNAME_MAX: Max length of timezone name */
811
+ # define _SC_1_VERSION_90 102 /* _POSIX_VERSION: Date of POSIX.1-1990 */
812
+ # define _SC_1_VERSION_93 103 /* _POSIX_VERSION: Date of POSIX.1b-1993 */
813
+ # define _SC_1_VERSION_95 104
814
+ # define _SC_1_VERSION_01 105
815
+
816
+ /* Pick appropriate value for _SC_VERSION symbolic constant */
817
+
818
+ # if (_POSIX_VERSION == _POSIX1_VERSION_88)
819
+ # define _SC_VERSION _SC_1_VERSION_88
820
+ # else
821
+ # if (_POSIX_VERSION == _POSIX1_VERSION_90)
822
+ # define _SC_VERSION _SC_1_VERSION_90
823
+ # else
824
+ # if (_POSIX_VERSION == _POSIX1_VERSION_93)
825
+ # define _SC_VERSION _SC_1_VERSION_93
826
+ # else
827
+ # if (_POSIX_VERSION == _POSIX1_VERSION_95)
828
+ # define _SC_VERSION _SC_1_VERSION_95
829
+ # else
830
+ # define _SC_VERSION _SC_1_VERSION_01
831
+ # endif
832
+ # endif
833
+ # endif
834
+ # endif
835
+
836
+ /* Symbolic constants for sysconf() variables added by POSIX.2: 200-299 */
837
+
838
+ # define _SC_BC_BASE_MAX 200 /* largest ibase & obase for bc */
839
+ # define _SC_BC_DIM_MAX 201 /* max array elements for bc */
840
+ # define _SC_BC_SCALE_MAX 202 /* max scale value for bc */
841
+ # define _SC_EXPR_NEST_MAX 204 /* max nesting of (...) for expr */
842
+ # define _SC_LINE_MAX 205 /* max length in bytes of input line */
843
+ # define _SC_RE_DUP_MAX 207 /* max regular expressions permitted */
844
+ # define _SC_2_VERSION 211 /* Current version of POSIX.2 */
845
+ # define _SC_2_C_BIND 212 /* C Language Bindings Option */
846
+ # define _SC_2_C_DEV 213 /* C Development Utilities Option */
847
+ # define _SC_2_FORT_DEV 214 /* FORTRAN Dev. Utilities Option */
848
+ # define _SC_2_SW_DEV 215 /* Software Dev. Utilities Option */
849
+ # define _SC_2_C_VERSION 216 /* version of POSIX.2 CLB supported */
850
+ # define _SC_2_CHAR_TERM 217 /* termianls exist where vi works */
851
+ # define _SC_2_FORT_RUN 218 /* FORTRAN Runtime Utilities Option */
852
+ # define _SC_2_LOCALEDEF 219 /* localedef(1M) can create locales */
853
+ # define _SC_2_UPE 220 /* User Portability Utilities Option */
854
+ # define _SC_BC_STRING_MAX 221 /* max scale value for bc */
855
+ # define _SC_COLL_WEIGHTS_MAX 222 /* max collation weights in locale */
856
+
857
+ /* The following are obsolete and will be removed in a future release */
858
+ # define _SC_COLL_ELEM_MAX 203 /* max bytes in collation element */
859
+ # define _SC_PASTE_FILES_MAX 206 /* max file operands for paste */
860
+ # define _SC_SED_PATTERN_MAX 208 /* max bytes of pattern space for sed */
861
+ # define _SC_SENDTO_MAX 209 /* max bytes of message for sendto */
862
+ # define _SC_SORT_LINE_MAX 210 /* max bytes of input line for sort */
863
+
864
+ /* Symbolic constants for sysconf() variables added by POSIX.4: 400-499 */
865
+ # define _SC_TIMER_MAX 400 /* max number of timers per process */
866
+ # define _SC_FSYNC 401 /* yes: POSIX.1b File Synchronization */
867
+ # define _SC_SYNCHRONIZED_IO 402 /* yes: POSIX.1b Synchronized IO */
868
+ # define _SC_PRIORITY_SCHEDULING 403 /* Priority scheduling supported */
869
+ # define _SC_TIMERS 404 /* POSIX.1b Clocks and Timers supported*/
870
+ # define _SC_DELAYTIMER_MAX 405 /* max timer overrun count */
871
+ /* these following POSIX.4 constants represent unsupported functionality */
872
+ # define _SC_ASYNCHRONOUS_IO 406 /* POSIX.1b asynchronous I/O supported */
873
+ # define _SC_MAPPED_FILES 407 /* POSIX.1b mapped files supported */
874
+ # define _SC_MEMLOCK 408 /* POSIX.1b memory locking supported */
875
+ # define _SC_MEMLOCK_RANGE 409 /* POSIX.1b memory range locking */
876
+ # define _SC_MEMORY_PROTECTION 410 /* POSIX.1b memory protection supported*/
877
+ # define _SC_MESSAGE_PASSING 411 /* POSIX.1b message queues supported */
878
+ # define _SC_PRIORITIZED_IO 412 /* POSIX.1b prioritized I/O supported */
879
+ # define _SC_REALTIME_SIGNALS 413 /* POSIX.1b realtime signals supported */
880
+ # define _SC_SEMAPHORES 414 /* POSIX.1b semaphores supported */
881
+ # define _SC_SHARED_MEMORY_OBJECTS 415 /* POSIX.1b shared memory supported */
882
+
883
+ # define _SC_AIO_LISTIO_MAX 416 /* max I/O ops in a list I/O call */
884
+ # define _SC_AIO_MAX 417 /* max outstanding async I/O ops */
885
+ # define _SC_AIO_PRIO_DELTA_MAX 418 /* max aio/scheduling prio delta */
886
+ # define _SC_MQ_OPEN_MAX 419 /* max open msg queues per process */
887
+ # define _SC_MQ_PRIO_MAX 420 /* max different message priorities */
888
+ # define _SC_RTSIG_MAX 421 /* # of realtime signals */
889
+ # define _SC_SEM_NSEMS_MAX 422 /* max open semaphores per process */
890
+ # define _SC_SEM_VALUE_MAX 423 /* max semaphore value */
891
+ # define _SC_SIGQUEUE_MAX 424 /* max queued signals pending/sender */
892
+
893
+ /* Symbolic constants for sysconf() variables added by POSIX.1c (threads) */
894
+ # define _SC_THREAD_DESTRUCTOR_ITERATIONS 430 /* PTHREAD_DESTRUCTOR_ITERATIONS:
895
+ max trys to destroy thread-
896
+ specific data on thrd exit */
897
+ # define _SC_THREAD_KEYS_MAX 431 /* PTHREAD_KEYS_MAX: max num data
898
+ keys per proc */
899
+ # define _SC_THREAD_STACK_MIN 432 /* PTHREAD_STACK_MIN: min size of
900
+ thread stack */
901
+ # define _SC_THREAD_THREADS_MAX 433 /* PTHREAD_THREADS_MAX: max threads
902
+ per proc */
903
+
904
+ # define _SC_THREADS 434 /* _POSIX_THREADS:
905
+ 1 iff POSIX threads supported */
906
+ # define _SC_THREAD_ATTR_STACKADDR 435 /* _POSIX_THREAD_ATTR_STACKADDR:
907
+ 1 iff stack address attribute
908
+ supported */
909
+ # define _SC_THREAD_ATTR_STACKSIZE 436 /* _POSIX_THREAD_ATTR_STACKSIZE:
910
+ 1 iff stack size attribute
911
+ supported */
912
+ # define _SC_THREAD_PRIORITY_SCHEDULING 437 /*_POSIX_THREAD_PRIORITY_SCHEDULING
913
+ 1 iff thread execution
914
+ scheduling supported */
915
+ # define _SC_THREAD_PRIO_INHERIT 438 /* _POSIX_THREAD_PRIO_INHERIT:
916
+ 1 iff priority inheritance is
917
+ supported */
918
+ # define _SC_THREAD_PRIO_PROTECT 439 /* _POSIX_THREAD_PRIO_PROTECT:
919
+ 1 iff priority protection is
920
+ supported */
921
+ # define _SC_THREAD_PROCESS_SHARED 440 /* _POSIX_THREAD_PROCESS_SHARED:
922
+ 1 iff process-shared
923
+ synchronization is supported */
924
+ # define _SC_THREAD_SAFE_FUNCTIONS 441 /* _POSIX_THREAD_SAFE_FUNCTIONS:
925
+ 1 iff thread-safe functions are
926
+ supported */
927
+ # define _SC_GETGR_R_SIZE_MAX 442 /* Maximum size of getgrgid_r() and
928
+ and getgrnam_r() data buffers */
929
+ # define _SC_GETPW_R_SIZE_MAX 443 /* Maximum size of getpwuid_r() and
930
+ and getpwnam_r() data buffers */
931
+ # define _SC_LOGIN_NAME_MAX 444 /* Value of LOGIN_NAME_MAX */
932
+ # define _SC_TTY_NAME_MAX 445 /* Value of TTY_NAME_MAX */
933
+ # define _SC_CACHE_LINE_SIZE 446 /* Size of Cache line in bytes*/
934
+ # define _SC_I_CACHE_SIZE 447 /* Size of I-Cache in bytes */
935
+ # define _SC_D_CACHE_SIZE 448 /* Size of D-Cache in bytes */
936
+ # define _SC_I_CACHE_LINE_SIZE 449 /* Size of I-Cache line in bytes */
937
+ # define _SC_D_CACHE_LINE_SIZE 450 /* Size of D-Cache line in bytes */
938
+ # define _SC_I_CACHE_WT 451 /* 0 means write-back I-Cache,
939
+ 1 means write-through I-Cache */
940
+ # define _SC_D_CACHE_WT 452 /* 0 for write-back D-Cache,
941
+ 1 for write-through D-Cache */
942
+ # define _SC_I_CACHE_CST 453 /* 0 means I-Cache is not issuing coherent
943
+ operations, 1 means I-Cache is issuing
944
+ coherent operations */
945
+ # define _SC_D_CACHE_CST 454 /* 0 means D-Cache is not issuing cohere
946
+ operations, 1 means D-Cache is issuing
947
+ coherent operations */
948
+ # define _SC_I_CACHE_F_SEL 455 /* tells software how to flush a range
949
+ of address from the I_cache and has
950
+ following meaning:
951
+ 0 - Both FIC and FDC must be used
952
+ 1 - Only need FDC
953
+ 2 - Only need FIC
954
+ 3 - Either FIC or FDC may be used */
955
+ # define _SC_D_CACHE_F_SEL 456 /* tells software how to flush a range
956
+ of address from the D_cache and has
957
+ following meaning:
958
+ 0 - Both FIC and FDC must be used
959
+ 1 - Only need FDC
960
+ 2 - Only need FIC
961
+ 3 - Either FIC or FDC may be used*/
962
+ # define _SC_I_CACHE_LOOP 457 /* intended for set-associative caches.
963
+ It is used to force the FDCE
964
+ instruction to be executed multiple
965
+ times with the same address. Note
966
+ that when it is 1, software can
967
+ optimize out the inner loop of the C
968
+ routine. */
969
+ # define _SC_D_CACHE_LOOP 458 /* same as _SC_I_CACHE_LOOP */
970
+
971
+ /* Symbolic constants for sysconf() variables added by POSIX.1,2003: 500-599 */
972
+ # define _SC_2_PBS 500
973
+ # define _SC_2_PBS_ACCOUNTING 501
974
+ # define _SC_2_PBS_CHECKPOINT 502
975
+ # define _SC_2_PBS_LOCATE 503
976
+ # define _SC_2_PBS_MESSAGE 504
977
+ # define _SC_2_PBS_TRACK 505
978
+ # define _SC_REGEXP 506
979
+ # define _SC_SHELL 507
980
+ # define _SC_HOST_NAME_MAX 508
981
+ # define _SC_SYMLOOP_MAX 509
982
+ # define _SC_ADVISORY_INFO 510
983
+ # define _SC_BARRIERS 511
984
+ # define _SC_CLOCK_SELECTION 512
985
+ # define _SC_CPUTIME 513
986
+ # define _SC_IPV6 515
987
+ # define _SC_MONOTONIC_CLOCK 516
988
+ # define _SC_RAW_SOCKETS 518
989
+ # define _SC_READER_WRITER_LOCKS 519
990
+ # define _SC_SPAWN 520
991
+ # define _SC_SPIN_LOCKS 521
992
+ # define _SC_SPORADIC_SERVER 522
993
+ # define _SC_THREAD_CPUTIME 523
994
+ # define _SC_THREAD_SPORADIC_SERVER 524
995
+ # define _SC_TIMEOUTS 525
996
+ # define _SC_TRACE 526
997
+ # define _SC_TRACE_EVENT_FILTER 527
998
+ # define _SC_TRACE_INHERIT 528
999
+ # define _SC_TRACE_LOG 529
1000
+ # define _SC_TYPED_MEMORY_OBJECTS 530
1001
+ # define _SC_XOPEN_REALTIME 531
1002
+ # define _SC_XOPEN_REALTIME_THREADS 532
1003
+
1004
+ /* Symbolic constants for sysconf() variables defined by X/Open: 2000-2999 */
1005
+
1006
+ # define _SC_CLOCKS_PER_SEC 2000 /* CLOCKS_PER_SEC: Units/sec of clock() */
1007
+ # define _SC_XPG3_VERSION 8 /* 3 */
1008
+ # define _SC_XPG4_VERSION 2001 /* 4 */
1009
+ # define _SC_PASS_MAX 9 /* Max # of bytes in password */
1010
+ # define _SC_XOPEN_CRYPT 2002 /* Encryption feature group supported */
1011
+ # define _SC_XOPEN_ENH_I18N 2003 /* Enhanced I18N feature group " */
1012
+ # define _SC_XOPEN_SHM 2004 /* Shared memory feature group " */
1013
+ # ifdef _XPG3
1014
+ # define _SC_XOPEN_VERSION _SC_XPG3_VERSION /* Issue of XPG supported */
1015
+ # else /* not _XPG3 */
1016
+ # define _SC_XOPEN_VERSION _SC_XPG4_VERSION /* Issue of XPG supported */
1017
+ # endif /* not _XPG3 */
1018
+
1019
+ /* Symbolic constants for sysconf() variables defined by XPG5 */
1020
+
1021
+ # define _SC_XBS5_ILP32_OFF32 2005 /* 32-bit int, long, pointer and off_t */
1022
+ # define _SC_XBS5_ILP32_OFFBIG 2006 /* 32-bit int, long, pointer, and 64-bit off_t */
1023
+ # define _SC_XBS5_LP64_OFF64 2007 /* 32-bit int, 64-bit long, pointer, off_t */
1024
+ # define _SC_XBS5_LPBIG_OFFBIG 2008 /* at least 32-bit int, at least 64-bit long, pointer, off_t */
1025
+
1026
+ /* Symbolic constants for sysconf() variables defined for UNIX 2003 */
1027
+ # define _SC_XOPEN_STREAMS 2009
1028
+ # define _SC_XOPEN_LEGACY 2010
1029
+
1030
+ # define _SC_V6_ILP32_OFF32 _SC_XBS5_ILP32_OFF32
1031
+ # define _SC_V6_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG
1032
+ # define _SC_V6_LP64_OFF64 _SC_XBS5_LP64_OFF64
1033
+ # define _SC_V6_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG
1034
+
1035
+ # define _SC_SS_REPL_MAX 2011
1036
+ # define _SC_TRACE_EVENT_NAME_MAX 2012
1037
+ # define _SC_TRACE_NAME_MAX 2013
1038
+ # define _SC_TRACE_SYS_MAX 2014
1039
+ # define _SC_TRACE_USER_EVENT_MAX 2015
1040
+
1041
+ /* Symbolic constants for sysconf() variables defined by OSF: 3000-3999 */
1042
+
1043
+ # define _SC_AES_OS_VERSION 3000 /* AES_OS_VERSION: Version of OSF/AES OS */
1044
+ # define _SC_PAGE_SIZE 3001 /* PAGE_SIZE: Software page size */
1045
+ # define _SC_ATEXIT_MAX 3002 /* ATEXIT_MAX: Max # of atexit() funcs */
1046
+
1047
+ /* Symbolic constants for sysconf() variables defined by SVID/3 */
1048
+ # define _SC_PAGESIZE _SC_PAGE_SIZE
1049
+
1050
+ /* Symbolic constants for sysconf() variables defined by HP-UX: 10000-19999 */
1051
+
1052
+ # define _SC_SECURITY_CLASS 10000 /* SECURITY_CLASS: DoD security level */
1053
+ # define _SC_CPU_VERSION 10001 /* CPU type this program is running on */
1054
+ # define _SC_IO_TYPE 10002 /* I/O system type this system supports */
1055
+ # define _SC_MSEM_LOCKID 10003 /* msemaphore lock unique identifier */
1056
+ # define _SC_MCAS_OFFSET 10004 /* Offset on gateway page of mcas_util() */
1057
+ # define _SC_CPU_KEYBITS1 10005 /* hardware key bit information */
1058
+ # define _SC_PROC_RSRC_MGR 10006 /* Process Resource Manager is configured */
1059
+ # define _SC_SOFTPOWER 10007 /* Soft Power Switch Hardware exists */
1060
+ # define _SC_EXEC_INTERPRETER_LENGTH 10008 /* for '#!' scripts, inclusive */
1061
+ # define _SC_SLVM_MAXNODES 10009 /* Max num of nodes supported by SLVM */
1062
+ # define _SC_SIGRTMIN 10010 /* First POSIX.4 Realtime Signal */
1063
+ # define _SC_SIGRTMAX 10011 /* Last POSIX.4 Realtime Signal */
1064
+ # define _SC_LIBC_VERSION 10012 /* Libc version */
1065
+ # define _SC_KERNEL_BITS 10013 /* running kernel is 32 or 64bit */
1066
+ # define _SC_KERNEL_IS_BIGENDIAN 10014 /* indicates kernel "big-endian" */
1067
+ # define _SC_HW_32_64_CAPABLE 10015 /* indicates whether h/w is capable
1068
+ of running 32bit and/or 64bit OS */
1069
+ # define _SC_INT_MIN 10016 /* minimum value an object of type int can hold */
1070
+ # define _SC_INT_MAX 10017 /* maximum value an object of type int can hold */
1071
+ # define _SC_LONG_MIN 10018 /* minimum value an object of type long can hold */
1072
+ # define _SC_LONG_MAX 10019 /* maximum value an object of type long can hold */
1073
+ # define _SC_SSIZE_MAX 10020 /* maximum value an object of type ssize_t can hold */
1074
+ # define _SC_WORD_BIT 10021 /* number of bits in a word */
1075
+ # define _SC_LONG_BIT 10022 /* number of bits in a long */
1076
+ # define _SC_CPU_CHIP_TYPE 10023 /* encoded CPU chip type from PDC */
1077
+ # define _SC_CCNUMA_PM 10024 /* CCNUMA Programming Model Exts Active */
1078
+ # define _SC_CCNUMA_SUPPORT 10025 /* CCNUMA supported platform */
1079
+ # define _SC_IPMI_INTERFACE 10026 /* ipmi interface type */
1080
+ # define _SC_SPROFIL_MAX 10027 /* max number of profiled regions in
1081
+ sprofil system call */
1082
+ # define _SC_NUM_CPUS 10028 /* number of cpus in use */
1083
+ # define _SC_MEM_MBYTES 10029 /* Mbytes of memory */
1084
+
1085
+ /* reserve 10030 for private use */
1086
+
1087
+ # define _SC_PSET_RTE_SUPPORT 10031 /* RTE PSets Supported */
1088
+ # define _SC_RTE_SUPPORT 10032 /* RTE Supported */
1089
+
1090
+ # define _SC_HG_SUPPORT 10034 /* HG (Project Mercury) supported */
1091
+ # define _SC_INIT_PROCESS_ID 10035 /* PID of the INIT process */
1092
+ # define _SC_SWAPPER_PROCESS_ID 10036 /* PID of the SWAPPER process */
1093
+ # define _SC_VHAND_PROCESS_ID 10037 /* PID of the VHAND process */
1094
+ # define _SC_HOST_NAME_MAX_2 10038 /* duplicate of _SC_HOST_NAME_MAX,
1095
+ for compatibility with 11.23 0409 */
1096
+ # define _SC_SCALABLE_INIT 10039 /* Scalable init code is present */
1097
+
1098
+ # define _SC_HT_CAPABLE 10040 /* The hardware is capable of
1099
+ hyperthread */
1100
+ # define _SC_HT_ENABLED 10041 /* The hardware is hyperthread enabled */
1101
+
1102
+ /* Macro to check if numeric username is enabled */
1103
+ # define _SC_EXTENDED_LOGIN_NAME 10042
1104
+ # define _SC_MINCORE 10043 /* mincore() system call support */
1105
+
1106
+
1107
+ # define _SC_CELL_OLA_SUPPORT 11001 /* OS supports Online Cell Addition */
1108
+ # define _SC_CELL_OLD_SUPPORT 11002 /* OS supports Online Cell Deletion */
1109
+ # define _SC_CPU_OLA_SUPPORT 11003 /* OS supports Online CPU Addition */
1110
+ # define _SC_CPU_OLD_SUPPORT 11004 /* OS supports Online CPU Deletion */
1111
+ # define _SC_MEM_OLA_SUPPORT 11005 /* OS supports Online Memory Addition */
1112
+ # define _SC_MEM_OLD_SUPPORT 11006 /* OS supports Online Memory Deletion */
1113
+ # define _SC_LORA_MODE 11007 /* NUMA mode for the partition */
1114
+
1115
+ # define _SC_P2P 19500 /* p2p bcopy feature */
1116
+
1117
+ /* value(s) returned by sysconf(_SC_P2P) */
1118
+
1119
+ # define _SC_P2P_ENABLED 0x1
1120
+ # define _SC_P2P_DATA_MOVER 0x2
1121
+
1122
+ # define _SC_GANG_SCHED 19501 /* gang scheduler feature */
1123
+
1124
+ # define _SC_PSET_SUPPORT 19502 /* Processor Set functionality support */
1125
+
1126
+ /* 20000-20999 reserved for private use */
1127
+
1128
+ /* Symbolic constants for pathconf() defined by POSIX.1: 0-99 */
1129
+ # define _PC_LINK_MAX 0 /* LINK_MAX: Max # of links to a single
1130
+ file */
1131
+ # define _PC_MAX_CANON 1 /* MAX_CANON: Max # of bytes in a terminal
1132
+ canonical input line */
1133
+ # define _PC_MAX_INPUT 2 /* MAX_INPUT: Max # of bytes allowed in
1134
+ a terminal input queue */
1135
+ # define _PC_NAME_MAX 3 /* NAME_MAX: Max # of bytes in a filename */
1136
+
1137
+ # define _PC_PATH_MAX 4 /* PATH_MAX: Max # of bytes in a pathname */
1138
+
1139
+ # define _PC_PIPE_BUF 5 /* PIPE_BUF: Max # of bytes for which pipe
1140
+ writes are atomic */
1141
+ # define _PC_CHOWN_RESTRICTED 6 /* _POSIX_CHOWN_RESTRICTED: 1 iff only a
1142
+ privileged process can use chown() */
1143
+ # define _PC_NO_TRUNC 7 /* _POSIX_NO_TRUNC: 1 iff an error is
1144
+ detected when exceeding NAME_MAX */
1145
+ # define _PC_VDISABLE 8 /* _POSIX_VDISABLE: character setting which
1146
+ disables TTY local editing characters */
1147
+
1148
+ /* Symbolic constants for pathconf() defined by POSIX.1b */
1149
+
1150
+ # define _PC_SYNC_IO 100 /* SYNC_IO: 1 iff Synchronized IO may be
1151
+ performed for the associated file */
1152
+ # define _PC_ASYNC_IO 101 /* Async I/O may be performed on this fd */
1153
+ # define _PC_PRIO_IO 102 /* I/O Prioritization is done on this fd */
1154
+
1155
+ # define _PC_FILESIZEBITS 103 /* bits needed to represent file offset */
1156
+
1157
+ /* Symbolic constants for pathconf() defined by POSIX.1d or Unix2003 */
1158
+
1159
+ # define _PC_2_SYMLINKS 600
1160
+ # define _PC_ALLOC_SIZE_MIN 601
1161
+ # define _PC_REC_INCR_XFER_SIZE 602
1162
+ # define _PC_REC_MAX_XFER_SIZE 603
1163
+ # define _PC_REC_MIN_XFER_SIZE 604
1164
+ # define _PC_REC_XFER_ALIGN 605
1165
+ # define _PC_SYMLINK_MAX 606
1166
+
1167
+ #endif /* _INCLUDE_POSIX_SOURCE || _INCLUDE_POSIX2_SOURCE */
1168
+
1169
+ /* Issue(s) of X/Open Portability Guide we support */
1170
+
1171
+ #ifdef _INCLUDE_XOPEN_SOURCE
1172
+
1173
+ # ifdef _XPG3
1174
+ # define _XOPEN_VERSION 3
1175
+ # else /* not _XPG3 */
1176
+ # define _XOPEN_VERSION 4
1177
+ # endif /* not _XPG3 */
1178
+
1179
+ # ifdef _XPG2
1180
+ # define _XOPEN_XPG2 1
1181
+ # else /* not _XPG2 */
1182
+ # ifdef _XPG3
1183
+ # define _XOPEN_XPG3 1
1184
+ # else /* not _XPG3 */
1185
+ # define _XOPEN_XPG4 1
1186
+ # endif /* not _XPG3 */
1187
+ # endif /* not _XPG2 */
1188
+
1189
+ # define _XOPEN_XCU_VERSION 3 /* X/Open Commands & Utilities */
1190
+
1191
+ /* XPG4 Feature Groups */
1192
+
1193
+ # define _XOPEN_CRYPT 1 /* Encryption and Decryption */
1194
+ # define _XOPEN_ENH_I18N 1 /* Enhanced Internationalization */
1195
+ /* _XOPEN_SHM is not defined because the Shared Memory routines can be
1196
+ configured in and out of the system. See uxgen(1M) or config(1M). */
1197
+ # ifdef _INCLUDE_XOPEN_SOURCE_500
1198
+ # define _XOPEN_SHM 1
1199
+ # endif /* _INCLUDE_XOPEN_SOURCE_500 */
1200
+
1201
+ #endif /* _INCLUDE_XOPEN_SOURCE */
1202
+
1203
+
1204
+ /* Revision of AES OS we support */
1205
+
1206
+ #ifdef _INCLUDE_AES_SOURCE
1207
+ # define _AES_OS_VERSION 1
1208
+ #endif /* _INCLUDE_AES_SOURCE */
1209
+
1210
+
1211
+ #ifdef _INCLUDE_POSIX2_SOURCE
1212
+
1213
+ # define _POSIX2_VERSION_92 199209L /* We support POSIX.2-1992 */
1214
+ # define _POSIX2_VERSION_01 200112L /* We support POSIX.2-2001 */
1215
+
1216
+ /* Conformance and options for POSIX.2 */
1217
+ # ifdef _INCLUDE_XOPEN_SOURCE_PRE_600
1218
+ # define _POSIX2_C_VERSION _POSIX2_VERSION_92
1219
+ # ifdef _HPUX_SOURCE
1220
+ /* IEEE POSIX.2-2001 base standard */
1221
+ # define _POSIX2_VERSION _POSIX2_VERSION_01
1222
+ /* IEEE POSIX.2-2001 C language binding */
1223
+ # define _SUPPORTED_POSIX2_OPTION _POSIX2_VERSION_01
1224
+ # else /* !_HPUX_SOURCE */
1225
+ /* IEEE POSIX.2-1992 base standard */
1226
+ # define _POSIX2_VERSION _POSIX2_VERSION_92
1227
+ /* IEEE POSIX.2-1992 C language binding */
1228
+ # define _SUPPORTED_POSIX2_OPTION 1L
1229
+ # endif /* !_HPUX_SOURCE */
1230
+ # else /* !_INCLUDE_XOPEN_SOURCE_PRE_600 */
1231
+ /* IEEE POSIX.2-1992 base standard */
1232
+ # define _POSIX2_VERSION _POSIX2_VERSION_01
1233
+ # define _SUPPORTED_POSIX2_OPTION _POSIX2_VERSION_01
1234
+ # endif /* !_INCLUDE_XOPEN_SOURCE_PRE_600 */
1235
+
1236
+ /* c89 finds POSIX.2 funcs by default */
1237
+ # define _POSIX2_C_BIND _SUPPORTED_POSIX2_OPTION
1238
+
1239
+ /* c89, lex, yacc, etc. are provided */
1240
+ # define _POSIX2_C_DEV _SUPPORTED_POSIX2_OPTION
1241
+
1242
+ /* make, ar, etc. are provided */
1243
+ # define _POSIX2_SW_DEV _SUPPORTED_POSIX2_OPTION
1244
+
1245
+ /* terminals exist where vi works */
1246
+ # define _POSIX2_CHAR_TERM _SUPPORTED_POSIX2_OPTION
1247
+
1248
+ /* User Portability Utilities supported */
1249
+ # define _POSIX2_UPE _SUPPORTED_POSIX2_OPTION
1250
+
1251
+ /* localedef(1M) can create locales */
1252
+ # define _POSIX2_LOCALEDEF _SUPPORTED_POSIX2_OPTION
1253
+
1254
+ /* fort77 is not provided */
1255
+ # define _POSIX2_FORT_DEV -1L
1256
+
1257
+ /* asa is not provided */
1258
+ # define _POSIX2_FORT_RUN -1L
1259
+
1260
+
1261
+ /* Symbolic constants representing C-language compilation environments defined
1262
+ * by XPG5
1263
+ */
1264
+ # define _XBS5_ILP32_OFF32 32 /* 32-bit int, long, pointer, off_t */
1265
+ # define _XBS5_ILP32_OFFBIG 32 /* 32-bit int, long, pointer, 64-bit off_t */
1266
+ # define _XBS5_LP64_OFF64 64 /* 32-bit int, 64-bit long, pointer, off_t */
1267
+ # define _XBS5_LPBIG_OFFBIG 64 /* 32-bit int, 64-bit long, pointer, off_t */
1268
+
1269
+ /* Symbolic constants for confstr() defined by POSIX.2: 200-299 */
1270
+
1271
+ # define _CS_PATH 200 /* Search path that finds all POSIX.2 utils */
1272
+
1273
+ /* Symbolic constants for confstr() defined by XPG5: 300-399 */
1274
+
1275
+ /* Initial compiler options, final compiler options, set of libraries and lint
1276
+ * options for 32-bit int, long, pointer, off_t.
1277
+ */
1278
+ # define _CS_XBS5_ILP32_OFF32_CFLAGS 300
1279
+ # define _CS_XBS5_ILP32_OFF32_LDFLAGS 301
1280
+ # define _CS_XBS5_ILP32_OFF32_LIBS 302
1281
+ # define _CS_XBS5_ILP32_OFF32_LINTFLAGS 303
1282
+
1283
+ /* Initial compiler options, final compiler options, set of libraries and lint
1284
+ * options for 32-bit int, long, pointer, 64-bit off_t.
1285
+ */
1286
+ # define _CS_XBS5_ILP32_OFFBIG_CFLAGS 304
1287
+ # define _CS_XBS5_ILP32_OFFBIG_LDFLAGS 305
1288
+ # define _CS_XBS5_ILP32_OFFBIG_LIBS 306
1289
+ # define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS 307
1290
+
1291
+ /* Initial compiler options, final compiler options, set of libraries and lint
1292
+ * options for 32-bit int, 64-bit long, pointer, off_t.
1293
+ */
1294
+ # define _CS_XBS5_LP64_OFF64_CFLAGS 308
1295
+ # define _CS_XBS5_LP64_OFF64_LDFLAGS 309
1296
+ # define _CS_XBS5_LP64_OFF64_LIBS 310
1297
+ # define _CS_XBS5_LP64_OFF64_LINTFLAGS 311
1298
+
1299
+ /* Initial compiler options, final compiler options, set of libraries and lint
1300
+ * options for an int type using at least 32-bits, and long, pointer, and off_t
1301
+ * types using at least 64-bits.
1302
+ */
1303
+ # define _CS_XBS5_LPBIG_OFFBIG_CFLAGS 312
1304
+ # define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS 313
1305
+ # define _CS_XBS5_LPBIG_OFFBIG_LIBS 314
1306
+ # define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS 315
1307
+
1308
+ /* Symbolic constants for confstr() defined by Unix2003 : 700 - 799 */
1309
+
1310
+ /* Initial C99 compiler options, final C99 compiler options, set of libraries
1311
+ * options for 32-bit int, long, pointer, off_t.
1312
+ */
1313
+ # define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 700
1314
+ # define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 701
1315
+ # define _CS_POSIX_V6_ILP32_OFF32_LIBS 702
1316
+
1317
+ /* Initial C99 compiler options, final C99 compiler options, set of libraries
1318
+ * options for 32-bit int, long, pointer, 64-bit off_t.
1319
+ */
1320
+ # define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 704
1321
+ # define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 705
1322
+ # define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 706
1323
+
1324
+ /* Initial C99 compiler options, final C99 compiler options, set of libraries
1325
+ * options for 32-bit int, 64-bit long, pointer, off_t.
1326
+ */
1327
+ # define _CS_POSIX_V6_LP64_OFF64_CFLAGS 708
1328
+ # define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 709
1329
+ # define _CS_POSIX_V6_LP64_OFF64_LIBS 710
1330
+
1331
+ /* Initial compiler options, final compiler options, set of libraries and lint
1332
+ * options for an int type using at least 32-bits, and long, pointer, and off_t
1333
+ * types using at least 64-bits.
1334
+ */
1335
+ # define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 712
1336
+ # define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 713
1337
+ # define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 714
1338
+
1339
+ # define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 716
1340
+
1341
+ /* Symbolic constants for confstr() defined by HP-UX: 10000-19999 */
1342
+
1343
+ # define _CS_MACHINE_MODEL 10000 /* system model name */
1344
+ # define _CS_HW_CPU_SUPP_BITS 10001 /* OS configurations supported */
1345
+ # define _CS_KERNEL_BITS 10002 /* kernel running is "32" or "64" bits */
1346
+ # define _CS_MACHINE_IDENT 10003 /* Machine ID */
1347
+ # define _CS_PARTITION_IDENT 10004 /* Partition ID */
1348
+ # define _CS_MACHINE_SERIAL 10005 /* Machine serial number */
1349
+
1350
+ /* Symbolic constants for use with fnmatch() have been moved to <fnmatch.h> */
1351
+
1352
+ #endif /* _INCLUDE_POSIX2_SOURCE */
1353
+
1354
+ # ifndef _XOPEN_UNIX
1355
+ # define _XOPEN_UNIX -1
1356
+ # endif
1357
+ # define _XOPEN_CURSES 1
1358
+
1359
+ #ifdef _INCLUDE_XOPEN_SOURCE_EXTENDED
1360
+
1361
+ /* Symbolic constants for the "lockf" function: */
1362
+
1363
+ # define F_ULOCK 0 /* Unlock a previously locked region */
1364
+ # define F_LOCK 1 /* Lock a region for exclusive use */
1365
+ # define F_TLOCK 2 /* Test and lock a region for exclusive use */
1366
+ # define F_TEST 3 /* Test a region for a previous lock */
1367
+
1368
+ /* Symbolic constants for sysconf() variables defined by XPG4_EXTENDED */
1369
+ /* Continue with ones for XOPEN (2000-2999) */
1370
+
1371
+ # define _SC_IOV_MAX 2100 /* Max # of iovec structures for readv/writev */
1372
+ # define _SC_XOPEN_UNIX 2101 /* Whether or not XOPEN_UNIX is supported */
1373
+ #endif /* _INCLUDE_XOPEN_SOURCE_EXTENDED */
1374
+
1375
+ /*
1376
+ * Define _XOPEN_VERSION symbolic constant for unix98
1377
+ * compliance.
1378
+ */
1379
+ #ifdef _INCLUDE_XOPEN_SOURCE_500
1380
+ # undef _XOPEN_VERSION
1381
+ # define _XOPEN_VERSION 500
1382
+ #endif /* _INCLUDE_XOPEN_SOURCE_500 */
1383
+ /*
1384
+ * Define _XOPEN_VERSION symbolic constant for unix03
1385
+ * compliance.
1386
+ */
1387
+ #if defined(_INCLUDE_XOPEN_SOURCE_600)
1388
+ # undef _XOPEN_VERSION
1389
+ # define _XOPEN_VERSION 600
1390
+ # define _XOPEN_STREAMS 1
1391
+ # define _XOPEN_REALTIME -1
1392
+ # define _XOPEN_LEGACY -1
1393
+ # define _POSIX_V6_ILP32_OFF32 32
1394
+ # define _POSIX_V6_ILP32_OFFBIG 32
1395
+ # define _POSIX_V6_LP64_OFF64 64
1396
+ # define _POSIX_V6_LPBIG_OFFBIG 64
1397
+ #endif /* _INCLUDE_XOPEN_SOURCE_600 */
1398
+
1399
+ #ifdef _INCLUDE_HPUX_SOURCE
1400
+
1401
+ /* Symbolic constants for the passwd file and group file */
1402
+
1403
+ # define GF_PATH "/etc/group" /* Path name of the "group" file */
1404
+ # define PF_PATH "/etc/passwd" /* Path name of the "passwd" file */
1405
+ # define IN_PATH "/usr/include" /* Path name for <...> files */
1406
+
1407
+
1408
+ /* Path on which all POSIX.2 utilities can be found */
1409
+
1410
+ # define CS_PATH \
1411
+ "/usr/bin:/usr/ccs/bin:/opt/ansic/bin:/opt/langtools/bin:/opt/fortran/bin"
1412
+
1413
+ # define CS_XBS5_ILP32_OFF32_CFLAGS ""
1414
+ # define CS_XBS5_ILP32_OFF32_LDFLAGS ""
1415
+ # define CS_XBS5_ILP32_OFF32_LIBS ""
1416
+ # define CS_XBS5_ILP32_OFF32_LINTFLAGS ""
1417
+ # define CS_XBS5_ILP32_OFFBIG_CFLAGS "-D_FILE_OFFSET_BITS=64"
1418
+ # define CS_XBS5_ILP32_OFFBIG_LDFLAGS ""
1419
+ # define CS_XBS5_ILP32_OFFBIG_LIBS ""
1420
+ # define CS_XBS5_ILP32_OFFBIG_LINTFLAGS "-D_FILE_OFFSET_BITS=64"
1421
+
1422
+ #if defined(__ia64)
1423
+ # define CS_XBS5_LP64_OFF64_CFLAGS "+DD64"
1424
+ # define CS_XBS5_LPBIG_OFFBIG_CFLAGS "+DD64"
1425
+ #else
1426
+ # define CS_XBS5_LP64_OFF64_CFLAGS "+DA2.0W"
1427
+ # define CS_XBS5_LPBIG_OFFBIG_CFLAGS "+DA2.0W"
1428
+ #endif
1429
+
1430
+ # define CS_XBS5_LP64_OFF64_LDFLAGS ""
1431
+ # define CS_XBS5_LP64_OFF64_LIBS ""
1432
+ # define CS_XBS5_LP64_OFF64_LINTFLAGS ""
1433
+ # define CS_XBS5_LPBIG_OFFBIG_LDFLAGS ""
1434
+ # define CS_XBS5_LPBIG_OFFBIG_LIBS ""
1435
+ # define CS_XBS5_LPBIG_OFFBIG_LINTFLAGS ""
1436
+
1437
+ # define CS_POSIX_V6_ILP32_OFF32_CFLAGS ""
1438
+ # define CS_POSIX_V6_ILP32_OFF32_LDFLAGS ""
1439
+ # define CS_POSIX_V6_ILP32_OFF32_LIBS ""
1440
+ # define CS_POSIX_V6_ILP32_OFFBIG_CFLAGS "-D_FILE_OFFSET_BITS=64"
1441
+ # define CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS ""
1442
+ # define CS_POSIX_V6_ILP32_OFFBIG_LIBS ""
1443
+ # define CS_POSIX_V6_LP64_OFF64_CFLAGS "+DD64"
1444
+ # define CS_POSIX_V6_LP64_OFF64_LDFLAGS ""
1445
+ # define CS_POSIX_V6_LP64_OFF64_LIBS ""
1446
+ # define CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS "+DD64"
1447
+ # define CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS ""
1448
+ # define CS_POSIX_V6_LPBIG_OFFBIG_LIBS ""
1449
+ # define CS_POSIX_V6_WIDTH_RESTRICTED_ENVS "_POSIX_V6_ILP32_OFF32\n_POSIX_V6_ILP32_OFFBIG\n_POSIX_V6_LP64_OFF64\n_POSIX_V6_LPBIG_OFFBIG"
1450
+
1451
+ /* Symbolic constants for values of sysconf(_SC_SECURITY_LEVEL) */
1452
+
1453
+ # define SEC_CLASS_NONE 0 /* default secure system */
1454
+ # define SEC_CLASS_C2 1 /* C2 level security */
1455
+ # define SEC_CLASS_B1 2 /* B1 level security */
1456
+
1457
+ /* Symbolic constants for values of sysconf(_SC_IO_TYPE) */
1458
+
1459
+ # define IO_TYPE_WSIO 01
1460
+ # define IO_TYPE_SIO 02
1461
+ # define IO_TYPE_CDIO 03
1462
+
1463
+ /* Symbolic constants for values of sysconf(_SC_CPU_KEYBITS1) */
1464
+
1465
+ #define HARITH 0x00000010 /* Halfword parallel add, subtract, average */
1466
+ #define HSHIFTADD 0x00000020 /* Halfword parallel shift-and-add */
1467
+
1468
+ /* Symbolic constants for values of sysconf(_SC_CPU_VERSION) */
1469
+ /* These are the same as the magic numbers defined in <sys/magic.h> */
1470
+ /* Symbolic constants for values of sysconf(_SC_CPU_VERSION)
1471
+ do not have to be monotonic.
1472
+ Values from 0x0210 through 0x02ff have been reserved for
1473
+ revisions of PA-RISC */
1474
+
1475
+ # define CPU_HP_MC68020 0x20C /* Motorola MC68020 */
1476
+ # define CPU_HP_MC68030 0x20D /* Motorola MC68030 */
1477
+ # define CPU_HP_MC68040 0x20E /* Motorola MC68040 */
1478
+ # define CPU_PA_RISC1_0 0x20B /* HP PA-RISC1.0 */
1479
+ # define CPU_PA_RISC1_1 0x210 /* HP PA-RISC1.1 */
1480
+ # define CPU_PA_RISC1_2 0x211 /* HP PA-RISC1.2 */
1481
+ # define CPU_PA_RISC2_0 0x214 /* HP PA-RISC2.0 */
1482
+ # define CPU_PA_RISC_MAX 0x2FF /* Maximum value for HP PA-RISC systems */
1483
+ # define CPU_IA64_ARCHREV_0 0x300 /* IA-64 archrev 0 */
1484
+
1485
+ /* Macro for detecting whether a given CPU version is an HP PA-RISC machine */
1486
+
1487
+ # define CPU_IS_PA_RISC(__x) \
1488
+ ((__x) == CPU_PA_RISC1_0 || \
1489
+ ((__x) >= CPU_PA_RISC1_1 && (__x) <= CPU_PA_RISC_MAX))
1490
+
1491
+ /* Macro for detecting whether a given CPU version is an HP MC680x0 machine */
1492
+
1493
+ # define CPU_IS_HP_MC68K(__x) \
1494
+ ((__x) == CPU_HP_MC68020 || \
1495
+ (__x) == CPU_HP_MC68030 || \
1496
+ (__x) == CPU_HP_MC68040)
1497
+
1498
+
1499
+ /* Macros to interpret return value from sysconf(_SC_HW_32_64_CAPABLE) */
1500
+
1501
+ # define _SYSTEM_SUPPORTS_LP64OS(__x) ((__x) & 0x1)
1502
+ # define _SYSTEM_SUPPORTS_ILP32OS(__x) ((__x) & 0x2)
1503
+
1504
+ #ifndef _KERNEL
1505
+ /*
1506
+ * serialize system call
1507
+ */
1508
+ /* Function prototype */
1509
+ #if defined(__ia64) && !defined(_LIBC)
1510
+ /* pragmas needed to support -B protected */
1511
+ #pragma extern serialize
1512
+ #endif /* __ia64 && ! _LIBC */
1513
+ extern int serialize __((int, pid_t));
1514
+
1515
+ #endif /* not _KERNEL */
1516
+
1517
+ #endif /* _INCLUDE_HPUX_SOURCE */
1518
+
1519
+ #ifdef _UNSUPPORTED
1520
+
1521
+ /*
1522
+ * NOTE: The following header file contains information specific
1523
+ * to the internals of the HP-UX implementation. The contents of
1524
+ * this header file are subject to change without notice. Such
1525
+ * changes may affect source code, object code, or binary
1526
+ * compatibility between releases of HP-UX. Code which uses
1527
+ * the symbols contained within this header file is inherently
1528
+ * non-portable (even between HP-UX implementations).
1529
+ */
1530
+ # include <.unsupp/sys/_unistd.h>
1531
+ #endif /* _UNSUPPORTED */
1532
+
1533
+ #endif /* _SYS_UNISTD_INCLUDED */
1534
+