netdb_linux_amd64.go 139 KB

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