netdb_linux_loong64.go 148 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267
  1. // Code generated by 'ccgo netdb/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 netdb/netdb_linux_loong64.go -pkgname netdb', DO NOT EDIT.
  2. package netdb
  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. AF_ALG = 38 // socket.h:134:1:
  15. AF_APPLETALK = 5 // socket.h:100:1:
  16. AF_ASH = 18 // socket.h:114:1:
  17. AF_ATMPVC = 8 // socket.h:103:1:
  18. AF_ATMSVC = 20 // socket.h:116:1:
  19. AF_AX25 = 3 // socket.h:98:1:
  20. AF_BLUETOOTH = 31 // socket.h:127:1:
  21. AF_BRIDGE = 7 // socket.h:102:1:
  22. AF_CAIF = 37 // socket.h:133:1:
  23. AF_CAN = 29 // socket.h:125:1:
  24. AF_DECnet = 12 // socket.h:107:1:
  25. AF_ECONET = 19 // socket.h:115:1:
  26. AF_FILE = 1 // socket.h:96:1:
  27. AF_IB = 27 // socket.h:123:1:
  28. AF_IEEE802154 = 36 // socket.h:132:1:
  29. AF_INET = 2 // socket.h:97:1:
  30. AF_INET6 = 10 // socket.h:105:1:
  31. AF_IPX = 4 // socket.h:99:1:
  32. AF_IRDA = 23 // socket.h:119:1:
  33. AF_ISDN = 34 // socket.h:130:1:
  34. AF_IUCV = 32 // socket.h:128:1:
  35. AF_KCM = 41 // socket.h:137:1:
  36. AF_KEY = 15 // socket.h:110:1:
  37. AF_LLC = 26 // socket.h:122:1:
  38. AF_LOCAL = 1 // socket.h:94:1:
  39. AF_MAX = 46 // socket.h:142:1:
  40. AF_MCTP = 45 // socket.h:141:1:
  41. AF_MPLS = 28 // socket.h:124:1:
  42. AF_NETBEUI = 13 // socket.h:108:1:
  43. AF_NETLINK = 16 // socket.h:111:1:
  44. AF_NETROM = 6 // socket.h:101:1:
  45. AF_NFC = 39 // socket.h:135:1:
  46. AF_PACKET = 17 // socket.h:113:1:
  47. AF_PHONET = 35 // socket.h:131:1:
  48. AF_PPPOX = 24 // socket.h:120:1:
  49. AF_QIPCRTR = 42 // socket.h:138:1:
  50. AF_RDS = 21 // socket.h:117:1:
  51. AF_ROSE = 11 // socket.h:106:1:
  52. AF_ROUTE = 16 // socket.h:112:1:
  53. AF_RXRPC = 33 // socket.h:129:1:
  54. AF_SECURITY = 14 // socket.h:109:1:
  55. AF_SMC = 43 // socket.h:139:1:
  56. AF_SNA = 22 // socket.h:118:1:
  57. AF_TIPC = 30 // socket.h:126:1:
  58. AF_UNIX = 1 // socket.h:95:1:
  59. AF_UNSPEC = 0 // socket.h:93:1:
  60. AF_VSOCK = 40 // socket.h:136:1:
  61. AF_WANPIPE = 25 // socket.h:121:1:
  62. AF_X25 = 9 // socket.h:104:1:
  63. AF_XDP = 44 // socket.h:140:1:
  64. AI_ADDRCONFIG = 0x0020 // netdb.h:601:1:
  65. AI_ALL = 0x0010 // netdb.h:600:1:
  66. AI_CANONNAME = 0x0002 // netdb.h:597:1:
  67. AI_NUMERICHOST = 0x0004 // netdb.h:598:1:
  68. AI_NUMERICSERV = 0x0400 // netdb.h:613:1:
  69. AI_PASSIVE = 0x0001 // netdb.h:596:1:
  70. AI_V4MAPPED = 0x0008 // netdb.h:599:1:
  71. BIG_ENDIAN = 4321 // endian.h:28:1:
  72. BYTE_ORDER = 1234 // endian.h:30:1:
  73. EAI_AGAIN = -3 // netdb.h:618:1:
  74. EAI_BADFLAGS = -1 // netdb.h:616:1:
  75. EAI_FAIL = -4 // netdb.h:619:1:
  76. EAI_FAMILY = -6 // netdb.h:620:1:
  77. EAI_MEMORY = -10 // netdb.h:623:1:
  78. EAI_NONAME = -2 // netdb.h:617:1:
  79. EAI_OVERFLOW = -12 // netdb.h:625:1:
  80. EAI_SERVICE = -8 // netdb.h:622:1:
  81. EAI_SOCKTYPE = -7 // netdb.h:621:1:
  82. EAI_SYSTEM = -11 // netdb.h:624:1:
  83. FD_SETSIZE = 1024 // select.h:73:1:
  84. FIOGETOWN = 0x8903 // sockios.h:8:1:
  85. FIOSETOWN = 0x8901 // sockios.h:6:1:
  86. HOST_NOT_FOUND = 1 // netdb.h:63:1:
  87. INET6_ADDRSTRLEN = 46 // in.h:243:1:
  88. INET_ADDRSTRLEN = 16 // in.h:242:1:
  89. IN_CLASSA_HOST = 16777215 // in.h:175:1:
  90. IN_CLASSA_MAX = 128 // in.h:176:1:
  91. IN_CLASSA_NET = 0xff000000 // in.h:173:1:
  92. IN_CLASSA_NSHIFT = 24 // in.h:174:1:
  93. IN_CLASSB_HOST = 65535 // in.h:181:1:
  94. IN_CLASSB_MAX = 65536 // in.h:182:1:
  95. IN_CLASSB_NET = 0xffff0000 // in.h:179:1:
  96. IN_CLASSB_NSHIFT = 16 // in.h:180:1:
  97. IN_CLASSC_HOST = 255 // in.h:187:1:
  98. IN_CLASSC_NET = 0xffffff00 // in.h:185:1:
  99. IN_CLASSC_NSHIFT = 8 // in.h:186:1:
  100. IN_LOOPBACKNET = 127 // in.h:206:1:
  101. IPPORT_RESERVED1 = 1024 // netdb.h:79:1:
  102. IPV6_2292DSTOPTS = 4 // in.h:166:1:
  103. IPV6_2292HOPLIMIT = 8 // in.h:170:1:
  104. IPV6_2292HOPOPTS = 3 // in.h:165:1:
  105. IPV6_2292PKTINFO = 2 // in.h:164:1:
  106. IPV6_2292PKTOPTIONS = 6 // in.h:168:1:
  107. IPV6_2292RTHDR = 5 // in.h:167:1:
  108. IPV6_ADDRFORM = 1 // in.h:163:1:
  109. IPV6_ADDR_PREFERENCES = 72 // in.h:219:1:
  110. IPV6_ADD_MEMBERSHIP = 20 // in.h:233:1:
  111. IPV6_AUTHHDR = 10 // in.h:175:1:
  112. IPV6_AUTOFLOWLABEL = 70 // in.h:216:1:
  113. IPV6_CHECKSUM = 7 // in.h:169:1:
  114. IPV6_DONTFRAG = 62 // in.h:210:1:
  115. IPV6_DROP_MEMBERSHIP = 21 // in.h:234:1:
  116. IPV6_DSTOPTS = 59 // in.h:207:1:
  117. IPV6_FREEBIND = 78 // in.h:229:1:
  118. IPV6_HDRINCL = 36 // in.h:194:1:
  119. IPV6_HOPLIMIT = 52 // in.h:200:1:
  120. IPV6_HOPOPTS = 54 // in.h:202:1:
  121. IPV6_IPSEC_POLICY = 34 // in.h:192:1:
  122. IPV6_JOIN_ANYCAST = 27 // in.h:187:1:
  123. IPV6_JOIN_GROUP = 20 // in.h:180:1:
  124. IPV6_LEAVE_ANYCAST = 28 // in.h:188:1:
  125. IPV6_LEAVE_GROUP = 21 // in.h:181:1:
  126. IPV6_MINHOPCOUNT = 73 // in.h:222:1:
  127. IPV6_MTU = 24 // in.h:184:1:
  128. IPV6_MTU_DISCOVER = 23 // in.h:183:1:
  129. IPV6_MULTICAST_ALL = 29 // in.h:189:1:
  130. IPV6_MULTICAST_HOPS = 18 // in.h:178:1:
  131. IPV6_MULTICAST_IF = 17 // in.h:177:1:
  132. IPV6_MULTICAST_LOOP = 19 // in.h:179:1:
  133. IPV6_NEXTHOP = 9 // in.h:174:1:
  134. IPV6_ORIGDSTADDR = 74 // in.h:224:1:
  135. IPV6_PATHMTU = 61 // in.h:209:1:
  136. IPV6_PKTINFO = 50 // in.h:198:1:
  137. IPV6_PMTUDISC_DO = 2 // in.h:242:1:
  138. IPV6_PMTUDISC_DONT = 0 // in.h:240:1:
  139. IPV6_PMTUDISC_INTERFACE = 4 // in.h:244:1:
  140. IPV6_PMTUDISC_OMIT = 5 // in.h:245:1:
  141. IPV6_PMTUDISC_PROBE = 3 // in.h:243:1:
  142. IPV6_PMTUDISC_WANT = 1 // in.h:241:1:
  143. IPV6_RECVDSTOPTS = 58 // in.h:206:1:
  144. IPV6_RECVERR = 25 // in.h:185:1:
  145. IPV6_RECVERR_RFC4884 = 31 // in.h:191:1:
  146. IPV6_RECVFRAGSIZE = 77 // in.h:228:1:
  147. IPV6_RECVHOPLIMIT = 51 // in.h:199:1:
  148. IPV6_RECVHOPOPTS = 53 // in.h:201:1:
  149. IPV6_RECVORIGDSTADDR = 74 // in.h:225:1:
  150. IPV6_RECVPATHMTU = 60 // in.h:208:1:
  151. IPV6_RECVPKTINFO = 49 // in.h:197:1:
  152. IPV6_RECVRTHDR = 56 // in.h:204:1:
  153. IPV6_RECVTCLASS = 66 // in.h:213:1:
  154. IPV6_ROUTER_ALERT = 22 // in.h:182:1:
  155. IPV6_ROUTER_ALERT_ISOLATE = 30 // in.h:190:1:
  156. IPV6_RTHDR = 57 // in.h:205:1:
  157. IPV6_RTHDRDSTOPTS = 55 // in.h:203:1:
  158. IPV6_RTHDR_LOOSE = 0 // in.h:252:1:
  159. IPV6_RTHDR_STRICT = 1 // in.h:253:1:
  160. IPV6_RTHDR_TYPE_0 = 0 // in.h:255:1:
  161. IPV6_RXDSTOPTS = 59 // in.h:237:1:
  162. IPV6_RXHOPOPTS = 54 // in.h:236:1:
  163. IPV6_TCLASS = 67 // in.h:214:1:
  164. IPV6_TRANSPARENT = 75 // in.h:226:1:
  165. IPV6_UNICAST_HOPS = 16 // in.h:176:1:
  166. IPV6_UNICAST_IF = 76 // in.h:227:1:
  167. IPV6_V6ONLY = 26 // in.h:186:1:
  168. IPV6_XFRM_POLICY = 35 // in.h:193:1:
  169. IP_ADD_MEMBERSHIP = 35 // in.h:122:1:
  170. IP_ADD_SOURCE_MEMBERSHIP = 39 // in.h:126:1:
  171. IP_BIND_ADDRESS_NO_PORT = 24 // in.h:103:1:
  172. IP_BLOCK_SOURCE = 38 // in.h:125:1:
  173. IP_CHECKSUM = 23 // in.h:102:1:
  174. IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:138:1:
  175. IP_DEFAULT_MULTICAST_TTL = 1 // in.h:137:1:
  176. IP_DROP_MEMBERSHIP = 36 // in.h:123:1:
  177. IP_DROP_SOURCE_MEMBERSHIP = 40 // in.h:127:1:
  178. IP_FREEBIND = 15 // in.h:89:1:
  179. IP_HDRINCL = 3 // in.h:48:1:
  180. IP_IPSEC_POLICY = 16 // in.h:90:1:
  181. IP_LOCAL_PORT_RANGE = 51 // in.h:131:1:
  182. IP_MAX_MEMBERSHIPS = 20 // in.h:139:1:
  183. IP_MINTTL = 21 // in.h:100:1:
  184. IP_MSFILTER = 41 // in.h:128:1:
  185. IP_MTU = 14 // in.h:88:1:
  186. IP_MTU_DISCOVER = 10 // in.h:84:1:
  187. IP_MULTICAST_ALL = 49 // in.h:129:1:
  188. IP_MULTICAST_IF = 32 // in.h:119:1:
  189. IP_MULTICAST_LOOP = 34 // in.h:121:1:
  190. IP_MULTICAST_TTL = 33 // in.h:120:1:
  191. IP_NODEFRAG = 22 // in.h:101:1:
  192. IP_OPTIONS = 4 // in.h:47:1:
  193. IP_ORIGDSTADDR = 20 // in.h:97:1:
  194. IP_PASSSEC = 18 // in.h:92:1:
  195. IP_PKTINFO = 8 // in.h:81:1:
  196. IP_PKTOPTIONS = 9 // in.h:82:1:
  197. IP_PMTUDISC = 10 // in.h:83:1:
  198. IP_PMTUDISC_DO = 2 // in.h:110:1:
  199. IP_PMTUDISC_DONT = 0 // in.h:108:1:
  200. IP_PMTUDISC_INTERFACE = 4 // in.h:115:1:
  201. IP_PMTUDISC_OMIT = 5 // in.h:117:1:
  202. IP_PMTUDISC_PROBE = 3 // in.h:111:1:
  203. IP_PMTUDISC_WANT = 1 // in.h:109:1:
  204. IP_PROTOCOL = 52 // in.h:132:1:
  205. IP_RECVERR = 11 // in.h:85:1:
  206. IP_RECVERR_RFC4884 = 26 // in.h:105:1:
  207. IP_RECVFRAGSIZE = 25 // in.h:104:1:
  208. IP_RECVOPTS = 6 // in.h:51:1:
  209. IP_RECVORIGDSTADDR = 20 // in.h:98:1:
  210. IP_RECVRETOPTS = 7 // in.h:53:1:
  211. IP_RECVTOS = 13 // in.h:87:1:
  212. IP_RECVTTL = 12 // in.h:86:1:
  213. IP_RETOPTS = 7 // in.h:54:1:
  214. IP_ROUTER_ALERT = 5 // in.h:80:1:
  215. IP_TOS = 1 // in.h:49:1:
  216. IP_TRANSPARENT = 19 // in.h:93:1:
  217. IP_TTL = 2 // in.h:50:1:
  218. IP_UNBLOCK_SOURCE = 37 // in.h:124:1:
  219. IP_UNICAST_IF = 50 // in.h:130:1:
  220. IP_XFRM_POLICY = 17 // in.h:91:1:
  221. LITTLE_ENDIAN = 1234 // endian.h:27:1:
  222. MCAST_BLOCK_SOURCE = 43 // in.h:67:1:
  223. MCAST_EXCLUDE = 0 // in.h:76:1:
  224. MCAST_INCLUDE = 1 // in.h:77:1:
  225. MCAST_JOIN_GROUP = 42 // in.h:66:1:
  226. MCAST_JOIN_SOURCE_GROUP = 46 // in.h:70:1:
  227. MCAST_LEAVE_GROUP = 45 // in.h:69:1:
  228. MCAST_LEAVE_SOURCE_GROUP = 47 // in.h:71:1:
  229. MCAST_MSFILTER = 48 // in.h:72:1:
  230. MCAST_UNBLOCK_SOURCE = 44 // in.h:68:1:
  231. NETDB_INTERNAL = -1 // netdb.h:72:1:
  232. NETDB_SUCCESS = 0 // netdb.h:73:1:
  233. NI_DGRAM = 16 // netdb.h:646:1:
  234. NI_MAXHOST = 1025 // netdb.h:638:1:
  235. NI_MAXSERV = 32 // netdb.h:639:1:
  236. NI_NAMEREQD = 8 // netdb.h:645:1:
  237. NI_NOFQDN = 4 // netdb.h:644:1:
  238. NI_NUMERICHOST = 1 // netdb.h:642:1:
  239. NI_NUMERICSERV = 2 // netdb.h:643:1:
  240. NO_ADDRESS = 4 // netdb.h:74:1:
  241. NO_DATA = 4 // netdb.h:68:1:
  242. NO_RECOVERY = 3 // netdb.h:66:1:
  243. PDP_ENDIAN = 3412 // endian.h:29:1:
  244. PF_ALG = 38 // socket.h:82:1:
  245. PF_APPLETALK = 5 // socket.h:48:1:
  246. PF_ASH = 18 // socket.h:62:1:
  247. PF_ATMPVC = 8 // socket.h:51:1:
  248. PF_ATMSVC = 20 // socket.h:64:1:
  249. PF_AX25 = 3 // socket.h:46:1:
  250. PF_BLUETOOTH = 31 // socket.h:75:1:
  251. PF_BRIDGE = 7 // socket.h:50:1:
  252. PF_CAIF = 37 // socket.h:81:1:
  253. PF_CAN = 29 // socket.h:73:1:
  254. PF_DECnet = 12 // socket.h:55:1:
  255. PF_ECONET = 19 // socket.h:63:1:
  256. PF_FILE = 1 // socket.h:44:1:
  257. PF_IB = 27 // socket.h:71:1:
  258. PF_IEEE802154 = 36 // socket.h:80:1:
  259. PF_INET = 2 // socket.h:45:1:
  260. PF_INET6 = 10 // socket.h:53:1:
  261. PF_IPX = 4 // socket.h:47:1:
  262. PF_IRDA = 23 // socket.h:67:1:
  263. PF_ISDN = 34 // socket.h:78:1:
  264. PF_IUCV = 32 // socket.h:76:1:
  265. PF_KCM = 41 // socket.h:85:1:
  266. PF_KEY = 15 // socket.h:58:1:
  267. PF_LLC = 26 // socket.h:70:1:
  268. PF_LOCAL = 1 // socket.h:42:1:
  269. PF_MAX = 46 // socket.h:90:1:
  270. PF_MCTP = 45 // socket.h:89:1:
  271. PF_MPLS = 28 // socket.h:72:1:
  272. PF_NETBEUI = 13 // socket.h:56:1:
  273. PF_NETLINK = 16 // socket.h:59:1:
  274. PF_NETROM = 6 // socket.h:49:1:
  275. PF_NFC = 39 // socket.h:83:1:
  276. PF_PACKET = 17 // socket.h:61:1:
  277. PF_PHONET = 35 // socket.h:79:1:
  278. PF_PPPOX = 24 // socket.h:68:1:
  279. PF_QIPCRTR = 42 // socket.h:86:1:
  280. PF_RDS = 21 // socket.h:65:1:
  281. PF_ROSE = 11 // socket.h:54:1:
  282. PF_ROUTE = 16 // socket.h:60:1:
  283. PF_RXRPC = 33 // socket.h:77:1:
  284. PF_SECURITY = 14 // socket.h:57:1:
  285. PF_SMC = 43 // socket.h:87:1:
  286. PF_SNA = 22 // socket.h:66:1:
  287. PF_TIPC = 30 // socket.h:74:1:
  288. PF_UNIX = 1 // socket.h:43:1:
  289. PF_UNSPEC = 0 // socket.h:41:1:
  290. PF_VSOCK = 40 // socket.h:84:1:
  291. PF_WANPIPE = 25 // socket.h:69:1:
  292. PF_X25 = 9 // socket.h:52:1:
  293. PF_XDP = 44 // socket.h:88:1:
  294. SCM_TIMESTAMP = 29 // socket.h:156:1:
  295. SCM_TIMESTAMPING = 37 // socket.h:158:1:
  296. SCM_TIMESTAMPING_OPT_STATS = 54 // socket.h:90:1:
  297. SCM_TIMESTAMPING_PKTINFO = 58 // socket.h:98:1:
  298. SCM_TIMESTAMPNS = 35 // socket.h:157:1:
  299. SCM_TXTIME = 61 // socket.h:105:1:
  300. SCM_WIFI_STATUS = 41 // socket.h:64:1:
  301. SIOCATMARK = 0x8905 // sockios.h:10:1:
  302. SIOCGPGRP = 0x8904 // sockios.h:9:1:
  303. SIOCGSTAMPNS_OLD = 0x8907 // sockios.h:12:1:
  304. SIOCGSTAMP_OLD = 0x8906 // sockios.h:11:1:
  305. SIOCSPGRP = 0x8902 // sockios.h:7:1:
  306. SOL_AAL = 265 // socket.h:153:1:
  307. SOL_ALG = 279 // socket.h:167:1:
  308. SOL_ATM = 264 // socket.h:152:1:
  309. SOL_BLUETOOTH = 274 // socket.h:162:1:
  310. SOL_CAIF = 278 // socket.h:166:1:
  311. SOL_DCCP = 269 // socket.h:157:1:
  312. SOL_DECNET = 261 // socket.h:149:1:
  313. SOL_ICMPV6 = 58 // in.h:249:1:
  314. SOL_IP = 0 // in.h:135:1:
  315. SOL_IPV6 = 41 // in.h:248:1:
  316. SOL_IRDA = 266 // socket.h:154:1:
  317. SOL_IUCV = 277 // socket.h:165:1:
  318. SOL_KCM = 281 // socket.h:169:1:
  319. SOL_LLC = 268 // socket.h:156:1:
  320. SOL_MCTP = 285 // socket.h:173:1:
  321. SOL_MPTCP = 284 // socket.h:172:1:
  322. SOL_NETBEUI = 267 // socket.h:155:1:
  323. SOL_NETLINK = 270 // socket.h:158:1:
  324. SOL_NFC = 280 // socket.h:168:1:
  325. SOL_PACKET = 263 // socket.h:151:1:
  326. SOL_PNPIPE = 275 // socket.h:163:1:
  327. SOL_PPPOL2TP = 273 // socket.h:161:1:
  328. SOL_RAW = 255 // socket.h:148:1:
  329. SOL_RDS = 276 // socket.h:164:1:
  330. SOL_RXRPC = 272 // socket.h:160:1:
  331. SOL_SMC = 286 // socket.h:174:1:
  332. SOL_SOCKET = 1 // socket.h:9:1:
  333. SOL_TIPC = 271 // socket.h:159:1:
  334. SOL_TLS = 282 // socket.h:170:1:
  335. SOL_X25 = 262 // socket.h:150:1:
  336. SOL_XDP = 283 // socket.h:171:1:
  337. SOMAXCONN = 4096 // socket.h:177:1:
  338. SO_ACCEPTCONN = 30 // socket.h:51:1:
  339. SO_ATTACH_BPF = 50 // socket.h:82:1:
  340. SO_ATTACH_FILTER = 26 // socket.h:45:1:
  341. SO_ATTACH_REUSEPORT_CBPF = 51 // socket.h:85:1:
  342. SO_ATTACH_REUSEPORT_EBPF = 52 // socket.h:86:1:
  343. SO_BINDTODEVICE = 25 // socket.h:42:1:
  344. SO_BINDTOIFINDEX = 62 // socket.h:107:1:
  345. SO_BPF_EXTENSIONS = 48 // socket.h:78:1:
  346. SO_BROADCAST = 6 // socket.h:16:1:
  347. SO_BSDCOMPAT = 14 // socket.h:26:1:
  348. SO_BUF_LOCK = 72 // socket.h:127:1:
  349. SO_BUSY_POLL = 46 // socket.h:74:1:
  350. SO_BUSY_POLL_BUDGET = 70 // socket.h:123:1:
  351. SO_CNX_ADVICE = 53 // socket.h:88:1:
  352. SO_COOKIE = 57 // socket.h:96:1:
  353. SO_DEBUG = 1 // socket.h:11:1:
  354. SO_DETACH_BPF = 27 // socket.h:83:1:
  355. SO_DETACH_FILTER = 27 // socket.h:46:1:
  356. SO_DETACH_REUSEPORT_BPF = 68 // socket.h:120:1:
  357. SO_DOMAIN = 39 // socket.h:59:1:
  358. SO_DONTROUTE = 5 // socket.h:15:1:
  359. SO_ERROR = 4 // socket.h:14:1:
  360. SO_GET_FILTER = 26 // socket.h:47:1:
  361. SO_INCOMING_CPU = 49 // socket.h:80:1:
  362. SO_INCOMING_NAPI_ID = 56 // socket.h:94:1:
  363. SO_KEEPALIVE = 9 // socket.h:21:1:
  364. SO_LINGER = 13 // socket.h:25:1:
  365. SO_LOCK_FILTER = 44 // socket.h:70:1:
  366. SO_MARK = 36 // socket.h:56:1:
  367. SO_MAX_PACING_RATE = 47 // socket.h:76:1:
  368. SO_MEMINFO = 55 // socket.h:92:1:
  369. SO_NETNS_COOKIE = 71 // socket.h:125:1:
  370. SO_NOFCS = 43 // socket.h:68:1:
  371. SO_NO_CHECK = 11 // socket.h:23:1:
  372. SO_OOBINLINE = 10 // socket.h:22:1:
  373. SO_PASSCRED = 16 // socket.h:29:1:
  374. SO_PASSPIDFD = 76 // socket.h:135:1:
  375. SO_PASSSEC = 34 // socket.h:54:1:
  376. SO_PEEK_OFF = 42 // socket.h:65:1:
  377. SO_PEERCRED = 17 // socket.h:30:1:
  378. SO_PEERGROUPS = 59 // socket.h:100:1:
  379. SO_PEERNAME = 28 // socket.h:49:1:
  380. SO_PEERPIDFD = 77 // socket.h:136:1:
  381. SO_PEERSEC = 31 // socket.h:53:1:
  382. SO_PREFER_BUSY_POLL = 69 // socket.h:122:1:
  383. SO_PRIORITY = 12 // socket.h:24:1:
  384. SO_PROTOCOL = 38 // socket.h:58:1:
  385. SO_RCVBUF = 8 // socket.h:18:1:
  386. SO_RCVBUFFORCE = 33 // socket.h:20:1:
  387. SO_RCVLOWAT = 18 // socket.h:31:1:
  388. SO_RCVMARK = 75 // socket.h:133:1:
  389. SO_RCVTIMEO = 20 // socket.h:145:1:
  390. SO_RCVTIMEO_NEW = 66 // socket.h:117:1:
  391. SO_RCVTIMEO_OLD = 20 // socket.h:33:1:
  392. SO_RESERVE_MEM = 73 // socket.h:129:1:
  393. SO_REUSEADDR = 2 // socket.h:12:1:
  394. SO_REUSEPORT = 15 // socket.h:27:1:
  395. SO_RXQ_OVFL = 40 // socket.h:61:1:
  396. SO_SECURITY_AUTHENTICATION = 22 // socket.h:38:1:
  397. SO_SECURITY_ENCRYPTION_NETWORK = 24 // socket.h:40:1:
  398. SO_SECURITY_ENCRYPTION_TRANSPORT = 23 // socket.h:39:1:
  399. SO_SELECT_ERR_QUEUE = 45 // socket.h:72:1:
  400. SO_SNDBUF = 7 // socket.h:17:1:
  401. SO_SNDBUFFORCE = 32 // socket.h:19:1:
  402. SO_SNDLOWAT = 19 // socket.h:32:1:
  403. SO_SNDTIMEO = 21 // socket.h:146:1:
  404. SO_SNDTIMEO_NEW = 67 // socket.h:118:1:
  405. SO_SNDTIMEO_OLD = 21 // socket.h:34:1:
  406. SO_TIMESTAMP = 29 // socket.h:141:1:
  407. SO_TIMESTAMPING = 37 // socket.h:143:1:
  408. SO_TIMESTAMPING_NEW = 65 // socket.h:115:1:
  409. SO_TIMESTAMPING_OLD = 37 // socket.h:111:1:
  410. SO_TIMESTAMPNS = 35 // socket.h:142:1:
  411. SO_TIMESTAMPNS_NEW = 64 // socket.h:114:1:
  412. SO_TIMESTAMPNS_OLD = 35 // socket.h:110:1:
  413. SO_TIMESTAMP_NEW = 63 // socket.h:113:1:
  414. SO_TIMESTAMP_OLD = 29 // socket.h:109:1:
  415. SO_TXREHASH = 74 // socket.h:131:1:
  416. SO_TXTIME = 61 // socket.h:104:1:
  417. SO_TYPE = 3 // socket.h:13:1:
  418. SO_WIFI_STATUS = 41 // socket.h:63:1:
  419. SO_ZEROCOPY = 60 // socket.h:102:1:
  420. TRY_AGAIN = 2 // netdb.h:64:1:
  421. X_ABILP64 = 3 // <predefined>:377:1:
  422. X_ATFILE_SOURCE = 1 // features.h:353:1:
  423. X_BITS_ATOMIC_WIDE_COUNTER_H = 0 // atomic_wide_counter.h:20:1:
  424. X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
  425. X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
  426. X_BITS_ENDIAN_H = 1 // endian.h:20:1:
  427. X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:21:1:
  428. X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
  429. X_BITS_SOCKADDR_H = 1 // sockaddr.h:24:1:
  430. X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
  431. X_BITS_STDINT_UINTN_H = 1 // stdint-uintn.h:20:1:
  432. X_BITS_TIME64_H = 1 // time64.h:24:1:
  433. X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
  434. X_BITS_TYPES_H = 1 // types.h:24:1:
  435. X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
  436. X_BSD_SIZE_T_ = 0 // stddef.h:193:1:
  437. X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:196:1:
  438. X_DEFAULT_SOURCE = 1 // features.h:238:1:
  439. X_ENDIAN_H = 1 // endian.h:19:1:
  440. X_FEATURES_H = 1 // features.h:19:1:
  441. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  442. X_GCC_SIZE_T = 0 // stddef.h:200:1:
  443. X_LINUX_POSIX_TYPES_H = 0 // posix_types.h:3:1:
  444. X_LINUX_STDDEF_H = 0 // stddef.h:3:1:
  445. X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
  446. X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
  447. X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
  448. X_LOONGARCH_SIM = 3 // <predefined>:233:1:
  449. X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
  450. X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
  451. X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
  452. X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
  453. X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
  454. X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
  455. X_LP64 = 1 // <predefined>:372:1:
  456. X_NETDB_H = 1 // netdb.h:23:1:
  457. X_NETINET_IN_H = 1 // in.h:19:1:
  458. X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:43:1:
  459. X_PATH_HOSTS = "/etc/hosts" // netdb.h:44:1:
  460. X_PATH_NETWORKS = "/etc/networks" // netdb.h:45:1:
  461. X_PATH_NSSWITCH_CONF = "/etc/nsswitch.conf" // netdb.h:46:1:
  462. X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:47:1:
  463. X_PATH_SERVICES = "/etc/services" // netdb.h:48:1:
  464. X_POSIX_C_SOURCE = 200809 // features.h:292:1:
  465. X_POSIX_SOURCE = 1 // features.h:290:1:
  466. X_RPC_NETDB_H = 1 // netdb.h:37:1:
  467. X_SIZET_ = 0 // stddef.h:201:1:
  468. X_SIZE_T = 0 // stddef.h:187:1:
  469. X_SIZE_T_ = 0 // stddef.h:192:1:
  470. X_SIZE_T_DECLARED = 0 // stddef.h:197:1:
  471. X_SIZE_T_DEFINED = 0 // stddef.h:195:1:
  472. X_SIZE_T_DEFINED_ = 0 // stddef.h:194:1:
  473. X_SS_SIZE = 128 // sockaddr.h:40:1:
  474. X_STDC_PREDEF_H = 1 // <predefined>:223:1:
  475. X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
  476. X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
  477. X_SYS_SELECT_H = 1 // select.h:22:1:
  478. X_SYS_SIZE_T_H = 0 // stddef.h:188:1:
  479. X_SYS_SOCKET_H = 1 // socket.h:20:1:
  480. X_SYS_TYPES_H = 1 // types.h:23:1:
  481. X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
  482. X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
  483. X_T_SIZE = 0 // stddef.h:190:1:
  484. X_T_SIZE_ = 0 // stddef.h:189:1:
  485. Linux = 1 // <predefined>:308:1:
  486. Unix = 1 // <predefined>:247:1:
  487. )
  488. // Bits in the FLAGS argument to `send', `recv', et al.
  489. const ( /* socket.h:205:1: */
  490. MSG_OOB = 1 // Process out-of-band data.
  491. MSG_PEEK = 2 // Peek at incoming messages.
  492. MSG_DONTROUTE = 4 // Don't use local routing.
  493. MSG_CTRUNC = 8 // Control data lost before delivery.
  494. MSG_PROXY = 16 // Supply or ask second address.
  495. MSG_TRUNC = 32
  496. MSG_DONTWAIT = 64 // Nonblocking IO.
  497. MSG_EOR = 128 // End of record.
  498. MSG_WAITALL = 256 // Wait for a full request.
  499. MSG_FIN = 512
  500. MSG_SYN = 1024
  501. MSG_CONFIRM = 2048 // Confirm path validity.
  502. MSG_RST = 4096
  503. MSG_ERRQUEUE = 8192 // Fetch message from error queue.
  504. MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE.
  505. MSG_MORE = 32768 // Sender will send more.
  506. MSG_WAITFORONE = 65536 // Wait for at least one packet to return.
  507. MSG_BATCH = 262144 // sendmmsg: more messages coming.
  508. MSG_ZEROCOPY = 67108864 // Use user data in kernel path.
  509. MSG_FASTOPEN = 536870912 // Send data in TCP SYN.
  510. MSG_CMSG_CLOEXEC = 1073741824
  511. )
  512. // Socket level message types. This must match the definitions in
  513. //
  514. // <linux/socket.h>.
  515. const ( /* socket.h:363:1: */
  516. SCM_RIGHTS = 1
  517. )
  518. // Get the architecture-dependent definition of enum __socket_type.
  519. // Define enum __socket_type for generic Linux.
  520. // Copyright (C) 1991-2023 Free Software Foundation, Inc.
  521. // This file is part of the GNU C Library.
  522. //
  523. // The GNU C Library is free software; you can redistribute it and/or
  524. // modify it under the terms of the GNU Lesser General Public
  525. // License as published by the Free Software Foundation; either
  526. // version 2.1 of the License, or (at your option) any later version.
  527. //
  528. // The GNU C Library is distributed in the hope that it will be useful,
  529. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  530. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  531. // Lesser General Public License for more details.
  532. //
  533. // You should have received a copy of the GNU Lesser General Public
  534. // License along with the GNU C Library; if not, see
  535. // <https://www.gnu.org/licenses/>.
  536. // Types of sockets.
  537. const ( /* socket_type.h:24:1: */
  538. SOCK_STREAM = 1 // Sequenced, reliable, connection-based
  539. // byte streams.
  540. SOCK_DGRAM = 2 // Connectionless, unreliable datagrams
  541. // of fixed maximum length.
  542. SOCK_RAW = 3 // Raw protocol interface.
  543. SOCK_RDM = 4 // Reliably-delivered messages.
  544. SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based,
  545. // datagrams of fixed maximum length.
  546. SOCK_DCCP = 6 // Datagram Congestion Control Protocol.
  547. SOCK_PACKET = 10 // Linux specific way of getting packets
  548. // at the dev level. For writing rarp and
  549. // other similar things on the user level.
  550. // Flags to be ORed into the type parameter of socket and socketpair and
  551. // used for the flags parameter of paccept.
  552. SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the
  553. // new descriptor(s).
  554. SOCK_NONBLOCK = 2048
  555. )
  556. // If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel
  557. //
  558. // network headers first and we should use those ABI-identical definitions
  559. // instead of our own, otherwise 0.
  560. const ( /* in.h:105:1: */
  561. IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options.
  562. IPPROTO_ROUTING = 43 // IPv6 routing header.
  563. IPPROTO_FRAGMENT = 44 // IPv6 fragmentation header.
  564. IPPROTO_ICMPV6 = 58 // ICMPv6.
  565. IPPROTO_NONE = 59 // IPv6 no next header.
  566. IPPROTO_DSTOPTS = 60 // IPv6 destination options.
  567. IPPROTO_MH = 135
  568. )
  569. // Standard well-known ports.
  570. const ( /* in.h:128:1: */
  571. IPPORT_ECHO = 7 // Echo service.
  572. IPPORT_DISCARD = 9 // Discard transmissions service.
  573. IPPORT_SYSTAT = 11 // System status service.
  574. IPPORT_DAYTIME = 13 // Time of day service.
  575. IPPORT_NETSTAT = 15 // Network status service.
  576. IPPORT_FTP = 21 // File Transfer Protocol.
  577. IPPORT_TELNET = 23 // Telnet protocol.
  578. IPPORT_SMTP = 25 // Simple Mail Transfer Protocol.
  579. IPPORT_TIMESERVER = 37 // Timeserver service.
  580. IPPORT_NAMESERVER = 42 // Domain Name Service.
  581. IPPORT_WHOIS = 43 // Internet Whois service.
  582. IPPORT_MTP = 57
  583. IPPORT_TFTP = 69 // Trivial File Transfer Protocol.
  584. IPPORT_RJE = 77
  585. IPPORT_FINGER = 79 // Finger service.
  586. IPPORT_TTYLINK = 87
  587. IPPORT_SUPDUP = 95 // SUPDUP protocol.
  588. IPPORT_EXECSERVER = 512 // execd service.
  589. IPPORT_LOGINSERVER = 513 // rlogind service.
  590. IPPORT_CMDSERVER = 514
  591. IPPORT_EFSSERVER = 520
  592. // UDP ports.
  593. IPPORT_BIFFUDP = 512
  594. IPPORT_WHOSERVER = 513
  595. IPPORT_ROUTESERVER = 520
  596. // Ports less than this value are reserved for privileged processes.
  597. IPPORT_RESERVED = 1024
  598. // Ports greater this value are reserved for (non-privileged) servers.
  599. IPPORT_USERRESERVED = 5000
  600. )
  601. // Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
  602. // The first word in the comment at the right is the data type used;
  603. // "bool" means a boolean value stored in an `int'.
  604. // Advanced API (RFC3542) (1).
  605. // Advanced API (RFC3542) (2).
  606. // RFC5014.
  607. // RFC5082.
  608. // Obsolete synonyms for the above.
  609. // IPV6_MTU_DISCOVER values.
  610. // Socket level values for IPv6.
  611. // Routing header options for IPv6.
  612. // Standard well-defined IP protocols.
  613. const ( /* in.h:40:1: */
  614. IPPROTO_IP = 0 // Dummy protocol for TCP.
  615. IPPROTO_ICMP = 1 // Internet Control Message Protocol.
  616. IPPROTO_IGMP = 2 // Internet Group Management Protocol.
  617. IPPROTO_IPIP = 4 // IPIP tunnels (older KA9Q tunnels use 94).
  618. IPPROTO_TCP = 6 // Transmission Control Protocol.
  619. IPPROTO_EGP = 8 // Exterior Gateway Protocol.
  620. IPPROTO_PUP = 12 // PUP protocol.
  621. IPPROTO_UDP = 17 // User Datagram Protocol.
  622. IPPROTO_IDP = 22 // XNS IDP protocol.
  623. IPPROTO_TP = 29 // SO Transport Protocol Class 4.
  624. IPPROTO_DCCP = 33 // Datagram Congestion Control Protocol.
  625. IPPROTO_IPV6 = 41 // IPv6 header.
  626. IPPROTO_RSVP = 46 // Reservation Protocol.
  627. IPPROTO_GRE = 47 // General Routing Encapsulation.
  628. IPPROTO_ESP = 50 // encapsulating security payload.
  629. IPPROTO_AH = 51 // authentication header.
  630. IPPROTO_MTP = 92 // Multicast Transport Protocol.
  631. IPPROTO_BEETPH = 94 // IP option pseudo header for BEET.
  632. IPPROTO_ENCAP = 98 // Encapsulation Header.
  633. IPPROTO_PIM = 103 // Protocol Independent Multicast.
  634. IPPROTO_COMP = 108 // Compression Header Protocol.
  635. IPPROTO_L2TP = 115 // Layer 2 Tunnelling Protocol.
  636. IPPROTO_SCTP = 132 // Stream Control Transmission Protocol.
  637. IPPROTO_UDPLITE = 136 // UDP-Lite protocol.
  638. IPPROTO_MPLS = 137 // MPLS in IP.
  639. IPPROTO_ETHERNET = 143 // Ethernet-within-IPv6 Encapsulation.
  640. IPPROTO_RAW = 255 // Raw IP packets.
  641. IPPROTO_MPTCP = 262 // Multipath TCP connection.
  642. IPPROTO_MAX = 263
  643. )
  644. // The following constants should be used for the second parameter of
  645. //
  646. // `shutdown'.
  647. const ( /* socket.h:41:1: */
  648. SHUT_RD = 0 // No more receptions.
  649. SHUT_WR = 1 // No more transmissions.
  650. SHUT_RDWR = 2
  651. )
  652. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  653. type Size_t = uint64 /* <builtin>:9:23 */
  654. type Wchar_t = int32 /* <builtin>:15:24 */
  655. type X__int128_t = struct {
  656. Flo int64
  657. Fhi int64
  658. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  659. type X__uint128_t = struct {
  660. Flo uint64
  661. Fhi uint64
  662. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  663. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  664. type X__float128 = float64 /* <builtin>:47:21 */
  665. // Copyright (C) 1996-2023 Free Software Foundation, Inc.
  666. // This file is part of the GNU C Library.
  667. //
  668. // The GNU C Library is free software; you can redistribute it and/or
  669. // modify it under the terms of the GNU Lesser General Public
  670. // License as published by the Free Software Foundation; either
  671. // version 2.1 of the License, or (at your option) any later version.
  672. //
  673. // The GNU C Library is distributed in the hope that it will be useful,
  674. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  675. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  676. // Lesser General Public License for more details.
  677. //
  678. // You should have received a copy of the GNU Lesser General Public
  679. // License along with the GNU C Library; if not, see
  680. // <https://www.gnu.org/licenses/>.
  681. // All data returned by the network data base library are supplied in
  682. // host order and returned in network order (suitable for use in
  683. // system calls).
  684. // Copyright (C) 1991-2023 Free Software Foundation, Inc.
  685. // This file is part of the GNU C Library.
  686. //
  687. // The GNU C Library is free software; you can redistribute it and/or
  688. // modify it under the terms of the GNU Lesser General Public
  689. // License as published by the Free Software Foundation; either
  690. // version 2.1 of the License, or (at your option) any later version.
  691. //
  692. // The GNU C Library is distributed in the hope that it will be useful,
  693. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  694. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  695. // Lesser General Public License for more details.
  696. //
  697. // You should have received a copy of the GNU Lesser General Public
  698. // License along with the GNU C Library; if not, see
  699. // <https://www.gnu.org/licenses/>.
  700. // These are defined by the user (or the compiler)
  701. // to specify the desired environment:
  702. //
  703. // __STRICT_ANSI__ ISO Standard C.
  704. // _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
  705. // _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
  706. // _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
  707. // __STDC_WANT_LIB_EXT2__
  708. // Extensions to ISO C99 from TR 27431-2:2010.
  709. // __STDC_WANT_IEC_60559_BFP_EXT__
  710. // Extensions to ISO C11 from TS 18661-1:2014.
  711. // __STDC_WANT_IEC_60559_FUNCS_EXT__
  712. // Extensions to ISO C11 from TS 18661-4:2015.
  713. // __STDC_WANT_IEC_60559_TYPES_EXT__
  714. // Extensions to ISO C11 from TS 18661-3:2015.
  715. // __STDC_WANT_IEC_60559_EXT__
  716. // ISO C2X interfaces defined only in Annex F.
  717. //
  718. // _POSIX_SOURCE IEEE Std 1003.1.
  719. // _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
  720. // if >=199309L, add IEEE Std 1003.1b-1993;
  721. // if >=199506L, add IEEE Std 1003.1c-1995;
  722. // if >=200112L, all of IEEE 1003.1-2004
  723. // if >=200809L, all of IEEE 1003.1-2008
  724. // _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
  725. // Single Unix conformance is wanted, to 600 for the
  726. // sixth revision, to 700 for the seventh revision.
  727. // _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
  728. // _LARGEFILE_SOURCE Some more functions for correct standard I/O.
  729. // _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
  730. // _FILE_OFFSET_BITS=N Select default filesystem interface.
  731. // _ATFILE_SOURCE Additional *at interfaces.
  732. // _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
  733. // MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
  734. // _GNU_SOURCE All of the above, plus GNU extensions.
  735. // _DEFAULT_SOURCE The default set of features (taking precedence over
  736. // __STRICT_ANSI__).
  737. //
  738. // _FORTIFY_SOURCE Add security hardening to many library functions.
  739. // Set to 1, 2 or 3; 3 performs stricter checks than 2, which
  740. // performs stricter checks than 1.
  741. //
  742. // _REENTRANT, _THREAD_SAFE
  743. // Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
  744. //
  745. // The `-ansi' switch to the GNU C compiler, and standards conformance
  746. // options such as `-std=c99', define __STRICT_ANSI__. If none of
  747. // these are defined, or if _DEFAULT_SOURCE is defined, the default is
  748. // to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
  749. // 200809L, as well as enabling miscellaneous functions from BSD and
  750. // SVID. If more than one of these are defined, they accumulate. For
  751. // example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
  752. // give you ISO C, 1003.1, and 1003.2, but nothing else.
  753. //
  754. // These are defined by this file and are used by the
  755. // header files to decide what to declare or define:
  756. //
  757. // __GLIBC_USE (F) Define things from feature set F. This is defined
  758. // to 1 or 0; the subsequent macros are either defined
  759. // or undefined, and those tests should be moved to
  760. // __GLIBC_USE.
  761. // __USE_ISOC11 Define ISO C11 things.
  762. // __USE_ISOC99 Define ISO C99 things.
  763. // __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
  764. // __USE_ISOCXX11 Define ISO C++11 things.
  765. // __USE_POSIX Define IEEE Std 1003.1 things.
  766. // __USE_POSIX2 Define IEEE Std 1003.2 things.
  767. // __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
  768. // __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
  769. // __USE_XOPEN Define XPG things.
  770. // __USE_XOPEN_EXTENDED Define X/Open Unix things.
  771. // __USE_UNIX98 Define Single Unix V2 things.
  772. // __USE_XOPEN2K Define XPG6 things.
  773. // __USE_XOPEN2KXSI Define XPG6 XSI things.
  774. // __USE_XOPEN2K8 Define XPG7 things.
  775. // __USE_XOPEN2K8XSI Define XPG7 XSI things.
  776. // __USE_LARGEFILE Define correct standard I/O things.
  777. // __USE_LARGEFILE64 Define LFS things with separate names.
  778. // __USE_FILE_OFFSET64 Define 64bit interface as default.
  779. // __USE_MISC Define things from 4.3BSD or System V Unix.
  780. // __USE_ATFILE Define *at interfaces and AT_* constants for them.
  781. // __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
  782. // MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
  783. // __USE_GNU Define GNU extensions.
  784. // __USE_FORTIFY_LEVEL Additional security measures used, according to level.
  785. //
  786. // The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
  787. // defined by this file unconditionally. `__GNU_LIBRARY__' is provided
  788. // only for compatibility. All new code should use the other symbols
  789. // to test for features.
  790. //
  791. // All macros listed above as possibly being defined by this file are
  792. // explicitly undefined if they are not explicitly defined.
  793. // Feature-test macros that are not defined by the user or compiler
  794. // but are implied by the other feature-test macros defined (or by the
  795. // lack of any definitions) are defined by the file.
  796. //
  797. // ISO C feature test macros depend on the definition of the macro
  798. // when an affected header is included, not when the first system
  799. // header is included, and so they are handled in
  800. // <bits/libc-header-start.h>, which does not have a multiple include
  801. // guard. Feature test macros that can be handled from the first
  802. // system header included are handled here.
  803. // Undefine everything, so we get a clean slate.
  804. // Suppress kernel-name space pollution unless user expressedly asks
  805. // for it.
  806. // Convenience macro to test the version of gcc.
  807. // Use like this:
  808. // #if __GNUC_PREREQ (2,8)
  809. // ... code requiring gcc 2.8 or later ...
  810. // #endif
  811. // Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
  812. // added in 2.0.
  813. // Similarly for clang. Features added to GCC after version 4.2 may
  814. // or may not also be available in clang, and clang's definitions of
  815. // __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
  816. // features can be queried via __has_extension/__has_feature.
  817. // Whether to use feature set F.
  818. // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
  819. // _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
  820. // issue a warning; the expectation is that the source is being
  821. // transitioned to use the new macro.
  822. // If _GNU_SOURCE was defined by the user, turn on all the other features.
  823. // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
  824. // define _DEFAULT_SOURCE.
  825. // This is to enable the ISO C2X extension.
  826. // This is to enable the ISO C11 extension.
  827. // This is to enable the ISO C99 extension.
  828. // This is to enable the ISO C90 Amendment 1:1995 extension.
  829. // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
  830. // is defined, use POSIX.1-2008 (or another version depending on
  831. // _XOPEN_SOURCE).
  832. // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
  833. // defined in all multithreaded code. GNU libc has not required this
  834. // for many years. We now treat them as compatibility synonyms for
  835. // _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
  836. // comprehensive support for multithreaded code. Using them never
  837. // lowers the selected level of POSIX conformance, only raises it.
  838. // Features part to handle 64-bit time_t support.
  839. // Copyright (C) 2021-2023 Free Software Foundation, Inc.
  840. // This file is part of the GNU C Library.
  841. //
  842. // The GNU C Library is free software; you can redistribute it and/or
  843. // modify it under the terms of the GNU Lesser General Public
  844. // License as published by the Free Software Foundation; either
  845. // version 2.1 of the License, or (at your option) any later version.
  846. //
  847. // The GNU C Library is distributed in the hope that it will be useful,
  848. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  849. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  850. // Lesser General Public License for more details.
  851. //
  852. // You should have received a copy of the GNU Lesser General Public
  853. // License along with the GNU C Library; if not, see
  854. // <https://www.gnu.org/licenses/>.
  855. // We need to know the word size in order to check the time size.
  856. // Copyright (C) 1999-2023 Free Software Foundation, Inc.
  857. // This file is part of the GNU C Library.
  858. //
  859. // The GNU C Library is free software; you can redistribute it and/or
  860. // modify it under the terms of the GNU Lesser General Public
  861. // License as published by the Free Software Foundation; either
  862. // version 2.1 of the License, or (at your option) any later version.
  863. //
  864. // The GNU C Library is distributed in the hope that it will be useful,
  865. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  866. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  867. // Lesser General Public License for more details.
  868. //
  869. // You should have received a copy of the GNU Lesser General Public
  870. // License along with the GNU C Library; if not, see
  871. // <https://www.gnu.org/licenses/>.
  872. // Bit size of the time_t type at glibc build time, general case.
  873. // Copyright (C) 2018-2023 Free Software Foundation, Inc.
  874. // This file is part of the GNU C Library.
  875. //
  876. // The GNU C Library is free software; you can redistribute it and/or
  877. // modify it under the terms of the GNU Lesser General Public
  878. // License as published by the Free Software Foundation; either
  879. // version 2.1 of the License, or (at your option) any later version.
  880. //
  881. // The GNU C Library is distributed in the hope that it will be useful,
  882. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  883. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  884. // Lesser General Public License for more details.
  885. //
  886. // You should have received a copy of the GNU Lesser General Public
  887. // License along with the GNU C Library; if not, see
  888. // <https://www.gnu.org/licenses/>.
  889. // Size in bits of the 'time_t' type of the default ABI.
  890. // The function 'gets' existed in C89, but is impossible to use
  891. // safely. It has been removed from ISO C11 and ISO C++14. Note: for
  892. // compatibility with various implementations of <cstdio>, this test
  893. // must consider only the value of __cplusplus when compiling C++.
  894. // GNU formerly extended the scanf functions with modified format
  895. // specifiers %as, %aS, and %a[...] that allocate a buffer for the
  896. // input using malloc. This extension conflicts with ISO C99, which
  897. // defines %a as a standalone format specifier that reads a floating-
  898. // point number; moreover, POSIX.1-2008 provides the same feature
  899. // using the modifier letter 'm' instead (%ms, %mS, %m[...]).
  900. //
  901. // We now follow C99 unless GNU extensions are active and the compiler
  902. // is specifically in C89 or C++98 mode (strict or not). For
  903. // instance, with GCC, -std=gnu11 will have C99-compliant scanf with
  904. // or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
  905. // old extension.
  906. // ISO C2X added support for a 0b or 0B prefix on binary constants as
  907. // inputs to strtol-family functions (base 0 or 2). This macro is
  908. // used to condition redirection in headers to allow that redirection
  909. // to be disabled when building those functions, despite _GNU_SOURCE
  910. // being defined.
  911. // Get definitions of __STDC_* predefined macros, if the compiler has
  912. // not preincluded this header automatically.
  913. // Copyright (C) 1991-2023 Free Software Foundation, Inc.
  914. // This file is part of the GNU C Library.
  915. //
  916. // The GNU C Library is free software; you can redistribute it and/or
  917. // modify it under the terms of the GNU Lesser General Public
  918. // License as published by the Free Software Foundation; either
  919. // version 2.1 of the License, or (at your option) any later version.
  920. //
  921. // The GNU C Library is distributed in the hope that it will be useful,
  922. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  923. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  924. // Lesser General Public License for more details.
  925. //
  926. // You should have received a copy of the GNU Lesser General Public
  927. // License along with the GNU C Library; if not, see
  928. // <https://www.gnu.org/licenses/>.
  929. // This macro indicates that the installed library is the GNU C Library.
  930. // For historic reasons the value now is 6 and this will stay from now
  931. // on. The use of this variable is deprecated. Use __GLIBC__ and
  932. // __GLIBC_MINOR__ now (see below) when you want to test for a specific
  933. // GNU C library version and use the values in <gnu/lib-names.h> to get
  934. // the sonames of the shared libraries.
  935. // Major and minor version number of the GNU C library package. Use
  936. // these macros to test for features in specific releases.
  937. // This is here only because every header file already includes this one.
  938. // Copyright (C) 1992-2023 Free Software Foundation, Inc.
  939. // Copyright The GNU Toolchain Authors.
  940. // This file is part of the GNU C Library.
  941. //
  942. // The GNU C Library is free software; you can redistribute it and/or
  943. // modify it under the terms of the GNU Lesser General Public
  944. // License as published by the Free Software Foundation; either
  945. // version 2.1 of the License, or (at your option) any later version.
  946. //
  947. // The GNU C Library is distributed in the hope that it will be useful,
  948. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  949. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  950. // Lesser General Public License for more details.
  951. //
  952. // You should have received a copy of the GNU Lesser General Public
  953. // License along with the GNU C Library; if not, see
  954. // <https://www.gnu.org/licenses/>.
  955. // We are almost always included from features.h.
  956. // The GNU libc does not support any K&R compilers or the traditional mode
  957. // of ISO C compilers anymore. Check for some of the combinations not
  958. // supported anymore.
  959. // Some user header file might have defined this before.
  960. // Compilers that lack __has_attribute may object to
  961. // #if defined __has_attribute && __has_attribute (...)
  962. // even though they do not need to evaluate the right-hand side of the &&.
  963. // Similarly for __has_builtin, etc.
  964. // All functions, except those with callbacks or those that
  965. // synchronize memory, are leaf functions.
  966. // GCC can always grok prototypes. For C++ programs we add throw()
  967. // to help it optimize the function calls. But this only works with
  968. // gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
  969. // as non-throwing using a function attribute since programs can use
  970. // the -fexceptions options for C code as well.
  971. // These two macros are not used in glibc anymore. They are kept here
  972. // only because some other projects expect the macros to be defined.
  973. // For these things, GCC behaves the ANSI way normally,
  974. // and the non-ANSI way under -traditional.
  975. // This is not a typedef so `const __ptr_t' does the right thing.
  976. // C++ needs to know that types and declarations are C, not C++.
  977. // Fortify support.
  978. // Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
  979. // Support for flexible arrays.
  980. // Headers that should use flexible arrays only if they're "real"
  981. // (e.g. only if they won't affect sizeof()) should test
  982. // #if __glibc_c99_flexarr_available.
  983. // __asm__ ("xyz") is used throughout the headers to rename functions
  984. // at the assembly language level. This is wrapped by the __REDIRECT
  985. // macro, in order to support compilers that can do this some other
  986. // way. When compilers don't support asm-names at all, we have to do
  987. // preprocessor tricks instead (which don't have exactly the right
  988. // semantics, but it's the best we can do).
  989. //
  990. // Example:
  991. // int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
  992. //
  993. // #elif __SOME_OTHER_COMPILER__
  994. //
  995. // # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
  996. // GCC and clang have various useful declarations that can be made with
  997. // the '__attribute__' syntax. All of the ways we use this do fine if
  998. // they are omitted for compilers that don't understand it.
  999. // At some point during the gcc 2.96 development the `malloc' attribute
  1000. // for functions was introduced. We don't want to use it unconditionally
  1001. // (although this would be possible) since it generates warnings.
  1002. // Tell the compiler which arguments to an allocation function
  1003. // indicate the size of the allocation.
  1004. // Tell the compiler which argument to an allocation function
  1005. // indicates the alignment of the allocation.
  1006. // At some point during the gcc 2.96 development the `pure' attribute
  1007. // for functions was introduced. We don't want to use it unconditionally
  1008. // (although this would be possible) since it generates warnings.
  1009. // This declaration tells the compiler that the value is constant.
  1010. // At some point during the gcc 3.1 development the `used' attribute
  1011. // for functions was introduced. We don't want to use it unconditionally
  1012. // (although this would be possible) since it generates warnings.
  1013. // Since version 3.2, gcc allows marking deprecated functions.
  1014. // Since version 4.5, gcc also allows one to specify the message printed
  1015. // when a deprecated function is used. clang claims to be gcc 4.2, but
  1016. // may also support this feature.
  1017. // At some point during the gcc 2.8 development the `format_arg' attribute
  1018. // for functions was introduced. We don't want to use it unconditionally
  1019. // (although this would be possible) since it generates warnings.
  1020. // If several `format_arg' attributes are given for the same function, in
  1021. // gcc-3.0 and older, all but the last one are ignored. In newer gccs,
  1022. // all designated arguments are considered.
  1023. // At some point during the gcc 2.97 development the `strfmon' format
  1024. // attribute for functions was introduced. We don't want to use it
  1025. // unconditionally (although this would be possible) since it
  1026. // generates warnings.
  1027. // The nonnull function attribute marks pointer parameters that
  1028. // must not be NULL. This has the name __nonnull in glibc,
  1029. // and __attribute_nonnull__ in files shared with Gnulib to avoid
  1030. // collision with a different __nonnull in DragonFlyBSD 5.9.
  1031. // The returns_nonnull function attribute marks the return type of the function
  1032. // as always being non-null.
  1033. // If fortification mode, we warn about unused results of certain
  1034. // function calls which can lead to problems.
  1035. // Forces a function to be always inlined.
  1036. // The Linux kernel defines __always_inline in stddef.h (283d7573), and
  1037. // it conflicts with this definition. Therefore undefine it first to
  1038. // allow either header to be included first.
  1039. // Associate error messages with the source location of the call site rather
  1040. // than with the source location inside the function.
  1041. // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
  1042. // inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
  1043. // or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
  1044. // older than 4.3 may define these macros and still not guarantee GNU inlining
  1045. // semantics.
  1046. //
  1047. // clang++ identifies itself as gcc-4.2, but has support for GNU inlining
  1048. // semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
  1049. // __GNUC_GNU_INLINE__ macro definitions.
  1050. // GCC 4.3 and above allow passing all anonymous arguments of an
  1051. // __extern_always_inline function to some other vararg function.
  1052. // It is possible to compile containing GCC extensions even if GCC is
  1053. // run in pedantic mode if the uses are carefully marked using the
  1054. // `__extension__' keyword. But this is not generally available before
  1055. // version 2.8.
  1056. // __restrict is known in EGCS 1.2 and above, and in clang.
  1057. // It works also in C++ mode (outside of arrays), but only when spelled
  1058. // as '__restrict', not 'restrict'.
  1059. // ISO C99 also allows to declare arrays as non-overlapping. The syntax is
  1060. // array_name[restrict]
  1061. // GCC 3.1 and clang support this.
  1062. // This syntax is not usable in C++ mode.
  1063. // Describes a char array whose address can safely be passed as the first
  1064. // argument to strncpy and strncat, as the char array is not necessarily
  1065. // a NUL-terminated string.
  1066. // Undefine (also defined in libc-symbols.h).
  1067. // Copies attributes from the declaration or type referenced by
  1068. // the argument.
  1069. // Gnulib avoids including these, as they don't work on non-glibc or
  1070. // older glibc platforms.
  1071. // Copyright (C) 1999-2023 Free Software Foundation, Inc.
  1072. // This file is part of the GNU C Library.
  1073. //
  1074. // The GNU C Library is free software; you can redistribute it and/or
  1075. // modify it under the terms of the GNU Lesser General Public
  1076. // License as published by the Free Software Foundation; either
  1077. // version 2.1 of the License, or (at your option) any later version.
  1078. //
  1079. // The GNU C Library is distributed in the hope that it will be useful,
  1080. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1081. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1082. // Lesser General Public License for more details.
  1083. //
  1084. // You should have received a copy of the GNU Lesser General Public
  1085. // License along with the GNU C Library; if not, see
  1086. // <https://www.gnu.org/licenses/>.
  1087. // Properties of long double type. ldbl-128 version.
  1088. // Copyright (C) 2016-2023 Free Software Foundation, Inc.
  1089. // This file is part of the GNU C Library.
  1090. //
  1091. // The GNU C Library is free software; you can redistribute it and/or
  1092. // modify it under the terms of the GNU Lesser General Public
  1093. // License published by the Free Software Foundation; either
  1094. // version 2.1 of the License, or (at your option) any later version.
  1095. //
  1096. // The GNU C Library is distributed in the hope that it will be useful,
  1097. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1098. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1099. // Lesser General Public License for more details.
  1100. //
  1101. // You should have received a copy of the GNU Lesser General Public
  1102. // License along with the GNU C Library; if not, see
  1103. // <https://www.gnu.org/licenses/>.
  1104. // long double is distinct from double, so there is nothing to
  1105. // define here.
  1106. // __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
  1107. // intended for use in preprocessor macros.
  1108. //
  1109. // Note: MESSAGE must be a _single_ string; concatenation of string
  1110. // literals is not supported.
  1111. // Generic selection (ISO C11) is a C-only feature, available in GCC
  1112. // since version 4.9. Previous versions do not provide generic
  1113. // selection, even though they might set __STDC_VERSION__ to 201112L,
  1114. // when in -std=c11 mode. Thus, we must check for !defined __GNUC__
  1115. // when testing __STDC_VERSION__ for generic selection support.
  1116. // On the other hand, Clang also defines __GNUC__, so a clang-specific
  1117. // check is required to enable the use of generic selection.
  1118. // Designates a 1-based positional argument ref-index of pointer type
  1119. // that can be used to access size-index elements of the pointed-to
  1120. // array according to access mode, or at least one element when
  1121. // size-index is not provided:
  1122. // access (access-mode, <ref-index> [, <size-index>])
  1123. // For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
  1124. // use the access attribute to get object sizes from function definition
  1125. // arguments, so we can't use them on functions we fortify. Drop the object
  1126. // size hints for such functions.
  1127. // Designates dealloc as a function to call to deallocate objects
  1128. // allocated by the declared function.
  1129. // Specify that a function such as setjmp or vfork may return
  1130. // twice.
  1131. // If we don't have __REDIRECT, prototypes will be missing if
  1132. // __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
  1133. // Decide whether we can define 'extern inline' functions in headers.
  1134. // This is here only because every header file already includes this one.
  1135. // Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
  1136. // <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
  1137. // that will always return failure (and set errno to ENOSYS).
  1138. // This file is automatically generated.
  1139. // This file selects the right generated file of `__stub_FUNCTION' macros
  1140. // based on the architecture being compiled for.
  1141. // Copyright (C) 1999-2023 Free Software Foundation, Inc.
  1142. // This file is part of the GNU C Library.
  1143. //
  1144. // The GNU C Library is free software; you can redistribute it and/or
  1145. // modify it under the terms of the GNU Lesser General Public
  1146. // License as published by the Free Software Foundation; either
  1147. // version 2.1 of the License, or (at your option) any later version.
  1148. //
  1149. // The GNU C Library is distributed in the hope that it will be useful,
  1150. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1151. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1152. // Lesser General Public License for more details.
  1153. //
  1154. // You should have received a copy of the GNU Lesser General Public
  1155. // License along with the GNU C Library; if not, see
  1156. // <https://www.gnu.org/licenses/>.
  1157. // This file is automatically generated.
  1158. // It defines a symbol `__stub_FUNCTION' for each function
  1159. // in the C library which is a stub, meaning it will fail
  1160. // every time called, usually setting errno to ENOSYS.
  1161. // Copyright (C) 1991-2023 Free Software Foundation, Inc.
  1162. // This file is part of the GNU C Library.
  1163. //
  1164. // The GNU C Library is free software; you can redistribute it and/or
  1165. // modify it under the terms of the GNU Lesser General Public
  1166. // License as published by the Free Software Foundation; either
  1167. // version 2.1 of the License, or (at your option) any later version.
  1168. //
  1169. // The GNU C Library is distributed in the hope that it will be useful,
  1170. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1171. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1172. // Lesser General Public License for more details.
  1173. //
  1174. // You should have received a copy of the GNU Lesser General Public
  1175. // License along with the GNU C Library; if not, see
  1176. // <https://www.gnu.org/licenses/>.
  1177. // Copyright (C) 1991-2023 Free Software Foundation, Inc.
  1178. // This file is part of the GNU C Library.
  1179. //
  1180. // The GNU C Library is free software; you can redistribute it and/or
  1181. // modify it under the terms of the GNU Lesser General Public
  1182. // License as published by the Free Software Foundation; either
  1183. // version 2.1 of the License, or (at your option) any later version.
  1184. //
  1185. // The GNU C Library is distributed in the hope that it will be useful,
  1186. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1187. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1188. // Lesser General Public License for more details.
  1189. //
  1190. // You should have received a copy of the GNU Lesser General Public
  1191. // License along with the GNU C Library; if not, see
  1192. // <https://www.gnu.org/licenses/>.
  1193. // Define uintN_t types.
  1194. // Copyright (C) 2017-2023 Free Software Foundation, Inc.
  1195. // This file is part of the GNU C Library.
  1196. //
  1197. // The GNU C Library is free software; you can redistribute it and/or
  1198. // modify it under the terms of the GNU Lesser General Public
  1199. // License as published by the Free Software Foundation; either
  1200. // version 2.1 of the License, or (at your option) any later version.
  1201. //
  1202. // The GNU C Library is distributed in the hope that it will be useful,
  1203. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1204. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1205. // Lesser General Public License for more details.
  1206. //
  1207. // You should have received a copy of the GNU Lesser General Public
  1208. // License along with the GNU C Library; if not, see
  1209. // <https://www.gnu.org/licenses/>.
  1210. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1211. // Copyright (C) 2002-2023 Free Software Foundation, Inc.
  1212. // This file is part of the GNU C Library.
  1213. //
  1214. // The GNU C Library is free software; you can redistribute it and/or
  1215. // modify it under the terms of the GNU Lesser General Public
  1216. // License as published by the Free Software Foundation; either
  1217. // version 2.1 of the License, or (at your option) any later version.
  1218. //
  1219. // The GNU C Library is distributed in the hope that it will be useful,
  1220. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1221. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1222. // Lesser General Public License for more details.
  1223. //
  1224. // You should have received a copy of the GNU Lesser General Public
  1225. // License along with the GNU C Library; if not, see
  1226. // <https://www.gnu.org/licenses/>.
  1227. // Never include this file directly; use <sys/types.h> instead.
  1228. // Copyright (C) 1991-2023 Free Software Foundation, Inc.
  1229. // This file is part of the GNU C Library.
  1230. //
  1231. // The GNU C Library is free software; you can redistribute it and/or
  1232. // modify it under the terms of the GNU Lesser General Public
  1233. // License as published by the Free Software Foundation; either
  1234. // version 2.1 of the License, or (at your option) any later version.
  1235. //
  1236. // The GNU C Library is distributed in the hope that it will be useful,
  1237. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1238. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1239. // Lesser General Public License for more details.
  1240. //
  1241. // You should have received a copy of the GNU Lesser General Public
  1242. // License along with the GNU C Library; if not, see
  1243. // <https://www.gnu.org/licenses/>.
  1244. // Copyright (C) 1999-2023 Free Software Foundation, Inc.
  1245. // This file is part of the GNU C Library.
  1246. //
  1247. // The GNU C Library is free software; you can redistribute it and/or
  1248. // modify it under the terms of the GNU Lesser General Public
  1249. // License as published by the Free Software Foundation; either
  1250. // version 2.1 of the License, or (at your option) any later version.
  1251. //
  1252. // The GNU C Library is distributed in the hope that it will be useful,
  1253. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1254. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1255. // Lesser General Public License for more details.
  1256. //
  1257. // You should have received a copy of the GNU Lesser General Public
  1258. // License along with the GNU C Library; if not, see
  1259. // <https://www.gnu.org/licenses/>.
  1260. // Bit size of the time_t type at glibc build time, general case.
  1261. // Copyright (C) 2018-2023 Free Software Foundation, Inc.
  1262. // This file is part of the GNU C Library.
  1263. //
  1264. // The GNU C Library is free software; you can redistribute it and/or
  1265. // modify it under the terms of the GNU Lesser General Public
  1266. // License as published by the Free Software Foundation; either
  1267. // version 2.1 of the License, or (at your option) any later version.
  1268. //
  1269. // The GNU C Library is distributed in the hope that it will be useful,
  1270. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1271. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1272. // Lesser General Public License for more details.
  1273. //
  1274. // You should have received a copy of the GNU Lesser General Public
  1275. // License along with the GNU C Library; if not, see
  1276. // <https://www.gnu.org/licenses/>.
  1277. // Size in bits of the 'time_t' type of the default ABI.
  1278. // Convenience types.
  1279. type X__u_char = uint8 /* types.h:31:23 */
  1280. type X__u_short = uint16 /* types.h:32:28 */
  1281. type X__u_int = uint32 /* types.h:33:22 */
  1282. type X__u_long = uint64 /* types.h:34:27 */
  1283. // Fixed-size types, underlying types depend on word size and compiler.
  1284. type X__int8_t = int8 /* types.h:37:21 */
  1285. type X__uint8_t = uint8 /* types.h:38:23 */
  1286. type X__int16_t = int16 /* types.h:39:26 */
  1287. type X__uint16_t = uint16 /* types.h:40:28 */
  1288. type X__int32_t = int32 /* types.h:41:20 */
  1289. type X__uint32_t = uint32 /* types.h:42:22 */
  1290. type X__int64_t = int64 /* types.h:44:25 */
  1291. type X__uint64_t = uint64 /* types.h:45:27 */
  1292. // Smallest types with at least a given width.
  1293. type X__int_least8_t = int8 /* types.h:52:18 */
  1294. type X__uint_least8_t = uint8 /* types.h:53:19 */
  1295. type X__int_least16_t = int16 /* types.h:54:19 */
  1296. type X__uint_least16_t = uint16 /* types.h:55:20 */
  1297. type X__int_least32_t = int32 /* types.h:56:19 */
  1298. type X__uint_least32_t = uint32 /* types.h:57:20 */
  1299. type X__int_least64_t = int64 /* types.h:58:19 */
  1300. type X__uint_least64_t = uint64 /* types.h:59:20 */
  1301. // quad_t is also 64 bits.
  1302. type X__quad_t = int64 /* types.h:63:18 */
  1303. type X__u_quad_t = uint64 /* types.h:64:27 */
  1304. // Largest integral types.
  1305. type X__intmax_t = int64 /* types.h:72:18 */
  1306. type X__uintmax_t = uint64 /* types.h:73:27 */
  1307. // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
  1308. // macros for each of the OS types we define below. The definitions
  1309. // of those macros must use the following macros for underlying types.
  1310. // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
  1311. // variants of each of the following integer types on this machine.
  1312. //
  1313. // 16 -- "natural" 16-bit type (always short)
  1314. // 32 -- "natural" 32-bit type (always int)
  1315. // 64 -- "natural" 64-bit type (long or long long)
  1316. // LONG32 -- 32-bit type, traditionally long
  1317. // QUAD -- 64-bit type, traditionally long long
  1318. // WORD -- natural type of __WORDSIZE bits (int or long)
  1319. // LONGWORD -- type of __WORDSIZE bits, traditionally long
  1320. //
  1321. // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
  1322. // conventional uses of `long' or `long long' type modifiers match the
  1323. // types we define, even when a less-adorned type would be the same size.
  1324. // This matters for (somewhat) portably writing printf/scanf formats for
  1325. // these types, where using the appropriate l or ll format modifiers can
  1326. // make the typedefs and the formats match up across all GNU platforms. If
  1327. // we used `long' when it's 64 bits where `long long' is expected, then the
  1328. // compiler would warn about the formats not matching the argument types,
  1329. // and the programmer changing them to shut up the compiler would break the
  1330. // program's portability.
  1331. //
  1332. // Here we assume what is presently the case in all the GCC configurations
  1333. // we support: long long is always 64 bits, long is always word/address size,
  1334. // and int is always 32 bits.
  1335. // No need to mark the typedef with __extension__.
  1336. // bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
  1337. // Copyright (C) 2011-2023 Free Software Foundation, Inc.
  1338. // This file is part of the GNU C Library.
  1339. //
  1340. // The GNU C Library is free software; you can redistribute it and/or
  1341. // modify it under the terms of the GNU Lesser General Public
  1342. // License as published by the Free Software Foundation; either
  1343. // version 2.1 of the License, or (at your option) any later version.
  1344. //
  1345. // The GNU C Library is distributed in the hope that it will be useful,
  1346. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1347. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1348. // Lesser General Public License for more details.
  1349. //
  1350. // You should have received a copy of the GNU Lesser General Public
  1351. // License along with the GNU C Library. If not, see
  1352. // <https://www.gnu.org/licenses/>.
  1353. // See <bits/types.h> for the meaning of these macros. This file exists so
  1354. // that <bits/types.h> need not vary across different GNU platforms.
  1355. // Tell the libc code that off_t and off64_t are actually the same type
  1356. // for all ABI purposes, even if possibly expressed as different base types
  1357. // for C type-checking purposes.
  1358. // Same for ino_t and ino64_t.
  1359. // And for __rlim_t and __rlim64_t.
  1360. // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
  1361. // And for getitimer, setitimer and rusage
  1362. // Number of descriptors that can fit in an `fd_set'.
  1363. // bits/time64.h -- underlying types for __time64_t. Generic version.
  1364. // Copyright (C) 2018-2023 Free Software Foundation, Inc.
  1365. // This file is part of the GNU C Library.
  1366. //
  1367. // The GNU C Library is free software; you can redistribute it and/or
  1368. // modify it under the terms of the GNU Lesser General Public
  1369. // License as published by the Free Software Foundation; either
  1370. // version 2.1 of the License, or (at your option) any later version.
  1371. //
  1372. // The GNU C Library is distributed in the hope that it will be useful,
  1373. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1374. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1375. // Lesser General Public License for more details.
  1376. //
  1377. // You should have received a copy of the GNU Lesser General Public
  1378. // License along with the GNU C Library; if not, see
  1379. // <https://www.gnu.org/licenses/>.
  1380. // Define __TIME64_T_TYPE so that it is always a 64-bit type.
  1381. // If we already have 64-bit time type then use it.
  1382. type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
  1383. type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
  1384. type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
  1385. type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
  1386. type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
  1387. type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
  1388. type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
  1389. type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
  1390. type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
  1391. type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
  1392. type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
  1393. type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
  1394. type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
  1395. type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
  1396. type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
  1397. type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
  1398. type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
  1399. type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
  1400. type X__suseconds64_t = int64 /* types.h:163:33 */
  1401. type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
  1402. type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
  1403. // Clock ID used in clock and timer functions.
  1404. type X__clockid_t = int32 /* types.h:169:29 */
  1405. // Timer ID returned by `timer_create'.
  1406. type X__timer_t = uintptr /* types.h:172:12 */
  1407. // Type to represent block size.
  1408. type X__blksize_t = int32 /* types.h:175:29 */
  1409. // Types from the Large File Support interface.
  1410. // Type to count number of disk blocks.
  1411. type X__blkcnt_t = int64 /* types.h:180:28 */
  1412. type X__blkcnt64_t = int64 /* types.h:181:30 */
  1413. // Type to count file system blocks.
  1414. type X__fsblkcnt_t = uint64 /* types.h:184:30 */
  1415. type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
  1416. // Type to count file system nodes.
  1417. type X__fsfilcnt_t = uint64 /* types.h:188:30 */
  1418. type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
  1419. // Type of miscellaneous file system fields.
  1420. type X__fsword_t = int64 /* types.h:192:28 */
  1421. type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
  1422. // Signed long type used in system calls.
  1423. type X__syscall_slong_t = int64 /* types.h:197:33 */
  1424. // Unsigned long type used in system calls.
  1425. type X__syscall_ulong_t = uint64 /* types.h:199:33 */
  1426. // These few don't really vary by system, they always correspond
  1427. //
  1428. // to one of the other defined types.
  1429. type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
  1430. type X__caddr_t = uintptr /* types.h:204:14 */
  1431. // Duplicates info from stdint.h but this is used in unistd.h.
  1432. type X__intptr_t = int64 /* types.h:207:25 */
  1433. // Duplicate info from sys/socket.h.
  1434. type X__socklen_t = uint32 /* types.h:210:23 */
  1435. // C99: An integer type that can be accessed as an atomic entity,
  1436. //
  1437. // even in the presence of asynchronous interrupts.
  1438. // It is not currently necessary for this to be machine-specific.
  1439. type X__sig_atomic_t = int32 /* types.h:215:13 */
  1440. // Seconds since the Epoch, visible to user code when time_t is too
  1441. // narrow only for consistency with the old way of widening too-narrow
  1442. // types. User code should never use __time64_t.
  1443. type Uint8_t = uint8 /* stdint-uintn.h:24:19 */
  1444. type Uint16_t = uint16 /* stdint-uintn.h:25:20 */
  1445. type Uint32_t = uint32 /* stdint-uintn.h:26:20 */
  1446. type Uint64_t = uint64 /* stdint-uintn.h:27:20 */
  1447. // Wide character type.
  1448. // Locale-writers should change this as necessary to
  1449. // be big enough to hold unique values not between 0 and 127,
  1450. // and not (wchar_t) -1, for each defined multibyte character.
  1451. // Define this type if we are doing the whole job,
  1452. // or if we want this type in particular.
  1453. // A null pointer constant.
  1454. // Structure for scatter/gather I/O.
  1455. type Iovec = struct {
  1456. Fiov_base uintptr
  1457. Fiov_len uint64
  1458. } /* struct_iovec.h:26:1 */
  1459. // Copyright (C) 1989-2023 Free Software Foundation, Inc.
  1460. //
  1461. // This file is part of GCC.
  1462. //
  1463. // GCC is free software; you can redistribute it and/or modify
  1464. // it under the terms of the GNU General Public License as published by
  1465. // the Free Software Foundation; either version 3, or (at your option)
  1466. // any later version.
  1467. //
  1468. // GCC is distributed in the hope that it will be useful,
  1469. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1470. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1471. // GNU General Public License for more details.
  1472. //
  1473. // Under Section 7 of GPL version 3, you are granted additional
  1474. // permissions described in the GCC Runtime Library Exception, version
  1475. // 3.1, as published by the Free Software Foundation.
  1476. //
  1477. // You should have received a copy of the GNU General Public License and
  1478. // a copy of the GCC Runtime Library Exception along with this program;
  1479. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  1480. // <http://www.gnu.org/licenses/>.
  1481. // ISO C Standard: 7.17 Common definitions <stddef.h>
  1482. // Any one of these symbols __need_* means that GNU libc
  1483. // wants us just to define one data type. So don't define
  1484. // the symbols that indicate this file's entire job has been done.
  1485. // This avoids lossage on SunOS but only if stdtypes.h comes first.
  1486. // There's no way to win with the other order! Sun lossage.
  1487. // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  1488. // Just ignore it.
  1489. // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  1490. // _TYPE_size_t which will typedef size_t. fixincludes patched the
  1491. // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  1492. // not defined, and so that defining this macro defines _GCC_SIZE_T.
  1493. // If we find that the macros are still defined at this point, we must
  1494. // invoke them so that the type is defined as expected.
  1495. // In case nobody has defined these types, but we aren't running under
  1496. // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  1497. // __WCHAR_TYPE__ have reasonable values. This can happen if the
  1498. // parts of GCC is compiled by an older compiler, that actually
  1499. // include gstddef.h, such as collect2.
  1500. // Signed type of difference of two pointers.
  1501. // Define this type if we are doing the whole job,
  1502. // or if we want this type in particular.
  1503. // Unsigned type of `sizeof' something.
  1504. // Define this type if we are doing the whole job,
  1505. // or if we want this type in particular.
  1506. // Wide character type.
  1507. // Locale-writers should change this as necessary to
  1508. // be big enough to hold unique values not between 0 and 127,
  1509. // and not (wchar_t) -1, for each defined multibyte character.
  1510. // Define this type if we are doing the whole job,
  1511. // or if we want this type in particular.
  1512. // A null pointer constant.
  1513. // This operating system-specific header file defines the SOCK_*, PF_*,
  1514. // AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr',
  1515. // `struct msghdr', and `struct linger' types.
  1516. // System-specific socket constants and types. Linux version.
  1517. // Copyright (C) 1991-2023 Free Software Foundation, Inc.
  1518. // This file is part of the GNU C Library.
  1519. //
  1520. // The GNU C Library is free software; you can redistribute it and/or
  1521. // modify it under the terms of the GNU Lesser General Public
  1522. // License as published by the Free Software Foundation; either
  1523. // version 2.1 of the License, or (at your option) any later version.
  1524. //
  1525. // The GNU C Library is distributed in the hope that it will be useful,
  1526. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1527. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1528. // Lesser General Public License for more details.
  1529. //
  1530. // You should have received a copy of the GNU Lesser General Public
  1531. // License along with the GNU C Library; if not, see
  1532. // <https://www.gnu.org/licenses/>.
  1533. // Copyright (C) 1989-2023 Free Software Foundation, Inc.
  1534. //
  1535. // This file is part of GCC.
  1536. //
  1537. // GCC is free software; you can redistribute it and/or modify
  1538. // it under the terms of the GNU General Public License as published by
  1539. // the Free Software Foundation; either version 3, or (at your option)
  1540. // any later version.
  1541. //
  1542. // GCC is distributed in the hope that it will be useful,
  1543. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1544. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1545. // GNU General Public License for more details.
  1546. //
  1547. // Under Section 7 of GPL version 3, you are granted additional
  1548. // permissions described in the GCC Runtime Library Exception, version
  1549. // 3.1, as published by the Free Software Foundation.
  1550. //
  1551. // You should have received a copy of the GNU General Public License and
  1552. // a copy of the GCC Runtime Library Exception along with this program;
  1553. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  1554. // <http://www.gnu.org/licenses/>.
  1555. // ISO C Standard: 7.17 Common definitions <stddef.h>
  1556. // Any one of these symbols __need_* means that GNU libc
  1557. // wants us just to define one data type. So don't define
  1558. // the symbols that indicate this file's entire job has been done.
  1559. // This avoids lossage on SunOS but only if stdtypes.h comes first.
  1560. // There's no way to win with the other order! Sun lossage.
  1561. // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  1562. // Just ignore it.
  1563. // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  1564. // _TYPE_size_t which will typedef size_t. fixincludes patched the
  1565. // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  1566. // not defined, and so that defining this macro defines _GCC_SIZE_T.
  1567. // If we find that the macros are still defined at this point, we must
  1568. // invoke them so that the type is defined as expected.
  1569. // In case nobody has defined these types, but we aren't running under
  1570. // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  1571. // __WCHAR_TYPE__ have reasonable values. This can happen if the
  1572. // parts of GCC is compiled by an older compiler, that actually
  1573. // include gstddef.h, such as collect2.
  1574. // Signed type of difference of two pointers.
  1575. // Define this type if we are doing the whole job,
  1576. // or if we want this type in particular.
  1577. // Unsigned type of `sizeof' something.
  1578. // Define this type if we are doing the whole job,
  1579. // or if we want this type in particular.
  1580. // Wide character type.
  1581. // Locale-writers should change this as necessary to
  1582. // be big enough to hold unique values not between 0 and 127,
  1583. // and not (wchar_t) -1, for each defined multibyte character.
  1584. // Define this type if we are doing the whole job,
  1585. // or if we want this type in particular.
  1586. // A null pointer constant.
  1587. // Copyright (C) 1991-2023 Free Software Foundation, Inc.
  1588. // This file is part of the GNU C Library.
  1589. //
  1590. // The GNU C Library is free software; you can redistribute it and/or
  1591. // modify it under the terms of the GNU Lesser General Public
  1592. // License as published by the Free Software Foundation; either
  1593. // version 2.1 of the License, or (at your option) any later version.
  1594. //
  1595. // The GNU C Library is distributed in the hope that it will be useful,
  1596. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1597. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1598. // Lesser General Public License for more details.
  1599. //
  1600. // You should have received a copy of the GNU Lesser General Public
  1601. // License along with the GNU C Library; if not, see
  1602. // <https://www.gnu.org/licenses/>.
  1603. // POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
  1604. // Copyright (C) 1991-2023 Free Software Foundation, Inc.
  1605. // This file is part of the GNU C Library.
  1606. //
  1607. // The GNU C Library is free software; you can redistribute it and/or
  1608. // modify it under the terms of the GNU Lesser General Public
  1609. // License as published by the Free Software Foundation; either
  1610. // version 2.1 of the License, or (at your option) any later version.
  1611. //
  1612. // The GNU C Library is distributed in the hope that it will be useful,
  1613. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1614. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1615. // Lesser General Public License for more details.
  1616. //
  1617. // You should have received a copy of the GNU Lesser General Public
  1618. // License along with the GNU C Library; if not, see
  1619. // <https://www.gnu.org/licenses/>.
  1620. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1621. // Copyright (C) 2002-2023 Free Software Foundation, Inc.
  1622. // This file is part of the GNU C Library.
  1623. //
  1624. // The GNU C Library is free software; you can redistribute it and/or
  1625. // modify it under the terms of the GNU Lesser General Public
  1626. // License as published by the Free Software Foundation; either
  1627. // version 2.1 of the License, or (at your option) any later version.
  1628. //
  1629. // The GNU C Library is distributed in the hope that it will be useful,
  1630. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1631. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1632. // Lesser General Public License for more details.
  1633. //
  1634. // You should have received a copy of the GNU Lesser General Public
  1635. // License along with the GNU C Library; if not, see
  1636. // <https://www.gnu.org/licenses/>.
  1637. // Never include this file directly; use <sys/types.h> instead.
  1638. type U_char = uint8 /* types.h:33:18 */
  1639. type U_short = uint16 /* types.h:34:19 */
  1640. type U_int = uint32 /* types.h:35:17 */
  1641. type U_long = uint64 /* types.h:36:18 */
  1642. type Quad_t = int64 /* types.h:37:18 */
  1643. type U_quad_t = uint64 /* types.h:38:20 */
  1644. type Fsid_t = X__fsid_t /* types.h:39:18 */
  1645. type Loff_t = int64 /* types.h:42:18 */
  1646. type Ino_t = uint64 /* types.h:49:19 */
  1647. type Dev_t = uint64 /* types.h:59:17 */
  1648. type Gid_t = uint32 /* types.h:64:17 */
  1649. type Mode_t = uint32 /* types.h:69:18 */
  1650. type Nlink_t = uint32 /* types.h:74:19 */
  1651. type Uid_t = uint32 /* types.h:79:17 */
  1652. type Off_t = int64 /* types.h:87:19 */
  1653. type Pid_t = int32 /* types.h:97:17 */
  1654. type Id_t = uint32 /* types.h:103:16 */
  1655. type Ssize_t = int64 /* types.h:108:19 */
  1656. type Daddr_t = int32 /* types.h:114:19 */
  1657. type Caddr_t = uintptr /* types.h:115:19 */
  1658. type Key_t = int32 /* types.h:121:17 */
  1659. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1660. // Copyright (C) 2002-2023 Free Software Foundation, Inc.
  1661. // This file is part of the GNU C Library.
  1662. //
  1663. // The GNU C Library is free software; you can redistribute it and/or
  1664. // modify it under the terms of the GNU Lesser General Public
  1665. // License as published by the Free Software Foundation; either
  1666. // version 2.1 of the License, or (at your option) any later version.
  1667. //
  1668. // The GNU C Library is distributed in the hope that it will be useful,
  1669. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1670. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1671. // Lesser General Public License for more details.
  1672. //
  1673. // You should have received a copy of the GNU Lesser General Public
  1674. // License along with the GNU C Library; if not, see
  1675. // <https://www.gnu.org/licenses/>.
  1676. // Never include this file directly; use <sys/types.h> instead.
  1677. // Returned by `clock'.
  1678. type Clock_t = int64 /* clock_t.h:7:19 */
  1679. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1680. // Copyright (C) 2002-2023 Free Software Foundation, Inc.
  1681. // This file is part of the GNU C Library.
  1682. //
  1683. // The GNU C Library is free software; you can redistribute it and/or
  1684. // modify it under the terms of the GNU Lesser General Public
  1685. // License as published by the Free Software Foundation; either
  1686. // version 2.1 of the License, or (at your option) any later version.
  1687. //
  1688. // The GNU C Library is distributed in the hope that it will be useful,
  1689. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1690. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1691. // Lesser General Public License for more details.
  1692. //
  1693. // You should have received a copy of the GNU Lesser General Public
  1694. // License along with the GNU C Library; if not, see
  1695. // <https://www.gnu.org/licenses/>.
  1696. // Never include this file directly; use <sys/types.h> instead.
  1697. // Clock ID used in clock and timer functions.
  1698. type Clockid_t = int32 /* clockid_t.h:7:21 */
  1699. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1700. // Copyright (C) 2002-2023 Free Software Foundation, Inc.
  1701. // This file is part of the GNU C Library.
  1702. //
  1703. // The GNU C Library is free software; you can redistribute it and/or
  1704. // modify it under the terms of the GNU Lesser General Public
  1705. // License as published by the Free Software Foundation; either
  1706. // version 2.1 of the License, or (at your option) any later version.
  1707. //
  1708. // The GNU C Library is distributed in the hope that it will be useful,
  1709. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1710. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1711. // Lesser General Public License for more details.
  1712. //
  1713. // You should have received a copy of the GNU Lesser General Public
  1714. // License along with the GNU C Library; if not, see
  1715. // <https://www.gnu.org/licenses/>.
  1716. // Never include this file directly; use <sys/types.h> instead.
  1717. // Returned by `time'.
  1718. type Time_t = int64 /* time_t.h:10:18 */
  1719. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1720. // Copyright (C) 2002-2023 Free Software Foundation, Inc.
  1721. // This file is part of the GNU C Library.
  1722. //
  1723. // The GNU C Library is free software; you can redistribute it and/or
  1724. // modify it under the terms of the GNU Lesser General Public
  1725. // License as published by the Free Software Foundation; either
  1726. // version 2.1 of the License, or (at your option) any later version.
  1727. //
  1728. // The GNU C Library is distributed in the hope that it will be useful,
  1729. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1730. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1731. // Lesser General Public License for more details.
  1732. //
  1733. // You should have received a copy of the GNU Lesser General Public
  1734. // License along with the GNU C Library; if not, see
  1735. // <https://www.gnu.org/licenses/>.
  1736. // Never include this file directly; use <sys/types.h> instead.
  1737. // Timer ID returned by `timer_create'.
  1738. type Timer_t = uintptr /* timer_t.h:7:19 */
  1739. // Copyright (C) 1989-2023 Free Software Foundation, Inc.
  1740. //
  1741. // This file is part of GCC.
  1742. //
  1743. // GCC is free software; you can redistribute it and/or modify
  1744. // it under the terms of the GNU General Public License as published by
  1745. // the Free Software Foundation; either version 3, or (at your option)
  1746. // any later version.
  1747. //
  1748. // GCC is distributed in the hope that it will be useful,
  1749. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1750. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1751. // GNU General Public License for more details.
  1752. //
  1753. // Under Section 7 of GPL version 3, you are granted additional
  1754. // permissions described in the GCC Runtime Library Exception, version
  1755. // 3.1, as published by the Free Software Foundation.
  1756. //
  1757. // You should have received a copy of the GNU General Public License and
  1758. // a copy of the GCC Runtime Library Exception along with this program;
  1759. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  1760. // <http://www.gnu.org/licenses/>.
  1761. // ISO C Standard: 7.17 Common definitions <stddef.h>
  1762. // Any one of these symbols __need_* means that GNU libc
  1763. // wants us just to define one data type. So don't define
  1764. // the symbols that indicate this file's entire job has been done.
  1765. // This avoids lossage on SunOS but only if stdtypes.h comes first.
  1766. // There's no way to win with the other order! Sun lossage.
  1767. // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  1768. // Just ignore it.
  1769. // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  1770. // _TYPE_size_t which will typedef size_t. fixincludes patched the
  1771. // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  1772. // not defined, and so that defining this macro defines _GCC_SIZE_T.
  1773. // If we find that the macros are still defined at this point, we must
  1774. // invoke them so that the type is defined as expected.
  1775. // In case nobody has defined these types, but we aren't running under
  1776. // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  1777. // __WCHAR_TYPE__ have reasonable values. This can happen if the
  1778. // parts of GCC is compiled by an older compiler, that actually
  1779. // include gstddef.h, such as collect2.
  1780. // Signed type of difference of two pointers.
  1781. // Define this type if we are doing the whole job,
  1782. // or if we want this type in particular.
  1783. // Unsigned type of `sizeof' something.
  1784. // Define this type if we are doing the whole job,
  1785. // or if we want this type in particular.
  1786. // Wide character type.
  1787. // Locale-writers should change this as necessary to
  1788. // be big enough to hold unique values not between 0 and 127,
  1789. // and not (wchar_t) -1, for each defined multibyte character.
  1790. // Define this type if we are doing the whole job,
  1791. // or if we want this type in particular.
  1792. // A null pointer constant.
  1793. // Old compatibility names for C types.
  1794. type Ulong = uint64 /* types.h:148:27 */
  1795. type Ushort = uint16 /* types.h:149:28 */
  1796. type Uint = uint32 /* types.h:150:22 */
  1797. // These size-specific names are used by some of the inet code.
  1798. // Define intN_t types.
  1799. // Copyright (C) 2017-2023 Free Software Foundation, Inc.
  1800. // This file is part of the GNU C Library.
  1801. //
  1802. // The GNU C Library is free software; you can redistribute it and/or
  1803. // modify it under the terms of the GNU Lesser General Public
  1804. // License as published by the Free Software Foundation; either
  1805. // version 2.1 of the License, or (at your option) any later version.
  1806. //
  1807. // The GNU C Library is distributed in the hope that it will be useful,
  1808. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1809. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1810. // Lesser General Public License for more details.
  1811. //
  1812. // You should have received a copy of the GNU Lesser General Public
  1813. // License along with the GNU C Library; if not, see
  1814. // <https://www.gnu.org/licenses/>.
  1815. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1816. // Copyright (C) 2002-2023 Free Software Foundation, Inc.
  1817. // This file is part of the GNU C Library.
  1818. //
  1819. // The GNU C Library is free software; you can redistribute it and/or
  1820. // modify it under the terms of the GNU Lesser General Public
  1821. // License as published by the Free Software Foundation; either
  1822. // version 2.1 of the License, or (at your option) any later version.
  1823. //
  1824. // The GNU C Library is distributed in the hope that it will be useful,
  1825. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1826. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1827. // Lesser General Public License for more details.
  1828. //
  1829. // You should have received a copy of the GNU Lesser General Public
  1830. // License along with the GNU C Library; if not, see
  1831. // <https://www.gnu.org/licenses/>.
  1832. // Never include this file directly; use <sys/types.h> instead.
  1833. type Int8_t = int8 /* stdint-intn.h:24:18 */
  1834. type Int16_t = int16 /* stdint-intn.h:25:19 */
  1835. type Int32_t = int32 /* stdint-intn.h:26:19 */
  1836. type Int64_t = int64 /* stdint-intn.h:27:19 */
  1837. // These were defined by ISO C without the first `_'.
  1838. type U_int8_t = uint8 /* types.h:158:19 */
  1839. type U_int16_t = uint16 /* types.h:159:20 */
  1840. type U_int32_t = uint32 /* types.h:160:20 */
  1841. type U_int64_t = uint64 /* types.h:161:20 */
  1842. type Register_t = int32 /* types.h:164:13 */
  1843. // It also defines `fd_set' and the FD_* macros for `select'.
  1844. // `fd_set' type and related macros, and `select'/`pselect' declarations.
  1845. // Copyright (C) 1996-2023 Free Software Foundation, Inc.
  1846. // This file is part of the GNU C Library.
  1847. //
  1848. // The GNU C Library is free software; you can redistribute it and/or
  1849. // modify it under the terms of the GNU Lesser General Public
  1850. // License as published by the Free Software Foundation; either
  1851. // version 2.1 of the License, or (at your option) any later version.
  1852. //
  1853. // The GNU C Library is distributed in the hope that it will be useful,
  1854. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1855. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1856. // Lesser General Public License for more details.
  1857. //
  1858. // You should have received a copy of the GNU Lesser General Public
  1859. // License along with the GNU C Library; if not, see
  1860. // <https://www.gnu.org/licenses/>.
  1861. // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
  1862. // Copyright (C) 1991-2023 Free Software Foundation, Inc.
  1863. // This file is part of the GNU C Library.
  1864. //
  1865. // The GNU C Library is free software; you can redistribute it and/or
  1866. // modify it under the terms of the GNU Lesser General Public
  1867. // License as published by the Free Software Foundation; either
  1868. // version 2.1 of the License, or (at your option) any later version.
  1869. //
  1870. // The GNU C Library is distributed in the hope that it will be useful,
  1871. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1872. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1873. // Lesser General Public License for more details.
  1874. //
  1875. // You should have received a copy of the GNU Lesser General Public
  1876. // License along with the GNU C Library; if not, see
  1877. // <https://www.gnu.org/licenses/>.
  1878. // Get definition of needed basic types.
  1879. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1880. // Copyright (C) 2002-2023 Free Software Foundation, Inc.
  1881. // This file is part of the GNU C Library.
  1882. //
  1883. // The GNU C Library is free software; you can redistribute it and/or
  1884. // modify it under the terms of the GNU Lesser General Public
  1885. // License as published by the Free Software Foundation; either
  1886. // version 2.1 of the License, or (at your option) any later version.
  1887. //
  1888. // The GNU C Library is distributed in the hope that it will be useful,
  1889. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1890. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1891. // Lesser General Public License for more details.
  1892. //
  1893. // You should have received a copy of the GNU Lesser General Public
  1894. // License along with the GNU C Library; if not, see
  1895. // <https://www.gnu.org/licenses/>.
  1896. // Never include this file directly; use <sys/types.h> instead.
  1897. // Get __FD_* definitions.
  1898. // Copyright (C) 1997-2023 Free Software Foundation, Inc.
  1899. // This file is part of the GNU C Library.
  1900. //
  1901. // The GNU C Library is free software; you can redistribute it and/or
  1902. // modify it under the terms of the GNU Lesser General Public
  1903. // License as published by the Free Software Foundation; either
  1904. // version 2.1 of the License, or (at your option) any later version.
  1905. //
  1906. // The GNU C Library is distributed in the hope that it will be useful,
  1907. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1908. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1909. // Lesser General Public License for more details.
  1910. //
  1911. // You should have received a copy of the GNU Lesser General Public
  1912. // License along with the GNU C Library; if not, see
  1913. // <https://www.gnu.org/licenses/>.
  1914. // We don't use `memset' because this would require a prototype and
  1915. // the array isn't too big.
  1916. // Get sigset_t.
  1917. type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */
  1918. // A set of signals to be blocked, unblocked, or waited for.
  1919. type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
  1920. // Get definition of timer specification structures.
  1921. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1922. // Copyright (C) 2002-2023 Free Software Foundation, Inc.
  1923. // This file is part of the GNU C Library.
  1924. //
  1925. // The GNU C Library is free software; you can redistribute it and/or
  1926. // modify it under the terms of the GNU Lesser General Public
  1927. // License as published by the Free Software Foundation; either
  1928. // version 2.1 of the License, or (at your option) any later version.
  1929. //
  1930. // The GNU C Library is distributed in the hope that it will be useful,
  1931. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1932. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1933. // Lesser General Public License for more details.
  1934. //
  1935. // You should have received a copy of the GNU Lesser General Public
  1936. // License along with the GNU C Library; if not, see
  1937. // <https://www.gnu.org/licenses/>.
  1938. // Never include this file directly; use <sys/types.h> instead.
  1939. // A time value that is accurate to the nearest
  1940. //
  1941. // microsecond but also has a range of years.
  1942. type Timeval = struct {
  1943. Ftv_sec int64
  1944. Ftv_usec int64
  1945. } /* struct_timeval.h:8:1 */
  1946. // NB: Include guard matches what <linux/time.h> uses.
  1947. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1948. // Copyright (C) 2002-2023 Free Software Foundation, Inc.
  1949. // This file is part of the GNU C Library.
  1950. //
  1951. // The GNU C Library is free software; you can redistribute it and/or
  1952. // modify it under the terms of the GNU Lesser General Public
  1953. // License as published by the Free Software Foundation; either
  1954. // version 2.1 of the License, or (at your option) any later version.
  1955. //
  1956. // The GNU C Library is distributed in the hope that it will be useful,
  1957. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1958. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1959. // Lesser General Public License for more details.
  1960. //
  1961. // You should have received a copy of the GNU Lesser General Public
  1962. // License along with the GNU C Library; if not, see
  1963. // <https://www.gnu.org/licenses/>.
  1964. // Never include this file directly; use <sys/types.h> instead.
  1965. // Endian macros for string.h functions
  1966. // Copyright (C) 1992-2023 Free Software Foundation, Inc.
  1967. // This file is part of the GNU C Library.
  1968. //
  1969. // The GNU C Library is free software; you can redistribute it and/or
  1970. // modify it under the terms of the GNU Lesser General Public
  1971. // License as published by the Free Software Foundation; either
  1972. // version 2.1 of the License, or (at your option) any later version.
  1973. //
  1974. // The GNU C Library is distributed in the hope that it will be useful,
  1975. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1976. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1977. // Lesser General Public License for more details.
  1978. //
  1979. // You should have received a copy of the GNU Lesser General Public
  1980. // License along with the GNU C Library; if not, see
  1981. // <http://www.gnu.org/licenses/>.
  1982. // POSIX.1b structure for a time value. This is like a `struct timeval' but
  1983. //
  1984. // has nanoseconds instead of microseconds.
  1985. type Timespec = struct {
  1986. Ftv_sec int64
  1987. Ftv_nsec int64
  1988. } /* struct_timespec.h:11:1 */
  1989. type Suseconds_t = int64 /* select.h:43:23 */
  1990. // The fd_set member is required to be an array of longs.
  1991. type X__fd_mask = int64 /* select.h:49:18 */
  1992. // Some versions of <linux/posix_types.h> define this macros.
  1993. // It's easier to assume 8-bit bytes than to get CHAR_BIT.
  1994. // fd_set for select and pselect.
  1995. type Fd_set = struct{ F__fds_bits [16]int64 } /* select.h:70:5 */
  1996. // Maximum number of file descriptors in `fd_set'.
  1997. // Sometimes the fd_set member is assumed to have this type.
  1998. type Fd_mask = int64 /* select.h:77:19 */
  1999. // Define some inlines helping to catch common problems.
  2000. type Blksize_t = int32 /* types.h:185:21 */
  2001. // Types from the Large File Support interface.
  2002. type Blkcnt_t = int64 /* types.h:205:22 */ // Type to count number of disk blocks.
  2003. type Fsblkcnt_t = uint64 /* types.h:209:24 */ // Type to count file system blocks.
  2004. type Fsfilcnt_t = uint64 /* types.h:213:24 */ // Type to count file system inodes.
  2005. // Now add the thread types.
  2006. // Declaration of common pthread types for all architectures.
  2007. // Copyright (C) 2017-2023 Free Software Foundation, Inc.
  2008. // This file is part of the GNU C Library.
  2009. //
  2010. // The GNU C Library is free software; you can redistribute it and/or
  2011. // modify it under the terms of the GNU Lesser General Public
  2012. // License as published by the Free Software Foundation; either
  2013. // version 2.1 of the License, or (at your option) any later version.
  2014. //
  2015. // The GNU C Library is distributed in the hope that it will be useful,
  2016. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2017. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2018. // Lesser General Public License for more details.
  2019. //
  2020. // You should have received a copy of the GNU Lesser General Public
  2021. // License along with the GNU C Library; if not, see
  2022. // <https://www.gnu.org/licenses/>.
  2023. // For internal mutex and condition variable definitions.
  2024. // Common threading primitives definitions for both POSIX and C11.
  2025. // Copyright (C) 2017-2023 Free Software Foundation, Inc.
  2026. // This file is part of the GNU C Library.
  2027. //
  2028. // The GNU C Library is free software; you can redistribute it and/or
  2029. // modify it under the terms of the GNU Lesser General Public
  2030. // License as published by the Free Software Foundation; either
  2031. // version 2.1 of the License, or (at your option) any later version.
  2032. //
  2033. // The GNU C Library is distributed in the hope that it will be useful,
  2034. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2035. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2036. // Lesser General Public License for more details.
  2037. //
  2038. // You should have received a copy of the GNU Lesser General Public
  2039. // License along with the GNU C Library; if not, see
  2040. // <https://www.gnu.org/licenses/>.
  2041. // Arch-specific definitions. Each architecture must define the following
  2042. // macros to define the expected sizes of pthread data types:
  2043. //
  2044. // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
  2045. // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
  2046. // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
  2047. // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
  2048. // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
  2049. // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
  2050. // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
  2051. // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
  2052. // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  2053. //
  2054. // The additional macro defines any constraint for the lock alignment
  2055. // inside the thread structures:
  2056. //
  2057. // __LOCK_ALIGNMENT - for internal lock/futex usage.
  2058. //
  2059. // Same idea but for the once locking primitive:
  2060. //
  2061. // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  2062. // Machine-specific pthread type layouts. Generic version.
  2063. // Copyright (C) 2019-2023 Free Software Foundation, Inc.
  2064. //
  2065. // This file is part of the GNU C Library.
  2066. //
  2067. // The GNU C Library is free software; you can redistribute it and/or
  2068. // modify it under the terms of the GNU Lesser General Public
  2069. // License as published by the Free Software Foundation; either
  2070. // version 2.1 of the License, or (at your option) any later version.
  2071. //
  2072. // The GNU C Library is distributed in the hope that it will be useful,
  2073. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2074. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2075. // Lesser General Public License for more details.
  2076. //
  2077. // You should have received a copy of the GNU Lesser General Public
  2078. // License along with the GNU C Library; if not, see
  2079. // <http://www.gnu.org/licenses/>.
  2080. // Copyright (C) 1999-2023 Free Software Foundation, Inc.
  2081. // This file is part of the GNU C Library.
  2082. //
  2083. // The GNU C Library is free software; you can redistribute it and/or
  2084. // modify it under the terms of the GNU Lesser General Public
  2085. // License as published by the Free Software Foundation; either
  2086. // version 2.1 of the License, or (at your option) any later version.
  2087. //
  2088. // The GNU C Library is distributed in the hope that it will be useful,
  2089. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2090. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2091. // Lesser General Public License for more details.
  2092. //
  2093. // You should have received a copy of the GNU Lesser General Public
  2094. // License along with the GNU C Library; if not, see
  2095. // <https://www.gnu.org/licenses/>.
  2096. // Monotonically increasing wide counters (at least 62 bits).
  2097. // Copyright (C) 2016-2023 Free Software Foundation, Inc.
  2098. // This file is part of the GNU C Library.
  2099. //
  2100. // The GNU C Library is free software; you can redistribute it and/or
  2101. // modify it under the terms of the GNU Lesser General Public
  2102. // License as published by the Free Software Foundation; either
  2103. // version 2.1 of the License, or (at your option) any later version.
  2104. //
  2105. // The GNU C Library is distributed in the hope that it will be useful,
  2106. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2107. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2108. // Lesser General Public License for more details.
  2109. //
  2110. // You should have received a copy of the GNU Lesser General Public
  2111. // License along with the GNU C Library; if not, see
  2112. // <https://www.gnu.org/licenses/>.
  2113. // Counter that is monotonically increasing (by less than 2**31 per
  2114. //
  2115. // increment), with a single writer, and an arbitrary number of
  2116. // readers.
  2117. type X__atomic_wide_counter = struct{ F__value64 uint64 } /* atomic_wide_counter.h:33:3 */
  2118. // Common definition of pthread_mutex_t.
  2119. type X__pthread_internal_list = struct {
  2120. F__prev uintptr
  2121. F__next uintptr
  2122. } /* thread-shared-types.h:51:9 */
  2123. // Common definition of pthread_mutex_t.
  2124. type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:55:3 */
  2125. type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:57:9 */
  2126. type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:60:3 */
  2127. // Arch-specific mutex definitions. A generic implementation is provided
  2128. // by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
  2129. // can override it by defining:
  2130. //
  2131. // 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
  2132. // definition). It should contains at least the internal members
  2133. // defined in the generic version.
  2134. //
  2135. // 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
  2136. // atomic operations.
  2137. //
  2138. // 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
  2139. // It should initialize the mutex internal flag.
  2140. // Default mutex implementation struct definitions.
  2141. // Copyright (C) 2019-2023 Free Software Foundation, Inc.
  2142. // This file is part of the GNU C Library.
  2143. //
  2144. // The GNU C Library is free software; you can redistribute it and/or
  2145. // modify it under the terms of the GNU Lesser General Public
  2146. // License as published by the Free Software Foundation; either
  2147. // version 2.1 of the License, or (at your option) any later version.
  2148. //
  2149. // The GNU C Library is distributed in the hope that it will be useful,
  2150. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2151. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2152. // Lesser General Public License for more details.
  2153. //
  2154. // You should have received a copy of the GNU Lesser General Public
  2155. // License along with the GNU C Library; if not, see
  2156. // <http://www.gnu.org/licenses/>.
  2157. // Generic struct for both POSIX and C11 mutexes. New ports are expected
  2158. // to use the default layout, however architecture can redefine it to
  2159. // add arch-specific extension (such as lock-elision). The struct have
  2160. // a size of 32 bytes on LP32 and 40 bytes on LP64 architectures.
  2161. type X__pthread_mutex_s = struct {
  2162. F__lock int32
  2163. F__count uint32
  2164. F__owner int32
  2165. F__nusers uint32
  2166. F__kind int32
  2167. F__spins int32
  2168. F__list X__pthread_list_t
  2169. } /* struct_mutex.h:27:1 */
  2170. // Arch-sepecific read-write lock definitions. A generic implementation is
  2171. // provided by struct_rwlock.h. If required, an architecture can override it
  2172. // by defining:
  2173. //
  2174. // 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
  2175. // It should contain at least the internal members defined in the
  2176. // generic version.
  2177. //
  2178. // 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
  2179. // It should initialize the rwlock internal type.
  2180. // Default read-write lock implementation struct definitions.
  2181. // Copyright (C) 2019-2023 Free Software Foundation, Inc.
  2182. // This file is part of the GNU C Library.
  2183. //
  2184. // The GNU C Library is free software; you can redistribute it and/or
  2185. // modify it under the terms of the GNU Lesser General Public
  2186. // License as published by the Free Software Foundation; either
  2187. // version 2.1 of the License, or (at your option) any later version.
  2188. //
  2189. // The GNU C Library is distributed in the hope that it will be useful,
  2190. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2191. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2192. // Lesser General Public License for more details.
  2193. //
  2194. // You should have received a copy of the GNU Lesser General Public
  2195. // License along with the GNU C Library; if not, see
  2196. // <http://www.gnu.org/licenses/>.
  2197. // Endian macros for string.h functions
  2198. // Copyright (C) 1992-2023 Free Software Foundation, Inc.
  2199. // This file is part of the GNU C Library.
  2200. //
  2201. // The GNU C Library is free software; you can redistribute it and/or
  2202. // modify it under the terms of the GNU Lesser General Public
  2203. // License as published by the Free Software Foundation; either
  2204. // version 2.1 of the License, or (at your option) any later version.
  2205. //
  2206. // The GNU C Library is distributed in the hope that it will be useful,
  2207. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2208. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2209. // Lesser General Public License for more details.
  2210. //
  2211. // You should have received a copy of the GNU Lesser General Public
  2212. // License along with the GNU C Library; if not, see
  2213. // <http://www.gnu.org/licenses/>.
  2214. // Generic struct for both POSIX read-write lock. New ports are expected
  2215. // to use the default layout, however archictetures can redefine it to add
  2216. // arch-specific extensions (such as lock-elision). The struct have a size
  2217. // of 32 bytes on both LP32 and LP64 architectures.
  2218. type X__pthread_rwlock_arch_t = struct {
  2219. F__readers uint32
  2220. F__writers uint32
  2221. F__wrphase_futex uint32
  2222. F__writers_futex uint32
  2223. F__pad3 uint32
  2224. F__pad4 uint32
  2225. F__flags uint8
  2226. F__shared uint8
  2227. F__pad1 uint8
  2228. F__pad2 uint8
  2229. F__cur_writer int32
  2230. } /* struct_rwlock.h:29:1 */
  2231. // Common definition of pthread_cond_t.
  2232. type X__pthread_cond_s = struct {
  2233. F__wseq X__atomic_wide_counter
  2234. F__g1_start X__atomic_wide_counter
  2235. F__g_refs [2]uint32
  2236. F__g_size [2]uint32
  2237. F__g1_orig_size uint32
  2238. F__wrefs uint32
  2239. F__g_signals [2]uint32
  2240. } /* thread-shared-types.h:94:1 */
  2241. type X__tss_t = uint32 /* thread-shared-types.h:105:22 */
  2242. type X__thrd_t = uint64 /* thread-shared-types.h:106:27 */
  2243. type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:111:3 */
  2244. // Thread identifiers. The structure of the attribute type is not
  2245. //
  2246. // exposed on purpose.
  2247. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */
  2248. // Data structures for mutex handling. The structure of the attribute
  2249. //
  2250. // type is not exposed on purpose.
  2251. type Pthread_mutexattr_t = struct {
  2252. F__ccgo_pad1 [0]uint32
  2253. F__size [4]int8
  2254. } /* pthreadtypes.h:36:3 */
  2255. // Data structure for condition variable handling. The structure of
  2256. //
  2257. // the attribute type is not exposed on purpose.
  2258. type Pthread_condattr_t = struct {
  2259. F__ccgo_pad1 [0]uint32
  2260. F__size [4]int8
  2261. } /* pthreadtypes.h:45:3 */
  2262. // Keys for thread-specific data
  2263. type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
  2264. // Once-only execution
  2265. type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
  2266. type Pthread_attr_t1 = struct {
  2267. F__ccgo_pad1 [0]uint64
  2268. F__size [56]int8
  2269. } /* pthreadtypes.h:56:1 */
  2270. type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */
  2271. type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */
  2272. type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */
  2273. // Data structure for reader-writer lock variable handling. The
  2274. //
  2275. // structure of the attribute type is deliberately not exposed.
  2276. type Pthread_rwlock_t = struct {
  2277. F__ccgo_pad1 [0]uint64
  2278. F__data X__pthread_rwlock_arch_t
  2279. F__ccgo_pad2 [24]byte
  2280. } /* pthreadtypes.h:91:3 */
  2281. type Pthread_rwlockattr_t = struct {
  2282. F__ccgo_pad1 [0]uint64
  2283. F__size [8]int8
  2284. } /* pthreadtypes.h:97:3 */
  2285. // POSIX spinlock data type.
  2286. type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
  2287. // POSIX barriers data type. The structure of the type is
  2288. //
  2289. // deliberately not exposed.
  2290. type Pthread_barrier_t = struct {
  2291. F__ccgo_pad1 [0]uint64
  2292. F__size [32]int8
  2293. } /* pthreadtypes.h:112:3 */
  2294. type Pthread_barrierattr_t = struct {
  2295. F__ccgo_pad1 [0]uint32
  2296. F__size [4]int8
  2297. } /* pthreadtypes.h:118:3 */
  2298. // Type for length arguments in socket calls.
  2299. type Socklen_t = uint32 /* socket.h:33:21 */
  2300. // Protocol families.
  2301. // Address families.
  2302. // Socket level values. Others are defined in the appropriate headers.
  2303. //
  2304. // XXX These definitions also should go into the appropriate headers as
  2305. // far as they are available.
  2306. // Maximum queue length specifiable by listen.
  2307. // Get the definition of the macro to define the common sockaddr members.
  2308. // Definition of struct sockaddr_* common members and sizes, generic version.
  2309. // Copyright (C) 1995-2023 Free Software Foundation, Inc.
  2310. // This file is part of the GNU C Library.
  2311. //
  2312. // The GNU C Library is free software; you can redistribute it and/or
  2313. // modify it under the terms of the GNU Lesser General Public
  2314. // License as published by the Free Software Foundation; either
  2315. // version 2.1 of the License, or (at your option) any later version.
  2316. //
  2317. // The GNU C Library is distributed in the hope that it will be useful,
  2318. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2319. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2320. // Lesser General Public License for more details.
  2321. //
  2322. // You should have received a copy of the GNU Lesser General Public
  2323. // License along with the GNU C Library; if not, see
  2324. // <https://www.gnu.org/licenses/>.
  2325. // Never include this file directly; use <sys/socket.h> instead.
  2326. // POSIX.1g specifies this type name for the `sa_family' member.
  2327. type Sa_family_t = uint16 /* sockaddr.h:28:28 */
  2328. // This macro is used to declare the initial common members
  2329. // of the data types used for socket addresses, `struct sockaddr',
  2330. // `struct sockaddr_in', `struct sockaddr_un', etc.
  2331. // Size of struct sockaddr_storage.
  2332. // Structure describing a generic socket address.
  2333. type Sockaddr = struct {
  2334. Fsa_family uint16
  2335. Fsa_data [14]int8
  2336. } /* socket.h:183:1 */
  2337. // Structure large enough to hold any socket address (with the historical
  2338. // exception of AF_UNIX).
  2339. type Sockaddr_storage = struct {
  2340. Fss_family uint16
  2341. F__ss_padding [118]int8
  2342. F__ss_align uint64
  2343. } /* socket.h:196:1 */
  2344. // Structure describing messages sent by
  2345. //
  2346. // `sendmsg' and received by `recvmsg'.
  2347. type Msghdr = struct {
  2348. Fmsg_name uintptr
  2349. Fmsg_namelen uint32
  2350. F__ccgo_pad1 [4]byte
  2351. Fmsg_iov uintptr
  2352. Fmsg_iovlen uint64
  2353. Fmsg_control uintptr
  2354. Fmsg_controllen uint64
  2355. Fmsg_flags int32
  2356. F__ccgo_pad2 [4]byte
  2357. } /* socket.h:262:1 */
  2358. // Structure used for storage of ancillary data object information.
  2359. type Cmsghdr = struct {
  2360. F__ccgo_pad1 [0]uint64
  2361. Fcmsg_len uint64
  2362. Fcmsg_level int32
  2363. Fcmsg_type int32
  2364. } /* socket.h:280:1 */
  2365. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  2366. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  2367. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  2368. // *
  2369. // __struct_group() - Create a mirrored named and anonyomous struct
  2370. //
  2371. // @TAG: The tag name for the named sub-struct (usually empty)
  2372. // @NAME: The identifier name of the mirrored sub-struct
  2373. // @ATTRS: Any struct attributes (usually empty)
  2374. // @MEMBERS: The member declarations for the mirrored structs
  2375. //
  2376. // Used to create an anonymous union of two structs with identical layout
  2377. // and size: one anonymous and one named. The former's members can be used
  2378. // normally without sub-struct naming, and the latter can be used to
  2379. // reason about the start, end, and size of the group of struct members.
  2380. // The named struct can also be explicitly tagged for layer reuse, as well
  2381. // as both having struct attributes appended.
  2382. // *
  2383. // __DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union
  2384. //
  2385. // @TYPE: The type of each flexible array element
  2386. // @NAME: The name of the flexible array member
  2387. //
  2388. // In order to have a flexible array member in a union or alone in a
  2389. // struct, it needs to be wrapped in an anonymous struct with at least 1
  2390. // named member, but that member can be empty.
  2391. // This allows for 1024 file descriptors: if NR_OPEN is ever grown
  2392. // beyond that you'll have to change this too. But 1024 fd's seem to be
  2393. // enough even for such "real" unices like OSF/1, so hopefully this is
  2394. // one limit that doesn't have to be changed [again].
  2395. //
  2396. // Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in
  2397. // <sys/time.h> (and thus <linux/time.h>) - but this is a more logical
  2398. // place for them. Solved by having dummy defines in <sys/time.h>.
  2399. // This macro may have been defined in <gnu/types.h>. But we always
  2400. // use the one here.
  2401. type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */
  2402. // Type of a signal handler.
  2403. type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */
  2404. // Type of a SYSV IPC key.
  2405. type X__kernel_key_t = int32 /* posix_types.h:33:13 */
  2406. type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */
  2407. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  2408. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  2409. // In order to keep safe and avoid regression, only unify uapi
  2410. // bitsperlong.h for some archs which are using newer toolchains
  2411. // that have the definitions of __CHAR_BIT__ and __SIZEOF_LONG__.
  2412. // See the following link for more info:
  2413. // https://lore.kernel.org/linux-arch/b9624545-2c80-49a1-ac3c-39264a591f7b@app.fastmail.com/
  2414. // This file is generally used by user-level software, so you need to
  2415. // be a little careful about namespace pollution etc.
  2416. //
  2417. // First the types that are often defined in different ways across
  2418. // architectures, so that you can override them.
  2419. type X__kernel_long_t = int64 /* posix_types.h:15:15 */
  2420. type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */
  2421. type X__kernel_ino_t = uint64 /* posix_types.h:20:26 */
  2422. type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */
  2423. type X__kernel_pid_t = int32 /* posix_types.h:28:14 */
  2424. type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */
  2425. type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */
  2426. type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */
  2427. type X__kernel_suseconds_t = int64 /* posix_types.h:41:26 */
  2428. type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */
  2429. type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */
  2430. type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */
  2431. type X__kernel_old_uid_t = uint32 /* posix_types.h:54:24 */
  2432. type X__kernel_old_gid_t = uint32 /* posix_types.h:55:24 */
  2433. type X__kernel_old_dev_t = uint32 /* posix_types.h:59:22 */
  2434. // Most 32 bit architectures use "unsigned int" size_t,
  2435. // and all 64 bit architectures use "unsigned long" size_t.
  2436. type X__kernel_size_t = uint64 /* posix_types.h:72:26 */
  2437. type X__kernel_ssize_t = int64 /* posix_types.h:73:25 */
  2438. type X__kernel_ptrdiff_t = int64 /* posix_types.h:74:25 */
  2439. type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */
  2440. // anything below here should be completely generic
  2441. type X__kernel_off_t = int64 /* posix_types.h:87:25 */
  2442. type X__kernel_loff_t = int64 /* posix_types.h:88:19 */
  2443. type X__kernel_old_time_t = int64 /* posix_types.h:89:25 */
  2444. type X__kernel_time_t = int64 /* posix_types.h:90:25 */
  2445. type X__kernel_time64_t = int64 /* posix_types.h:91:19 */
  2446. type X__kernel_clock_t = int64 /* posix_types.h:92:25 */
  2447. type X__kernel_timer_t = int32 /* posix_types.h:93:14 */
  2448. type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */
  2449. type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */
  2450. type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */
  2451. type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */
  2452. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  2453. // Socket-level I/O control calls.
  2454. // For setsockopt(2)
  2455. // Security levels - as per NRL IPv6 - don't actually do anything
  2456. // Socket filtering
  2457. // Instruct lower device to use last 4-bytes of skb data as FCS
  2458. // on 64-bit and x32, avoid the ?: operator
  2459. // Structure used to manipulate the SO_LINGER option.
  2460. type Linger = struct {
  2461. Fl_onoff int32
  2462. Fl_linger int32
  2463. } /* socket.h:392:1 */
  2464. // This is the 4.3 BSD `struct sockaddr' format, which is used as wire
  2465. //
  2466. // format in the grotty old 4.3 `talk' protocol.
  2467. type Osockaddr = struct {
  2468. Fsa_family uint16
  2469. Fsa_data [14]uint8
  2470. } /* struct_osockaddr.h:6:1 */
  2471. // Define some macros helping to catch buffer overflows.
  2472. // bits/types.h -- definitions of __*_t types underlying *_t types.
  2473. // Copyright (C) 2002-2023 Free Software Foundation, Inc.
  2474. // This file is part of the GNU C Library.
  2475. //
  2476. // The GNU C Library is free software; you can redistribute it and/or
  2477. // modify it under the terms of the GNU Lesser General Public
  2478. // License as published by the Free Software Foundation; either
  2479. // version 2.1 of the License, or (at your option) any later version.
  2480. //
  2481. // The GNU C Library is distributed in the hope that it will be useful,
  2482. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2483. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2484. // Lesser General Public License for more details.
  2485. //
  2486. // You should have received a copy of the GNU Lesser General Public
  2487. // License along with the GNU C Library; if not, see
  2488. // <https://www.gnu.org/licenses/>.
  2489. // Never include this file directly; use <sys/types.h> instead.
  2490. // Internet address.
  2491. type In_addr_t = uint32 /* in.h:30:18 */
  2492. type In_addr = struct{ Fs_addr uint32 } /* in.h:31:1 */
  2493. // Get system-specific definitions.
  2494. // Copyright (C) 1991-2023 Free Software Foundation, Inc.
  2495. // This file is part of the GNU C Library.
  2496. //
  2497. // The GNU C Library is free software; you can redistribute it and/or
  2498. // modify it under the terms of the GNU Lesser General Public
  2499. // License as published by the Free Software Foundation; either
  2500. // version 2.1 of the License, or (at your option) any later version.
  2501. //
  2502. // The GNU C Library is distributed in the hope that it will be useful,
  2503. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2504. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2505. // Lesser General Public License for more details.
  2506. //
  2507. // You should have received a copy of the GNU Lesser General Public
  2508. // License along with the GNU C Library; if not, see
  2509. // <https://www.gnu.org/licenses/>.
  2510. // Linux version.
  2511. // If the application has already included linux/in6.h from a linux-based
  2512. // kernel then we will not define the IPv6 IPPROTO_* defines, in6_addr (nor the
  2513. // defines), sockaddr_in6, or ipv6_mreq. Same for in6_ptkinfo or ip6_mtuinfo
  2514. // in linux/ipv6.h. The ABI used by the linux-kernel and glibc match exactly.
  2515. // Neither the linux kernel nor glibc should break this ABI without coordination.
  2516. // In upstream kernel 56c176c9 the _UAPI prefix was stripped so we need to check
  2517. // for _LINUX_IN6_H and _IPV6_H now, and keep checking the old versions for
  2518. // maximum backwards compatibility.
  2519. // Options for use with `getsockopt' and `setsockopt' at the IP level.
  2520. // The first word in the comment at the right is the data type used;
  2521. // "bool" means a boolean value stored in an `int'.
  2522. // For BSD compatibility.
  2523. // TProxy original addresses
  2524. // IP_MTU_DISCOVER arguments.
  2525. // Always use interface mtu (ignores dst pmtu) but don't set DF flag.
  2526. // Also incoming ICMP frag_needed notifications will be ignored on
  2527. // this socket to prevent accepting spoofed ones.
  2528. // Like IP_PMTUDISC_INTERFACE but allow packets to be fragmented.
  2529. // To select the IP level.
  2530. // Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS.
  2531. //
  2532. // The `ip_dst' field is used for the first-hop gateway when using a
  2533. // source route (this gets put into the header proper).
  2534. type Ip_opts = struct {
  2535. Fip_dst struct{ Fs_addr uint32 }
  2536. Fip_opts [40]int8
  2537. } /* in.h:145:1 */
  2538. // Structure used for IP_PKTINFO.
  2539. type In_pktinfo = struct {
  2540. Fipi_ifindex int32
  2541. Fipi_spec_dst struct{ Fs_addr uint32 }
  2542. Fipi_addr struct{ Fs_addr uint32 }
  2543. } /* in.h:152:1 */
  2544. // Type to represent a port.
  2545. type In_port_t = uint16 /* in.h:125:18 */
  2546. // Definitions of the bits in an Internet address integer.
  2547. //
  2548. // On subnets, host and network parts are found according to
  2549. // the subnet mask, not these masks.
  2550. // Address to accept any incoming messages.
  2551. // Address to send to all hosts.
  2552. // Address indicating an error return.
  2553. // Dummy address for source of ICMPv6 errors converted to IPv4 (RFC
  2554. // 7600).
  2555. // Network number for local host loopback.
  2556. // Address to loopback in software to local host.
  2557. // Defines for Multicast INADDR.
  2558. // IPv6 address
  2559. type In6_addr = struct {
  2560. F__in6_u struct {
  2561. F__ccgo_pad1 [0]uint32
  2562. F__u6_addr8 [16]uint8
  2563. }
  2564. } /* in.h:221:1 */
  2565. // ::1
  2566. // Structure describing an Internet socket address.
  2567. type Sockaddr_in = struct {
  2568. Fsin_family uint16
  2569. Fsin_port uint16
  2570. Fsin_addr struct{ Fs_addr uint32 }
  2571. Fsin_zero [8]uint8
  2572. } /* in.h:247:1 */
  2573. // Ditto, for IPv6.
  2574. type Sockaddr_in6 = struct {
  2575. Fsin6_family uint16
  2576. Fsin6_port uint16
  2577. Fsin6_flowinfo uint32
  2578. Fsin6_addr struct {
  2579. F__in6_u struct {
  2580. F__ccgo_pad1 [0]uint32
  2581. F__u6_addr8 [16]uint8
  2582. }
  2583. }
  2584. Fsin6_scope_id uint32
  2585. } /* in.h:262:1 */
  2586. // IPv4 multicast request.
  2587. type Ip_mreq = struct {
  2588. Fimr_multiaddr struct{ Fs_addr uint32 }
  2589. Fimr_interface struct{ Fs_addr uint32 }
  2590. } /* in.h:274:1 */
  2591. // IPv4 multicast request with interface index.
  2592. type Ip_mreqn = struct {
  2593. Fimr_multiaddr struct{ Fs_addr uint32 }
  2594. Fimr_address struct{ Fs_addr uint32 }
  2595. Fimr_ifindex int32
  2596. } /* in.h:284:1 */
  2597. type Ip_mreq_source = struct {
  2598. Fimr_multiaddr struct{ Fs_addr uint32 }
  2599. Fimr_interface struct{ Fs_addr uint32 }
  2600. Fimr_sourceaddr struct{ Fs_addr uint32 }
  2601. } /* in.h:296:1 */
  2602. // Likewise, for IPv6.
  2603. type Ipv6_mreq = struct {
  2604. Fipv6mr_multiaddr struct {
  2605. F__in6_u struct {
  2606. F__ccgo_pad1 [0]uint32
  2607. F__u6_addr8 [16]uint8
  2608. }
  2609. }
  2610. Fipv6mr_interface uint32
  2611. } /* in.h:311:1 */
  2612. // Multicast group request.
  2613. type Group_req = struct {
  2614. Fgr_interface uint32
  2615. F__ccgo_pad1 [4]byte
  2616. Fgr_group struct {
  2617. Fss_family uint16
  2618. F__ss_padding [118]int8
  2619. F__ss_align uint64
  2620. }
  2621. } /* in.h:323:1 */
  2622. type Group_source_req = struct {
  2623. Fgsr_interface uint32
  2624. F__ccgo_pad1 [4]byte
  2625. Fgsr_group struct {
  2626. Fss_family uint16
  2627. F__ss_padding [118]int8
  2628. F__ss_align uint64
  2629. }
  2630. Fgsr_source struct {
  2631. Fss_family uint16
  2632. F__ss_padding [118]int8
  2633. F__ss_align uint64
  2634. }
  2635. } /* in.h:332:1 */
  2636. // Full-state filter operations.
  2637. type Ip_msfilter = struct {
  2638. Fimsf_multiaddr struct{ Fs_addr uint32 }
  2639. Fimsf_interface struct{ Fs_addr uint32 }
  2640. Fimsf_fmode uint32
  2641. Fimsf_numsrc uint32
  2642. Fimsf_slist [1]struct{ Fs_addr uint32 }
  2643. } /* in.h:346:1 */
  2644. type Group_filter = struct {
  2645. Fgf_interface uint32
  2646. F__ccgo_pad1 [4]byte
  2647. Fgf_group struct {
  2648. Fss_family uint16
  2649. F__ss_padding [118]int8
  2650. F__ss_align uint64
  2651. }
  2652. Fgf_fmode uint32
  2653. Fgf_numsrc uint32
  2654. Fgf_slist [1]struct {
  2655. Fss_family uint16
  2656. F__ss_padding [118]int8
  2657. F__ss_align uint64
  2658. }
  2659. } /* in.h:367:1 */
  2660. // Define uintN_t types.
  2661. // Copyright (C) 2017-2023 Free Software Foundation, Inc.
  2662. // This file is part of the GNU C Library.
  2663. //
  2664. // The GNU C Library is free software; you can redistribute it and/or
  2665. // modify it under the terms of the GNU Lesser General Public
  2666. // License as published by the Free Software Foundation; either
  2667. // version 2.1 of the License, or (at your option) any later version.
  2668. //
  2669. // The GNU C Library is distributed in the hope that it will be useful,
  2670. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2671. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2672. // Lesser General Public License for more details.
  2673. //
  2674. // You should have received a copy of the GNU Lesser General Public
  2675. // License along with the GNU C Library; if not, see
  2676. // <https://www.gnu.org/licenses/>.
  2677. // This is necessary to make this include file properly replace the
  2678. // Sun version.
  2679. // @(#)netdb.h 2.1 88/07/29 3.9 RPCSRC
  2680. // Copyright (c) 2010, Oracle America, Inc.
  2681. // Redistribution and use in source and binary forms, with or without
  2682. // modification, are permitted provided that the following conditions are
  2683. // met:
  2684. //
  2685. // * Redistributions of source code must retain the above copyright
  2686. // notice, this list of conditions and the following disclaimer.
  2687. // * Redistributions in binary form must reproduce the above
  2688. // copyright notice, this list of conditions and the following
  2689. // disclaimer in the documentation and/or other materials
  2690. // provided with the distribution.
  2691. // * Neither the name of the "Oracle America, Inc." nor the names of its
  2692. // contributors may be used to endorse or promote products derived
  2693. // from this software without specific prior written permission.
  2694. //
  2695. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  2696. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  2697. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  2698. // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  2699. // COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  2700. // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2701. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  2702. // GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  2703. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  2704. // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  2705. // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  2706. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  2707. // Cleaned up for GNU C library roland@gnu.ai.mit.edu:
  2708. // added multiple inclusion protection and use of <sys/cdefs.h>.
  2709. // In GNU this file is #include'd by <netdb.h>.
  2710. // Copyright (C) 1991-2023 Free Software Foundation, Inc.
  2711. // This file is part of the GNU C Library.
  2712. //
  2713. // The GNU C Library is free software; you can redistribute it and/or
  2714. // modify it under the terms of the GNU Lesser General Public
  2715. // License as published by the Free Software Foundation; either
  2716. // version 2.1 of the License, or (at your option) any later version.
  2717. //
  2718. // The GNU C Library is distributed in the hope that it will be useful,
  2719. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2720. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2721. // Lesser General Public License for more details.
  2722. //
  2723. // You should have received a copy of the GNU Lesser General Public
  2724. // License along with the GNU C Library; if not, see
  2725. // <https://www.gnu.org/licenses/>.
  2726. // Copyright (C) 1989-2023 Free Software Foundation, Inc.
  2727. //
  2728. // This file is part of GCC.
  2729. //
  2730. // GCC is free software; you can redistribute it and/or modify
  2731. // it under the terms of the GNU General Public License as published by
  2732. // the Free Software Foundation; either version 3, or (at your option)
  2733. // any later version.
  2734. //
  2735. // GCC is distributed in the hope that it will be useful,
  2736. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2737. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  2738. // GNU General Public License for more details.
  2739. //
  2740. // Under Section 7 of GPL version 3, you are granted additional
  2741. // permissions described in the GCC Runtime Library Exception, version
  2742. // 3.1, as published by the Free Software Foundation.
  2743. //
  2744. // You should have received a copy of the GNU General Public License and
  2745. // a copy of the GCC Runtime Library Exception along with this program;
  2746. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  2747. // <http://www.gnu.org/licenses/>.
  2748. // ISO C Standard: 7.17 Common definitions <stddef.h>
  2749. // Any one of these symbols __need_* means that GNU libc
  2750. // wants us just to define one data type. So don't define
  2751. // the symbols that indicate this file's entire job has been done.
  2752. // This avoids lossage on SunOS but only if stdtypes.h comes first.
  2753. // There's no way to win with the other order! Sun lossage.
  2754. // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  2755. // Just ignore it.
  2756. // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  2757. // _TYPE_size_t which will typedef size_t. fixincludes patched the
  2758. // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  2759. // not defined, and so that defining this macro defines _GCC_SIZE_T.
  2760. // If we find that the macros are still defined at this point, we must
  2761. // invoke them so that the type is defined as expected.
  2762. // In case nobody has defined these types, but we aren't running under
  2763. // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  2764. // __WCHAR_TYPE__ have reasonable values. This can happen if the
  2765. // parts of GCC is compiled by an older compiler, that actually
  2766. // include gstddef.h, such as collect2.
  2767. // Signed type of difference of two pointers.
  2768. // Define this type if we are doing the whole job,
  2769. // or if we want this type in particular.
  2770. // Unsigned type of `sizeof' something.
  2771. // Define this type if we are doing the whole job,
  2772. // or if we want this type in particular.
  2773. // Wide character type.
  2774. // Locale-writers should change this as necessary to
  2775. // be big enough to hold unique values not between 0 and 127,
  2776. // and not (wchar_t) -1, for each defined multibyte character.
  2777. // Define this type if we are doing the whole job,
  2778. // or if we want this type in particular.
  2779. // A null pointer constant.
  2780. type Rpcent = struct {
  2781. Fr_name uintptr
  2782. Fr_aliases uintptr
  2783. Fr_number int32
  2784. F__ccgo_pad1 [4]byte
  2785. } /* netdb.h:46:1 */
  2786. // Copyright (C) 1996-2023 Free Software Foundation, Inc.
  2787. // This file is part of the GNU C Library.
  2788. //
  2789. // The GNU C Library is free software; you can redistribute it and/or
  2790. // modify it under the terms of the GNU Lesser General Public
  2791. // License as published by the Free Software Foundation; either
  2792. // version 2.1 of the License, or (at your option) any later version.
  2793. //
  2794. // The GNU C Library is distributed in the hope that it will be useful,
  2795. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2796. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2797. // Lesser General Public License for more details.
  2798. //
  2799. // You should have received a copy of the GNU Lesser General Public
  2800. // License along with the GNU C Library; if not, see
  2801. // <https://www.gnu.org/licenses/>.
  2802. // Description of data base entry for a single network. NOTE: here a
  2803. //
  2804. // poor assumption is made. The network number is expected to fit
  2805. // into an unsigned long int variable.
  2806. type Netent = struct {
  2807. Fn_name uintptr
  2808. Fn_aliases uintptr
  2809. Fn_addrtype int32
  2810. Fn_net uint32
  2811. } /* netdb.h:26:1 */
  2812. // Description of data base entry for a single host.
  2813. type Hostent = struct {
  2814. Fh_name uintptr
  2815. Fh_aliases uintptr
  2816. Fh_addrtype int32
  2817. Fh_length int32
  2818. Fh_addr_list uintptr
  2819. } /* netdb.h:98:1 */
  2820. // Description of data base entry for a single service.
  2821. type Servent = struct {
  2822. Fs_name uintptr
  2823. Fs_aliases uintptr
  2824. Fs_port int32
  2825. F__ccgo_pad1 [4]byte
  2826. Fs_proto uintptr
  2827. } /* netdb.h:255:1 */
  2828. // Description of data base entry for a single service.
  2829. type Protoent = struct {
  2830. Fp_name uintptr
  2831. Fp_aliases uintptr
  2832. Fp_proto int32
  2833. F__ccgo_pad1 [4]byte
  2834. } /* netdb.h:324:1 */
  2835. // Extension from POSIX.1:2001.
  2836. // Structure to contain information about address of a service provider.
  2837. type Addrinfo = struct {
  2838. Fai_flags int32
  2839. Fai_family int32
  2840. Fai_socktype int32
  2841. Fai_protocol int32
  2842. Fai_addrlen uint32
  2843. F__ccgo_pad1 [4]byte
  2844. Fai_addr uintptr
  2845. Fai_canonname uintptr
  2846. Fai_next uintptr
  2847. } /* netdb.h:565:1 */
  2848. var _ int8 /* gen.c:2:13: */