stat_illumos_amd64.go 120 KB

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