netdb_linux_riscv64.go 135 KB

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