unistd_illumos_amd64.go 139 KB

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