grp_illumos_amd64.go 129 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181
  1. // Code generated by 'ccgo grp/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o grp/grp_illumos_amd64.go -pkgname grp', DO NOT EDIT.
  2. package grp
  3. import (
  4. "math"
  5. "reflect"
  6. "sync/atomic"
  7. "unsafe"
  8. )
  9. var _ = math.Pi
  10. var _ reflect.Kind
  11. var _ atomic.Value
  12. var _ unsafe.Pointer
  13. const (
  14. BUFSIZ = 1024 // stdio_iso.h:124:1:
  15. CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
  16. CLOCK_HIGHRES = 4 // time_impl.h:126:1:
  17. CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
  18. CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
  19. CLOCK_PROF = 2 // time_impl.h:127:1:
  20. CLOCK_REALTIME = 3 // time_impl.h:123:1:
  21. CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
  22. CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
  23. DST_AUST = 2 // time.h:115:1:
  24. DST_AUSTALT = 10 // time.h:123:1:
  25. DST_CAN = 6 // time.h:119:1:
  26. DST_EET = 5 // time.h:118:1:
  27. DST_GB = 7 // time.h:120:1:
  28. DST_MET = 4 // time.h:117:1:
  29. DST_NONE = 0 // time.h:113:1:
  30. DST_RUM = 8 // time.h:121:1:
  31. DST_TUR = 9 // time.h:122:1:
  32. DST_USA = 1 // time.h:114:1:
  33. DST_WET = 3 // time.h:116:1:
  34. EOF = -1 // stdio_iso.h:152:1:
  35. FD_SETSIZE = 65536 // select.h:88:1:
  36. FILENAME_MAX = 1024 // stdio_iso.h:156:1:
  37. FOPEN_MAX = 20 // stdio_iso.h:155:1:
  38. ITIMER_PROF = 2 // time.h:201:1:
  39. ITIMER_REAL = 0 // time.h:199:1:
  40. ITIMER_REALPROF = 3 // time.h:204:1:
  41. ITIMER_VIRTUAL = 1 // time.h:200:1:
  42. L_ctermid = 9 // stdio.h:207:1:
  43. L_cuserid = 9 // stdio.h:211:1:
  44. L_tmpnam = 25 // stdio_iso.h:163:1:
  45. MICROSEC = 1000000 // time.h:246:1:
  46. MILLISEC = 1000 // time.h:245:1:
  47. NANOSEC = 1000000000 // time.h:247:1:
  48. NBBY = 8 // select.h:103:1:
  49. P_MYID = -1 // types.h:632:1:
  50. P_tmpdir = "/var/tmp/" // stdio.h:220:1:
  51. REG_LABEL_BP = 2 // machtypes.h:44:1:
  52. REG_LABEL_MAX = 8 // machtypes.h:51:1:
  53. REG_LABEL_PC = 0 // machtypes.h:42:1:
  54. REG_LABEL_R12 = 4 // machtypes.h:47:1:
  55. REG_LABEL_R13 = 5 // machtypes.h:48:1:
  56. REG_LABEL_R14 = 6 // machtypes.h:49:1:
  57. REG_LABEL_R15 = 7 // machtypes.h:50:1:
  58. REG_LABEL_RBX = 3 // machtypes.h:46:1:
  59. REG_LABEL_SP = 1 // machtypes.h:43:1:
  60. SEC = 1 // time.h:244:1:
  61. SEEK_CUR = 1 // stdio_iso.h:159:1:
  62. SEEK_END = 2 // stdio_iso.h:160:1:
  63. SEEK_SET = 0 // stdio_iso.h:158:1:
  64. TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
  65. TIMER_RELTIME = 0x0 // time_impl.h:133:1:
  66. TIME_UTC = 0x1 // time.h:306:1:
  67. TMP_MAX = 17576 // stdio_iso.h:161:1:
  68. X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
  69. X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
  70. X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
  71. X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
  72. X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
  73. X_CLOCKID_T = 0 // types.h:568:1:
  74. X_CLOCK_T = 0 // types.h:563:1:
  75. X_COND_MAGIC = 0x4356 // types.h:426:1:
  76. X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
  77. X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
  78. X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
  79. X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
  80. X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
  81. X_FILEDEFED = 0 // stdio_iso.h:101:1:
  82. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  83. X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
  84. X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
  85. X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
  86. X_GRP_H = 0 // grp.h:36:1:
  87. X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
  88. X_IEEE_754 = 0 // isa_defs.h:246:1:
  89. X_INT64_TYPE = 0 // int_types.h:82:1:
  90. X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
  91. X_IOEOF = 0020 // stdio_iso.h:143:1:
  92. X_IOERR = 0040 // stdio_iso.h:144:1:
  93. X_IOFBF = 0000 // stdio_iso.h:140:1:
  94. X_IOLBF = 0100 // stdio_iso.h:141:1:
  95. X_IOMYBUF = 0010 // stdio_iso.h:149:1:
  96. X_IONBF = 0004 // stdio_iso.h:142:1:
  97. X_IOREAD = 0001 // stdio_iso.h:146:1:
  98. X_IORW = 0200 // stdio_iso.h:148:1:
  99. X_IOWRT = 0002 // stdio_iso.h:147:1:
  100. X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
  101. X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
  102. X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
  103. X_ISO_STDIO_C99_H = 0 // stdio_c99.h:41:1:
  104. X_ISO_STDIO_ISO_H = 0 // stdio_iso.h:59:1:
  105. X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
  106. X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
  107. X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
  108. X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
  109. X_LOCALE_T = 0 // time.h:291:1:
  110. X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
  111. X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
  112. X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
  113. X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
  114. X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
  115. X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
  116. X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
  117. X_LP64 = 1 // <predefined>:286:1:
  118. X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
  119. X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
  120. X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
  121. X_NBBY = 8 // select.h:100:1:
  122. X_NFILE = 20 // stdio_iso.h:135:1:
  123. X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
  124. X_OFF_T = 0 // types.h:142:1:
  125. X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
  126. X_PSM_MODULES = 0 // isa_defs.h:284:1:
  127. X_PTRDIFF_T = 0 // types.h:112:1:
  128. X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
  129. X_RTC_CONFIG = 0 // isa_defs.h:285:1:
  130. X_RWL_MAGIC = 0x5257 // types.h:427:1:
  131. X_SBFSIZ = 8 // stdio_iso.h:138:1:
  132. X_SEMA_MAGIC = 0x534d // types.h:425:1:
  133. X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
  134. X_SIGEVENT = 0 // time.h:132:1:
  135. X_SIGSET_T = 0 // select.h:73:1:
  136. X_SIGVAL = 0 // time.h:124:1:
  137. X_SIZE_T = 0 // types.h:540:1:
  138. X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
  139. X_SSIZE_T = 0 // types.h:549:1:
  140. X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
  141. X_STDC_C11 = 0 // feature_tests.h:165:1:
  142. X_STDC_C99 = 0 // feature_tests.h:169:1:
  143. X_STDIO_H = 0 // stdio.h:44:1:
  144. X_STDIO_IMPL_H = 0 // stdio_impl.h:28:1:
  145. X_STDIO_TAG_H = 0 // stdio_tag.h:28:1:
  146. X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
  147. X_SUSECONDS_T = 0 // types.h:343:1:
  148. X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
  149. X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
  150. X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
  151. X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
  152. X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
  153. X_SYS_NULL_H = 0 // null.h:17:1:
  154. X_SYS_SELECT_H = 0 // select.h:45:1:
  155. X_SYS_TIME_H = 0 // time.h:27:1:
  156. X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
  157. X_SYS_TYPES_H = 0 // types.h:35:1:
  158. X_SYS_VA_LIST_H = 0 // va_list.h:34:1:
  159. X_TIMER_T = 0 // types.h:573:1:
  160. X_TIME_H = 0 // time.h:37:1:
  161. X_TIME_T = 0 // types.h:558:1:
  162. X_UID_T = 0 // types.h:400:1:
  163. X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
  164. Sun = 1 // <predefined>:172:1:
  165. Unix = 1 // <predefined>:175:1:
  166. )
  167. // used for block sizes
  168. // The boolean_t type has had a varied amount of exposure over the years in
  169. // terms of how its enumeration constants have been exposed. In particular, it
  170. // originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
  171. // B_TRUE and B_FALSE with an underscore. This check never included the
  172. // question of if we were in a strict ANSI C environment or whether extensions
  173. // were defined.
  174. //
  175. // Compilers such as clang started defaulting to always including an
  176. // XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
  177. // This would lead most software that had used the non-underscore versions to
  178. // need it. As such, we have adjusted the non-strict XOPEN environment to retain
  179. // its old behavior so as to minimize namespace pollution; however, we instead
  180. // include both variants of the definitions in the generally visible version
  181. // allowing software written in either world to hopefully end up in a good
  182. // place.
  183. //
  184. // This isn't perfect, but should hopefully minimize the pain for folks actually
  185. // trying to build software.
  186. const ( /* types.h:215:1: */
  187. B_FALSE = 0
  188. B_TRUE = 1
  189. X_B_FALSE = 0
  190. X_B_TRUE = 1
  191. )
  192. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  193. type Size_t = uint64 /* <builtin>:9:23 */
  194. type Wchar_t = int32 /* <builtin>:15:24 */
  195. type X__int128_t = struct {
  196. Flo int64
  197. Fhi int64
  198. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  199. type X__uint128_t = struct {
  200. Flo uint64
  201. Fhi uint64
  202. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  203. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  204. type X__float128 = float64 /* <builtin>:47:21 */
  205. // CDDL HEADER START
  206. //
  207. // The contents of this file are subject to the terms of the
  208. // Common Development and Distribution License, Version 1.0 only
  209. // (the "License"). You may not use this file except in compliance
  210. // with the License.
  211. //
  212. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  213. // or http://www.opensolaris.org/os/licensing.
  214. // See the License for the specific language governing permissions
  215. // and limitations under the License.
  216. //
  217. // When distributing Covered Code, include this CDDL HEADER in each
  218. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  219. // If applicable, add the following below this CDDL HEADER, with the
  220. // fields enclosed by brackets "[]" replaced with your own identifying
  221. // information: Portions Copyright [yyyy] [name of copyright owner]
  222. //
  223. // CDDL HEADER END
  224. // Copyright (c) 1988 AT&T
  225. // All Rights Reserved
  226. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  227. //
  228. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  229. // Use is subject to license terms.
  230. //
  231. // Copyright 2020 Joyent, Inc.
  232. // DO NOT EDIT THIS FILE.
  233. //
  234. // It has been auto-edited by fixincludes from:
  235. //
  236. // "/usr/include/sys/feature_tests.h"
  237. //
  238. // This had to be done to correct non-standard usages in the
  239. // original, manufacturer supplied header file.
  240. // CDDL HEADER START
  241. //
  242. // The contents of this file are subject to the terms of the
  243. // Common Development and Distribution License (the "License").
  244. // You may not use this file except in compliance with the License.
  245. //
  246. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  247. // or http://www.opensolaris.org/os/licensing.
  248. // See the License for the specific language governing permissions
  249. // and limitations under the License.
  250. //
  251. // When distributing Covered Code, include this CDDL HEADER in each
  252. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  253. // If applicable, add the following below this CDDL HEADER, with the
  254. // fields enclosed by brackets "[]" replaced with your own identifying
  255. // information: Portions Copyright [yyyy] [name of copyright owner]
  256. //
  257. // CDDL HEADER END
  258. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  259. // Copyright 2016 Joyent, Inc.
  260. // Copyright 2022 Oxide Computer Company
  261. //
  262. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  263. // Use is subject to license terms.
  264. // CDDL HEADER START
  265. //
  266. // The contents of this file are subject to the terms of the
  267. // Common Development and Distribution License, Version 1.0 only
  268. // (the "License"). You may not use this file except in compliance
  269. // with the License.
  270. //
  271. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  272. // or http://www.opensolaris.org/os/licensing.
  273. // See the License for the specific language governing permissions
  274. // and limitations under the License.
  275. //
  276. // When distributing Covered Code, include this CDDL HEADER in each
  277. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  278. // If applicable, add the following below this CDDL HEADER, with the
  279. // fields enclosed by brackets "[]" replaced with your own identifying
  280. // information: Portions Copyright [yyyy] [name of copyright owner]
  281. //
  282. // CDDL HEADER END
  283. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  284. // Use is subject to license terms.
  285. // Copyright 2015 EveryCity Ltd. All rights reserved.
  286. // Copyright 2019 Joyent, Inc.
  287. // This file contains definitions designed to enable different compilers
  288. // to be used harmoniously on Solaris systems.
  289. // Allow for version tests for compiler bugs and features.
  290. // analogous to lint's PRINTFLIKEn
  291. // Handle the kernel printf routines that can take '%b' too
  292. // This one's pretty obvious -- the function never returns
  293. // The function is 'extern inline' and expects GNU C89 behaviour, not C99
  294. // behaviour.
  295. //
  296. // Should only be used on 'extern inline' definitions for GCC.
  297. // The function has control flow such that it may return multiple times (in
  298. // the manner of setjmp or vfork)
  299. // This is an appropriate label for functions that do not
  300. // modify their arguments, e.g. strlen()
  301. // This is a stronger form of __pure__. Can be used for functions
  302. // that do not modify their arguments and don't depend on global
  303. // memory.
  304. // This attribute, attached to a variable, means that the variable is meant to
  305. // be possibly unused. GCC will not produce a warning for this variable.
  306. // Shorthand versions for readability
  307. // In release build, disable warnings about variables
  308. // which are used only for debugging.
  309. // CDDL HEADER START
  310. //
  311. // The contents of this file are subject to the terms of the
  312. // Common Development and Distribution License (the "License").
  313. // You may not use this file except in compliance with the License.
  314. //
  315. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  316. // or http://www.opensolaris.org/os/licensing.
  317. // See the License for the specific language governing permissions
  318. // and limitations under the License.
  319. //
  320. //
  321. // When distributing Covered Code, include this CDDL HEADER in each
  322. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  323. // If applicable, add the following below this CDDL HEADER, with the
  324. // fields enclosed by brackets "[]" replaced with your own identifying
  325. // information: Portions Copyright [yyyy] [name of copyright owner]
  326. //
  327. // CDDL HEADER END
  328. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  329. // Use is subject to license terms.
  330. // Copyright 2016 Joyent, Inc.
  331. // This header file serves to group a set of well known defines and to
  332. // set these for each instruction set architecture. These defines may
  333. // be divided into two groups; characteristics of the processor and
  334. // implementation choices for Solaris on a processor.
  335. //
  336. // Processor Characteristics:
  337. //
  338. // _LITTLE_ENDIAN / _BIG_ENDIAN:
  339. // The natural byte order of the processor. A pointer to an int points
  340. // to the least/most significant byte of that int.
  341. //
  342. // _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
  343. // The processor specific direction of stack growth. A push onto the
  344. // stack increases/decreases the stack pointer, so it stores data at
  345. // successively higher/lower addresses. (Stackless machines ignored
  346. // without regrets).
  347. //
  348. // _LONG_LONG_HTOL / _LONG_LONG_LTOH:
  349. // A pointer to a long long points to the most/least significant long
  350. // within that long long.
  351. //
  352. // _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
  353. // The C compiler assigns bit fields from the high/low to the low/high end
  354. // of an int (most to least significant vs. least to most significant).
  355. //
  356. // _IEEE_754:
  357. // The processor (or supported implementations of the processor)
  358. // supports the ieee-754 floating point standard. No other floating
  359. // point standards are supported (or significant). Any other supported
  360. // floating point formats are expected to be cased on the ISA processor
  361. // symbol.
  362. //
  363. // _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
  364. // The C Compiler implements objects of type `char' as `unsigned' or
  365. // `signed' respectively. This is really an implementation choice of
  366. // the compiler writer, but it is specified in the ABI and tends to
  367. // be uniform across compilers for an instruction set architecture.
  368. // Hence, it has the properties of a processor characteristic.
  369. //
  370. // _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
  371. // _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
  372. // _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
  373. // The ABI defines alignment requirements of each of the primitive
  374. // object types. Some, if not all, may be hardware requirements as
  375. // well. The values are expressed in "byte-alignment" units.
  376. //
  377. // _MAX_ALIGNMENT:
  378. // The most stringent alignment requirement as specified by the ABI.
  379. // Equal to the maximum of all the above _XXX_ALIGNMENT values.
  380. //
  381. // _MAX_ALIGNMENT_TYPE:
  382. // The name of the C type that has the value descried in _MAX_ALIGNMENT.
  383. //
  384. // _ALIGNMENT_REQUIRED:
  385. // True or false (1 or 0) whether or not the hardware requires the ABI
  386. // alignment.
  387. //
  388. // _LONG_LONG_ALIGNMENT_32
  389. // The 32-bit ABI supported by a 64-bit kernel may have different
  390. // alignment requirements for primitive object types. The value of this
  391. // identifier is expressed in "byte-alignment" units.
  392. //
  393. // _HAVE_CPUID_INSN
  394. // This indicates that the architecture supports the 'cpuid'
  395. // instruction as defined by Intel. (Intel allows other vendors
  396. // to extend the instruction for their own purposes.)
  397. //
  398. //
  399. // Implementation Choices:
  400. //
  401. // _ILP32 / _LP64:
  402. // This specifies the compiler data type implementation as specified in
  403. // the relevant ABI. The choice between these is strongly influenced
  404. // by the underlying hardware, but is not absolutely tied to it.
  405. // Currently only two data type models are supported:
  406. //
  407. // _ILP32:
  408. // Int/Long/Pointer are 32 bits. This is the historical UNIX
  409. // and Solaris implementation. Due to its historical standing,
  410. // this is the default case.
  411. //
  412. // _LP64:
  413. // Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
  414. // implementation for 64-bit ABIs such as SPARC V9.
  415. //
  416. // _I32LPx:
  417. // A compilation environment where 'int' is 32-bit, and
  418. // longs and pointers are simply the same size.
  419. //
  420. // In all cases, Char is 8 bits and Short is 16 bits.
  421. //
  422. // _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
  423. // This specifies the form of the disk VTOC (or label):
  424. //
  425. // _SUNOS_VTOC_8:
  426. // This is a VTOC form which is upwardly compatible with the
  427. // SunOS 4.x disk label and allows 8 partitions per disk.
  428. //
  429. // _SUNOS_VTOC_16:
  430. // In this format the incore vtoc image matches the ondisk
  431. // version. It allows 16 slices per disk, and is not
  432. // compatible with the SunOS 4.x disk label.
  433. //
  434. // Note that these are not the only two VTOC forms possible and
  435. // additional forms may be added. One possible form would be the
  436. // SVr4 VTOC form. The symbol for that is reserved now, although
  437. // it is not implemented.
  438. //
  439. // _SVR4_VTOC_16:
  440. // This VTOC form is compatible with the System V Release 4
  441. // VTOC (as implemented on the SVr4 Intel and 3b ports) with
  442. // 16 partitions per disk.
  443. //
  444. //
  445. // _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
  446. // This describes the type of addresses used by system DMA:
  447. //
  448. // _DMA_USES_PHYSADDR:
  449. // This type of DMA, used in the x86 implementation,
  450. // requires physical addresses for DMA buffers. The 24-bit
  451. // addresses used by some legacy boards is the source of the
  452. // "low-memory" (<16MB) requirement for some devices using DMA.
  453. //
  454. // _DMA_USES_VIRTADDR:
  455. // This method of DMA allows the use of virtual addresses for
  456. // DMA transfers.
  457. //
  458. // _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
  459. // This indicates the presence/absence of an fdisk table.
  460. //
  461. // _FIRMWARE_NEEDS_FDISK
  462. // The fdisk table is required by system firmware. If present,
  463. // it allows a disk to be subdivided into multiple fdisk
  464. // partitions, each of which is equivalent to a separate,
  465. // virtual disk. This enables the co-existence of multiple
  466. // operating systems on a shared hard disk.
  467. //
  468. // _NO_FDISK_PRESENT
  469. // If the fdisk table is absent, it is assumed that the entire
  470. // media is allocated for a single operating system.
  471. //
  472. // _HAVE_TEM_FIRMWARE
  473. // Defined if this architecture has the (fallback) option of
  474. // using prom_* calls for doing I/O if a suitable kernel driver
  475. // is not available to do it.
  476. //
  477. // _DONT_USE_1275_GENERIC_NAMES
  478. // Controls whether or not device tree node names should
  479. // comply with the IEEE 1275 "Generic Names" Recommended
  480. // Practice. With _DONT_USE_GENERIC_NAMES, device-specific
  481. // names identifying the particular device will be used.
  482. //
  483. // __i386_COMPAT
  484. // This indicates whether the i386 ABI is supported as a *non-native*
  485. // mode for the platform. When this symbol is defined:
  486. // - 32-bit xstat-style system calls are enabled
  487. // - 32-bit xmknod-style system calls are enabled
  488. // - 32-bit system calls use i386 sizes -and- alignments
  489. //
  490. // Note that this is NOT defined for the i386 native environment!
  491. //
  492. // __x86
  493. // This is ONLY a synonym for defined(__i386) || defined(__amd64)
  494. // which is useful only insofar as these two architectures share
  495. // common attributes. Analogous to __sparc.
  496. //
  497. // _PSM_MODULES
  498. // This indicates whether or not the implementation uses PSM
  499. // modules for processor support, reading /etc/mach from inside
  500. // the kernel to extract a list.
  501. //
  502. // _RTC_CONFIG
  503. // This indicates whether or not the implementation uses /etc/rtc_config
  504. // to configure the real-time clock in the kernel.
  505. //
  506. // _UNIX_KRTLD
  507. // This indicates that the implementation uses a dynamically
  508. // linked unix + krtld to form the core kernel image at boot
  509. // time, or (in the absence of this symbol) a prelinked kernel image.
  510. //
  511. // _OBP
  512. // This indicates the firmware interface is OBP.
  513. //
  514. // _SOFT_HOSTID
  515. // This indicates that the implementation obtains the hostid
  516. // from the file /etc/hostid, rather than from hardware.
  517. // The following set of definitions characterize Solaris on AMD's
  518. // 64-bit systems.
  519. // Define the appropriate "processor characteristics"
  520. // Different alignment constraints for the i386 ABI in compatibility mode
  521. // Define the appropriate "implementation choices".
  522. // The feature test macro __i386 is generic for all processors implementing
  523. // the Intel 386 instruction set or a superset of it. Specifically, this
  524. // includes all members of the 386, 486, and Pentium family of processors.
  525. // Values of _POSIX_C_SOURCE
  526. //
  527. // undefined not a POSIX compilation
  528. // 1 POSIX.1-1990 compilation
  529. // 2 POSIX.2-1992 compilation
  530. // 199309L POSIX.1b-1993 compilation (Real Time)
  531. // 199506L POSIX.1c-1995 compilation (POSIX Threads)
  532. // 200112L POSIX.1-2001 compilation (Austin Group Revision)
  533. // 200809L POSIX.1-2008 compilation
  534. // The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
  535. // and _STDC_C99 are Sun implementation specific macros created in order to
  536. // compress common standards specified feature test macros for easier reading.
  537. // These macros should not be used by the application developer as
  538. // unexpected results may occur. Instead, the user should reference
  539. // standards(7) for correct usage of the standards feature test macros.
  540. //
  541. // __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
  542. // X/Open or POSIX or in the negative, when neither
  543. // X/Open or POSIX defines a symbol.
  544. //
  545. // _STRICT_STDC __STDC__ is specified by the C Standards and defined
  546. // by the compiler. For Sun compilers the value of
  547. // __STDC__ is either 1, 0, or not defined based on the
  548. // compilation mode (see cc(1)). When the value of
  549. // __STDC__ is 1 and in the absence of any other feature
  550. // test macros, the namespace available to the application
  551. // is limited to only those symbols defined by the C
  552. // Standard. _STRICT_STDC provides a more readable means
  553. // of identifying symbols defined by the standard, or in
  554. // the negative, symbols that are extensions to the C
  555. // Standard. See additional comments for GNU C differences.
  556. //
  557. // _STDC_C99 __STDC_VERSION__ is specified by the C standards and
  558. // defined by the compiler and indicates the version of
  559. // the C standard. A value of 199901L indicates a
  560. // compiler that complies with ISO/IEC 9899:1999, other-
  561. // wise known as the C99 standard.
  562. //
  563. // _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
  564. // is 201112L indicating a compiler that compiles with
  565. // ISO/IEC 9899:2011, otherwise known as the C11 standard.
  566. //
  567. // _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
  568. // by the standards, and the user has not explicitly
  569. // relaxed the strictness via __EXTENSIONS__.
  570. // ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
  571. // 99899:2011 specify the following predefined macro name:
  572. //
  573. // __STDC__ The integer constant 1, intended to indicate a conforming
  574. // implementation.
  575. //
  576. // Furthermore, a strictly conforming program shall use only those features
  577. // of the language and library specified in these standards. A conforming
  578. // implementation shall accept any strictly conforming program.
  579. //
  580. // Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
  581. // strictly conforming environments and __STDC__ to 0 for environments that
  582. // use ANSI C semantics but allow extensions to the C standard. For non-ANSI
  583. // C semantics, Sun's C compiler does not define __STDC__.
  584. //
  585. // The GNU C project interpretation is that __STDC__ should always be defined
  586. // to 1 for compilation modes that accept ANSI C syntax regardless of whether
  587. // or not extensions to the C standard are used. Violations of conforming
  588. // behavior are conditionally flagged as warnings via the use of the
  589. // -pedantic option. In addition to defining __STDC__ to 1, the GNU C
  590. // compiler also defines __STRICT_ANSI__ as a means of specifying strictly
  591. // conforming environments using the -ansi or -std=<standard> options.
  592. //
  593. // In the absence of any other compiler options, Sun and GNU set the value
  594. // of __STDC__ as follows when using the following options:
  595. //
  596. // Value of __STDC__ __STRICT_ANSI__
  597. //
  598. // cc -Xa (default) 0 undefined
  599. // cc -Xt (transitional) 0 undefined
  600. // cc -Xc (strictly conforming) 1 undefined
  601. // cc -Xs (K&R C) undefined undefined
  602. //
  603. // gcc (default) 1 undefined
  604. // gcc -ansi, -std={c89, c99,...) 1 defined
  605. // gcc -traditional (K&R) undefined undefined
  606. //
  607. // The default compilation modes for Sun C compilers versus GNU C compilers
  608. // results in a differing value for __STDC__ which results in a more
  609. // restricted namespace when using Sun compilers. To allow both GNU and Sun
  610. // interpretations to peacefully co-exist, we use the following Sun
  611. // implementation _STRICT_STDC_ macro:
  612. // Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
  613. // Use strict symbol visibility.
  614. // This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
  615. // governed by POSIX, but have not been governed by ISO C. One can go two ways
  616. // on what should happen if an application actively includes (not transitively)
  617. // a header that isn't part of the ISO C spec, we opt to say that if someone has
  618. // gone out of there way then they're doing it for a reason and that is an act
  619. // of non-compliance and therefore it's not up to us to hide away every symbol.
  620. //
  621. // In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
  622. // cases where in the past we have only used a POSIX related check and we don't
  623. // wish to make something stricter. Often applications are relying on the
  624. // ability to, or more realistically unwittingly, have _STRICT_STDC declared and
  625. // still use these interfaces.
  626. // Large file interfaces:
  627. //
  628. // _LARGEFILE_SOURCE
  629. // 1 large file-related additions to POSIX
  630. // interfaces requested (fseeko, etc.)
  631. // _LARGEFILE64_SOURCE
  632. // 1 transitional large-file-related interfaces
  633. // requested (seek64, stat64, etc.)
  634. //
  635. // The corresponding announcement macros are respectively:
  636. // _LFS_LARGEFILE
  637. // _LFS64_LARGEFILE
  638. // (These are set in <unistd.h>.)
  639. //
  640. // Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
  641. // well.
  642. //
  643. // The large file interfaces are made visible regardless of the initial values
  644. // of the feature test macros under certain circumstances:
  645. // - If no explicit standards-conforming environment is requested (neither
  646. // of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
  647. // __STDC__ does not imply standards conformance).
  648. // - Extended system interfaces are explicitly requested (__EXTENSIONS__
  649. // is defined).
  650. // - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
  651. // defined). (Note that this dependency is an artifact of the current
  652. // kernel implementation and may change in future releases.)
  653. // Large file compilation environment control:
  654. //
  655. // The setting of _FILE_OFFSET_BITS controls the size of various file-related
  656. // types and governs the mapping between file-related source function symbol
  657. // names and the corresponding binary entry points.
  658. //
  659. // In the 32-bit environment, the default value is 32; if not set, set it to
  660. // the default here, to simplify tests in other headers.
  661. //
  662. // In the 64-bit compilation environment, the only value allowed is 64.
  663. // Use of _XOPEN_SOURCE
  664. //
  665. // The following X/Open specifications are supported:
  666. //
  667. // X/Open Portability Guide, Issue 3 (XPG3)
  668. // X/Open CAE Specification, Issue 4 (XPG4)
  669. // X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
  670. // X/Open CAE Specification, Issue 5 (XPG5)
  671. // Open Group Technical Standard, Issue 6 (XPG6), also referred to as
  672. // IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
  673. // Open Group Technical Standard, Issue 7 (XPG7), also referred to as
  674. // IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
  675. //
  676. // XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
  677. // XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
  678. // Version 2 (SUSv2)
  679. // XPG6 is the result of a merge of the X/Open and POSIX specifications
  680. // and as such is also referred to as IEEE Std. 1003.1-2001 in
  681. // addition to UNIX 03 and SUSv3.
  682. // XPG7 is also referred to as UNIX 08 and SUSv4.
  683. //
  684. // When writing a conforming X/Open application, as per the specification
  685. // requirements, the appropriate feature test macros must be defined at
  686. // compile time. These are as follows. For more info, see standards(7).
  687. //
  688. // Feature Test Macro Specification
  689. // ------------------------------------------------ -------------
  690. // _XOPEN_SOURCE XPG3
  691. // _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
  692. // _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
  693. // _XOPEN_SOURCE = 500 XPG5
  694. // _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
  695. // _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
  696. //
  697. // In order to simplify the guards within the headers, the following
  698. // implementation private test macros have been created. Applications
  699. // must NOT use these private test macros as unexpected results will
  700. // occur.
  701. //
  702. // Note that in general, the use of these private macros is cumulative.
  703. // For example, the use of _XPG3 with no other restrictions on the X/Open
  704. // namespace will make the symbols visible for XPG3 through XPG6
  705. // compilation environments. The use of _XPG4_2 with no other X/Open
  706. // namespace restrictions indicates that the symbols were introduced in
  707. // XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
  708. // environments, but not for XPG3 or XPG4 compilation environments.
  709. //
  710. // _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
  711. // _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
  712. // _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
  713. // _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
  714. // _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
  715. // _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
  716. // X/Open Portability Guide, Issue 3
  717. // _XOPEN_VERSION is defined by the X/Open specifications and is not
  718. // normally defined by the application, except in the case of an XPG4
  719. // application. On the implementation side, _XOPEN_VERSION defined with
  720. // the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
  721. // with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
  722. // _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
  723. // application and with a value of 600 indicates an XPG6 (UNIX 03)
  724. // application and with a value of 700 indicates an XPG7 (UNIX 08).
  725. // The appropriate version is determined by the use of the
  726. // feature test macros described earlier. The value of _XOPEN_VERSION
  727. // defaults to 3 otherwise indicating support for XPG3 applications.
  728. // ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
  729. // conforming environments. ISO 9899:1999 says it does.
  730. //
  731. // The presence of _LONGLONG_TYPE says "long long exists" which is therefore
  732. // defined in all but strictly conforming environments that disallow it.
  733. // The following macro defines a value for the ISO C99 restrict
  734. // keyword so that _RESTRICT_KYWD resolves to "restrict" if
  735. // an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
  736. // if any other compiler is used. This allows for the use of single
  737. // prototype declarations regardless of compiler version.
  738. // The following macro defines a value for the ISO C11 _Noreturn
  739. // keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
  740. // an ISO C11 compiler is used and "" (null string) if any other
  741. // compiler is used. This allows for the use of single prototype
  742. // declarations regardless of compiler version.
  743. // ISO/IEC 9899:2011 Annex K
  744. // The following macro indicates header support for the ANSI C++
  745. // standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
  746. // The following macro indicates header support for the C99 standard,
  747. // ISO/IEC 9899:1999, Programming Languages - C.
  748. // The following macro indicates header support for the C11 standard,
  749. // ISO/IEC 9899:2011, Programming Languages - C.
  750. // The following macro indicates header support for the C11 standard,
  751. // ISO/IEC 9899:2011 Annex K, Programming Languages - C.
  752. // The following macro indicates header support for DTrace. The value is an
  753. // integer that corresponds to the major version number for DTrace.
  754. // CDDL HEADER START
  755. //
  756. // The contents of this file are subject to the terms of the
  757. // Common Development and Distribution License (the "License").
  758. // You may not use this file except in compliance with the License.
  759. //
  760. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  761. // or http://www.opensolaris.org/os/licensing.
  762. // See the License for the specific language governing permissions
  763. // and limitations under the License.
  764. //
  765. // When distributing Covered Code, include this CDDL HEADER in each
  766. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  767. // If applicable, add the following below this CDDL HEADER, with the
  768. // fields enclosed by brackets "[]" replaced with your own identifying
  769. // information: Portions Copyright [yyyy] [name of copyright owner]
  770. //
  771. // CDDL HEADER END
  772. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  773. // All Rights Reserved
  774. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  775. // Use is subject to license terms.
  776. //
  777. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  778. // Copyright 2016 Joyent, Inc.
  779. // Copyright 2021 Oxide Computer Company
  780. // DO NOT EDIT THIS FILE.
  781. //
  782. // It has been auto-edited by fixincludes from:
  783. //
  784. // "/usr/include/sys/feature_tests.h"
  785. //
  786. // This had to be done to correct non-standard usages in the
  787. // original, manufacturer supplied header file.
  788. // CDDL HEADER START
  789. //
  790. // The contents of this file are subject to the terms of the
  791. // Common Development and Distribution License (the "License").
  792. // You may not use this file except in compliance with the License.
  793. //
  794. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  795. // or http://www.opensolaris.org/os/licensing.
  796. // See the License for the specific language governing permissions
  797. // and limitations under the License.
  798. //
  799. // When distributing Covered Code, include this CDDL HEADER in each
  800. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  801. // If applicable, add the following below this CDDL HEADER, with the
  802. // fields enclosed by brackets "[]" replaced with your own identifying
  803. // information: Portions Copyright [yyyy] [name of copyright owner]
  804. //
  805. // CDDL HEADER END
  806. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  807. // Copyright 2016 Joyent, Inc.
  808. // Copyright 2022 Oxide Computer Company
  809. //
  810. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  811. // Use is subject to license terms.
  812. // CDDL HEADER START
  813. //
  814. // The contents of this file are subject to the terms of the
  815. // Common Development and Distribution License (the "License").
  816. // You may not use this file except in compliance with the License.
  817. //
  818. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  819. // or http://www.opensolaris.org/os/licensing.
  820. // See the License for the specific language governing permissions
  821. // and limitations under the License.
  822. //
  823. //
  824. // When distributing Covered Code, include this CDDL HEADER in each
  825. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  826. // If applicable, add the following below this CDDL HEADER, with the
  827. // fields enclosed by brackets "[]" replaced with your own identifying
  828. // information: Portions Copyright [yyyy] [name of copyright owner]
  829. //
  830. // CDDL HEADER END
  831. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  832. // Use is subject to license terms.
  833. // Copyright 2016 Joyent, Inc.
  834. // Machine dependent definitions moved to <sys/machtypes.h>.
  835. // CDDL HEADER START
  836. //
  837. // The contents of this file are subject to the terms of the
  838. // Common Development and Distribution License (the "License").
  839. // You may not use this file except in compliance with the License.
  840. //
  841. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  842. // or http://www.opensolaris.org/os/licensing.
  843. // See the License for the specific language governing permissions
  844. // and limitations under the License.
  845. //
  846. // When distributing Covered Code, include this CDDL HEADER in each
  847. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  848. // If applicable, add the following below this CDDL HEADER, with the
  849. // fields enclosed by brackets "[]" replaced with your own identifying
  850. // information: Portions Copyright [yyyy] [name of copyright owner]
  851. //
  852. // CDDL HEADER END
  853. // Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  854. // Use is subject to license terms.
  855. // Machine dependent types:
  856. //
  857. // intel ia32 Version
  858. type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
  859. // CDDL HEADER START
  860. //
  861. // The contents of this file are subject to the terms of the
  862. // Common Development and Distribution License, Version 1.0 only
  863. // (the "License"). You may not use this file except in compliance
  864. // with the License.
  865. //
  866. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  867. // or http://www.opensolaris.org/os/licensing.
  868. // See the License for the specific language governing permissions
  869. // and limitations under the License.
  870. //
  871. // When distributing Covered Code, include this CDDL HEADER in each
  872. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  873. // If applicable, add the following below this CDDL HEADER, with the
  874. // fields enclosed by brackets "[]" replaced with your own identifying
  875. // information: Portions Copyright [yyyy] [name of copyright owner]
  876. //
  877. // CDDL HEADER END
  878. // Copyright (c) 1988 AT&T
  879. // All Rights Reserved
  880. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  881. //
  882. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  883. // Use is subject to license terms.
  884. //
  885. // Copyright 2020 Joyent, Inc.
  886. // DO NOT EDIT THIS FILE.
  887. //
  888. // It has been auto-edited by fixincludes from:
  889. //
  890. // "/usr/include/sys/feature_tests.h"
  891. //
  892. // This had to be done to correct non-standard usages in the
  893. // original, manufacturer supplied header file.
  894. // CDDL HEADER START
  895. //
  896. // The contents of this file are subject to the terms of the
  897. // Common Development and Distribution License (the "License").
  898. // You may not use this file except in compliance with the License.
  899. //
  900. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  901. // or http://www.opensolaris.org/os/licensing.
  902. // See the License for the specific language governing permissions
  903. // and limitations under the License.
  904. //
  905. // When distributing Covered Code, include this CDDL HEADER in each
  906. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  907. // If applicable, add the following below this CDDL HEADER, with the
  908. // fields enclosed by brackets "[]" replaced with your own identifying
  909. // information: Portions Copyright [yyyy] [name of copyright owner]
  910. //
  911. // CDDL HEADER END
  912. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  913. // Copyright 2016 Joyent, Inc.
  914. // Copyright 2022 Oxide Computer Company
  915. //
  916. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  917. // Use is subject to license terms.
  918. // CDDL HEADER START
  919. //
  920. // The contents of this file are subject to the terms of the
  921. // Common Development and Distribution License, Version 1.0 only
  922. // (the "License"). You may not use this file except in compliance
  923. // with the License.
  924. //
  925. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  926. // or http://www.opensolaris.org/os/licensing.
  927. // See the License for the specific language governing permissions
  928. // and limitations under the License.
  929. //
  930. // When distributing Covered Code, include this CDDL HEADER in each
  931. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  932. // If applicable, add the following below this CDDL HEADER, with the
  933. // fields enclosed by brackets "[]" replaced with your own identifying
  934. // information: Portions Copyright [yyyy] [name of copyright owner]
  935. //
  936. // CDDL HEADER END
  937. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  938. // Use is subject to license terms.
  939. // Copyright 2015 EveryCity Ltd. All rights reserved.
  940. // Copyright 2019 Joyent, Inc.
  941. // This file contains definitions designed to enable different compilers
  942. // to be used harmoniously on Solaris systems.
  943. // Allow for version tests for compiler bugs and features.
  944. // analogous to lint's PRINTFLIKEn
  945. // Handle the kernel printf routines that can take '%b' too
  946. // This one's pretty obvious -- the function never returns
  947. // The function is 'extern inline' and expects GNU C89 behaviour, not C99
  948. // behaviour.
  949. //
  950. // Should only be used on 'extern inline' definitions for GCC.
  951. // The function has control flow such that it may return multiple times (in
  952. // the manner of setjmp or vfork)
  953. // This is an appropriate label for functions that do not
  954. // modify their arguments, e.g. strlen()
  955. // This is a stronger form of __pure__. Can be used for functions
  956. // that do not modify their arguments and don't depend on global
  957. // memory.
  958. // This attribute, attached to a variable, means that the variable is meant to
  959. // be possibly unused. GCC will not produce a warning for this variable.
  960. // Shorthand versions for readability
  961. // In release build, disable warnings about variables
  962. // which are used only for debugging.
  963. // CDDL HEADER START
  964. //
  965. // The contents of this file are subject to the terms of the
  966. // Common Development and Distribution License (the "License").
  967. // You may not use this file except in compliance with the License.
  968. //
  969. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  970. // or http://www.opensolaris.org/os/licensing.
  971. // See the License for the specific language governing permissions
  972. // and limitations under the License.
  973. //
  974. //
  975. // When distributing Covered Code, include this CDDL HEADER in each
  976. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  977. // If applicable, add the following below this CDDL HEADER, with the
  978. // fields enclosed by brackets "[]" replaced with your own identifying
  979. // information: Portions Copyright [yyyy] [name of copyright owner]
  980. //
  981. // CDDL HEADER END
  982. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  983. // Use is subject to license terms.
  984. // Copyright 2016 Joyent, Inc.
  985. // This header file serves to group a set of well known defines and to
  986. // set these for each instruction set architecture. These defines may
  987. // be divided into two groups; characteristics of the processor and
  988. // implementation choices for Solaris on a processor.
  989. //
  990. // Processor Characteristics:
  991. //
  992. // _LITTLE_ENDIAN / _BIG_ENDIAN:
  993. // The natural byte order of the processor. A pointer to an int points
  994. // to the least/most significant byte of that int.
  995. //
  996. // _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
  997. // The processor specific direction of stack growth. A push onto the
  998. // stack increases/decreases the stack pointer, so it stores data at
  999. // successively higher/lower addresses. (Stackless machines ignored
  1000. // without regrets).
  1001. //
  1002. // _LONG_LONG_HTOL / _LONG_LONG_LTOH:
  1003. // A pointer to a long long points to the most/least significant long
  1004. // within that long long.
  1005. //
  1006. // _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
  1007. // The C compiler assigns bit fields from the high/low to the low/high end
  1008. // of an int (most to least significant vs. least to most significant).
  1009. //
  1010. // _IEEE_754:
  1011. // The processor (or supported implementations of the processor)
  1012. // supports the ieee-754 floating point standard. No other floating
  1013. // point standards are supported (or significant). Any other supported
  1014. // floating point formats are expected to be cased on the ISA processor
  1015. // symbol.
  1016. //
  1017. // _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
  1018. // The C Compiler implements objects of type `char' as `unsigned' or
  1019. // `signed' respectively. This is really an implementation choice of
  1020. // the compiler writer, but it is specified in the ABI and tends to
  1021. // be uniform across compilers for an instruction set architecture.
  1022. // Hence, it has the properties of a processor characteristic.
  1023. //
  1024. // _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
  1025. // _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
  1026. // _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
  1027. // The ABI defines alignment requirements of each of the primitive
  1028. // object types. Some, if not all, may be hardware requirements as
  1029. // well. The values are expressed in "byte-alignment" units.
  1030. //
  1031. // _MAX_ALIGNMENT:
  1032. // The most stringent alignment requirement as specified by the ABI.
  1033. // Equal to the maximum of all the above _XXX_ALIGNMENT values.
  1034. //
  1035. // _MAX_ALIGNMENT_TYPE:
  1036. // The name of the C type that has the value descried in _MAX_ALIGNMENT.
  1037. //
  1038. // _ALIGNMENT_REQUIRED:
  1039. // True or false (1 or 0) whether or not the hardware requires the ABI
  1040. // alignment.
  1041. //
  1042. // _LONG_LONG_ALIGNMENT_32
  1043. // The 32-bit ABI supported by a 64-bit kernel may have different
  1044. // alignment requirements for primitive object types. The value of this
  1045. // identifier is expressed in "byte-alignment" units.
  1046. //
  1047. // _HAVE_CPUID_INSN
  1048. // This indicates that the architecture supports the 'cpuid'
  1049. // instruction as defined by Intel. (Intel allows other vendors
  1050. // to extend the instruction for their own purposes.)
  1051. //
  1052. //
  1053. // Implementation Choices:
  1054. //
  1055. // _ILP32 / _LP64:
  1056. // This specifies the compiler data type implementation as specified in
  1057. // the relevant ABI. The choice between these is strongly influenced
  1058. // by the underlying hardware, but is not absolutely tied to it.
  1059. // Currently only two data type models are supported:
  1060. //
  1061. // _ILP32:
  1062. // Int/Long/Pointer are 32 bits. This is the historical UNIX
  1063. // and Solaris implementation. Due to its historical standing,
  1064. // this is the default case.
  1065. //
  1066. // _LP64:
  1067. // Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
  1068. // implementation for 64-bit ABIs such as SPARC V9.
  1069. //
  1070. // _I32LPx:
  1071. // A compilation environment where 'int' is 32-bit, and
  1072. // longs and pointers are simply the same size.
  1073. //
  1074. // In all cases, Char is 8 bits and Short is 16 bits.
  1075. //
  1076. // _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
  1077. // This specifies the form of the disk VTOC (or label):
  1078. //
  1079. // _SUNOS_VTOC_8:
  1080. // This is a VTOC form which is upwardly compatible with the
  1081. // SunOS 4.x disk label and allows 8 partitions per disk.
  1082. //
  1083. // _SUNOS_VTOC_16:
  1084. // In this format the incore vtoc image matches the ondisk
  1085. // version. It allows 16 slices per disk, and is not
  1086. // compatible with the SunOS 4.x disk label.
  1087. //
  1088. // Note that these are not the only two VTOC forms possible and
  1089. // additional forms may be added. One possible form would be the
  1090. // SVr4 VTOC form. The symbol for that is reserved now, although
  1091. // it is not implemented.
  1092. //
  1093. // _SVR4_VTOC_16:
  1094. // This VTOC form is compatible with the System V Release 4
  1095. // VTOC (as implemented on the SVr4 Intel and 3b ports) with
  1096. // 16 partitions per disk.
  1097. //
  1098. //
  1099. // _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
  1100. // This describes the type of addresses used by system DMA:
  1101. //
  1102. // _DMA_USES_PHYSADDR:
  1103. // This type of DMA, used in the x86 implementation,
  1104. // requires physical addresses for DMA buffers. The 24-bit
  1105. // addresses used by some legacy boards is the source of the
  1106. // "low-memory" (<16MB) requirement for some devices using DMA.
  1107. //
  1108. // _DMA_USES_VIRTADDR:
  1109. // This method of DMA allows the use of virtual addresses for
  1110. // DMA transfers.
  1111. //
  1112. // _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
  1113. // This indicates the presence/absence of an fdisk table.
  1114. //
  1115. // _FIRMWARE_NEEDS_FDISK
  1116. // The fdisk table is required by system firmware. If present,
  1117. // it allows a disk to be subdivided into multiple fdisk
  1118. // partitions, each of which is equivalent to a separate,
  1119. // virtual disk. This enables the co-existence of multiple
  1120. // operating systems on a shared hard disk.
  1121. //
  1122. // _NO_FDISK_PRESENT
  1123. // If the fdisk table is absent, it is assumed that the entire
  1124. // media is allocated for a single operating system.
  1125. //
  1126. // _HAVE_TEM_FIRMWARE
  1127. // Defined if this architecture has the (fallback) option of
  1128. // using prom_* calls for doing I/O if a suitable kernel driver
  1129. // is not available to do it.
  1130. //
  1131. // _DONT_USE_1275_GENERIC_NAMES
  1132. // Controls whether or not device tree node names should
  1133. // comply with the IEEE 1275 "Generic Names" Recommended
  1134. // Practice. With _DONT_USE_GENERIC_NAMES, device-specific
  1135. // names identifying the particular device will be used.
  1136. //
  1137. // __i386_COMPAT
  1138. // This indicates whether the i386 ABI is supported as a *non-native*
  1139. // mode for the platform. When this symbol is defined:
  1140. // - 32-bit xstat-style system calls are enabled
  1141. // - 32-bit xmknod-style system calls are enabled
  1142. // - 32-bit system calls use i386 sizes -and- alignments
  1143. //
  1144. // Note that this is NOT defined for the i386 native environment!
  1145. //
  1146. // __x86
  1147. // This is ONLY a synonym for defined(__i386) || defined(__amd64)
  1148. // which is useful only insofar as these two architectures share
  1149. // common attributes. Analogous to __sparc.
  1150. //
  1151. // _PSM_MODULES
  1152. // This indicates whether or not the implementation uses PSM
  1153. // modules for processor support, reading /etc/mach from inside
  1154. // the kernel to extract a list.
  1155. //
  1156. // _RTC_CONFIG
  1157. // This indicates whether or not the implementation uses /etc/rtc_config
  1158. // to configure the real-time clock in the kernel.
  1159. //
  1160. // _UNIX_KRTLD
  1161. // This indicates that the implementation uses a dynamically
  1162. // linked unix + krtld to form the core kernel image at boot
  1163. // time, or (in the absence of this symbol) a prelinked kernel image.
  1164. //
  1165. // _OBP
  1166. // This indicates the firmware interface is OBP.
  1167. //
  1168. // _SOFT_HOSTID
  1169. // This indicates that the implementation obtains the hostid
  1170. // from the file /etc/hostid, rather than from hardware.
  1171. // The following set of definitions characterize Solaris on AMD's
  1172. // 64-bit systems.
  1173. // Define the appropriate "processor characteristics"
  1174. // Different alignment constraints for the i386 ABI in compatibility mode
  1175. // Define the appropriate "implementation choices".
  1176. // The feature test macro __i386 is generic for all processors implementing
  1177. // the Intel 386 instruction set or a superset of it. Specifically, this
  1178. // includes all members of the 386, 486, and Pentium family of processors.
  1179. // Values of _POSIX_C_SOURCE
  1180. //
  1181. // undefined not a POSIX compilation
  1182. // 1 POSIX.1-1990 compilation
  1183. // 2 POSIX.2-1992 compilation
  1184. // 199309L POSIX.1b-1993 compilation (Real Time)
  1185. // 199506L POSIX.1c-1995 compilation (POSIX Threads)
  1186. // 200112L POSIX.1-2001 compilation (Austin Group Revision)
  1187. // 200809L POSIX.1-2008 compilation
  1188. // The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
  1189. // and _STDC_C99 are Sun implementation specific macros created in order to
  1190. // compress common standards specified feature test macros for easier reading.
  1191. // These macros should not be used by the application developer as
  1192. // unexpected results may occur. Instead, the user should reference
  1193. // standards(7) for correct usage of the standards feature test macros.
  1194. //
  1195. // __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
  1196. // X/Open or POSIX or in the negative, when neither
  1197. // X/Open or POSIX defines a symbol.
  1198. //
  1199. // _STRICT_STDC __STDC__ is specified by the C Standards and defined
  1200. // by the compiler. For Sun compilers the value of
  1201. // __STDC__ is either 1, 0, or not defined based on the
  1202. // compilation mode (see cc(1)). When the value of
  1203. // __STDC__ is 1 and in the absence of any other feature
  1204. // test macros, the namespace available to the application
  1205. // is limited to only those symbols defined by the C
  1206. // Standard. _STRICT_STDC provides a more readable means
  1207. // of identifying symbols defined by the standard, or in
  1208. // the negative, symbols that are extensions to the C
  1209. // Standard. See additional comments for GNU C differences.
  1210. //
  1211. // _STDC_C99 __STDC_VERSION__ is specified by the C standards and
  1212. // defined by the compiler and indicates the version of
  1213. // the C standard. A value of 199901L indicates a
  1214. // compiler that complies with ISO/IEC 9899:1999, other-
  1215. // wise known as the C99 standard.
  1216. //
  1217. // _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
  1218. // is 201112L indicating a compiler that compiles with
  1219. // ISO/IEC 9899:2011, otherwise known as the C11 standard.
  1220. //
  1221. // _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
  1222. // by the standards, and the user has not explicitly
  1223. // relaxed the strictness via __EXTENSIONS__.
  1224. // ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
  1225. // 99899:2011 specify the following predefined macro name:
  1226. //
  1227. // __STDC__ The integer constant 1, intended to indicate a conforming
  1228. // implementation.
  1229. //
  1230. // Furthermore, a strictly conforming program shall use only those features
  1231. // of the language and library specified in these standards. A conforming
  1232. // implementation shall accept any strictly conforming program.
  1233. //
  1234. // Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
  1235. // strictly conforming environments and __STDC__ to 0 for environments that
  1236. // use ANSI C semantics but allow extensions to the C standard. For non-ANSI
  1237. // C semantics, Sun's C compiler does not define __STDC__.
  1238. //
  1239. // The GNU C project interpretation is that __STDC__ should always be defined
  1240. // to 1 for compilation modes that accept ANSI C syntax regardless of whether
  1241. // or not extensions to the C standard are used. Violations of conforming
  1242. // behavior are conditionally flagged as warnings via the use of the
  1243. // -pedantic option. In addition to defining __STDC__ to 1, the GNU C
  1244. // compiler also defines __STRICT_ANSI__ as a means of specifying strictly
  1245. // conforming environments using the -ansi or -std=<standard> options.
  1246. //
  1247. // In the absence of any other compiler options, Sun and GNU set the value
  1248. // of __STDC__ as follows when using the following options:
  1249. //
  1250. // Value of __STDC__ __STRICT_ANSI__
  1251. //
  1252. // cc -Xa (default) 0 undefined
  1253. // cc -Xt (transitional) 0 undefined
  1254. // cc -Xc (strictly conforming) 1 undefined
  1255. // cc -Xs (K&R C) undefined undefined
  1256. //
  1257. // gcc (default) 1 undefined
  1258. // gcc -ansi, -std={c89, c99,...) 1 defined
  1259. // gcc -traditional (K&R) undefined undefined
  1260. //
  1261. // The default compilation modes for Sun C compilers versus GNU C compilers
  1262. // results in a differing value for __STDC__ which results in a more
  1263. // restricted namespace when using Sun compilers. To allow both GNU and Sun
  1264. // interpretations to peacefully co-exist, we use the following Sun
  1265. // implementation _STRICT_STDC_ macro:
  1266. // Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
  1267. // Use strict symbol visibility.
  1268. // This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
  1269. // governed by POSIX, but have not been governed by ISO C. One can go two ways
  1270. // on what should happen if an application actively includes (not transitively)
  1271. // a header that isn't part of the ISO C spec, we opt to say that if someone has
  1272. // gone out of there way then they're doing it for a reason and that is an act
  1273. // of non-compliance and therefore it's not up to us to hide away every symbol.
  1274. //
  1275. // In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
  1276. // cases where in the past we have only used a POSIX related check and we don't
  1277. // wish to make something stricter. Often applications are relying on the
  1278. // ability to, or more realistically unwittingly, have _STRICT_STDC declared and
  1279. // still use these interfaces.
  1280. // Large file interfaces:
  1281. //
  1282. // _LARGEFILE_SOURCE
  1283. // 1 large file-related additions to POSIX
  1284. // interfaces requested (fseeko, etc.)
  1285. // _LARGEFILE64_SOURCE
  1286. // 1 transitional large-file-related interfaces
  1287. // requested (seek64, stat64, etc.)
  1288. //
  1289. // The corresponding announcement macros are respectively:
  1290. // _LFS_LARGEFILE
  1291. // _LFS64_LARGEFILE
  1292. // (These are set in <unistd.h>.)
  1293. //
  1294. // Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
  1295. // well.
  1296. //
  1297. // The large file interfaces are made visible regardless of the initial values
  1298. // of the feature test macros under certain circumstances:
  1299. // - If no explicit standards-conforming environment is requested (neither
  1300. // of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
  1301. // __STDC__ does not imply standards conformance).
  1302. // - Extended system interfaces are explicitly requested (__EXTENSIONS__
  1303. // is defined).
  1304. // - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
  1305. // defined). (Note that this dependency is an artifact of the current
  1306. // kernel implementation and may change in future releases.)
  1307. // Large file compilation environment control:
  1308. //
  1309. // The setting of _FILE_OFFSET_BITS controls the size of various file-related
  1310. // types and governs the mapping between file-related source function symbol
  1311. // names and the corresponding binary entry points.
  1312. //
  1313. // In the 32-bit environment, the default value is 32; if not set, set it to
  1314. // the default here, to simplify tests in other headers.
  1315. //
  1316. // In the 64-bit compilation environment, the only value allowed is 64.
  1317. // Use of _XOPEN_SOURCE
  1318. //
  1319. // The following X/Open specifications are supported:
  1320. //
  1321. // X/Open Portability Guide, Issue 3 (XPG3)
  1322. // X/Open CAE Specification, Issue 4 (XPG4)
  1323. // X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
  1324. // X/Open CAE Specification, Issue 5 (XPG5)
  1325. // Open Group Technical Standard, Issue 6 (XPG6), also referred to as
  1326. // IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
  1327. // Open Group Technical Standard, Issue 7 (XPG7), also referred to as
  1328. // IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
  1329. //
  1330. // XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
  1331. // XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
  1332. // Version 2 (SUSv2)
  1333. // XPG6 is the result of a merge of the X/Open and POSIX specifications
  1334. // and as such is also referred to as IEEE Std. 1003.1-2001 in
  1335. // addition to UNIX 03 and SUSv3.
  1336. // XPG7 is also referred to as UNIX 08 and SUSv4.
  1337. //
  1338. // When writing a conforming X/Open application, as per the specification
  1339. // requirements, the appropriate feature test macros must be defined at
  1340. // compile time. These are as follows. For more info, see standards(7).
  1341. //
  1342. // Feature Test Macro Specification
  1343. // ------------------------------------------------ -------------
  1344. // _XOPEN_SOURCE XPG3
  1345. // _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
  1346. // _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
  1347. // _XOPEN_SOURCE = 500 XPG5
  1348. // _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
  1349. // _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
  1350. //
  1351. // In order to simplify the guards within the headers, the following
  1352. // implementation private test macros have been created. Applications
  1353. // must NOT use these private test macros as unexpected results will
  1354. // occur.
  1355. //
  1356. // Note that in general, the use of these private macros is cumulative.
  1357. // For example, the use of _XPG3 with no other restrictions on the X/Open
  1358. // namespace will make the symbols visible for XPG3 through XPG6
  1359. // compilation environments. The use of _XPG4_2 with no other X/Open
  1360. // namespace restrictions indicates that the symbols were introduced in
  1361. // XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
  1362. // environments, but not for XPG3 or XPG4 compilation environments.
  1363. //
  1364. // _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
  1365. // _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
  1366. // _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
  1367. // _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
  1368. // _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
  1369. // _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
  1370. // X/Open Portability Guide, Issue 3
  1371. // _XOPEN_VERSION is defined by the X/Open specifications and is not
  1372. // normally defined by the application, except in the case of an XPG4
  1373. // application. On the implementation side, _XOPEN_VERSION defined with
  1374. // the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
  1375. // with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
  1376. // _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
  1377. // application and with a value of 600 indicates an XPG6 (UNIX 03)
  1378. // application and with a value of 700 indicates an XPG7 (UNIX 08).
  1379. // The appropriate version is determined by the use of the
  1380. // feature test macros described earlier. The value of _XOPEN_VERSION
  1381. // defaults to 3 otherwise indicating support for XPG3 applications.
  1382. // ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
  1383. // conforming environments. ISO 9899:1999 says it does.
  1384. //
  1385. // The presence of _LONGLONG_TYPE says "long long exists" which is therefore
  1386. // defined in all but strictly conforming environments that disallow it.
  1387. // The following macro defines a value for the ISO C99 restrict
  1388. // keyword so that _RESTRICT_KYWD resolves to "restrict" if
  1389. // an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
  1390. // if any other compiler is used. This allows for the use of single
  1391. // prototype declarations regardless of compiler version.
  1392. // The following macro defines a value for the ISO C11 _Noreturn
  1393. // keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
  1394. // an ISO C11 compiler is used and "" (null string) if any other
  1395. // compiler is used. This allows for the use of single prototype
  1396. // declarations regardless of compiler version.
  1397. // ISO/IEC 9899:2011 Annex K
  1398. // The following macro indicates header support for the ANSI C++
  1399. // standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
  1400. // The following macro indicates header support for the C99 standard,
  1401. // ISO/IEC 9899:1999, Programming Languages - C.
  1402. // The following macro indicates header support for the C11 standard,
  1403. // ISO/IEC 9899:2011, Programming Languages - C.
  1404. // The following macro indicates header support for the C11 standard,
  1405. // ISO/IEC 9899:2011 Annex K, Programming Languages - C.
  1406. // The following macro indicates header support for DTrace. The value is an
  1407. // integer that corresponds to the major version number for DTrace.
  1408. // CDDL HEADER START
  1409. //
  1410. // The contents of this file are subject to the terms of the
  1411. // Common Development and Distribution License (the "License").
  1412. // You may not use this file except in compliance with the License.
  1413. //
  1414. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1415. // or http://www.opensolaris.org/os/licensing.
  1416. // See the License for the specific language governing permissions
  1417. // and limitations under the License.
  1418. //
  1419. // When distributing Covered Code, include this CDDL HEADER in each
  1420. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1421. // If applicable, add the following below this CDDL HEADER, with the
  1422. // fields enclosed by brackets "[]" replaced with your own identifying
  1423. // information: Portions Copyright [yyyy] [name of copyright owner]
  1424. //
  1425. // CDDL HEADER END
  1426. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  1427. // All Rights Reserved
  1428. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  1429. // Use is subject to license terms.
  1430. //
  1431. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  1432. // Copyright 2016 Joyent, Inc.
  1433. // Copyright 2021 Oxide Computer Company
  1434. // DO NOT EDIT THIS FILE.
  1435. //
  1436. // It has been auto-edited by fixincludes from:
  1437. //
  1438. // "/usr/include/sys/feature_tests.h"
  1439. //
  1440. // This had to be done to correct non-standard usages in the
  1441. // original, manufacturer supplied header file.
  1442. // CDDL HEADER START
  1443. //
  1444. // The contents of this file are subject to the terms of the
  1445. // Common Development and Distribution License (the "License").
  1446. // You may not use this file except in compliance with the License.
  1447. //
  1448. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1449. // or http://www.opensolaris.org/os/licensing.
  1450. // See the License for the specific language governing permissions
  1451. // and limitations under the License.
  1452. //
  1453. // When distributing Covered Code, include this CDDL HEADER in each
  1454. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1455. // If applicable, add the following below this CDDL HEADER, with the
  1456. // fields enclosed by brackets "[]" replaced with your own identifying
  1457. // information: Portions Copyright [yyyy] [name of copyright owner]
  1458. //
  1459. // CDDL HEADER END
  1460. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  1461. // Copyright 2016 Joyent, Inc.
  1462. // Copyright 2022 Oxide Computer Company
  1463. //
  1464. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  1465. // Use is subject to license terms.
  1466. // CDDL HEADER START
  1467. //
  1468. // The contents of this file are subject to the terms of the
  1469. // Common Development and Distribution License (the "License").
  1470. // You may not use this file except in compliance with the License.
  1471. //
  1472. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1473. // or http://www.opensolaris.org/os/licensing.
  1474. // See the License for the specific language governing permissions
  1475. // and limitations under the License.
  1476. //
  1477. //
  1478. // When distributing Covered Code, include this CDDL HEADER in each
  1479. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1480. // If applicable, add the following below this CDDL HEADER, with the
  1481. // fields enclosed by brackets "[]" replaced with your own identifying
  1482. // information: Portions Copyright [yyyy] [name of copyright owner]
  1483. //
  1484. // CDDL HEADER END
  1485. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  1486. // Use is subject to license terms.
  1487. // Copyright 2016 Joyent, Inc.
  1488. // Machine dependent definitions moved to <sys/machtypes.h>.
  1489. // CDDL HEADER START
  1490. //
  1491. // The contents of this file are subject to the terms of the
  1492. // Common Development and Distribution License (the "License").
  1493. // You may not use this file except in compliance with the License.
  1494. //
  1495. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1496. // or http://www.opensolaris.org/os/licensing.
  1497. // See the License for the specific language governing permissions
  1498. // and limitations under the License.
  1499. //
  1500. // When distributing Covered Code, include this CDDL HEADER in each
  1501. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1502. // If applicable, add the following below this CDDL HEADER, with the
  1503. // fields enclosed by brackets "[]" replaced with your own identifying
  1504. // information: Portions Copyright [yyyy] [name of copyright owner]
  1505. //
  1506. // CDDL HEADER END
  1507. // Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  1508. // Use is subject to license terms.
  1509. // Machine dependent types:
  1510. //
  1511. // intel ia32 Version
  1512. type Label_t = X_label_t /* machtypes.h:59:54 */
  1513. type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
  1514. // Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
  1515. // committee's working draft for the revision of the current ISO C standard,
  1516. // ISO/IEC 9899:1990 Programming language - C. These are not currently
  1517. // required by any standard but constitute a useful, general purpose set
  1518. // of type definitions which is namespace clean with respect to all standards.
  1519. // CDDL HEADER START
  1520. //
  1521. // The contents of this file are subject to the terms of the
  1522. // Common Development and Distribution License, Version 1.0 only
  1523. // (the "License"). You may not use this file except in compliance
  1524. // with the License.
  1525. //
  1526. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1527. // or http://www.opensolaris.org/os/licensing.
  1528. // See the License for the specific language governing permissions
  1529. // and limitations under the License.
  1530. //
  1531. // When distributing Covered Code, include this CDDL HEADER in each
  1532. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1533. // If applicable, add the following below this CDDL HEADER, with the
  1534. // fields enclosed by brackets "[]" replaced with your own identifying
  1535. // information: Portions Copyright [yyyy] [name of copyright owner]
  1536. //
  1537. // CDDL HEADER END
  1538. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  1539. //
  1540. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  1541. // Use is subject to license terms.
  1542. // This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
  1543. // of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
  1544. // Programming language - C.
  1545. //
  1546. // Programs/Modules should not directly include this file. Access to the
  1547. // types defined in this file should be through the inclusion of one of the
  1548. // following files:
  1549. //
  1550. // <sys/types.h> Provides only the "_t" types defined in this
  1551. // file which is a subset of the contents of
  1552. // <inttypes.h>. (This can be appropriate for
  1553. // all programs/modules except those claiming
  1554. // ANSI-C conformance.)
  1555. //
  1556. // <sys/inttypes.h> Provides the Kernel and Driver appropriate
  1557. // components of <inttypes.h>.
  1558. //
  1559. // <inttypes.h> For use by applications.
  1560. //
  1561. // See these files for more details.
  1562. // DO NOT EDIT THIS FILE.
  1563. //
  1564. // It has been auto-edited by fixincludes from:
  1565. //
  1566. // "/usr/include/sys/feature_tests.h"
  1567. //
  1568. // This had to be done to correct non-standard usages in the
  1569. // original, manufacturer supplied header file.
  1570. // CDDL HEADER START
  1571. //
  1572. // The contents of this file are subject to the terms of the
  1573. // Common Development and Distribution License (the "License").
  1574. // You may not use this file except in compliance with the License.
  1575. //
  1576. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1577. // or http://www.opensolaris.org/os/licensing.
  1578. // See the License for the specific language governing permissions
  1579. // and limitations under the License.
  1580. //
  1581. // When distributing Covered Code, include this CDDL HEADER in each
  1582. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1583. // If applicable, add the following below this CDDL HEADER, with the
  1584. // fields enclosed by brackets "[]" replaced with your own identifying
  1585. // information: Portions Copyright [yyyy] [name of copyright owner]
  1586. //
  1587. // CDDL HEADER END
  1588. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  1589. // Copyright 2016 Joyent, Inc.
  1590. // Copyright 2022 Oxide Computer Company
  1591. //
  1592. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  1593. // Use is subject to license terms.
  1594. // Basic / Extended integer types
  1595. //
  1596. // The following defines the basic fixed-size integer types.
  1597. //
  1598. // Implementations are free to typedef them to Standard C integer types or
  1599. // extensions that they support. If an implementation does not support one
  1600. // of the particular integer data types below, then it should not define the
  1601. // typedefs and macros corresponding to that data type. Note that int8_t
  1602. // is not defined in -Xs mode on ISAs for which the ABI specifies "char"
  1603. // as an unsigned entity because there is no way to define an eight bit
  1604. // signed integral.
  1605. type Int8_t = int8 /* int_types.h:75:16 */
  1606. type Int16_t = int16 /* int_types.h:79:17 */
  1607. type Int32_t = int32 /* int_types.h:80:15 */
  1608. type Int64_t = int64 /* int_types.h:83:16 */
  1609. type Uint8_t = uint8 /* int_types.h:91:24 */
  1610. type Uint16_t = uint16 /* int_types.h:92:25 */
  1611. type Uint32_t = uint32 /* int_types.h:93:23 */
  1612. type Uint64_t = uint64 /* int_types.h:95:24 */
  1613. // intmax_t and uintmax_t are to be the longest (in number of bits) signed
  1614. // and unsigned integer types supported by the implementation.
  1615. type Intmax_t = int64 /* int_types.h:107:19 */
  1616. type Uintmax_t = uint64 /* int_types.h:108:19 */
  1617. // intptr_t and uintptr_t are signed and unsigned integer types large enough
  1618. // to hold any data pointer; that is, data pointers can be assigned into or
  1619. // from these integer types without losing precision.
  1620. type Intptr_t = int64 /* int_types.h:120:16 */
  1621. type Uintptr_t = uint64 /* int_types.h:121:24 */
  1622. // The following define the fastest integer types that can hold the
  1623. // specified number of bits.
  1624. type Int_fast8_t = int8 /* int_types.h:132:16 */
  1625. type Int_fast16_t = int32 /* int_types.h:136:15 */
  1626. type Int_fast32_t = int32 /* int_types.h:137:15 */
  1627. type Int_fast64_t = int64 /* int_types.h:139:16 */
  1628. type Uint_fast8_t = uint8 /* int_types.h:146:24 */
  1629. type Uint_fast16_t = uint32 /* int_types.h:147:23 */
  1630. type Uint_fast32_t = uint32 /* int_types.h:148:23 */
  1631. type Uint_fast64_t = uint64 /* int_types.h:150:24 */
  1632. // The following define the smallest integer types that can hold the
  1633. // specified number of bits.
  1634. type Int_least8_t = int8 /* int_types.h:162:16 */
  1635. type Int_least16_t = int16 /* int_types.h:166:17 */
  1636. type Int_least32_t = int32 /* int_types.h:167:15 */
  1637. type Int_least64_t = int64 /* int_types.h:169:16 */
  1638. // If these are changed, please update char16_t and char32_t in head/uchar.h.
  1639. type Uint_least8_t = uint8 /* int_types.h:179:24 */
  1640. type Uint_least16_t = uint16 /* int_types.h:180:25 */
  1641. type Uint_least32_t = uint32 /* int_types.h:181:23 */
  1642. type Uint_least64_t = uint64 /* int_types.h:183:24 */
  1643. // Strictly conforming ANSI C environments prior to the 1999
  1644. // revision of the C Standard (ISO/IEC 9899:1999) do not have
  1645. // the long long data type.
  1646. type Longlong_t = int64 /* types.h:72:20 */
  1647. type U_longlong_t = uint64 /* types.h:73:28 */
  1648. // These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
  1649. // to use them instead of int32_t and uint32_t because DEC had
  1650. // shipped 64-bit wide.
  1651. type T_scalar_t = int32 /* types.h:92:18 */
  1652. type T_uscalar_t = uint32 /* types.h:93:18 */
  1653. // POSIX Extensions
  1654. type Uchar_t = uint8 /* types.h:102:23 */
  1655. type Ushort_t = uint16 /* types.h:103:24 */
  1656. type Uint_t = uint32 /* types.h:104:22 */
  1657. type Ulong_t = uint64 /* types.h:105:23 */
  1658. type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
  1659. type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
  1660. type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
  1661. // VM-related types
  1662. type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
  1663. type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
  1664. type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
  1665. type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
  1666. type Sysid_t = int16 /* types.h:128:16 */
  1667. type Index_t = int16 /* types.h:129:16 */
  1668. type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
  1669. type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
  1670. // The size of off_t and related types depends on the setting of
  1671. // _FILE_OFFSET_BITS. (Note that other system headers define other types
  1672. // related to those defined here.)
  1673. //
  1674. // If _LARGEFILE64_SOURCE is defined, variants of these types that are
  1675. // explicitly 64 bits wide become available.
  1676. type Off_t = int64 /* types.h:145:15 */ // offsets within files
  1677. type Off64_t = int64 /* types.h:152:16 */ // offsets within files
  1678. type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
  1679. type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
  1680. type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
  1681. type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
  1682. type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
  1683. type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
  1684. type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
  1685. type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
  1686. type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
  1687. // The boolean_t type has had a varied amount of exposure over the years in
  1688. // terms of how its enumeration constants have been exposed. In particular, it
  1689. // originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
  1690. // B_TRUE and B_FALSE with an underscore. This check never included the
  1691. // question of if we were in a strict ANSI C environment or whether extensions
  1692. // were defined.
  1693. //
  1694. // Compilers such as clang started defaulting to always including an
  1695. // XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
  1696. // This would lead most software that had used the non-underscore versions to
  1697. // need it. As such, we have adjusted the non-strict XOPEN environment to retain
  1698. // its old behavior so as to minimize namespace pollution; however, we instead
  1699. // include both variants of the definitions in the generally visible version
  1700. // allowing software written in either world to hopefully end up in a good
  1701. // place.
  1702. //
  1703. // This isn't perfect, but should hopefully minimize the pain for folks actually
  1704. // trying to build software.
  1705. type Boolean_t = uint32 /* types.h:215:69 */
  1706. // The {u,}pad64_t types can be used in structures such that those structures
  1707. // may be accessed by code produced by compilation environments which don't
  1708. // support a 64 bit integral datatype. The intention is not to allow
  1709. // use of these fields in such environments, but to maintain the alignment
  1710. // and offsets of the structure.
  1711. //
  1712. // Similar comments for {u,}pad128_t.
  1713. //
  1714. // Note that these types do NOT generate any stronger alignment constraints
  1715. // than those available in the underlying ABI. See <sys/isa_defs.h>
  1716. type Pad64_t = int64 /* types.h:240:18 */
  1717. type Upad64_t = uint64 /* types.h:241:18 */
  1718. type Pad128_t = struct {
  1719. F_q float64
  1720. F__ccgo_pad1 [8]byte
  1721. } /* types.h:257:3 */
  1722. type Upad128_t = struct {
  1723. F_q float64
  1724. F__ccgo_pad1 [8]byte
  1725. } /* types.h:262:3 */
  1726. type Offset_t = int64 /* types.h:264:20 */
  1727. type U_offset_t = uint64 /* types.h:265:22 */
  1728. type Len_t = uint64 /* types.h:266:22 */
  1729. type Diskaddr_t = uint64 /* types.h:267:22 */
  1730. // Definitions remaining from previous partial support for 64-bit file
  1731. // offsets. This partial support for devices greater than 2gb requires
  1732. // compiler support for long long.
  1733. type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
  1734. type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
  1735. type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
  1736. // The following type is for various kinds of identifiers. The
  1737. // actual type must be the same for all since some system calls
  1738. // (such as sigsend) take arguments that may be any of these
  1739. // types. The enumeration type idtype_t defined in sys/procset.h
  1740. // is used to indicate what type of id is being specified --
  1741. // a process id, process group id, session id, scheduling class id,
  1742. // user id, group id, project id, task id or zone id.
  1743. type Id_t = int32 /* types.h:329:14 */
  1744. type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
  1745. // Type useconds_t is an unsigned integral type capable of storing
  1746. // values at least in the range of zero to 1,000,000.
  1747. type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
  1748. type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
  1749. // Typedefs for dev_t components.
  1750. type Major_t = uint32 /* types.h:351:16 */ // major part of device number
  1751. type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
  1752. // The data type of a thread priority.
  1753. type Pri_t = int16 /* types.h:361:15 */
  1754. // The data type for a CPU flags field. (Can be extended to larger unsigned
  1755. // types, if needed, limited by ability to update atomically.)
  1756. type Cpu_flag_t = uint16 /* types.h:367:18 */
  1757. // For compatibility reasons the following typedefs (prefixed o_)
  1758. // can't grow regardless of the EFT definition. Although,
  1759. // applications should not explicitly use these typedefs
  1760. // they may be included via a system header definition.
  1761. // WARNING: These typedefs may be removed in a future
  1762. // release.
  1763. //
  1764. // ex. the definitions in s5inode.h (now obsoleted)
  1765. // remained small to preserve compatibility
  1766. // in the S5 file system type.
  1767. type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
  1768. type O_dev_t = int16 /* types.h:381:15 */ // old device type
  1769. type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
  1770. type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
  1771. type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
  1772. type O_pid_t = int16 /* types.h:385:15 */ // old process id type
  1773. type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
  1774. // POSIX and XOPEN Declarations
  1775. type Key_t = int32 /* types.h:392:13 */ // IPC key type
  1776. type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
  1777. type Uid_t = uint32 /* types.h:401:22 */ // UID type
  1778. type Gid_t = uint32 /* types.h:404:15 */ // GID type
  1779. type Datalink_id_t = uint32 /* types.h:406:18 */
  1780. type Vrid_t = uint32 /* types.h:407:18 */
  1781. type Taskid_t = int32 /* types.h:409:17 */
  1782. type Projid_t = int32 /* types.h:410:17 */
  1783. type Poolid_t = int32 /* types.h:411:14 */
  1784. type Zoneid_t = int32 /* types.h:412:14 */
  1785. type Ctid_t = int32 /* types.h:413:14 */
  1786. // POSIX definitions are same as defined in thread.h and synch.h.
  1787. // Any changes made to here should be reflected in corresponding
  1788. // files as described in comments.
  1789. type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
  1790. type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
  1791. // "Magic numbers" tagging synchronization object types
  1792. type X_pthread_mutex = struct {
  1793. F__pthread_mutex_flags struct {
  1794. F__pthread_mutex_flag1 uint16
  1795. F__pthread_mutex_flag2 uint8
  1796. F__pthread_mutex_ceiling uint8
  1797. F__pthread_mutex_type uint16
  1798. F__pthread_mutex_magic uint16
  1799. }
  1800. F__pthread_mutex_lock struct {
  1801. F__ccgo_pad1 [0]uint64
  1802. F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
  1803. }
  1804. F__pthread_mutex_data uint64
  1805. } /* types.h:429:9 */
  1806. // = thread_key_t in thread.h
  1807. // "Magic numbers" tagging synchronization object types
  1808. type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
  1809. type X_pthread_cond = struct {
  1810. F__pthread_cond_flags struct {
  1811. F__pthread_cond_flag [4]uint8
  1812. F__pthread_cond_type uint16
  1813. F__pthread_cond_magic uint16
  1814. }
  1815. F__pthread_cond_data uint64
  1816. } /* types.h:450:9 */
  1817. type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
  1818. // UNIX 98 Extension
  1819. type X_pthread_rwlock = struct {
  1820. F__pthread_rwlock_readers int32
  1821. F__pthread_rwlock_type uint16
  1822. F__pthread_rwlock_magic uint16
  1823. F__pthread_rwlock_mutex Pthread_mutex_t
  1824. F__pthread_rwlock_readercv Pthread_cond_t
  1825. F__pthread_rwlock_writercv Pthread_cond_t
  1826. } /* types.h:462:9 */
  1827. // UNIX 98 Extension
  1828. type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
  1829. // SUSV3
  1830. type Pthread_barrier_t = struct {
  1831. F__pthread_barrier_count uint32
  1832. F__pthread_barrier_current uint32
  1833. F__pthread_barrier_cycle uint64
  1834. F__pthread_barrier_reserved uint64
  1835. F__pthread_barrier_lock Pthread_mutex_t
  1836. F__pthread_barrier_cond Pthread_cond_t
  1837. } /* types.h:481:3 */
  1838. type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
  1839. // attributes for threads, dynamically allocated by library
  1840. type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
  1841. // attributes for threads, dynamically allocated by library
  1842. type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
  1843. // attributes for mutex, dynamically allocated by library
  1844. type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
  1845. // attributes for mutex, dynamically allocated by library
  1846. type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
  1847. // attributes for cond, dynamically allocated by library
  1848. type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
  1849. // attributes for cond, dynamically allocated by library
  1850. type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
  1851. // pthread_once
  1852. type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
  1853. // pthread_once
  1854. type Pthread_once_t = X_once /* types.h:511:3 */
  1855. // UNIX 98 Extensions
  1856. // attributes for rwlock, dynamically allocated by library
  1857. type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
  1858. // UNIX 98 Extensions
  1859. // attributes for rwlock, dynamically allocated by library
  1860. type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
  1861. // SUSV3
  1862. // attributes for pthread_barrier_t, dynamically allocated by library
  1863. type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
  1864. type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
  1865. type Nlink_t = uint32 /* types.h:532:16 */ // file link type
  1866. type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
  1867. type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
  1868. type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
  1869. type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
  1870. type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
  1871. type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
  1872. // BEGIN CSTYLED
  1873. type Unchar = uint8 /* types.h:580:23 */
  1874. type Ushort = uint16 /* types.h:581:24 */
  1875. type Uint = uint32 /* types.h:582:22 */
  1876. type Ulong = uint64 /* types.h:583:23 */
  1877. // END CSTYLED
  1878. // The following is the value of type id_t to use to indicate the
  1879. // caller's current id. See procset.h for the type idtype_t
  1880. // which defines which kind of id is being specified.
  1881. // The following value of type pfn_t is used to indicate
  1882. // invalid page frame number.
  1883. // BEGIN CSTYLED
  1884. type U_char = uint8 /* types.h:650:23 */
  1885. type U_short = uint16 /* types.h:651:24 */
  1886. type U_int = uint32 /* types.h:652:22 */
  1887. type U_long = uint64 /* types.h:653:23 */
  1888. type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
  1889. type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
  1890. type Quad = Quad_t /* types.h:655:17 */ // used by UFS
  1891. // END CSTYLED
  1892. // Nested include for BSD/sockets source compatibility.
  1893. // (The select macros used to be defined here).
  1894. // CDDL HEADER START
  1895. //
  1896. // The contents of this file are subject to the terms of the
  1897. // Common Development and Distribution License (the "License").
  1898. // You may not use this file except in compliance with the License.
  1899. //
  1900. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1901. // or http://www.opensolaris.org/os/licensing.
  1902. // See the License for the specific language governing permissions
  1903. // and limitations under the License.
  1904. //
  1905. // When distributing Covered Code, include this CDDL HEADER in each
  1906. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1907. // If applicable, add the following below this CDDL HEADER, with the
  1908. // fields enclosed by brackets "[]" replaced with your own identifying
  1909. // information: Portions Copyright [yyyy] [name of copyright owner]
  1910. //
  1911. // CDDL HEADER END
  1912. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  1913. //
  1914. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  1915. //
  1916. // Copyright 2010 Sun Microsystems, Inc. All rights reserved.
  1917. // Use is subject to license terms.
  1918. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  1919. // All Rights Reserved
  1920. // University Copyright- Copyright (c) 1982, 1986, 1988
  1921. // The Regents of the University of California
  1922. // All Rights Reserved
  1923. //
  1924. // University Acknowledgment- Portions of this document are derived from
  1925. // software developed by the University of California, Berkeley, and its
  1926. // contributors.
  1927. // DO NOT EDIT THIS FILE.
  1928. //
  1929. // It has been auto-edited by fixincludes from:
  1930. //
  1931. // "/usr/include/sys/feature_tests.h"
  1932. //
  1933. // This had to be done to correct non-standard usages in the
  1934. // original, manufacturer supplied header file.
  1935. // CDDL HEADER START
  1936. //
  1937. // The contents of this file are subject to the terms of the
  1938. // Common Development and Distribution License (the "License").
  1939. // You may not use this file except in compliance with the License.
  1940. //
  1941. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1942. // or http://www.opensolaris.org/os/licensing.
  1943. // See the License for the specific language governing permissions
  1944. // and limitations under the License.
  1945. //
  1946. // When distributing Covered Code, include this CDDL HEADER in each
  1947. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1948. // If applicable, add the following below this CDDL HEADER, with the
  1949. // fields enclosed by brackets "[]" replaced with your own identifying
  1950. // information: Portions Copyright [yyyy] [name of copyright owner]
  1951. //
  1952. // CDDL HEADER END
  1953. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  1954. // Copyright 2016 Joyent, Inc.
  1955. // Copyright 2022 Oxide Computer Company
  1956. //
  1957. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  1958. // Use is subject to license terms.
  1959. // CDDL HEADER START
  1960. //
  1961. // The contents of this file are subject to the terms of the
  1962. // Common Development and Distribution License, Version 1.0 only
  1963. // (the "License"). You may not use this file except in compliance
  1964. // with the License.
  1965. //
  1966. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1967. // or http://www.opensolaris.org/os/licensing.
  1968. // See the License for the specific language governing permissions
  1969. // and limitations under the License.
  1970. //
  1971. // When distributing Covered Code, include this CDDL HEADER in each
  1972. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1973. // If applicable, add the following below this CDDL HEADER, with the
  1974. // fields enclosed by brackets "[]" replaced with your own identifying
  1975. // information: Portions Copyright [yyyy] [name of copyright owner]
  1976. //
  1977. // CDDL HEADER END
  1978. // Copyright 2005 Sun Microsystems, Inc. All rights reserved.
  1979. // Use is subject to license terms.
  1980. // Implementation-private. This header should not be included
  1981. // directly by an application. The application should instead
  1982. // include <time.h> which includes this header conditionally
  1983. // depending on which feature test macros are defined. By default,
  1984. // this header is included by <time.h>. X/Open and POSIX
  1985. // standards requirements result in this header being included
  1986. // by <time.h> only under a restricted set of conditions.
  1987. // DO NOT EDIT THIS FILE.
  1988. //
  1989. // It has been auto-edited by fixincludes from:
  1990. //
  1991. // "/usr/include/sys/feature_tests.h"
  1992. //
  1993. // This had to be done to correct non-standard usages in the
  1994. // original, manufacturer supplied header file.
  1995. // CDDL HEADER START
  1996. //
  1997. // The contents of this file are subject to the terms of the
  1998. // Common Development and Distribution License (the "License").
  1999. // You may not use this file except in compliance with the License.
  2000. //
  2001. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2002. // or http://www.opensolaris.org/os/licensing.
  2003. // See the License for the specific language governing permissions
  2004. // and limitations under the License.
  2005. //
  2006. // When distributing Covered Code, include this CDDL HEADER in each
  2007. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2008. // If applicable, add the following below this CDDL HEADER, with the
  2009. // fields enclosed by brackets "[]" replaced with your own identifying
  2010. // information: Portions Copyright [yyyy] [name of copyright owner]
  2011. //
  2012. // CDDL HEADER END
  2013. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2014. // Copyright 2016 Joyent, Inc.
  2015. // Copyright 2022 Oxide Computer Company
  2016. //
  2017. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2018. // Use is subject to license terms.
  2019. // Time expressed in seconds and nanoseconds
  2020. type Timespec = struct {
  2021. Ftv_sec int64
  2022. Ftv_nsec int64
  2023. } /* time_impl.h:57:9 */
  2024. // used by UFS
  2025. // END CSTYLED
  2026. // Nested include for BSD/sockets source compatibility.
  2027. // (The select macros used to be defined here).
  2028. // CDDL HEADER START
  2029. //
  2030. // The contents of this file are subject to the terms of the
  2031. // Common Development and Distribution License (the "License").
  2032. // You may not use this file except in compliance with the License.
  2033. //
  2034. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2035. // or http://www.opensolaris.org/os/licensing.
  2036. // See the License for the specific language governing permissions
  2037. // and limitations under the License.
  2038. //
  2039. // When distributing Covered Code, include this CDDL HEADER in each
  2040. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2041. // If applicable, add the following below this CDDL HEADER, with the
  2042. // fields enclosed by brackets "[]" replaced with your own identifying
  2043. // information: Portions Copyright [yyyy] [name of copyright owner]
  2044. //
  2045. // CDDL HEADER END
  2046. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2047. //
  2048. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  2049. //
  2050. // Copyright 2010 Sun Microsystems, Inc. All rights reserved.
  2051. // Use is subject to license terms.
  2052. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2053. // All Rights Reserved
  2054. // University Copyright- Copyright (c) 1982, 1986, 1988
  2055. // The Regents of the University of California
  2056. // All Rights Reserved
  2057. //
  2058. // University Acknowledgment- Portions of this document are derived from
  2059. // software developed by the University of California, Berkeley, and its
  2060. // contributors.
  2061. // DO NOT EDIT THIS FILE.
  2062. //
  2063. // It has been auto-edited by fixincludes from:
  2064. //
  2065. // "/usr/include/sys/feature_tests.h"
  2066. //
  2067. // This had to be done to correct non-standard usages in the
  2068. // original, manufacturer supplied header file.
  2069. // CDDL HEADER START
  2070. //
  2071. // The contents of this file are subject to the terms of the
  2072. // Common Development and Distribution License (the "License").
  2073. // You may not use this file except in compliance with the License.
  2074. //
  2075. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2076. // or http://www.opensolaris.org/os/licensing.
  2077. // See the License for the specific language governing permissions
  2078. // and limitations under the License.
  2079. //
  2080. // When distributing Covered Code, include this CDDL HEADER in each
  2081. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2082. // If applicable, add the following below this CDDL HEADER, with the
  2083. // fields enclosed by brackets "[]" replaced with your own identifying
  2084. // information: Portions Copyright [yyyy] [name of copyright owner]
  2085. //
  2086. // CDDL HEADER END
  2087. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2088. // Copyright 2016 Joyent, Inc.
  2089. // Copyright 2022 Oxide Computer Company
  2090. //
  2091. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2092. // Use is subject to license terms.
  2093. // CDDL HEADER START
  2094. //
  2095. // The contents of this file are subject to the terms of the
  2096. // Common Development and Distribution License, Version 1.0 only
  2097. // (the "License"). You may not use this file except in compliance
  2098. // with the License.
  2099. //
  2100. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2101. // or http://www.opensolaris.org/os/licensing.
  2102. // See the License for the specific language governing permissions
  2103. // and limitations under the License.
  2104. //
  2105. // When distributing Covered Code, include this CDDL HEADER in each
  2106. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2107. // If applicable, add the following below this CDDL HEADER, with the
  2108. // fields enclosed by brackets "[]" replaced with your own identifying
  2109. // information: Portions Copyright [yyyy] [name of copyright owner]
  2110. //
  2111. // CDDL HEADER END
  2112. // Copyright 2005 Sun Microsystems, Inc. All rights reserved.
  2113. // Use is subject to license terms.
  2114. // Implementation-private. This header should not be included
  2115. // directly by an application. The application should instead
  2116. // include <time.h> which includes this header conditionally
  2117. // depending on which feature test macros are defined. By default,
  2118. // this header is included by <time.h>. X/Open and POSIX
  2119. // standards requirements result in this header being included
  2120. // by <time.h> only under a restricted set of conditions.
  2121. // DO NOT EDIT THIS FILE.
  2122. //
  2123. // It has been auto-edited by fixincludes from:
  2124. //
  2125. // "/usr/include/sys/feature_tests.h"
  2126. //
  2127. // This had to be done to correct non-standard usages in the
  2128. // original, manufacturer supplied header file.
  2129. // CDDL HEADER START
  2130. //
  2131. // The contents of this file are subject to the terms of the
  2132. // Common Development and Distribution License (the "License").
  2133. // You may not use this file except in compliance with the License.
  2134. //
  2135. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2136. // or http://www.opensolaris.org/os/licensing.
  2137. // See the License for the specific language governing permissions
  2138. // and limitations under the License.
  2139. //
  2140. // When distributing Covered Code, include this CDDL HEADER in each
  2141. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2142. // If applicable, add the following below this CDDL HEADER, with the
  2143. // fields enclosed by brackets "[]" replaced with your own identifying
  2144. // information: Portions Copyright [yyyy] [name of copyright owner]
  2145. //
  2146. // CDDL HEADER END
  2147. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2148. // Copyright 2016 Joyent, Inc.
  2149. // Copyright 2022 Oxide Computer Company
  2150. //
  2151. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2152. // Use is subject to license terms.
  2153. // Time expressed in seconds and nanoseconds
  2154. type Timespec_t = Timespec /* time_impl.h:60:3 */
  2155. type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
  2156. // The following has been left in for backward compatibility. Portable
  2157. // applications should not use the structure name timestruc.
  2158. // Timer specification
  2159. type Itimerspec = struct {
  2160. Fit_interval struct {
  2161. Ftv_sec int64
  2162. Ftv_nsec int64
  2163. }
  2164. Fit_value struct {
  2165. Ftv_sec int64
  2166. Ftv_nsec int64
  2167. }
  2168. } /* time_impl.h:95:9 */
  2169. // definition per SVr4
  2170. // The following has been left in for backward compatibility. Portable
  2171. // applications should not use the structure name timestruc.
  2172. // Timer specification
  2173. type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
  2174. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2175. // All Rights Reserved
  2176. // Copyright (c) 1982, 1986, 1993 Regents of the University of California.
  2177. // All rights reserved. The Berkeley software License Agreement
  2178. // specifies the terms and conditions for redistribution.
  2179. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2180. //
  2181. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  2182. // Use is subject to license terms.
  2183. //
  2184. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  2185. // Copyright 2016 Joyent, Inc.
  2186. // Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
  2187. // Copyright (c) 2013, 2016 by Delphix. All rights reserved.
  2188. // DO NOT EDIT THIS FILE.
  2189. //
  2190. // It has been auto-edited by fixincludes from:
  2191. //
  2192. // "/usr/include/sys/feature_tests.h"
  2193. //
  2194. // This had to be done to correct non-standard usages in the
  2195. // original, manufacturer supplied header file.
  2196. // CDDL HEADER START
  2197. //
  2198. // The contents of this file are subject to the terms of the
  2199. // Common Development and Distribution License (the "License").
  2200. // You may not use this file except in compliance with the License.
  2201. //
  2202. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2203. // or http://www.opensolaris.org/os/licensing.
  2204. // See the License for the specific language governing permissions
  2205. // and limitations under the License.
  2206. //
  2207. // When distributing Covered Code, include this CDDL HEADER in each
  2208. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2209. // If applicable, add the following below this CDDL HEADER, with the
  2210. // fields enclosed by brackets "[]" replaced with your own identifying
  2211. // information: Portions Copyright [yyyy] [name of copyright owner]
  2212. //
  2213. // CDDL HEADER END
  2214. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2215. // Copyright 2016 Joyent, Inc.
  2216. // Copyright 2022 Oxide Computer Company
  2217. //
  2218. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2219. // Use is subject to license terms.
  2220. // Structure returned by gettimeofday(2) system call,
  2221. // and used in other calls.
  2222. type Timeval = struct {
  2223. Ftv_sec int64
  2224. Ftv_usec int64
  2225. } /* time.h:54:1 */
  2226. type Timezone = struct {
  2227. Ftz_minuteswest int32
  2228. Ftz_dsttime int32
  2229. } /* time.h:86:1 */
  2230. // Needed for longlong_t type. Placement of this due to <sys/types.h>
  2231. // including <sys/select.h> which relies on the presense of the itimerval
  2232. // structure.
  2233. // CDDL HEADER START
  2234. //
  2235. // The contents of this file are subject to the terms of the
  2236. // Common Development and Distribution License (the "License").
  2237. // You may not use this file except in compliance with the License.
  2238. //
  2239. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2240. // or http://www.opensolaris.org/os/licensing.
  2241. // See the License for the specific language governing permissions
  2242. // and limitations under the License.
  2243. //
  2244. // When distributing Covered Code, include this CDDL HEADER in each
  2245. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2246. // If applicable, add the following below this CDDL HEADER, with the
  2247. // fields enclosed by brackets "[]" replaced with your own identifying
  2248. // information: Portions Copyright [yyyy] [name of copyright owner]
  2249. //
  2250. // CDDL HEADER END
  2251. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2252. // All Rights Reserved
  2253. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  2254. // Use is subject to license terms.
  2255. //
  2256. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  2257. // Copyright 2016 Joyent, Inc.
  2258. // Copyright 2021 Oxide Computer Company
  2259. // Operations on timevals.
  2260. // Names of the interval timers, and structure
  2261. // defining a timer setting.
  2262. // time and when system is running on
  2263. // behalf of the process.
  2264. // time profiling of multithreaded
  2265. // programs.
  2266. type Itimerval = struct {
  2267. Fit_interval struct {
  2268. Ftv_sec int64
  2269. Ftv_usec int64
  2270. }
  2271. Fit_value struct {
  2272. Ftv_sec int64
  2273. Ftv_usec int64
  2274. }
  2275. } /* time.h:209:1 */
  2276. // Definitions for commonly used resolutions.
  2277. // Time expressed as a 64-bit nanosecond counter.
  2278. type Hrtime_t = int64 /* time.h:265:20 */
  2279. // The inclusion of <time.h> is historical and was added for
  2280. // backward compatibility in delta 1.2 when a number of definitions
  2281. // were moved out of <sys/time.h>. More recently, the timespec and
  2282. // itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
  2283. // _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
  2284. // which is now included by <time.h>. This change was due to POSIX
  2285. // 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
  2286. // non-X/Open applications, including this header will still make
  2287. // visible these definitions.
  2288. // CDDL HEADER START
  2289. //
  2290. // The contents of this file are subject to the terms of the
  2291. // Common Development and Distribution License (the "License").
  2292. // You may not use this file except in compliance with the License.
  2293. //
  2294. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2295. // or http://www.opensolaris.org/os/licensing.
  2296. // See the License for the specific language governing permissions
  2297. // and limitations under the License.
  2298. //
  2299. // When distributing Covered Code, include this CDDL HEADER in each
  2300. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2301. // If applicable, add the following below this CDDL HEADER, with the
  2302. // fields enclosed by brackets "[]" replaced with your own identifying
  2303. // information: Portions Copyright [yyyy] [name of copyright owner]
  2304. //
  2305. // CDDL HEADER END
  2306. // Copyright (c) 1988 AT&T
  2307. // All Rights Reserved
  2308. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2309. //
  2310. // Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  2311. // Use is subject to license terms.
  2312. // Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
  2313. // Copyright 2016 Joyent, Inc.
  2314. // DO NOT EDIT THIS FILE.
  2315. //
  2316. // It has been auto-edited by fixincludes from:
  2317. //
  2318. // "/usr/include/sys/feature_tests.h"
  2319. //
  2320. // This had to be done to correct non-standard usages in the
  2321. // original, manufacturer supplied header file.
  2322. // CDDL HEADER START
  2323. //
  2324. // The contents of this file are subject to the terms of the
  2325. // Common Development and Distribution License (the "License").
  2326. // You may not use this file except in compliance with the License.
  2327. //
  2328. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2329. // or http://www.opensolaris.org/os/licensing.
  2330. // See the License for the specific language governing permissions
  2331. // and limitations under the License.
  2332. //
  2333. // When distributing Covered Code, include this CDDL HEADER in each
  2334. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2335. // If applicable, add the following below this CDDL HEADER, with the
  2336. // fields enclosed by brackets "[]" replaced with your own identifying
  2337. // information: Portions Copyright [yyyy] [name of copyright owner]
  2338. //
  2339. // CDDL HEADER END
  2340. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2341. // Copyright 2016 Joyent, Inc.
  2342. // Copyright 2022 Oxide Computer Company
  2343. //
  2344. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2345. // Use is subject to license terms.
  2346. // CDDL HEADER START
  2347. //
  2348. // The contents of this file are subject to the terms of the
  2349. // Common Development and Distribution License, Version 1.0 only
  2350. // (the "License"). You may not use this file except in compliance
  2351. // with the License.
  2352. //
  2353. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2354. // or http://www.opensolaris.org/os/licensing.
  2355. // See the License for the specific language governing permissions
  2356. // and limitations under the License.
  2357. //
  2358. // When distributing Covered Code, include this CDDL HEADER in each
  2359. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2360. // If applicable, add the following below this CDDL HEADER, with the
  2361. // fields enclosed by brackets "[]" replaced with your own identifying
  2362. // information: Portions Copyright [yyyy] [name of copyright owner]
  2363. //
  2364. // CDDL HEADER END
  2365. // Copyright (c) 1988 AT&T
  2366. // All Rights Reserved
  2367. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2368. // Copyright 2014 PALO, Richard.
  2369. //
  2370. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  2371. // Use is subject to license terms.
  2372. // An application should not include this header directly. Instead it
  2373. // should be included only through the inclusion of other Sun headers.
  2374. //
  2375. // The contents of this header is limited to identifiers specified in the
  2376. // C Standard. Any new identifiers specified in future amendments to the
  2377. // C Standard must be placed in this header. If these new identifiers
  2378. // are required to also be in the C++ Standard "std" namespace, then for
  2379. // anything other than macro definitions, corresponding "using" directives
  2380. // must also be added to <time.h.h>.
  2381. // DO NOT EDIT THIS FILE.
  2382. //
  2383. // It has been auto-edited by fixincludes from:
  2384. //
  2385. // "/usr/include/sys/feature_tests.h"
  2386. //
  2387. // This had to be done to correct non-standard usages in the
  2388. // original, manufacturer supplied header file.
  2389. // CDDL HEADER START
  2390. //
  2391. // The contents of this file are subject to the terms of the
  2392. // Common Development and Distribution License (the "License").
  2393. // You may not use this file except in compliance with the License.
  2394. //
  2395. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2396. // or http://www.opensolaris.org/os/licensing.
  2397. // See the License for the specific language governing permissions
  2398. // and limitations under the License.
  2399. //
  2400. // When distributing Covered Code, include this CDDL HEADER in each
  2401. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2402. // If applicable, add the following below this CDDL HEADER, with the
  2403. // fields enclosed by brackets "[]" replaced with your own identifying
  2404. // information: Portions Copyright [yyyy] [name of copyright owner]
  2405. //
  2406. // CDDL HEADER END
  2407. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2408. // Copyright 2016 Joyent, Inc.
  2409. // Copyright 2022 Oxide Computer Company
  2410. //
  2411. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2412. // Use is subject to license terms.
  2413. // This file and its contents are supplied under the terms of the
  2414. // Common Development and Distribution License ("CDDL"), version 1.0.
  2415. // You may only use this file in accordance with the terms of version
  2416. // 1.0 of the CDDL.
  2417. //
  2418. // A full copy of the text of the CDDL should have accompanied this
  2419. // source. A copy of the CDDL is also available via the Internet at
  2420. // http://www.illumos.org/license/CDDL.
  2421. // Copyright 2014-2016 PALO, Richard.
  2422. // DO NOT EDIT THIS FILE.
  2423. //
  2424. // It has been auto-edited by fixincludes from:
  2425. //
  2426. // "/usr/include/sys/feature_tests.h"
  2427. //
  2428. // This had to be done to correct non-standard usages in the
  2429. // original, manufacturer supplied header file.
  2430. // CDDL HEADER START
  2431. //
  2432. // The contents of this file are subject to the terms of the
  2433. // Common Development and Distribution License (the "License").
  2434. // You may not use this file except in compliance with the License.
  2435. //
  2436. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2437. // or http://www.opensolaris.org/os/licensing.
  2438. // See the License for the specific language governing permissions
  2439. // and limitations under the License.
  2440. //
  2441. // When distributing Covered Code, include this CDDL HEADER in each
  2442. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2443. // If applicable, add the following below this CDDL HEADER, with the
  2444. // fields enclosed by brackets "[]" replaced with your own identifying
  2445. // information: Portions Copyright [yyyy] [name of copyright owner]
  2446. //
  2447. // CDDL HEADER END
  2448. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2449. // Copyright 2016 Joyent, Inc.
  2450. // Copyright 2022 Oxide Computer Company
  2451. //
  2452. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2453. // Use is subject to license terms.
  2454. // POSIX.1-2008 requires that the NULL macro be cast to type void *.
  2455. type Tm = struct {
  2456. Ftm_sec int32
  2457. Ftm_min int32
  2458. Ftm_hour int32
  2459. Ftm_mday int32
  2460. Ftm_mon int32
  2461. Ftm_year int32
  2462. Ftm_wday int32
  2463. Ftm_yday int32
  2464. Ftm_isdst int32
  2465. } /* time_iso.h:80:1 */
  2466. // Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
  2467. // definition of the sigevent structure. Both require the inclusion
  2468. // of <signal.h> and <time.h> when using the timer_create() function.
  2469. // However, X/Open also specifies that the sigevent structure be defined
  2470. // in <time.h> as described in the header <signal.h>. This prevents
  2471. // compiler warnings for applications that only include <time.h> and not
  2472. // also <signal.h>. The sigval union and the sigevent structure is
  2473. // therefore defined both here and in <sys/siginfo.h> which gets included
  2474. // via inclusion of <signal.h>.
  2475. type Sigval = struct {
  2476. F__ccgo_pad1 [0]uint64
  2477. Fsival_int int32
  2478. F__ccgo_pad2 [4]byte
  2479. } /* time.h:125:1 */
  2480. type Sigevent = struct {
  2481. Fsigev_notify int32
  2482. Fsigev_signo int32
  2483. Fsigev_value struct {
  2484. F__ccgo_pad1 [0]uint64
  2485. Fsival_int int32
  2486. F__ccgo_pad2 [4]byte
  2487. }
  2488. Fsigev_notify_function uintptr
  2489. Fsigev_notify_attributes uintptr
  2490. F__sigev_pad2 int32
  2491. F__ccgo_pad1 [4]byte
  2492. } /* time.h:133:1 */
  2493. type Locale_t = uintptr /* time.h:292:24 */
  2494. // The inclusion of <sys/select.h> is needed for the FD_CLR,
  2495. // FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
  2496. // select() prototype defined in the XOpen specifications
  2497. // beginning with XSH4v2. Placement required after definition
  2498. // for itimerval.
  2499. // CDDL HEADER START
  2500. //
  2501. // The contents of this file are subject to the terms of the
  2502. // Common Development and Distribution License (the "License").
  2503. // You may not use this file except in compliance with the License.
  2504. //
  2505. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2506. // or http://www.opensolaris.org/os/licensing.
  2507. // See the License for the specific language governing permissions
  2508. // and limitations under the License.
  2509. //
  2510. // When distributing Covered Code, include this CDDL HEADER in each
  2511. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2512. // If applicable, add the following below this CDDL HEADER, with the
  2513. // fields enclosed by brackets "[]" replaced with your own identifying
  2514. // information: Portions Copyright [yyyy] [name of copyright owner]
  2515. //
  2516. // CDDL HEADER END
  2517. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2518. //
  2519. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  2520. //
  2521. // Copyright 2010 Sun Microsystems, Inc. All rights reserved.
  2522. // Use is subject to license terms.
  2523. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2524. // All Rights Reserved
  2525. // University Copyright- Copyright (c) 1982, 1986, 1988
  2526. // The Regents of the University of California
  2527. // All Rights Reserved
  2528. //
  2529. // University Acknowledgment- Portions of this document are derived from
  2530. // software developed by the University of California, Berkeley, and its
  2531. // contributors.
  2532. // The sigset_t type is defined in <sys/signal.h> and duplicated
  2533. // in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
  2534. // now allows the visibility of signal.h in this header, however
  2535. // an order of inclusion problem occurs as a result of inclusion
  2536. // of <sys/select.h> in <signal.h> under certain conditions.
  2537. // Rather than include <sys/signal.h> here, we've duplicated
  2538. // the sigset_t type instead. This type is required for the XPG6
  2539. // introduced pselect() function also declared in this header.
  2540. type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
  2541. // Select uses bit masks of file descriptors in longs.
  2542. // These macros manipulate such bit fields.
  2543. // FD_SETSIZE may be defined by the user, but the default here
  2544. // should be >= RLIM_FD_MAX.
  2545. type Fd_mask = int64 /* select.h:92:14 */
  2546. type Fds_mask = int64 /* select.h:94:14 */
  2547. // The value of _NBBY needs to be consistant with the value
  2548. // of NBBY in <sys/param.h>.
  2549. type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
  2550. // The value of _NBBY needs to be consistant with the value
  2551. // of NBBY in <sys/param.h>.
  2552. type Fd_set = Fd_set1 /* select.h:125:3 */
  2553. // _VOID was defined to be either void or char but this is not
  2554. // required because previous SunOS compilers have accepted the void
  2555. // type. However, because many system header and source files use the
  2556. // void keyword, the volatile keyword, and ANSI C function prototypes,
  2557. // non-ANSI compilers cannot compile the system anyway. The _VOID macro
  2558. // should therefore not be used and remains for source compatibility
  2559. // only.
  2560. // CSTYLED
  2561. // DO NOT EDIT THIS FILE.
  2562. //
  2563. // It has been auto-edited by fixincludes from:
  2564. //
  2565. // "/usr/include/stdio.h"
  2566. //
  2567. // This had to be done to correct non-standard usages in the
  2568. // original, manufacturer supplied header file.
  2569. // CDDL HEADER START
  2570. //
  2571. // The contents of this file are subject to the terms of the
  2572. // Common Development and Distribution License (the "License").
  2573. // You may not use this file except in compliance with the License.
  2574. //
  2575. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2576. // or http://www.opensolaris.org/os/licensing.
  2577. // See the License for the specific language governing permissions
  2578. // and limitations under the License.
  2579. //
  2580. // When distributing Covered Code, include this CDDL HEADER in each
  2581. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2582. // If applicable, add the following below this CDDL HEADER, with the
  2583. // fields enclosed by brackets "[]" replaced with your own identifying
  2584. // information: Portions Copyright [yyyy] [name of copyright owner]
  2585. //
  2586. // CDDL HEADER END
  2587. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2588. // Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  2589. // Copyright (c) 1988 AT&T
  2590. // All Rights Reserved
  2591. // User-visible pieces of the ANSI C standard I/O package.
  2592. // DO NOT EDIT THIS FILE.
  2593. //
  2594. // It has been auto-edited by fixincludes from:
  2595. //
  2596. // "/usr/include/sys/feature_tests.h"
  2597. //
  2598. // This had to be done to correct non-standard usages in the
  2599. // original, manufacturer supplied header file.
  2600. // CDDL HEADER START
  2601. //
  2602. // The contents of this file are subject to the terms of the
  2603. // Common Development and Distribution License (the "License").
  2604. // You may not use this file except in compliance with the License.
  2605. //
  2606. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2607. // or http://www.opensolaris.org/os/licensing.
  2608. // See the License for the specific language governing permissions
  2609. // and limitations under the License.
  2610. //
  2611. // When distributing Covered Code, include this CDDL HEADER in each
  2612. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2613. // If applicable, add the following below this CDDL HEADER, with the
  2614. // fields enclosed by brackets "[]" replaced with your own identifying
  2615. // information: Portions Copyright [yyyy] [name of copyright owner]
  2616. //
  2617. // CDDL HEADER END
  2618. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2619. // Copyright 2016 Joyent, Inc.
  2620. // Copyright 2022 Oxide Computer Company
  2621. //
  2622. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2623. // Use is subject to license terms.
  2624. // Do all of our 'redefine_extname' processing before
  2625. // declarations of the associated functions are seen.
  2626. // This is necessary to keep gcc happy.
  2627. // large file compilation environment setup
  2628. // In the LP64 compilation environment, all APIs are already large file
  2629. // DO NOT EDIT THIS FILE.
  2630. //
  2631. // It has been auto-edited by fixincludes from:
  2632. //
  2633. // "/usr/include/iso/stdio_iso.h"
  2634. //
  2635. // This had to be done to correct non-standard usages in the
  2636. // original, manufacturer supplied header file.
  2637. // CDDL HEADER START
  2638. //
  2639. // The contents of this file are subject to the terms of the
  2640. // Common Development and Distribution License, Version 1.0 only
  2641. // (the "License"). You may not use this file except in compliance
  2642. // with the License.
  2643. //
  2644. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2645. // or http://www.opensolaris.org/os/licensing.
  2646. // See the License for the specific language governing permissions
  2647. // and limitations under the License.
  2648. //
  2649. // When distributing Covered Code, include this CDDL HEADER in each
  2650. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2651. // If applicable, add the following below this CDDL HEADER, with the
  2652. // fields enclosed by brackets "[]" replaced with your own identifying
  2653. // information: Portions Copyright [yyyy] [name of copyright owner]
  2654. //
  2655. // CDDL HEADER END
  2656. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2657. // Copyright 2014 PALO, Richard.
  2658. //
  2659. // Copyright 2005 Sun Microsystems, Inc. All rights reserved.
  2660. // Use is subject to license terms.
  2661. // Copyright (c) 1988 AT&T
  2662. // All Rights Reserved
  2663. // An application should not include this header directly. Instead it
  2664. // should be included only through the inclusion of other Sun headers.
  2665. //
  2666. // The contents of this header is limited to identifiers specified in the
  2667. // C Standard. Any new identifiers specified in future amendments to the
  2668. // C Standard must be placed in this header. If these new identifiers
  2669. // are required to also be in the C++ Standard "std" namespace, then for
  2670. // anything other than macro definitions, corresponding "using" directives
  2671. // must also be added to <stdio.h>.
  2672. // User-visible pieces of the ANSI C standard I/O package.
  2673. // DO NOT EDIT THIS FILE.
  2674. //
  2675. // It has been auto-edited by fixincludes from:
  2676. //
  2677. // "/usr/include/sys/feature_tests.h"
  2678. //
  2679. // This had to be done to correct non-standard usages in the
  2680. // original, manufacturer supplied header file.
  2681. // CDDL HEADER START
  2682. //
  2683. // The contents of this file are subject to the terms of the
  2684. // Common Development and Distribution License (the "License").
  2685. // You may not use this file except in compliance with the License.
  2686. //
  2687. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2688. // or http://www.opensolaris.org/os/licensing.
  2689. // See the License for the specific language governing permissions
  2690. // and limitations under the License.
  2691. //
  2692. // When distributing Covered Code, include this CDDL HEADER in each
  2693. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2694. // If applicable, add the following below this CDDL HEADER, with the
  2695. // fields enclosed by brackets "[]" replaced with your own identifying
  2696. // information: Portions Copyright [yyyy] [name of copyright owner]
  2697. //
  2698. // CDDL HEADER END
  2699. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2700. // Copyright 2016 Joyent, Inc.
  2701. // Copyright 2022 Oxide Computer Company
  2702. //
  2703. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2704. // Use is subject to license terms.
  2705. // This file and its contents are supplied under the terms of the
  2706. // Common Development and Distribution License ("CDDL"), version 1.0.
  2707. // You may only use this file in accordance with the terms of version
  2708. // 1.0 of the CDDL.
  2709. //
  2710. // A full copy of the text of the CDDL should have accompanied this
  2711. // source. A copy of the CDDL is also available via the Internet at
  2712. // http://www.illumos.org/license/CDDL.
  2713. // Copyright 2014-2016 PALO, Richard.
  2714. // CDDL HEADER START
  2715. //
  2716. // The contents of this file are subject to the terms of the
  2717. // Common Development and Distribution License, Version 1.0 only
  2718. // (the "License"). You may not use this file except in compliance
  2719. // with the License.
  2720. //
  2721. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2722. // or http://www.opensolaris.org/os/licensing.
  2723. // See the License for the specific language governing permissions
  2724. // and limitations under the License.
  2725. //
  2726. // When distributing Covered Code, include this CDDL HEADER in each
  2727. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2728. // If applicable, add the following below this CDDL HEADER, with the
  2729. // fields enclosed by brackets "[]" replaced with your own identifying
  2730. // information: Portions Copyright [yyyy] [name of copyright owner]
  2731. //
  2732. // CDDL HEADER END
  2733. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2734. // All Rights Reserved
  2735. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2736. //
  2737. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  2738. // Use is subject to license terms.
  2739. // An application should not include this header directly. Instead it
  2740. // should be included only through the inclusion of other Sun headers.
  2741. //
  2742. // The purpose of this header is to provide the type definitions for
  2743. // the va_list argument used by a number of printf and printf like
  2744. // functions. The headers that define these various function prototypes
  2745. // #include this header directly. These include but are not necessarily
  2746. // limited to <stdio.h>, <stdio_iso.h>, <wchar_iso.h>, <strlog.h> and
  2747. // <syslog.h>. The type definitions included in this header are for
  2748. // the benefit of consumers of va_list.
  2749. //
  2750. // Any application that accepts variable argument lists must as documented,
  2751. // include either <varargs.h> or the preferred <stdarg.h>. Doing so will
  2752. // pull in the appropriate compiler protocols defined in <sys/va_impl.h>
  2753. // which is in turn is included by <varargs.h> and <stdarg.h>. See comments
  2754. // in <sys/va_impl.h> for more detailed information regarding implementation
  2755. // and compiler specific protocols.
  2756. // The common definitions exported by this header or compilers using
  2757. // this header are:
  2758. //
  2759. // the identifier __builtin_va_alist for the variable list pseudo parameter
  2760. // the type __va_alist_type for the variable list pseudo parameter
  2761. // the type __va_list defining the type of the variable list iterator
  2762. //
  2763. // The feature macros (e.g. __BUILTIN_VA_STRUCT) and compiler macros
  2764. // (__GNUC__) and processor macros (e.g. __amd64) are intended to be
  2765. // defined by the compilation system, not the user of the system.
  2766. // CDDL HEADER START
  2767. //
  2768. // The contents of this file are subject to the terms of the
  2769. // Common Development and Distribution License (the "License").
  2770. // You may not use this file except in compliance with the License.
  2771. //
  2772. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2773. // or http://www.opensolaris.org/os/licensing.
  2774. // See the License for the specific language governing permissions
  2775. // and limitations under the License.
  2776. //
  2777. //
  2778. // When distributing Covered Code, include this CDDL HEADER in each
  2779. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2780. // If applicable, add the following below this CDDL HEADER, with the
  2781. // fields enclosed by brackets "[]" replaced with your own identifying
  2782. // information: Portions Copyright [yyyy] [name of copyright owner]
  2783. //
  2784. // CDDL HEADER END
  2785. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  2786. // Use is subject to license terms.
  2787. // Copyright 2016 Joyent, Inc.
  2788. type X__gnuc_va_list = uintptr /* va_list.h:108:27 */
  2789. // XX64 This seems unnecessary .. but is needed because vcmn_err is
  2790. //
  2791. // defined with __va_list instead of plain old va_list.
  2792. // Perhaps that should be fixed!
  2793. type X__va_list = uintptr /* va_list.h:114:27 */
  2794. // CDDL HEADER START
  2795. //
  2796. // The contents of this file are subject to the terms of the
  2797. // Common Development and Distribution License, Version 1.0 only
  2798. // (the "License"). You may not use this file except in compliance
  2799. // with the License.
  2800. //
  2801. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2802. // or http://www.opensolaris.org/os/licensing.
  2803. // See the License for the specific language governing permissions
  2804. // and limitations under the License.
  2805. //
  2806. // When distributing Covered Code, include this CDDL HEADER in each
  2807. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2808. // If applicable, add the following below this CDDL HEADER, with the
  2809. // fields enclosed by brackets "[]" replaced with your own identifying
  2810. // information: Portions Copyright [yyyy] [name of copyright owner]
  2811. //
  2812. // CDDL HEADER END
  2813. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  2814. // Use is subject to license terms.
  2815. type X__FILE1 = struct{ F__pad [16]int64 } /* stdio_tag.h:40:9 */
  2816. // CDDL HEADER START
  2817. //
  2818. // The contents of this file are subject to the terms of the
  2819. // Common Development and Distribution License, Version 1.0 only
  2820. // (the "License"). You may not use this file except in compliance
  2821. // with the License.
  2822. //
  2823. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2824. // or http://www.opensolaris.org/os/licensing.
  2825. // See the License for the specific language governing permissions
  2826. // and limitations under the License.
  2827. //
  2828. // When distributing Covered Code, include this CDDL HEADER in each
  2829. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2830. // If applicable, add the following below this CDDL HEADER, with the
  2831. // fields enclosed by brackets "[]" replaced with your own identifying
  2832. // information: Portions Copyright [yyyy] [name of copyright owner]
  2833. //
  2834. // CDDL HEADER END
  2835. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  2836. // Use is subject to license terms.
  2837. type X__FILE = X__FILE1 /* stdio_tag.h:40:27 */
  2838. // If feature test macros are set that enable interfaces that use types
  2839. // defined in <sys/types.h>, get those types by doing the include.
  2840. //
  2841. // Note that in asking for the interfaces associated with this feature test
  2842. // macro one also asks for definitions of the POSIX types.
  2843. type FILE = X__FILE /* stdio_iso.h:102:16 */
  2844. type Fpos_t = int64 /* stdio_iso.h:115:15 */
  2845. type Fpos64_t = int64 /* stdio.h:188:17 */
  2846. type Group = struct {
  2847. Fgr_name uintptr
  2848. Fgr_passwd uintptr
  2849. Fgr_gid uint32
  2850. F__ccgo_pad1 [4]byte
  2851. Fgr_mem uintptr
  2852. } /* grp.h:50:1 */
  2853. var _ int8 /* gen.c:2:13: */