fcntl_illumos_amd64.go 132 KB

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