in_linux_386.go 111 KB

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