netdb_linux_ppc64le.go 140 KB

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