pwd_illumos_amd64.go 130 KB

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