socket_linux_s390x.go 74 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846
  1. // Code generated by 'ccgo sys/socket/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 sys/socket/socket_linux_s390x.go -pkgname socket', DO NOT EDIT.
  2. package socket
  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 = 4321
  65. FD_SETSIZE = 1024
  66. FIOGETOWN = 0x8903
  67. FIOSETOWN = 0x8901
  68. LITTLE_ENDIAN = 1234
  69. PDP_ENDIAN = 3412
  70. PF_ALG = 38
  71. PF_APPLETALK = 5
  72. PF_ASH = 18
  73. PF_ATMPVC = 8
  74. PF_ATMSVC = 20
  75. PF_AX25 = 3
  76. PF_BLUETOOTH = 31
  77. PF_BRIDGE = 7
  78. PF_CAIF = 37
  79. PF_CAN = 29
  80. PF_DECnet = 12
  81. PF_ECONET = 19
  82. PF_FILE = 1
  83. PF_IB = 27
  84. PF_IEEE802154 = 36
  85. PF_INET = 2
  86. PF_INET6 = 10
  87. PF_IPX = 4
  88. PF_IRDA = 23
  89. PF_ISDN = 34
  90. PF_IUCV = 32
  91. PF_KCM = 41
  92. PF_KEY = 15
  93. PF_LLC = 26
  94. PF_LOCAL = 1
  95. PF_MAX = 45
  96. PF_MPLS = 28
  97. PF_NETBEUI = 13
  98. PF_NETLINK = 16
  99. PF_NETROM = 6
  100. PF_NFC = 39
  101. PF_PACKET = 17
  102. PF_PHONET = 35
  103. PF_PPPOX = 24
  104. PF_QIPCRTR = 42
  105. PF_RDS = 21
  106. PF_ROSE = 11
  107. PF_ROUTE = 16
  108. PF_RXRPC = 33
  109. PF_SECURITY = 14
  110. PF_SMC = 43
  111. PF_SNA = 22
  112. PF_TIPC = 30
  113. PF_UNIX = 1
  114. PF_UNSPEC = 0
  115. PF_VSOCK = 40
  116. PF_WANPIPE = 25
  117. PF_X25 = 9
  118. PF_XDP = 44
  119. SCM_TIMESTAMP = 29
  120. SCM_TIMESTAMPING = 37
  121. SCM_TIMESTAMPING_OPT_STATS = 54
  122. SCM_TIMESTAMPING_PKTINFO = 58
  123. SCM_TIMESTAMPNS = 35
  124. SCM_TXTIME = 61
  125. SCM_WIFI_STATUS = 41
  126. SIOCATMARK = 0x8905
  127. SIOCGPGRP = 0x8904
  128. SIOCGSTAMP = 0x8906
  129. SIOCGSTAMPNS = 0x8907
  130. SIOCSPGRP = 0x8902
  131. SOL_AAL = 265
  132. SOL_ALG = 279
  133. SOL_ATM = 264
  134. SOL_BLUETOOTH = 274
  135. SOL_CAIF = 278
  136. SOL_DCCP = 269
  137. SOL_DECNET = 261
  138. SOL_IRDA = 266
  139. SOL_IUCV = 277
  140. SOL_KCM = 281
  141. SOL_LLC = 268
  142. SOL_NETBEUI = 267
  143. SOL_NETLINK = 270
  144. SOL_NFC = 280
  145. SOL_PACKET = 263
  146. SOL_PNPIPE = 275
  147. SOL_PPPOL2TP = 273
  148. SOL_RAW = 255
  149. SOL_RDS = 276
  150. SOL_RXRPC = 272
  151. SOL_SOCKET = 1
  152. SOL_TIPC = 271
  153. SOL_TLS = 282
  154. SOL_X25 = 262
  155. SOL_XDP = 283
  156. SOMAXCONN = 4096
  157. SO_ACCEPTCONN = 30
  158. SO_ATTACH_BPF = 50
  159. SO_ATTACH_FILTER = 26
  160. SO_ATTACH_REUSEPORT_CBPF = 51
  161. SO_ATTACH_REUSEPORT_EBPF = 52
  162. SO_BINDTODEVICE = 25
  163. SO_BINDTOIFINDEX = 62
  164. SO_BPF_EXTENSIONS = 48
  165. SO_BROADCAST = 6
  166. SO_BSDCOMPAT = 14
  167. SO_BUSY_POLL = 46
  168. SO_CNX_ADVICE = 53
  169. SO_COOKIE = 57
  170. SO_DEBUG = 1
  171. SO_DETACH_BPF = 27
  172. SO_DETACH_FILTER = 27
  173. SO_DETACH_REUSEPORT_BPF = 68
  174. SO_DOMAIN = 39
  175. SO_DONTROUTE = 5
  176. SO_ERROR = 4
  177. SO_GET_FILTER = 26
  178. SO_INCOMING_CPU = 49
  179. SO_INCOMING_NAPI_ID = 56
  180. SO_KEEPALIVE = 9
  181. SO_LINGER = 13
  182. SO_LOCK_FILTER = 44
  183. SO_MARK = 36
  184. SO_MAX_PACING_RATE = 47
  185. SO_MEMINFO = 55
  186. SO_NOFCS = 43
  187. SO_NO_CHECK = 11
  188. SO_OOBINLINE = 10
  189. SO_PASSCRED = 16
  190. SO_PASSSEC = 34
  191. SO_PEEK_OFF = 42
  192. SO_PEERCRED = 17
  193. SO_PEERGROUPS = 59
  194. SO_PEERNAME = 28
  195. SO_PEERSEC = 31
  196. SO_PRIORITY = 12
  197. SO_PROTOCOL = 38
  198. SO_RCVBUF = 8
  199. SO_RCVBUFFORCE = 33
  200. SO_RCVLOWAT = 18
  201. SO_RCVTIMEO = 20
  202. SO_RCVTIMEO_NEW = 66
  203. SO_RCVTIMEO_OLD = 20
  204. SO_REUSEADDR = 2
  205. SO_REUSEPORT = 15
  206. SO_RXQ_OVFL = 40
  207. SO_SECURITY_AUTHENTICATION = 22
  208. SO_SECURITY_ENCRYPTION_NETWORK = 24
  209. SO_SECURITY_ENCRYPTION_TRANSPORT = 23
  210. SO_SELECT_ERR_QUEUE = 45
  211. SO_SNDBUF = 7
  212. SO_SNDBUFFORCE = 32
  213. SO_SNDLOWAT = 19
  214. SO_SNDTIMEO = 21
  215. SO_SNDTIMEO_NEW = 67
  216. SO_SNDTIMEO_OLD = 21
  217. SO_TIMESTAMP = 29
  218. SO_TIMESTAMPING = 37
  219. SO_TIMESTAMPING_NEW = 65
  220. SO_TIMESTAMPING_OLD = 37
  221. SO_TIMESTAMPNS = 35
  222. SO_TIMESTAMPNS_NEW = 64
  223. SO_TIMESTAMPNS_OLD = 35
  224. SO_TIMESTAMP_NEW = 63
  225. SO_TIMESTAMP_OLD = 29
  226. SO_TXTIME = 61
  227. SO_TYPE = 3
  228. SO_WIFI_STATUS = 41
  229. SO_ZEROCOPY = 60
  230. X_ATFILE_SOURCE = 1
  231. X_BITS_BYTESWAP_H = 1
  232. X_BITS_ENDIANNESS_H = 1
  233. X_BITS_ENDIAN_H = 1
  234. X_BITS_PTHREADTYPES_ARCH_H = 1
  235. X_BITS_PTHREADTYPES_COMMON_H = 1
  236. X_BITS_SOCKADDR_H = 1
  237. X_BITS_STDINT_INTN_H = 1
  238. X_BITS_TIME64_H = 1
  239. X_BITS_TYPESIZES_H = 1
  240. X_BITS_TYPES_H = 1
  241. X_BITS_UINTN_IDENTITY_H = 1
  242. X_BSD_SIZE_T_ = 0
  243. X_BSD_SIZE_T_DEFINED_ = 0
  244. X_DEFAULT_SOURCE = 1
  245. X_ENDIAN_H = 1
  246. X_FEATURES_H = 1
  247. X_FILE_OFFSET_BITS = 64
  248. X_GCC_SIZE_T = 0
  249. X_LINUX_POSIX_TYPES_H = 0
  250. X_LP64 = 1
  251. X_POSIX_C_SOURCE = 200809
  252. X_POSIX_SOURCE = 1
  253. X_RWLOCK_INTERNAL_H = 0
  254. X_SIZET_ = 0
  255. X_SIZE_T = 0
  256. X_SIZE_T_ = 0
  257. X_SIZE_T_DECLARED = 0
  258. X_SIZE_T_DEFINED = 0
  259. X_SIZE_T_DEFINED_ = 0
  260. X_SS_SIZE = 128
  261. X_STDC_PREDEF_H = 1
  262. X_STRUCT_TIMESPEC = 1
  263. X_SYS_CDEFS_H = 1
  264. X_SYS_SELECT_H = 1
  265. X_SYS_SIZE_T_H = 0
  266. X_SYS_SOCKET_H = 1
  267. X_SYS_TYPES_H = 1
  268. X_THREAD_MUTEX_INTERNAL_H = 1
  269. X_THREAD_SHARED_TYPES_H = 1
  270. X_T_SIZE = 0
  271. X_T_SIZE_ = 0
  272. Linux = 1
  273. Unix = 1
  274. )
  275. // Bits in the FLAGS argument to `send', `recv', et al.
  276. const ( /* socket.h:200:1: */
  277. MSG_OOB = 1 // Process out-of-band data.
  278. MSG_PEEK = 2 // Peek at incoming messages.
  279. MSG_DONTROUTE = 4 // Don't use local routing.
  280. MSG_CTRUNC = 8 // Control data lost before delivery.
  281. MSG_PROXY = 16 // Supply or ask second address.
  282. MSG_TRUNC = 32
  283. MSG_DONTWAIT = 64 // Nonblocking IO.
  284. MSG_EOR = 128 // End of record.
  285. MSG_WAITALL = 256 // Wait for a full request.
  286. MSG_FIN = 512
  287. MSG_SYN = 1024
  288. MSG_CONFIRM = 2048 // Confirm path validity.
  289. MSG_RST = 4096
  290. MSG_ERRQUEUE = 8192 // Fetch message from error queue.
  291. MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE.
  292. MSG_MORE = 32768 // Sender will send more.
  293. MSG_WAITFORONE = 65536 // Wait for at least one packet to return.
  294. MSG_BATCH = 262144 // sendmmsg: more messages coming.
  295. MSG_ZEROCOPY = 67108864 // Use user data in kernel path.
  296. MSG_FASTOPEN = 536870912 // Send data in TCP SYN.
  297. MSG_CMSG_CLOEXEC = 1073741824
  298. )
  299. // Socket level message types. This must match the definitions in
  300. //
  301. // <linux/socket.h>.
  302. const ( /* socket.h:332:1: */
  303. SCM_RIGHTS = 1
  304. )
  305. // Get the architecture-dependent definition of enum __socket_type.
  306. // Define enum __socket_type for generic Linux.
  307. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  308. // This file is part of the GNU C Library.
  309. //
  310. // The GNU C Library is free software; you can redistribute it and/or
  311. // modify it under the terms of the GNU Lesser General Public
  312. // License as published by the Free Software Foundation; either
  313. // version 2.1 of the License, or (at your option) any later version.
  314. //
  315. // The GNU C Library is distributed in the hope that it will be useful,
  316. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  317. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  318. // Lesser General Public License for more details.
  319. //
  320. // You should have received a copy of the GNU Lesser General Public
  321. // License along with the GNU C Library; if not, see
  322. // <https://www.gnu.org/licenses/>.
  323. // Types of sockets.
  324. const ( /* socket_type.h:24:1: */
  325. SOCK_STREAM = 1 // Sequenced, reliable, connection-based
  326. // byte streams.
  327. SOCK_DGRAM = 2 // Connectionless, unreliable datagrams
  328. // of fixed maximum length.
  329. SOCK_RAW = 3 // Raw protocol interface.
  330. SOCK_RDM = 4 // Reliably-delivered messages.
  331. SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based,
  332. // datagrams of fixed maximum length.
  333. SOCK_DCCP = 6 // Datagram Congestion Control Protocol.
  334. SOCK_PACKET = 10 // Linux specific way of getting packets
  335. // at the dev level. For writing rarp and
  336. // other similar things on the user level.
  337. // Flags to be ORed into the type parameter of socket and socketpair and
  338. // used for the flags parameter of paccept.
  339. SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the
  340. // new descriptor(s).
  341. SOCK_NONBLOCK = 2048
  342. )
  343. // The following constants should be used for the second parameter of
  344. //
  345. // `shutdown'.
  346. const ( /* socket.h:41:1: */
  347. SHUT_RD = 0 // No more receptions.
  348. SHUT_WR = 1 // No more transmissions.
  349. SHUT_RDWR = 2
  350. )
  351. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  352. type Size_t = uint64 /* <builtin>:9:23 */
  353. type Wchar_t = int32 /* <builtin>:15:24 */
  354. type X__int128_t = struct {
  355. Flo int64
  356. Fhi int64
  357. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  358. type X__uint128_t = struct {
  359. Flo uint64
  360. Fhi uint64
  361. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  362. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  363. type X__float128 = float64 /* <builtin>:47:21 */
  364. // Wide character type.
  365. // Locale-writers should change this as necessary to
  366. // be big enough to hold unique values not between 0 and 127,
  367. // and not (wchar_t) -1, for each defined multibyte character.
  368. // Define this type if we are doing the whole job,
  369. // or if we want this type in particular.
  370. // A null pointer constant.
  371. // Structure for scatter/gather I/O.
  372. type Iovec = struct {
  373. Fiov_base uintptr
  374. Fiov_len Size_t
  375. } /* struct_iovec.h:26:1 */
  376. // Copyright (C) 1989-2020 Free Software Foundation, Inc.
  377. //
  378. // This file is part of GCC.
  379. //
  380. // GCC is free software; you can redistribute it and/or modify
  381. // it under the terms of the GNU General Public License as published by
  382. // the Free Software Foundation; either version 3, or (at your option)
  383. // any later version.
  384. //
  385. // GCC is distributed in the hope that it will be useful,
  386. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  387. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  388. // GNU General Public License for more details.
  389. //
  390. // Under Section 7 of GPL version 3, you are granted additional
  391. // permissions described in the GCC Runtime Library Exception, version
  392. // 3.1, as published by the Free Software Foundation.
  393. //
  394. // You should have received a copy of the GNU General Public License and
  395. // a copy of the GCC Runtime Library Exception along with this program;
  396. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  397. // <http://www.gnu.org/licenses/>.
  398. // ISO C Standard: 7.17 Common definitions <stddef.h>
  399. // Any one of these symbols __need_* means that GNU libc
  400. // wants us just to define one data type. So don't define
  401. // the symbols that indicate this file's entire job has been done.
  402. // This avoids lossage on SunOS but only if stdtypes.h comes first.
  403. // There's no way to win with the other order! Sun lossage.
  404. // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  405. // Just ignore it.
  406. // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  407. // _TYPE_size_t which will typedef size_t. fixincludes patched the
  408. // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  409. // not defined, and so that defining this macro defines _GCC_SIZE_T.
  410. // If we find that the macros are still defined at this point, we must
  411. // invoke them so that the type is defined as expected.
  412. // In case nobody has defined these types, but we aren't running under
  413. // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  414. // __WCHAR_TYPE__ have reasonable values. This can happen if the
  415. // parts of GCC is compiled by an older compiler, that actually
  416. // include gstddef.h, such as collect2.
  417. // Signed type of difference of two pointers.
  418. // Define this type if we are doing the whole job,
  419. // or if we want this type in particular.
  420. // Unsigned type of `sizeof' something.
  421. // Define this type if we are doing the whole job,
  422. // or if we want this type in particular.
  423. // Wide character type.
  424. // Locale-writers should change this as necessary to
  425. // be big enough to hold unique values not between 0 and 127,
  426. // and not (wchar_t) -1, for each defined multibyte character.
  427. // Define this type if we are doing the whole job,
  428. // or if we want this type in particular.
  429. // A null pointer constant.
  430. // This operating system-specific header file defines the SOCK_*, PF_*,
  431. // AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr',
  432. // `struct msghdr', and `struct linger' types.
  433. // System-specific socket constants and types. Linux version.
  434. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  435. // This file is part of the GNU C Library.
  436. //
  437. // The GNU C Library is free software; you can redistribute it and/or
  438. // modify it under the terms of the GNU Lesser General Public
  439. // License as published by the Free Software Foundation; either
  440. // version 2.1 of the License, or (at your option) any later version.
  441. //
  442. // The GNU C Library is distributed in the hope that it will be useful,
  443. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  444. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  445. // Lesser General Public License for more details.
  446. //
  447. // You should have received a copy of the GNU Lesser General Public
  448. // License along with the GNU C Library; if not, see
  449. // <https://www.gnu.org/licenses/>.
  450. // Copyright (C) 1989-2020 Free Software Foundation, Inc.
  451. //
  452. // This file is part of GCC.
  453. //
  454. // GCC is free software; you can redistribute it and/or modify
  455. // it under the terms of the GNU General Public License as published by
  456. // the Free Software Foundation; either version 3, or (at your option)
  457. // any later version.
  458. //
  459. // GCC is distributed in the hope that it will be useful,
  460. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  461. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  462. // GNU General Public License for more details.
  463. //
  464. // Under Section 7 of GPL version 3, you are granted additional
  465. // permissions described in the GCC Runtime Library Exception, version
  466. // 3.1, as published by the Free Software Foundation.
  467. //
  468. // You should have received a copy of the GNU General Public License and
  469. // a copy of the GCC Runtime Library Exception along with this program;
  470. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  471. // <http://www.gnu.org/licenses/>.
  472. // ISO C Standard: 7.17 Common definitions <stddef.h>
  473. // Any one of these symbols __need_* means that GNU libc
  474. // wants us just to define one data type. So don't define
  475. // the symbols that indicate this file's entire job has been done.
  476. // This avoids lossage on SunOS but only if stdtypes.h comes first.
  477. // There's no way to win with the other order! Sun lossage.
  478. // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  479. // Just ignore it.
  480. // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  481. // _TYPE_size_t which will typedef size_t. fixincludes patched the
  482. // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  483. // not defined, and so that defining this macro defines _GCC_SIZE_T.
  484. // If we find that the macros are still defined at this point, we must
  485. // invoke them so that the type is defined as expected.
  486. // In case nobody has defined these types, but we aren't running under
  487. // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  488. // __WCHAR_TYPE__ have reasonable values. This can happen if the
  489. // parts of GCC is compiled by an older compiler, that actually
  490. // include gstddef.h, such as collect2.
  491. // Signed type of difference of two pointers.
  492. // Define this type if we are doing the whole job,
  493. // or if we want this type in particular.
  494. // Unsigned type of `sizeof' something.
  495. // Define this type if we are doing the whole job,
  496. // or if we want this type in particular.
  497. // Wide character type.
  498. // Locale-writers should change this as necessary to
  499. // be big enough to hold unique values not between 0 and 127,
  500. // and not (wchar_t) -1, for each defined multibyte character.
  501. // Define this type if we are doing the whole job,
  502. // or if we want this type in particular.
  503. // A null pointer constant.
  504. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  505. // This file is part of the GNU C Library.
  506. //
  507. // The GNU C Library is free software; you can redistribute it and/or
  508. // modify it under the terms of the GNU Lesser General Public
  509. // License as published by the Free Software Foundation; either
  510. // version 2.1 of the License, or (at your option) any later version.
  511. //
  512. // The GNU C Library is distributed in the hope that it will be useful,
  513. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  514. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  515. // Lesser General Public License for more details.
  516. //
  517. // You should have received a copy of the GNU Lesser General Public
  518. // License along with the GNU C Library; if not, see
  519. // <https://www.gnu.org/licenses/>.
  520. // POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
  521. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  522. // This file is part of the GNU C Library.
  523. //
  524. // The GNU C Library is free software; you can redistribute it and/or
  525. // modify it under the terms of the GNU Lesser General Public
  526. // License as published by the Free Software Foundation; either
  527. // version 2.1 of the License, or (at your option) any later version.
  528. //
  529. // The GNU C Library is distributed in the hope that it will be useful,
  530. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  531. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  532. // Lesser General Public License for more details.
  533. //
  534. // You should have received a copy of the GNU Lesser General Public
  535. // License along with the GNU C Library; if not, see
  536. // <https://www.gnu.org/licenses/>.
  537. // bits/types.h -- definitions of __*_t types underlying *_t types.
  538. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  539. // This file is part of the GNU C Library.
  540. //
  541. // The GNU C Library is free software; you can redistribute it and/or
  542. // modify it under the terms of the GNU Lesser General Public
  543. // License as published by the Free Software Foundation; either
  544. // version 2.1 of the License, or (at your option) any later version.
  545. //
  546. // The GNU C Library is distributed in the hope that it will be useful,
  547. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  548. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  549. // Lesser General Public License for more details.
  550. //
  551. // You should have received a copy of the GNU Lesser General Public
  552. // License along with the GNU C Library; if not, see
  553. // <https://www.gnu.org/licenses/>.
  554. // Never include this file directly; use <sys/types.h> instead.
  555. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  556. // This file is part of the GNU C Library.
  557. //
  558. // The GNU C Library is free software; you can redistribute it and/or
  559. // modify it under the terms of the GNU Lesser General Public
  560. // License as published by the Free Software Foundation; either
  561. // version 2.1 of the License, or (at your option) any later version.
  562. //
  563. // The GNU C Library is distributed in the hope that it will be useful,
  564. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  565. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  566. // Lesser General Public License for more details.
  567. //
  568. // You should have received a copy of the GNU Lesser General Public
  569. // License along with the GNU C Library; if not, see
  570. // <https://www.gnu.org/licenses/>.
  571. // Determine the wordsize from the preprocessor defines.
  572. // Bit size of the time_t type at glibc build time, general case.
  573. // Copyright (C) 2018-2020 Free Software Foundation, Inc.
  574. // This file is part of the GNU C Library.
  575. //
  576. // The GNU C Library is free software; you can redistribute it and/or
  577. // modify it under the terms of the GNU Lesser General Public
  578. // License as published by the Free Software Foundation; either
  579. // version 2.1 of the License, or (at your option) any later version.
  580. //
  581. // The GNU C Library is distributed in the hope that it will be useful,
  582. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  583. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  584. // Lesser General Public License for more details.
  585. //
  586. // You should have received a copy of the GNU Lesser General Public
  587. // License along with the GNU C Library; if not, see
  588. // <https://www.gnu.org/licenses/>.
  589. // Determine the wordsize from the preprocessor defines.
  590. // Size in bits of the 'time_t' type of the default ABI.
  591. // Convenience types.
  592. type X__u_char = uint8 /* types.h:31:23 */
  593. type X__u_short = uint16 /* types.h:32:28 */
  594. type X__u_int = uint32 /* types.h:33:22 */
  595. type X__u_long = uint64 /* types.h:34:27 */
  596. // Fixed-size types, underlying types depend on word size and compiler.
  597. type X__int8_t = int8 /* types.h:37:21 */
  598. type X__uint8_t = uint8 /* types.h:38:23 */
  599. type X__int16_t = int16 /* types.h:39:26 */
  600. type X__uint16_t = uint16 /* types.h:40:28 */
  601. type X__int32_t = int32 /* types.h:41:20 */
  602. type X__uint32_t = uint32 /* types.h:42:22 */
  603. type X__int64_t = int64 /* types.h:44:25 */
  604. type X__uint64_t = uint64 /* types.h:45:27 */
  605. // Smallest types with at least a given width.
  606. type X__int_least8_t = X__int8_t /* types.h:52:18 */
  607. type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
  608. type X__int_least16_t = X__int16_t /* types.h:54:19 */
  609. type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
  610. type X__int_least32_t = X__int32_t /* types.h:56:19 */
  611. type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
  612. type X__int_least64_t = X__int64_t /* types.h:58:19 */
  613. type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
  614. // quad_t is also 64 bits.
  615. type X__quad_t = int64 /* types.h:63:18 */
  616. type X__u_quad_t = uint64 /* types.h:64:27 */
  617. // Largest integral types.
  618. type X__intmax_t = int64 /* types.h:72:18 */
  619. type X__uintmax_t = uint64 /* types.h:73:27 */
  620. // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
  621. // macros for each of the OS types we define below. The definitions
  622. // of those macros must use the following macros for underlying types.
  623. // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
  624. // variants of each of the following integer types on this machine.
  625. //
  626. // 16 -- "natural" 16-bit type (always short)
  627. // 32 -- "natural" 32-bit type (always int)
  628. // 64 -- "natural" 64-bit type (long or long long)
  629. // LONG32 -- 32-bit type, traditionally long
  630. // QUAD -- 64-bit type, traditionally long long
  631. // WORD -- natural type of __WORDSIZE bits (int or long)
  632. // LONGWORD -- type of __WORDSIZE bits, traditionally long
  633. //
  634. // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
  635. // conventional uses of `long' or `long long' type modifiers match the
  636. // types we define, even when a less-adorned type would be the same size.
  637. // This matters for (somewhat) portably writing printf/scanf formats for
  638. // these types, where using the appropriate l or ll format modifiers can
  639. // make the typedefs and the formats match up across all GNU platforms. If
  640. // we used `long' when it's 64 bits where `long long' is expected, then the
  641. // compiler would warn about the formats not matching the argument types,
  642. // and the programmer changing them to shut up the compiler would break the
  643. // program's portability.
  644. //
  645. // Here we assume what is presently the case in all the GCC configurations
  646. // we support: long long is always 64 bits, long is always word/address size,
  647. // and int is always 32 bits.
  648. // No need to mark the typedef with __extension__.
  649. // bits/typesizes.h -- underlying types for *_t. Linux/s390 version.
  650. // Copyright (C) 2003-2020 Free Software Foundation, Inc.
  651. // This file is part of the GNU C Library.
  652. //
  653. // The GNU C Library is free software; you can redistribute it and/or
  654. // modify it under the terms of the GNU Lesser General Public
  655. // License as published by the Free Software Foundation; either
  656. // version 2.1 of the License, or (at your option) any later version.
  657. //
  658. // The GNU C Library is distributed in the hope that it will be useful,
  659. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  660. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  661. // Lesser General Public License for more details.
  662. //
  663. // You should have received a copy of the GNU Lesser General Public
  664. // License along with the GNU C Library; if not, see
  665. // <https://www.gnu.org/licenses/>.
  666. // See <bits/types.h> for the meaning of these macros. This file exists so
  667. // that <bits/types.h> need not vary across different GNU platforms.
  668. // size_t is unsigned long int on s390 -m31.
  669. // Tell the libc code that off_t and off64_t are actually the same type
  670. // for all ABI purposes, even if possibly expressed as different base types
  671. // for C type-checking purposes.
  672. // Same for ino_t and ino64_t.
  673. // And for __rlim_t and __rlim64_t.
  674. // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
  675. // Number of descriptors that can fit in an `fd_set'.
  676. // bits/time64.h -- underlying types for __time64_t. Generic version.
  677. // Copyright (C) 2018-2020 Free Software Foundation, Inc.
  678. // This file is part of the GNU C Library.
  679. //
  680. // The GNU C Library is free software; you can redistribute it and/or
  681. // modify it under the terms of the GNU Lesser General Public
  682. // License as published by the Free Software Foundation; either
  683. // version 2.1 of the License, or (at your option) any later version.
  684. //
  685. // The GNU C Library is distributed in the hope that it will be useful,
  686. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  687. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  688. // Lesser General Public License for more details.
  689. //
  690. // You should have received a copy of the GNU Lesser General Public
  691. // License along with the GNU C Library; if not, see
  692. // <https://www.gnu.org/licenses/>.
  693. // Define __TIME64_T_TYPE so that it is always a 64-bit type.
  694. // If we already have 64-bit time type then use it.
  695. type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
  696. type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
  697. type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
  698. type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
  699. type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
  700. type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
  701. type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
  702. type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
  703. type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
  704. type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
  705. type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
  706. type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
  707. type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
  708. type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
  709. type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
  710. type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
  711. type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
  712. type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
  713. type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
  714. type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
  715. // Clock ID used in clock and timer functions.
  716. type X__clockid_t = int32 /* types.h:168:29 */
  717. // Timer ID returned by `timer_create'.
  718. type X__timer_t = uintptr /* types.h:171:12 */
  719. // Type to represent block size.
  720. type X__blksize_t = int64 /* types.h:174:29 */
  721. // Types from the Large File Support interface.
  722. // Type to count number of disk blocks.
  723. type X__blkcnt_t = int64 /* types.h:179:28 */
  724. type X__blkcnt64_t = int64 /* types.h:180:30 */
  725. // Type to count file system blocks.
  726. type X__fsblkcnt_t = uint64 /* types.h:183:30 */
  727. type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
  728. // Type to count file system nodes.
  729. type X__fsfilcnt_t = uint64 /* types.h:187:30 */
  730. type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
  731. // Type of miscellaneous file system fields.
  732. type X__fsword_t = int64 /* types.h:191:28 */
  733. type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
  734. // Signed long type used in system calls.
  735. type X__syscall_slong_t = int64 /* types.h:196:33 */
  736. // Unsigned long type used in system calls.
  737. type X__syscall_ulong_t = uint64 /* types.h:198:33 */
  738. // These few don't really vary by system, they always correspond
  739. //
  740. // to one of the other defined types.
  741. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
  742. type X__caddr_t = uintptr /* types.h:203:14 */
  743. // Duplicates info from stdint.h but this is used in unistd.h.
  744. type X__intptr_t = int64 /* types.h:206:25 */
  745. // Duplicate info from sys/socket.h.
  746. type X__socklen_t = uint32 /* types.h:209:23 */
  747. // C99: An integer type that can be accessed as an atomic entity,
  748. //
  749. // even in the presence of asynchronous interrupts.
  750. // It is not currently necessary for this to be machine-specific.
  751. type X__sig_atomic_t = int32 /* types.h:214:13 */
  752. // Seconds since the Epoch, visible to user code when time_t is too
  753. // narrow only for consistency with the old way of widening too-narrow
  754. // types. User code should never use __time64_t.
  755. type U_char = X__u_char /* types.h:33:18 */
  756. type U_short = X__u_short /* types.h:34:19 */
  757. type U_int = X__u_int /* types.h:35:17 */
  758. type U_long = X__u_long /* types.h:36:18 */
  759. type Quad_t = X__quad_t /* types.h:37:18 */
  760. type U_quad_t = X__u_quad_t /* types.h:38:20 */
  761. type Fsid_t = X__fsid_t /* types.h:39:18 */
  762. type Loff_t = X__loff_t /* types.h:42:18 */
  763. type Ino_t = X__ino64_t /* types.h:49:19 */
  764. type Dev_t = X__dev_t /* types.h:59:17 */
  765. type Gid_t = X__gid_t /* types.h:64:17 */
  766. type Mode_t = X__mode_t /* types.h:69:18 */
  767. type Nlink_t = X__nlink_t /* types.h:74:19 */
  768. type Uid_t = X__uid_t /* types.h:79:17 */
  769. type Off_t = X__off64_t /* types.h:87:19 */
  770. type Pid_t = X__pid_t /* types.h:97:17 */
  771. type Id_t = X__id_t /* types.h:103:16 */
  772. type Ssize_t = X__ssize_t /* types.h:108:19 */
  773. type Daddr_t = X__daddr_t /* types.h:114:19 */
  774. type Caddr_t = X__caddr_t /* types.h:115:19 */
  775. type Key_t = X__key_t /* types.h:121:17 */
  776. // bits/types.h -- definitions of __*_t types underlying *_t types.
  777. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  778. // This file is part of the GNU C Library.
  779. //
  780. // The GNU C Library is free software; you can redistribute it and/or
  781. // modify it under the terms of the GNU Lesser General Public
  782. // License as published by the Free Software Foundation; either
  783. // version 2.1 of the License, or (at your option) any later version.
  784. //
  785. // The GNU C Library is distributed in the hope that it will be useful,
  786. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  787. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  788. // Lesser General Public License for more details.
  789. //
  790. // You should have received a copy of the GNU Lesser General Public
  791. // License along with the GNU C Library; if not, see
  792. // <https://www.gnu.org/licenses/>.
  793. // Never include this file directly; use <sys/types.h> instead.
  794. // Returned by `clock'.
  795. type Clock_t = X__clock_t /* clock_t.h:7:19 */
  796. // bits/types.h -- definitions of __*_t types underlying *_t types.
  797. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  798. // This file is part of the GNU C Library.
  799. //
  800. // The GNU C Library is free software; you can redistribute it and/or
  801. // modify it under the terms of the GNU Lesser General Public
  802. // License as published by the Free Software Foundation; either
  803. // version 2.1 of the License, or (at your option) any later version.
  804. //
  805. // The GNU C Library is distributed in the hope that it will be useful,
  806. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  807. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  808. // Lesser General Public License for more details.
  809. //
  810. // You should have received a copy of the GNU Lesser General Public
  811. // License along with the GNU C Library; if not, see
  812. // <https://www.gnu.org/licenses/>.
  813. // Never include this file directly; use <sys/types.h> instead.
  814. // Clock ID used in clock and timer functions.
  815. type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
  816. // bits/types.h -- definitions of __*_t types underlying *_t types.
  817. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  818. // This file is part of the GNU C Library.
  819. //
  820. // The GNU C Library is free software; you can redistribute it and/or
  821. // modify it under the terms of the GNU Lesser General Public
  822. // License as published by the Free Software Foundation; either
  823. // version 2.1 of the License, or (at your option) any later version.
  824. //
  825. // The GNU C Library is distributed in the hope that it will be useful,
  826. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  827. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  828. // Lesser General Public License for more details.
  829. //
  830. // You should have received a copy of the GNU Lesser General Public
  831. // License along with the GNU C Library; if not, see
  832. // <https://www.gnu.org/licenses/>.
  833. // Never include this file directly; use <sys/types.h> instead.
  834. // Returned by `time'.
  835. type Time_t = X__time_t /* time_t.h:7:18 */
  836. // bits/types.h -- definitions of __*_t types underlying *_t types.
  837. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  838. // This file is part of the GNU C Library.
  839. //
  840. // The GNU C Library is free software; you can redistribute it and/or
  841. // modify it under the terms of the GNU Lesser General Public
  842. // License as published by the Free Software Foundation; either
  843. // version 2.1 of the License, or (at your option) any later version.
  844. //
  845. // The GNU C Library is distributed in the hope that it will be useful,
  846. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  847. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  848. // Lesser General Public License for more details.
  849. //
  850. // You should have received a copy of the GNU Lesser General Public
  851. // License along with the GNU C Library; if not, see
  852. // <https://www.gnu.org/licenses/>.
  853. // Never include this file directly; use <sys/types.h> instead.
  854. // Timer ID returned by `timer_create'.
  855. type Timer_t = X__timer_t /* timer_t.h:7:19 */
  856. // Copyright (C) 1989-2020 Free Software Foundation, Inc.
  857. //
  858. // This file is part of GCC.
  859. //
  860. // GCC is free software; you can redistribute it and/or modify
  861. // it under the terms of the GNU General Public License as published by
  862. // the Free Software Foundation; either version 3, or (at your option)
  863. // any later version.
  864. //
  865. // GCC is distributed in the hope that it will be useful,
  866. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  867. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  868. // GNU General Public License for more details.
  869. //
  870. // Under Section 7 of GPL version 3, you are granted additional
  871. // permissions described in the GCC Runtime Library Exception, version
  872. // 3.1, as published by the Free Software Foundation.
  873. //
  874. // You should have received a copy of the GNU General Public License and
  875. // a copy of the GCC Runtime Library Exception along with this program;
  876. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  877. // <http://www.gnu.org/licenses/>.
  878. // ISO C Standard: 7.17 Common definitions <stddef.h>
  879. // Any one of these symbols __need_* means that GNU libc
  880. // wants us just to define one data type. So don't define
  881. // the symbols that indicate this file's entire job has been done.
  882. // This avoids lossage on SunOS but only if stdtypes.h comes first.
  883. // There's no way to win with the other order! Sun lossage.
  884. // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  885. // Just ignore it.
  886. // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  887. // _TYPE_size_t which will typedef size_t. fixincludes patched the
  888. // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  889. // not defined, and so that defining this macro defines _GCC_SIZE_T.
  890. // If we find that the macros are still defined at this point, we must
  891. // invoke them so that the type is defined as expected.
  892. // In case nobody has defined these types, but we aren't running under
  893. // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  894. // __WCHAR_TYPE__ have reasonable values. This can happen if the
  895. // parts of GCC is compiled by an older compiler, that actually
  896. // include gstddef.h, such as collect2.
  897. // Signed type of difference of two pointers.
  898. // Define this type if we are doing the whole job,
  899. // or if we want this type in particular.
  900. // Unsigned type of `sizeof' something.
  901. // Define this type if we are doing the whole job,
  902. // or if we want this type in particular.
  903. // Wide character type.
  904. // Locale-writers should change this as necessary to
  905. // be big enough to hold unique values not between 0 and 127,
  906. // and not (wchar_t) -1, for each defined multibyte character.
  907. // Define this type if we are doing the whole job,
  908. // or if we want this type in particular.
  909. // A null pointer constant.
  910. // Old compatibility names for C types.
  911. type Ulong = uint64 /* types.h:148:27 */
  912. type Ushort = uint16 /* types.h:149:28 */
  913. type Uint = uint32 /* types.h:150:22 */
  914. // These size-specific names are used by some of the inet code.
  915. // Define intN_t types.
  916. // Copyright (C) 2017-2020 Free Software Foundation, Inc.
  917. // This file is part of the GNU C Library.
  918. //
  919. // The GNU C Library is free software; you can redistribute it and/or
  920. // modify it under the terms of the GNU Lesser General Public
  921. // License as published by the Free Software Foundation; either
  922. // version 2.1 of the License, or (at your option) any later version.
  923. //
  924. // The GNU C Library is distributed in the hope that it will be useful,
  925. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  926. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  927. // Lesser General Public License for more details.
  928. //
  929. // You should have received a copy of the GNU Lesser General Public
  930. // License along with the GNU C Library; if not, see
  931. // <https://www.gnu.org/licenses/>.
  932. // bits/types.h -- definitions of __*_t types underlying *_t types.
  933. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  934. // This file is part of the GNU C Library.
  935. //
  936. // The GNU C Library is free software; you can redistribute it and/or
  937. // modify it under the terms of the GNU Lesser General Public
  938. // License as published by the Free Software Foundation; either
  939. // version 2.1 of the License, or (at your option) any later version.
  940. //
  941. // The GNU C Library is distributed in the hope that it will be useful,
  942. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  943. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  944. // Lesser General Public License for more details.
  945. //
  946. // You should have received a copy of the GNU Lesser General Public
  947. // License along with the GNU C Library; if not, see
  948. // <https://www.gnu.org/licenses/>.
  949. // Never include this file directly; use <sys/types.h> instead.
  950. type Int8_t = X__int8_t /* stdint-intn.h:24:18 */
  951. type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
  952. type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
  953. type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
  954. // These were defined by ISO C without the first `_'.
  955. type U_int8_t = X__uint8_t /* types.h:158:19 */
  956. type U_int16_t = X__uint16_t /* types.h:159:20 */
  957. type U_int32_t = X__uint32_t /* types.h:160:20 */
  958. type U_int64_t = X__uint64_t /* types.h:161:20 */
  959. type Register_t = int32 /* types.h:164:13 */
  960. // It also defines `fd_set' and the FD_* macros for `select'.
  961. // `fd_set' type and related macros, and `select'/`pselect' declarations.
  962. // Copyright (C) 1996-2020 Free Software Foundation, Inc.
  963. // This file is part of the GNU C Library.
  964. //
  965. // The GNU C Library is free software; you can redistribute it and/or
  966. // modify it under the terms of the GNU Lesser General Public
  967. // License as published by the Free Software Foundation; either
  968. // version 2.1 of the License, or (at your option) any later version.
  969. //
  970. // The GNU C Library is distributed in the hope that it will be useful,
  971. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  972. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  973. // Lesser General Public License for more details.
  974. //
  975. // You should have received a copy of the GNU Lesser General Public
  976. // License along with the GNU C Library; if not, see
  977. // <https://www.gnu.org/licenses/>.
  978. // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
  979. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  980. // This file is part of the GNU C Library.
  981. //
  982. // The GNU C Library is free software; you can redistribute it and/or
  983. // modify it under the terms of the GNU Lesser General Public
  984. // License as published by the Free Software Foundation; either
  985. // version 2.1 of the License, or (at your option) any later version.
  986. //
  987. // The GNU C Library is distributed in the hope that it will be useful,
  988. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  989. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  990. // Lesser General Public License for more details.
  991. //
  992. // You should have received a copy of the GNU Lesser General Public
  993. // License along with the GNU C Library; if not, see
  994. // <https://www.gnu.org/licenses/>.
  995. // Get definition of needed basic types.
  996. // bits/types.h -- definitions of __*_t types underlying *_t types.
  997. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  998. // This file is part of the GNU C Library.
  999. //
  1000. // The GNU C Library is free software; you can redistribute it and/or
  1001. // modify it under the terms of the GNU Lesser General Public
  1002. // License as published by the Free Software Foundation; either
  1003. // version 2.1 of the License, or (at your option) any later version.
  1004. //
  1005. // The GNU C Library is distributed in the hope that it will be useful,
  1006. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1007. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1008. // Lesser General Public License for more details.
  1009. //
  1010. // You should have received a copy of the GNU Lesser General Public
  1011. // License along with the GNU C Library; if not, see
  1012. // <https://www.gnu.org/licenses/>.
  1013. // Never include this file directly; use <sys/types.h> instead.
  1014. // Get __FD_* definitions.
  1015. // Copyright (C) 1997-2020 Free Software Foundation, Inc.
  1016. // This file is part of the GNU C Library.
  1017. //
  1018. // The GNU C Library is free software; you can redistribute it and/or
  1019. // modify it under the terms of the GNU Lesser General Public
  1020. // License as published by the Free Software Foundation; either
  1021. // version 2.1 of the License, or (at your option) any later version.
  1022. //
  1023. // The GNU C Library is distributed in the hope that it will be useful,
  1024. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1025. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1026. // Lesser General Public License for more details.
  1027. //
  1028. // You should have received a copy of the GNU Lesser General Public
  1029. // License along with the GNU C Library; if not, see
  1030. // <https://www.gnu.org/licenses/>.
  1031. // We don't use `memset' because this would require a prototype and
  1032. // the array isn't too big.
  1033. // Get sigset_t.
  1034. type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */
  1035. // A set of signals to be blocked, unblocked, or waited for.
  1036. type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
  1037. // Get definition of timer specification structures.
  1038. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1039. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1040. // This file is part of the GNU C Library.
  1041. //
  1042. // The GNU C Library is free software; you can redistribute it and/or
  1043. // modify it under the terms of the GNU Lesser General Public
  1044. // License as published by the Free Software Foundation; either
  1045. // version 2.1 of the License, or (at your option) any later version.
  1046. //
  1047. // The GNU C Library is distributed in the hope that it will be useful,
  1048. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1049. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1050. // Lesser General Public License for more details.
  1051. //
  1052. // You should have received a copy of the GNU Lesser General Public
  1053. // License along with the GNU C Library; if not, see
  1054. // <https://www.gnu.org/licenses/>.
  1055. // Never include this file directly; use <sys/types.h> instead.
  1056. // A time value that is accurate to the nearest
  1057. //
  1058. // microsecond but also has a range of years.
  1059. type Timeval = struct {
  1060. Ftv_sec X__time_t
  1061. Ftv_usec X__suseconds_t
  1062. } /* struct_timeval.h:8:1 */
  1063. // NB: Include guard matches what <linux/time.h> uses.
  1064. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1065. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1066. // This file is part of the GNU C Library.
  1067. //
  1068. // The GNU C Library is free software; you can redistribute it and/or
  1069. // modify it under the terms of the GNU Lesser General Public
  1070. // License as published by the Free Software Foundation; either
  1071. // version 2.1 of the License, or (at your option) any later version.
  1072. //
  1073. // The GNU C Library is distributed in the hope that it will be useful,
  1074. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1075. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1076. // Lesser General Public License for more details.
  1077. //
  1078. // You should have received a copy of the GNU Lesser General Public
  1079. // License along with the GNU C Library; if not, see
  1080. // <https://www.gnu.org/licenses/>.
  1081. // Never include this file directly; use <sys/types.h> instead.
  1082. // Endian macros for string.h functions
  1083. // Copyright (C) 1992-2020 Free Software Foundation, Inc.
  1084. // This file is part of the GNU C Library.
  1085. //
  1086. // The GNU C Library is free software; you can redistribute it and/or
  1087. // modify it under the terms of the GNU Lesser General Public
  1088. // License as published by the Free Software Foundation; either
  1089. // version 2.1 of the License, or (at your option) any later version.
  1090. //
  1091. // The GNU C Library is distributed in the hope that it will be useful,
  1092. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1093. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1094. // Lesser General Public License for more details.
  1095. //
  1096. // You should have received a copy of the GNU Lesser General Public
  1097. // License along with the GNU C Library; if not, see
  1098. // <http://www.gnu.org/licenses/>.
  1099. // POSIX.1b structure for a time value. This is like a `struct timeval' but
  1100. //
  1101. // has nanoseconds instead of microseconds.
  1102. type Timespec = struct {
  1103. Ftv_sec X__time_t
  1104. Ftv_nsec X__syscall_slong_t
  1105. } /* struct_timespec.h:10:1 */
  1106. type Suseconds_t = X__suseconds_t /* select.h:43:23 */
  1107. // The fd_set member is required to be an array of longs.
  1108. type X__fd_mask = int64 /* select.h:49:18 */
  1109. // Some versions of <linux/posix_types.h> define this macros.
  1110. // It's easier to assume 8-bit bytes than to get CHAR_BIT.
  1111. // fd_set for select and pselect.
  1112. type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */
  1113. // Maximum number of file descriptors in `fd_set'.
  1114. // Sometimes the fd_set member is assumed to have this type.
  1115. type Fd_mask = X__fd_mask /* select.h:77:19 */
  1116. // Define some inlines helping to catch common problems.
  1117. type Blksize_t = X__blksize_t /* types.h:185:21 */
  1118. // Types from the Large File Support interface.
  1119. type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks.
  1120. type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
  1121. type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
  1122. // Now add the thread types.
  1123. // Declaration of common pthread types for all architectures.
  1124. // Copyright (C) 2017-2020 Free Software Foundation, Inc.
  1125. // This file is part of the GNU C Library.
  1126. //
  1127. // The GNU C Library is free software; you can redistribute it and/or
  1128. // modify it under the terms of the GNU Lesser General Public
  1129. // License as published by the Free Software Foundation; either
  1130. // version 2.1 of the License, or (at your option) any later version.
  1131. //
  1132. // The GNU C Library is distributed in the hope that it will be useful,
  1133. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1134. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1135. // Lesser General Public License for more details.
  1136. //
  1137. // You should have received a copy of the GNU Lesser General Public
  1138. // License along with the GNU C Library; if not, see
  1139. // <https://www.gnu.org/licenses/>.
  1140. // For internal mutex and condition variable definitions.
  1141. // Common threading primitives definitions for both POSIX and C11.
  1142. // Copyright (C) 2017-2020 Free Software Foundation, Inc.
  1143. // This file is part of the GNU C Library.
  1144. //
  1145. // The GNU C Library is free software; you can redistribute it and/or
  1146. // modify it under the terms of the GNU Lesser General Public
  1147. // License as published by the Free Software Foundation; either
  1148. // version 2.1 of the License, or (at your option) any later version.
  1149. //
  1150. // The GNU C Library is distributed in the hope that it will be useful,
  1151. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1152. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1153. // Lesser General Public License for more details.
  1154. //
  1155. // You should have received a copy of the GNU Lesser General Public
  1156. // License along with the GNU C Library; if not, see
  1157. // <https://www.gnu.org/licenses/>.
  1158. // Arch-specific definitions. Each architecture must define the following
  1159. // macros to define the expected sizes of pthread data types:
  1160. //
  1161. // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
  1162. // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
  1163. // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
  1164. // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
  1165. // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
  1166. // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
  1167. // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
  1168. // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
  1169. // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  1170. //
  1171. // The additional macro defines any constraint for the lock alignment
  1172. // inside the thread structures:
  1173. //
  1174. // __LOCK_ALIGNMENT - for internal lock/futex usage.
  1175. //
  1176. // Same idea but for the once locking primitive:
  1177. //
  1178. // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  1179. // Machine-specific pthread type layouts. Generic version.
  1180. // Copyright (C) 2019-2020 Free Software Foundation, Inc.
  1181. //
  1182. // This file is part of the GNU C Library.
  1183. //
  1184. // The GNU C Library is free software; you can redistribute it and/or
  1185. // modify it under the terms of the GNU Lesser General Public
  1186. // License as published by the Free Software Foundation; either
  1187. // version 2.1 of the License, or (at your option) any later version.
  1188. //
  1189. // The GNU C Library is distributed in the hope that it will be useful,
  1190. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1191. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1192. // Lesser General Public License for more details.
  1193. //
  1194. // You should have received a copy of the GNU Lesser General Public
  1195. // License along with the GNU C Library; if not, see
  1196. // <http://www.gnu.org/licenses/>.
  1197. // Determine the wordsize from the preprocessor defines.
  1198. // Common definition of pthread_mutex_t.
  1199. type X__pthread_internal_list = struct {
  1200. F__prev uintptr
  1201. F__next uintptr
  1202. } /* thread-shared-types.h:49:9 */
  1203. // Type to count file system inodes.
  1204. // Now add the thread types.
  1205. // Declaration of common pthread types for all architectures.
  1206. // Copyright (C) 2017-2020 Free Software Foundation, Inc.
  1207. // This file is part of the GNU C Library.
  1208. //
  1209. // The GNU C Library is free software; you can redistribute it and/or
  1210. // modify it under the terms of the GNU Lesser General Public
  1211. // License as published by the Free Software Foundation; either
  1212. // version 2.1 of the License, or (at your option) any later version.
  1213. //
  1214. // The GNU C Library is distributed in the hope that it will be useful,
  1215. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1216. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1217. // Lesser General Public License for more details.
  1218. //
  1219. // You should have received a copy of the GNU Lesser General Public
  1220. // License along with the GNU C Library; if not, see
  1221. // <https://www.gnu.org/licenses/>.
  1222. // For internal mutex and condition variable definitions.
  1223. // Common threading primitives definitions for both POSIX and C11.
  1224. // Copyright (C) 2017-2020 Free Software Foundation, Inc.
  1225. // This file is part of the GNU C Library.
  1226. //
  1227. // The GNU C Library is free software; you can redistribute it and/or
  1228. // modify it under the terms of the GNU Lesser General Public
  1229. // License as published by the Free Software Foundation; either
  1230. // version 2.1 of the License, or (at your option) any later version.
  1231. //
  1232. // The GNU C Library is distributed in the hope that it will be useful,
  1233. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1234. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1235. // Lesser General Public License for more details.
  1236. //
  1237. // You should have received a copy of the GNU Lesser General Public
  1238. // License along with the GNU C Library; if not, see
  1239. // <https://www.gnu.org/licenses/>.
  1240. // Arch-specific definitions. Each architecture must define the following
  1241. // macros to define the expected sizes of pthread data types:
  1242. //
  1243. // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
  1244. // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
  1245. // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
  1246. // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
  1247. // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
  1248. // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
  1249. // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
  1250. // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
  1251. // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  1252. //
  1253. // The additional macro defines any constraint for the lock alignment
  1254. // inside the thread structures:
  1255. //
  1256. // __LOCK_ALIGNMENT - for internal lock/futex usage.
  1257. //
  1258. // Same idea but for the once locking primitive:
  1259. //
  1260. // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  1261. // Machine-specific pthread type layouts. Generic version.
  1262. // Copyright (C) 2019-2020 Free Software Foundation, Inc.
  1263. //
  1264. // This file is part of the GNU C Library.
  1265. //
  1266. // The GNU C Library is free software; you can redistribute it and/or
  1267. // modify it under the terms of the GNU Lesser General Public
  1268. // License as published by the Free Software Foundation; either
  1269. // version 2.1 of the License, or (at your option) any later version.
  1270. //
  1271. // The GNU C Library is distributed in the hope that it will be useful,
  1272. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1273. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1274. // Lesser General Public License for more details.
  1275. //
  1276. // You should have received a copy of the GNU Lesser General Public
  1277. // License along with the GNU C Library; if not, see
  1278. // <http://www.gnu.org/licenses/>.
  1279. // Determine the wordsize from the preprocessor defines.
  1280. // Common definition of pthread_mutex_t.
  1281. type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
  1282. type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
  1283. type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
  1284. // Arch-specific mutex definitions. A generic implementation is provided
  1285. // by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
  1286. // can override it by defining:
  1287. //
  1288. // 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
  1289. // definition). It should contains at least the internal members
  1290. // defined in the generic version.
  1291. //
  1292. // 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
  1293. // atomic operations.
  1294. //
  1295. // 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
  1296. // It should initialize the mutex internal flag.
  1297. // S390 internal mutex struct definitions.
  1298. // Copyright (C) 2019-2020 Free Software Foundation, Inc.
  1299. // This file is part of the GNU C Library.
  1300. //
  1301. // The GNU C Library is free software; you can redistribute it and/or
  1302. // modify it under the terms of the GNU Lesser General Public
  1303. // License as published by the Free Software Foundation; either
  1304. // version 2.1 of the License, or (at your option) any later version.
  1305. //
  1306. // The GNU C Library is distributed in the hope that it will be useful,
  1307. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1308. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1309. // Lesser General Public License for more details.
  1310. //
  1311. // You should have received a copy of the GNU Lesser General Public
  1312. // License along with the GNU C Library; if not, see
  1313. // <http://www.gnu.org/licenses/>.
  1314. type X__pthread_mutex_s = struct {
  1315. F__lock int32
  1316. F__count uint32
  1317. F__owner int32
  1318. F__nusers uint32
  1319. F__kind int32
  1320. F__spins int16
  1321. F__elision int16
  1322. F__list X__pthread_list_t
  1323. } /* struct_mutex.h:22:1 */
  1324. // Arch-sepecific read-write lock definitions. A generic implementation is
  1325. // provided by struct_rwlock.h. If required, an architecture can override it
  1326. // by defining:
  1327. //
  1328. // 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
  1329. // It should contain at least the internal members defined in the
  1330. // generic version.
  1331. //
  1332. // 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
  1333. // It should initialize the rwlock internal type.
  1334. // S390 internal rwlock struct definitions.
  1335. // Copyright (C) 2019-2020 Free Software Foundation, Inc.
  1336. //
  1337. // This file is part of the GNU C Library.
  1338. //
  1339. // The GNU C Library is free software; you can redistribute it and/or
  1340. // modify it under the terms of the GNU Lesser General Public
  1341. // License as published by the Free Software Foundation; either
  1342. // version 2.1 of the License, or (at your option) any later version.
  1343. //
  1344. // The GNU C Library is distributed in the hope that it will be useful,
  1345. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1346. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1347. // Lesser General Public License for more details.
  1348. //
  1349. // You should have received a copy of the GNU Lesser General Public
  1350. // License along with the GNU C Library; if not, see
  1351. // <http://www.gnu.org/licenses/>.
  1352. type X__pthread_rwlock_arch_t = struct {
  1353. F__readers uint32
  1354. F__writers uint32
  1355. F__wrphase_futex uint32
  1356. F__writers_futex uint32
  1357. F__pad3 uint32
  1358. F__pad4 uint32
  1359. F__cur_writer int32
  1360. F__shared int32
  1361. F__pad1 uint64
  1362. F__pad2 uint64
  1363. F__flags uint32
  1364. F__ccgo_pad1 [4]byte
  1365. } /* struct_rwlock.h:23:1 */
  1366. // Common definition of pthread_cond_t.
  1367. type X__pthread_cond_s = struct {
  1368. F__0 struct{ F__wseq uint64 }
  1369. F__8 struct{ F__g1_start uint64 }
  1370. F__g_refs [2]uint32
  1371. F__g_size [2]uint32
  1372. F__g1_orig_size uint32
  1373. F__wrefs uint32
  1374. F__g_signals [2]uint32
  1375. } /* thread-shared-types.h:92:1 */
  1376. // Thread identifiers. The structure of the attribute type is not
  1377. //
  1378. // exposed on purpose.
  1379. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */
  1380. // Data structures for mutex handling. The structure of the attribute
  1381. //
  1382. // type is not exposed on purpose.
  1383. type Pthread_mutexattr_t = struct {
  1384. F__ccgo_pad1 [0]uint32
  1385. F__size [4]uint8
  1386. } /* pthreadtypes.h:36:3 */
  1387. // Data structure for condition variable handling. The structure of
  1388. //
  1389. // the attribute type is not exposed on purpose.
  1390. type Pthread_condattr_t = struct {
  1391. F__ccgo_pad1 [0]uint32
  1392. F__size [4]uint8
  1393. } /* pthreadtypes.h:45:3 */
  1394. // Keys for thread-specific data
  1395. type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
  1396. // Once-only execution
  1397. type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
  1398. type Pthread_attr_t1 = struct {
  1399. F__ccgo_pad1 [0]uint64
  1400. F__size [56]uint8
  1401. } /* pthreadtypes.h:56:1 */
  1402. type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */
  1403. type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */
  1404. type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */
  1405. // Data structure for reader-writer lock variable handling. The
  1406. //
  1407. // structure of the attribute type is deliberately not exposed.
  1408. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
  1409. type Pthread_rwlockattr_t = struct {
  1410. F__ccgo_pad1 [0]uint64
  1411. F__size [8]uint8
  1412. } /* pthreadtypes.h:97:3 */
  1413. // POSIX spinlock data type.
  1414. type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
  1415. // POSIX barriers data type. The structure of the type is
  1416. //
  1417. // deliberately not exposed.
  1418. type Pthread_barrier_t = struct {
  1419. F__ccgo_pad1 [0]uint64
  1420. F__size [32]uint8
  1421. } /* pthreadtypes.h:112:3 */
  1422. type Pthread_barrierattr_t = struct {
  1423. F__ccgo_pad1 [0]uint32
  1424. F__size [4]uint8
  1425. } /* pthreadtypes.h:118:3 */
  1426. // Type for length arguments in socket calls.
  1427. type Socklen_t = X__socklen_t /* socket.h:33:21 */
  1428. // Protocol families.
  1429. // Address families.
  1430. // Socket level values. Others are defined in the appropriate headers.
  1431. //
  1432. // XXX These definitions also should go into the appropriate headers as
  1433. // far as they are available.
  1434. // Maximum queue length specifiable by listen.
  1435. // Get the definition of the macro to define the common sockaddr members.
  1436. // Definition of struct sockaddr_* common members and sizes, generic version.
  1437. // Copyright (C) 1995-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/socket.h> instead.
  1454. // POSIX.1g specifies this type name for the `sa_family' member.
  1455. type Sa_family_t = uint16 /* sockaddr.h:28:28 */
  1456. // This macro is used to declare the initial common members
  1457. // of the data types used for socket addresses, `struct sockaddr',
  1458. // `struct sockaddr_in', `struct sockaddr_un', etc.
  1459. // Size of struct sockaddr_storage.
  1460. // Structure describing a generic socket address.
  1461. type Sockaddr = struct {
  1462. Fsa_family Sa_family_t
  1463. Fsa_data [14]uint8
  1464. } /* socket.h:178:1 */
  1465. // Structure large enough to hold any socket address (with the historical
  1466. // exception of AF_UNIX).
  1467. type Sockaddr_storage = struct {
  1468. Fss_family Sa_family_t
  1469. F__ss_padding [118]uint8
  1470. F__ss_align uint64
  1471. } /* socket.h:191:1 */
  1472. // Structure describing messages sent by
  1473. //
  1474. // `sendmsg' and received by `recvmsg'.
  1475. type Msghdr = struct {
  1476. Fmsg_name uintptr
  1477. Fmsg_namelen Socklen_t
  1478. F__ccgo_pad1 [4]byte
  1479. Fmsg_iov uintptr
  1480. Fmsg_iovlen Size_t
  1481. Fmsg_control uintptr
  1482. Fmsg_controllen Size_t
  1483. Fmsg_flags int32
  1484. F__ccgo_pad2 [4]byte
  1485. } /* socket.h:257:1 */
  1486. // Structure used for storage of ancillary data object information.
  1487. type Cmsghdr = struct {
  1488. F__ccgo_pad1 [0]uint64
  1489. Fcmsg_len Size_t
  1490. Fcmsg_level int32
  1491. Fcmsg_type int32
  1492. } /* socket.h:275:1 */
  1493. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1494. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1495. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1496. // This allows for 1024 file descriptors: if NR_OPEN is ever grown
  1497. // beyond that you'll have to change this too. But 1024 fd's seem to be
  1498. // enough even for such "real" unices like OSF/1, so hopefully this is
  1499. // one limit that doesn't have to be changed [again].
  1500. //
  1501. // Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in
  1502. // <sys/time.h> (and thus <linux/time.h>) - but this is a more logical
  1503. // place for them. Solved by having dummy defines in <sys/time.h>.
  1504. // This macro may have been defined in <gnu/types.h>. But we always
  1505. // use the one here.
  1506. type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */
  1507. // Type of a signal handler.
  1508. type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */
  1509. // Type of a SYSV IPC key.
  1510. type X__kernel_key_t = int32 /* posix_types.h:33:13 */
  1511. type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */
  1512. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1513. // S390 version
  1514. //
  1515. // This file is generally used by user-level software, so you need to
  1516. // be a little careful about namespace pollution etc. Also, we cannot
  1517. // assume GCC is being used.
  1518. type X__kernel_size_t = uint64 /* posix_types.h:16:25 */
  1519. type X__kernel_ssize_t = int64 /* posix_types.h:17:25 */
  1520. type X__kernel_old_dev_t = uint16 /* posix_types.h:20:24 */
  1521. type X__kernel_ino_t = uint32 /* posix_types.h:35:25 */
  1522. type X__kernel_mode_t = uint32 /* posix_types.h:36:25 */
  1523. type X__kernel_ipc_pid_t = int32 /* posix_types.h:37:25 */
  1524. type X__kernel_uid_t = uint32 /* posix_types.h:38:25 */
  1525. type X__kernel_gid_t = uint32 /* posix_types.h:39:25 */
  1526. type X__kernel_ptrdiff_t = int64 /* posix_types.h:40:25 */
  1527. type X__kernel_sigset_t = uint64 /* posix_types.h:41:25 */ // at least 32 bits
  1528. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1529. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1530. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1531. // There seems to be no way of detecting this automatically from user
  1532. // space, so 64 bit architectures should override this in their
  1533. // bitsperlong.h. In particular, an architecture that supports
  1534. // both 32 and 64 bit user space must not rely on CONFIG_64BIT
  1535. // to decide it, but rather check a compiler provided macro.
  1536. // This file is generally used by user-level software, so you need to
  1537. // be a little careful about namespace pollution etc.
  1538. //
  1539. // First the types that are often defined in different ways across
  1540. // architectures, so that you can override them.
  1541. type X__kernel_long_t = int64 /* posix_types.h:15:15 */
  1542. type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */
  1543. type X__kernel_pid_t = int32 /* posix_types.h:28:14 */
  1544. type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */
  1545. type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */
  1546. type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */
  1547. type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */
  1548. type X__kernel_old_uid_t = X__kernel_uid_t /* posix_types.h:54:24 */
  1549. type X__kernel_old_gid_t = X__kernel_gid_t /* posix_types.h:55:24 */
  1550. // Most 32 bit architectures use "unsigned int" size_t,
  1551. // and all 64 bit architectures use "unsigned long" size_t.
  1552. type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */
  1553. // anything below here should be completely generic
  1554. type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */
  1555. type X__kernel_loff_t = int64 /* posix_types.h:88:19 */
  1556. type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */
  1557. type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */
  1558. type X__kernel_time64_t = int64 /* posix_types.h:91:19 */
  1559. type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */
  1560. type X__kernel_timer_t = int32 /* posix_types.h:93:14 */
  1561. type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */
  1562. type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */
  1563. type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */
  1564. type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */
  1565. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1566. // Socket-level I/O control calls.
  1567. // For setsockopt(2)
  1568. // Security levels - as per NRL IPv6 - don't actually do anything
  1569. // Socket filtering
  1570. // Instruct lower device to use last 4-bytes of skb data as FCS
  1571. // on 64-bit and x32, avoid the ?: operator
  1572. // Structure used to manipulate the SO_LINGER option.
  1573. type Linger = struct {
  1574. Fl_onoff int32
  1575. Fl_linger int32
  1576. } /* socket.h:361:1 */
  1577. // This is the 4.3 BSD `struct sockaddr' format, which is used as wire
  1578. //
  1579. // format in the grotty old 4.3 `talk' protocol.
  1580. type Osockaddr = struct {
  1581. Fsa_family uint16
  1582. Fsa_data [14]uint8
  1583. } /* struct_osockaddr.h:6:1 */
  1584. // Define some macros helping to catch buffer overflows.
  1585. var _ uint8 /* gen.c:2:13: */