socket_linux_arm64.go 78 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923
  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_arm64.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 = 1234
  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 = uint32 /* <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. //
  573. // Copyright (C) 2016-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. // Bit size of the time_t type at glibc build time, general case.
  590. // Copyright (C) 2018-2020 Free Software Foundation, Inc.
  591. // This file is part of the GNU C Library.
  592. //
  593. // The GNU C Library is free software; you can redistribute it and/or
  594. // modify it under the terms of the GNU Lesser General Public
  595. // License as published by the Free Software Foundation; either
  596. // version 2.1 of the License, or (at your option) any later version.
  597. //
  598. // The GNU C Library is distributed in the hope that it will be useful,
  599. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  600. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  601. // Lesser General Public License for more details.
  602. //
  603. // You should have received a copy of the GNU Lesser General Public
  604. // License along with the GNU C Library; if not, see
  605. // <https://www.gnu.org/licenses/>.
  606. // Determine the wordsize from the preprocessor defines.
  607. //
  608. // Copyright (C) 2016-2020 Free Software Foundation, Inc.
  609. // This file is part of the GNU C Library.
  610. //
  611. // The GNU C Library is free software; you can redistribute it and/or
  612. // modify it under the terms of the GNU Lesser General Public
  613. // License as published by the Free Software Foundation; either
  614. // version 2.1 of the License, or (at your option) any later version.
  615. //
  616. // The GNU C Library is distributed in the hope that it will be useful,
  617. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  618. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  619. // Lesser General Public License for more details.
  620. //
  621. // You should have received a copy of the GNU Lesser General Public
  622. // License along with the GNU C Library; if not, see
  623. // <https://www.gnu.org/licenses/>.
  624. // Size in bits of the 'time_t' type of the default ABI.
  625. // Convenience types.
  626. type X__u_char = uint8 /* types.h:31:23 */
  627. type X__u_short = uint16 /* types.h:32:28 */
  628. type X__u_int = uint32 /* types.h:33:22 */
  629. type X__u_long = uint64 /* types.h:34:27 */
  630. // Fixed-size types, underlying types depend on word size and compiler.
  631. type X__int8_t = int8 /* types.h:37:21 */
  632. type X__uint8_t = uint8 /* types.h:38:23 */
  633. type X__int16_t = int16 /* types.h:39:26 */
  634. type X__uint16_t = uint16 /* types.h:40:28 */
  635. type X__int32_t = int32 /* types.h:41:20 */
  636. type X__uint32_t = uint32 /* types.h:42:22 */
  637. type X__int64_t = int64 /* types.h:44:25 */
  638. type X__uint64_t = uint64 /* types.h:45:27 */
  639. // Smallest types with at least a given width.
  640. type X__int_least8_t = X__int8_t /* types.h:52:18 */
  641. type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
  642. type X__int_least16_t = X__int16_t /* types.h:54:19 */
  643. type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
  644. type X__int_least32_t = X__int32_t /* types.h:56:19 */
  645. type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
  646. type X__int_least64_t = X__int64_t /* types.h:58:19 */
  647. type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
  648. // quad_t is also 64 bits.
  649. type X__quad_t = int64 /* types.h:63:18 */
  650. type X__u_quad_t = uint64 /* types.h:64:27 */
  651. // Largest integral types.
  652. type X__intmax_t = int64 /* types.h:72:18 */
  653. type X__uintmax_t = uint64 /* types.h:73:27 */
  654. // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
  655. // macros for each of the OS types we define below. The definitions
  656. // of those macros must use the following macros for underlying types.
  657. // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
  658. // variants of each of the following integer types on this machine.
  659. //
  660. // 16 -- "natural" 16-bit type (always short)
  661. // 32 -- "natural" 32-bit type (always int)
  662. // 64 -- "natural" 64-bit type (long or long long)
  663. // LONG32 -- 32-bit type, traditionally long
  664. // QUAD -- 64-bit type, traditionally long long
  665. // WORD -- natural type of __WORDSIZE bits (int or long)
  666. // LONGWORD -- type of __WORDSIZE bits, traditionally long
  667. //
  668. // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
  669. // conventional uses of `long' or `long long' type modifiers match the
  670. // types we define, even when a less-adorned type would be the same size.
  671. // This matters for (somewhat) portably writing printf/scanf formats for
  672. // these types, where using the appropriate l or ll format modifiers can
  673. // make the typedefs and the formats match up across all GNU platforms. If
  674. // we used `long' when it's 64 bits where `long long' is expected, then the
  675. // compiler would warn about the formats not matching the argument types,
  676. // and the programmer changing them to shut up the compiler would break the
  677. // program's portability.
  678. //
  679. // Here we assume what is presently the case in all the GCC configurations
  680. // we support: long long is always 64 bits, long is always word/address size,
  681. // and int is always 32 bits.
  682. // No need to mark the typedef with __extension__.
  683. // bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
  684. // Copyright (C) 2011-2020 Free Software Foundation, Inc.
  685. // This file is part of the GNU C Library.
  686. // Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
  687. //
  688. // The GNU C Library is free software; you can redistribute it and/or
  689. // modify it under the terms of the GNU Lesser General Public
  690. // License as published by the Free Software Foundation; either
  691. // version 2.1 of the License, or (at your option) any later version.
  692. //
  693. // The GNU C Library is distributed in the hope that it will be useful,
  694. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  695. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  696. // Lesser General Public License for more details.
  697. //
  698. // You should have received a copy of the GNU Lesser General Public
  699. // License along with the GNU C Library. If not, see
  700. // <https://www.gnu.org/licenses/>.
  701. // See <bits/types.h> for the meaning of these macros. This file exists so
  702. // that <bits/types.h> need not vary across different GNU platforms.
  703. // Tell the libc code that off_t and off64_t are actually the same type
  704. // for all ABI purposes, even if possibly expressed as different base types
  705. // for C type-checking purposes.
  706. // Same for ino_t and ino64_t.
  707. // And for __rlim_t and __rlim64_t.
  708. // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
  709. // Number of descriptors that can fit in an `fd_set'.
  710. // bits/time64.h -- underlying types for __time64_t. Generic version.
  711. // Copyright (C) 2018-2020 Free Software Foundation, Inc.
  712. // This file is part of the GNU C Library.
  713. //
  714. // The GNU C Library is free software; you can redistribute it and/or
  715. // modify it under the terms of the GNU Lesser General Public
  716. // License as published by the Free Software Foundation; either
  717. // version 2.1 of the License, or (at your option) any later version.
  718. //
  719. // The GNU C Library is distributed in the hope that it will be useful,
  720. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  721. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  722. // Lesser General Public License for more details.
  723. //
  724. // You should have received a copy of the GNU Lesser General Public
  725. // License along with the GNU C Library; if not, see
  726. // <https://www.gnu.org/licenses/>.
  727. // Define __TIME64_T_TYPE so that it is always a 64-bit type.
  728. // If we already have 64-bit time type then use it.
  729. type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
  730. type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
  731. type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
  732. type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
  733. type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
  734. type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
  735. type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
  736. type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
  737. type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
  738. type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
  739. type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
  740. type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
  741. type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
  742. type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
  743. type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
  744. type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
  745. type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
  746. type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
  747. type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
  748. type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
  749. // Clock ID used in clock and timer functions.
  750. type X__clockid_t = int32 /* types.h:168:29 */
  751. // Timer ID returned by `timer_create'.
  752. type X__timer_t = uintptr /* types.h:171:12 */
  753. // Type to represent block size.
  754. type X__blksize_t = int32 /* types.h:174:29 */
  755. // Types from the Large File Support interface.
  756. // Type to count number of disk blocks.
  757. type X__blkcnt_t = int64 /* types.h:179:28 */
  758. type X__blkcnt64_t = int64 /* types.h:180:30 */
  759. // Type to count file system blocks.
  760. type X__fsblkcnt_t = uint64 /* types.h:183:30 */
  761. type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
  762. // Type to count file system nodes.
  763. type X__fsfilcnt_t = uint64 /* types.h:187:30 */
  764. type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
  765. // Type of miscellaneous file system fields.
  766. type X__fsword_t = int64 /* types.h:191:28 */
  767. type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
  768. // Signed long type used in system calls.
  769. type X__syscall_slong_t = int64 /* types.h:196:33 */
  770. // Unsigned long type used in system calls.
  771. type X__syscall_ulong_t = uint64 /* types.h:198:33 */
  772. // These few don't really vary by system, they always correspond
  773. //
  774. // to one of the other defined types.
  775. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
  776. type X__caddr_t = uintptr /* types.h:203:14 */
  777. // Duplicates info from stdint.h but this is used in unistd.h.
  778. type X__intptr_t = int64 /* types.h:206:25 */
  779. // Duplicate info from sys/socket.h.
  780. type X__socklen_t = uint32 /* types.h:209:23 */
  781. // C99: An integer type that can be accessed as an atomic entity,
  782. //
  783. // even in the presence of asynchronous interrupts.
  784. // It is not currently necessary for this to be machine-specific.
  785. type X__sig_atomic_t = int32 /* types.h:214:13 */
  786. // Seconds since the Epoch, visible to user code when time_t is too
  787. // narrow only for consistency with the old way of widening too-narrow
  788. // types. User code should never use __time64_t.
  789. type U_char = X__u_char /* types.h:33:18 */
  790. type U_short = X__u_short /* types.h:34:19 */
  791. type U_int = X__u_int /* types.h:35:17 */
  792. type U_long = X__u_long /* types.h:36:18 */
  793. type Quad_t = X__quad_t /* types.h:37:18 */
  794. type U_quad_t = X__u_quad_t /* types.h:38:20 */
  795. type Fsid_t = X__fsid_t /* types.h:39:18 */
  796. type Loff_t = X__loff_t /* types.h:42:18 */
  797. type Ino_t = X__ino64_t /* types.h:49:19 */
  798. type Dev_t = X__dev_t /* types.h:59:17 */
  799. type Gid_t = X__gid_t /* types.h:64:17 */
  800. type Mode_t = X__mode_t /* types.h:69:18 */
  801. type Nlink_t = X__nlink_t /* types.h:74:19 */
  802. type Uid_t = X__uid_t /* types.h:79:17 */
  803. type Off_t = X__off64_t /* types.h:87:19 */
  804. type Pid_t = X__pid_t /* types.h:97:17 */
  805. type Id_t = X__id_t /* types.h:103:16 */
  806. type Ssize_t = X__ssize_t /* types.h:108:19 */
  807. type Daddr_t = X__daddr_t /* types.h:114:19 */
  808. type Caddr_t = X__caddr_t /* types.h:115:19 */
  809. type Key_t = X__key_t /* types.h:121:17 */
  810. // bits/types.h -- definitions of __*_t types underlying *_t types.
  811. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  812. // This file is part of the GNU C Library.
  813. //
  814. // The GNU C Library is free software; you can redistribute it and/or
  815. // modify it under the terms of the GNU Lesser General Public
  816. // License as published by the Free Software Foundation; either
  817. // version 2.1 of the License, or (at your option) any later version.
  818. //
  819. // The GNU C Library is distributed in the hope that it will be useful,
  820. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  821. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  822. // Lesser General Public License for more details.
  823. //
  824. // You should have received a copy of the GNU Lesser General Public
  825. // License along with the GNU C Library; if not, see
  826. // <https://www.gnu.org/licenses/>.
  827. // Never include this file directly; use <sys/types.h> instead.
  828. // Returned by `clock'.
  829. type Clock_t = X__clock_t /* clock_t.h:7:19 */
  830. // bits/types.h -- definitions of __*_t types underlying *_t types.
  831. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  832. // This file is part of the GNU C Library.
  833. //
  834. // The GNU C Library is free software; you can redistribute it and/or
  835. // modify it under the terms of the GNU Lesser General Public
  836. // License as published by the Free Software Foundation; either
  837. // version 2.1 of the License, or (at your option) any later version.
  838. //
  839. // The GNU C Library is distributed in the hope that it will be useful,
  840. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  841. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  842. // Lesser General Public License for more details.
  843. //
  844. // You should have received a copy of the GNU Lesser General Public
  845. // License along with the GNU C Library; if not, see
  846. // <https://www.gnu.org/licenses/>.
  847. // Never include this file directly; use <sys/types.h> instead.
  848. // Clock ID used in clock and timer functions.
  849. type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
  850. // bits/types.h -- definitions of __*_t types underlying *_t types.
  851. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  852. // This file is part of the GNU C Library.
  853. //
  854. // The GNU C Library is free software; you can redistribute it and/or
  855. // modify it under the terms of the GNU Lesser General Public
  856. // License as published by the Free Software Foundation; either
  857. // version 2.1 of the License, or (at your option) any later version.
  858. //
  859. // The GNU C Library is distributed in the hope that it will be useful,
  860. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  861. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  862. // Lesser General Public License for more details.
  863. //
  864. // You should have received a copy of the GNU Lesser General Public
  865. // License along with the GNU C Library; if not, see
  866. // <https://www.gnu.org/licenses/>.
  867. // Never include this file directly; use <sys/types.h> instead.
  868. // Returned by `time'.
  869. type Time_t = X__time_t /* time_t.h:7:18 */
  870. // bits/types.h -- definitions of __*_t types underlying *_t types.
  871. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  872. // This file is part of the GNU C Library.
  873. //
  874. // The GNU C Library is free software; you can redistribute it and/or
  875. // modify it under the terms of the GNU Lesser General Public
  876. // License as published by the Free Software Foundation; either
  877. // version 2.1 of the License, or (at your option) any later version.
  878. //
  879. // The GNU C Library is distributed in the hope that it will be useful,
  880. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  881. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  882. // Lesser General Public License for more details.
  883. //
  884. // You should have received a copy of the GNU Lesser General Public
  885. // License along with the GNU C Library; if not, see
  886. // <https://www.gnu.org/licenses/>.
  887. // Never include this file directly; use <sys/types.h> instead.
  888. // Timer ID returned by `timer_create'.
  889. type Timer_t = X__timer_t /* timer_t.h:7:19 */
  890. // Copyright (C) 1989-2020 Free Software Foundation, Inc.
  891. //
  892. // This file is part of GCC.
  893. //
  894. // GCC is free software; you can redistribute it and/or modify
  895. // it under the terms of the GNU General Public License as published by
  896. // the Free Software Foundation; either version 3, or (at your option)
  897. // any later version.
  898. //
  899. // GCC is distributed in the hope that it will be useful,
  900. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  901. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  902. // GNU General Public License for more details.
  903. //
  904. // Under Section 7 of GPL version 3, you are granted additional
  905. // permissions described in the GCC Runtime Library Exception, version
  906. // 3.1, as published by the Free Software Foundation.
  907. //
  908. // You should have received a copy of the GNU General Public License and
  909. // a copy of the GCC Runtime Library Exception along with this program;
  910. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  911. // <http://www.gnu.org/licenses/>.
  912. // ISO C Standard: 7.17 Common definitions <stddef.h>
  913. // Any one of these symbols __need_* means that GNU libc
  914. // wants us just to define one data type. So don't define
  915. // the symbols that indicate this file's entire job has been done.
  916. // This avoids lossage on SunOS but only if stdtypes.h comes first.
  917. // There's no way to win with the other order! Sun lossage.
  918. // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  919. // Just ignore it.
  920. // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  921. // _TYPE_size_t which will typedef size_t. fixincludes patched the
  922. // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  923. // not defined, and so that defining this macro defines _GCC_SIZE_T.
  924. // If we find that the macros are still defined at this point, we must
  925. // invoke them so that the type is defined as expected.
  926. // In case nobody has defined these types, but we aren't running under
  927. // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  928. // __WCHAR_TYPE__ have reasonable values. This can happen if the
  929. // parts of GCC is compiled by an older compiler, that actually
  930. // include gstddef.h, such as collect2.
  931. // Signed type of difference of two pointers.
  932. // Define this type if we are doing the whole job,
  933. // or if we want this type in particular.
  934. // Unsigned type of `sizeof' something.
  935. // Define this type if we are doing the whole job,
  936. // or if we want this type in particular.
  937. // Wide character type.
  938. // Locale-writers should change this as necessary to
  939. // be big enough to hold unique values not between 0 and 127,
  940. // and not (wchar_t) -1, for each defined multibyte character.
  941. // Define this type if we are doing the whole job,
  942. // or if we want this type in particular.
  943. // A null pointer constant.
  944. // Old compatibility names for C types.
  945. type Ulong = uint64 /* types.h:148:27 */
  946. type Ushort = uint16 /* types.h:149:28 */
  947. type Uint = uint32 /* types.h:150:22 */
  948. // These size-specific names are used by some of the inet code.
  949. // Define intN_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. type Int8_t = X__int8_t /* stdint-intn.h:24:18 */
  985. type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
  986. type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
  987. type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
  988. // These were defined by ISO C without the first `_'.
  989. type U_int8_t = X__uint8_t /* types.h:158:19 */
  990. type U_int16_t = X__uint16_t /* types.h:159:20 */
  991. type U_int32_t = X__uint32_t /* types.h:160:20 */
  992. type U_int64_t = X__uint64_t /* types.h:161:20 */
  993. type Register_t = int32 /* types.h:164:13 */
  994. // It also defines `fd_set' and the FD_* macros for `select'.
  995. // `fd_set' type and related macros, and `select'/`pselect' declarations.
  996. // Copyright (C) 1996-2020 Free Software Foundation, Inc.
  997. // This file is part of the GNU C Library.
  998. //
  999. // The GNU C Library is free software; you can redistribute it and/or
  1000. // modify it under the terms of the GNU Lesser General Public
  1001. // License as published by the Free Software Foundation; either
  1002. // version 2.1 of the License, or (at your option) any later version.
  1003. //
  1004. // The GNU C Library is distributed in the hope that it will be useful,
  1005. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1006. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1007. // Lesser General Public License for more details.
  1008. //
  1009. // You should have received a copy of the GNU Lesser General Public
  1010. // License along with the GNU C Library; if not, see
  1011. // <https://www.gnu.org/licenses/>.
  1012. // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
  1013. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  1014. // This file is part of the GNU C Library.
  1015. //
  1016. // The GNU C Library is free software; you can redistribute it and/or
  1017. // modify it under the terms of the GNU Lesser General Public
  1018. // License as published by the Free Software Foundation; either
  1019. // version 2.1 of the License, or (at your option) any later version.
  1020. //
  1021. // The GNU C Library is distributed in the hope that it will be useful,
  1022. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1023. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1024. // Lesser General Public License for more details.
  1025. //
  1026. // You should have received a copy of the GNU Lesser General Public
  1027. // License along with the GNU C Library; if not, see
  1028. // <https://www.gnu.org/licenses/>.
  1029. // Get definition of needed basic types.
  1030. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1031. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1032. // This file is part of the GNU C Library.
  1033. //
  1034. // The GNU C Library is free software; you can redistribute it and/or
  1035. // modify it under the terms of the GNU Lesser General Public
  1036. // License as published by the Free Software Foundation; either
  1037. // version 2.1 of the License, or (at your option) any later version.
  1038. //
  1039. // The GNU C Library is distributed in the hope that it will be useful,
  1040. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1041. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1042. // Lesser General Public License for more details.
  1043. //
  1044. // You should have received a copy of the GNU Lesser General Public
  1045. // License along with the GNU C Library; if not, see
  1046. // <https://www.gnu.org/licenses/>.
  1047. // Never include this file directly; use <sys/types.h> instead.
  1048. // Get __FD_* definitions.
  1049. // Copyright (C) 1997-2020 Free Software Foundation, Inc.
  1050. // This file is part of the GNU C Library.
  1051. //
  1052. // The GNU C Library is free software; you can redistribute it and/or
  1053. // modify it under the terms of the GNU Lesser General Public
  1054. // License as published by the Free Software Foundation; either
  1055. // version 2.1 of the License, or (at your option) any later version.
  1056. //
  1057. // The GNU C Library is distributed in the hope that it will be useful,
  1058. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1059. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1060. // Lesser General Public License for more details.
  1061. //
  1062. // You should have received a copy of the GNU Lesser General Public
  1063. // License along with the GNU C Library; if not, see
  1064. // <https://www.gnu.org/licenses/>.
  1065. // We don't use `memset' because this would require a prototype and
  1066. // the array isn't too big.
  1067. // Get sigset_t.
  1068. type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */
  1069. // A set of signals to be blocked, unblocked, or waited for.
  1070. type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
  1071. // Get definition of timer specification structures.
  1072. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1073. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1074. // This file is part of the GNU C Library.
  1075. //
  1076. // The GNU C Library is free software; you can redistribute it and/or
  1077. // modify it under the terms of the GNU Lesser General Public
  1078. // License as published by the Free Software Foundation; either
  1079. // version 2.1 of the License, or (at your option) any later version.
  1080. //
  1081. // The GNU C Library is distributed in the hope that it will be useful,
  1082. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1083. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1084. // Lesser General Public License for more details.
  1085. //
  1086. // You should have received a copy of the GNU Lesser General Public
  1087. // License along with the GNU C Library; if not, see
  1088. // <https://www.gnu.org/licenses/>.
  1089. // Never include this file directly; use <sys/types.h> instead.
  1090. // A time value that is accurate to the nearest
  1091. //
  1092. // microsecond but also has a range of years.
  1093. type Timeval = struct {
  1094. Ftv_sec X__time_t
  1095. Ftv_usec X__suseconds_t
  1096. } /* struct_timeval.h:8:1 */
  1097. // NB: Include guard matches what <linux/time.h> uses.
  1098. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1099. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1100. // This file is part of the GNU C Library.
  1101. //
  1102. // The GNU C Library is free software; you can redistribute it and/or
  1103. // modify it under the terms of the GNU Lesser General Public
  1104. // License as published by the Free Software Foundation; either
  1105. // version 2.1 of the License, or (at your option) any later version.
  1106. //
  1107. // The GNU C Library is distributed in the hope that it will be useful,
  1108. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1109. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1110. // Lesser General Public License for more details.
  1111. //
  1112. // You should have received a copy of the GNU Lesser General Public
  1113. // License along with the GNU C Library; if not, see
  1114. // <https://www.gnu.org/licenses/>.
  1115. // Never include this file directly; use <sys/types.h> instead.
  1116. // Endian macros for string.h functions
  1117. // Copyright (C) 1992-2020 Free Software Foundation, Inc.
  1118. // This file is part of the GNU C Library.
  1119. //
  1120. // The GNU C Library is free software; you can redistribute it and/or
  1121. // modify it under the terms of the GNU Lesser General Public
  1122. // License as published by the Free Software Foundation; either
  1123. // version 2.1 of the License, or (at your option) any later version.
  1124. //
  1125. // The GNU C Library is distributed in the hope that it will be useful,
  1126. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1127. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1128. // Lesser General Public License for more details.
  1129. //
  1130. // You should have received a copy of the GNU Lesser General Public
  1131. // License along with the GNU C Library; if not, see
  1132. // <http://www.gnu.org/licenses/>.
  1133. // POSIX.1b structure for a time value. This is like a `struct timeval' but
  1134. //
  1135. // has nanoseconds instead of microseconds.
  1136. type Timespec = struct {
  1137. Ftv_sec X__time_t
  1138. Ftv_nsec X__syscall_slong_t
  1139. } /* struct_timespec.h:10:1 */
  1140. type Suseconds_t = X__suseconds_t /* select.h:43:23 */
  1141. // The fd_set member is required to be an array of longs.
  1142. type X__fd_mask = int64 /* select.h:49:18 */
  1143. // Some versions of <linux/posix_types.h> define this macros.
  1144. // It's easier to assume 8-bit bytes than to get CHAR_BIT.
  1145. // fd_set for select and pselect.
  1146. type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */
  1147. // Maximum number of file descriptors in `fd_set'.
  1148. // Sometimes the fd_set member is assumed to have this type.
  1149. type Fd_mask = X__fd_mask /* select.h:77:19 */
  1150. // Define some inlines helping to catch common problems.
  1151. type Blksize_t = X__blksize_t /* types.h:185:21 */
  1152. // Types from the Large File Support interface.
  1153. type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks.
  1154. type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
  1155. type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
  1156. // Now add the thread types.
  1157. // Declaration of common pthread types for all architectures.
  1158. // Copyright (C) 2017-2020 Free Software Foundation, Inc.
  1159. // This file is part of the GNU C Library.
  1160. //
  1161. // The GNU C Library is free software; you can redistribute it and/or
  1162. // modify it under the terms of the GNU Lesser General Public
  1163. // License as published by the Free Software Foundation; either
  1164. // version 2.1 of the License, or (at your option) any later version.
  1165. //
  1166. // The GNU C Library is distributed in the hope that it will be useful,
  1167. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1168. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1169. // Lesser General Public License for more details.
  1170. //
  1171. // You should have received a copy of the GNU Lesser General Public
  1172. // License along with the GNU C Library; if not, see
  1173. // <https://www.gnu.org/licenses/>.
  1174. // For internal mutex and condition variable definitions.
  1175. // Common threading primitives definitions for both POSIX and C11.
  1176. // Copyright (C) 2017-2020 Free Software Foundation, Inc.
  1177. // This file is part of the GNU C Library.
  1178. //
  1179. // The GNU C Library is free software; you can redistribute it and/or
  1180. // modify it under the terms of the GNU Lesser General Public
  1181. // License as published by the Free Software Foundation; either
  1182. // version 2.1 of the License, or (at your option) any later version.
  1183. //
  1184. // The GNU C Library is distributed in the hope that it will be useful,
  1185. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1186. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1187. // Lesser General Public License for more details.
  1188. //
  1189. // You should have received a copy of the GNU Lesser General Public
  1190. // License along with the GNU C Library; if not, see
  1191. // <https://www.gnu.org/licenses/>.
  1192. // Arch-specific definitions. Each architecture must define the following
  1193. // macros to define the expected sizes of pthread data types:
  1194. //
  1195. // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
  1196. // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
  1197. // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
  1198. // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
  1199. // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
  1200. // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
  1201. // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
  1202. // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
  1203. // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  1204. //
  1205. // The additional macro defines any constraint for the lock alignment
  1206. // inside the thread structures:
  1207. //
  1208. // __LOCK_ALIGNMENT - for internal lock/futex usage.
  1209. //
  1210. // Same idea but for the once locking primitive:
  1211. //
  1212. // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  1213. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1214. //
  1215. // This file is part of the GNU C Library.
  1216. //
  1217. // The GNU C Library is free software; you can redistribute it and/or
  1218. // modify it under the terms of the GNU Lesser General Public
  1219. // License as published by the Free Software Foundation; either
  1220. // version 2.1 of the License, or (at your option) any later version.
  1221. //
  1222. // The GNU C Library is distributed in the hope that it will be useful,
  1223. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1224. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1225. // Lesser General Public License for more details.
  1226. //
  1227. // You should have received a copy of the GNU Lesser General Public
  1228. // License along with the GNU C Library; if not, see
  1229. // <https://www.gnu.org/licenses/>.
  1230. // Endian macros for string.h functions
  1231. // Copyright (C) 1992-2020 Free Software Foundation, Inc.
  1232. // This file is part of the GNU C Library.
  1233. //
  1234. // The GNU C Library is free software; you can redistribute it and/or
  1235. // modify it under the terms of the GNU Lesser General Public
  1236. // License as published by the Free Software Foundation; either
  1237. // version 2.1 of the License, or (at your option) any later version.
  1238. //
  1239. // The GNU C Library is distributed in the hope that it will be useful,
  1240. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1241. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1242. // Lesser General Public License for more details.
  1243. //
  1244. // You should have received a copy of the GNU Lesser General Public
  1245. // License along with the GNU C Library; if not, see
  1246. // <http://www.gnu.org/licenses/>.
  1247. // Common definition of pthread_mutex_t.
  1248. type X__pthread_internal_list = struct {
  1249. F__prev uintptr
  1250. F__next uintptr
  1251. } /* thread-shared-types.h:49:9 */
  1252. // Type to count file system inodes.
  1253. // Now add the thread types.
  1254. // Declaration of common pthread types for all architectures.
  1255. // Copyright (C) 2017-2020 Free Software Foundation, Inc.
  1256. // This file is part of the GNU C Library.
  1257. //
  1258. // The GNU C Library is free software; you can redistribute it and/or
  1259. // modify it under the terms of the GNU Lesser General Public
  1260. // License as published by the Free Software Foundation; either
  1261. // version 2.1 of the License, or (at your option) any later version.
  1262. //
  1263. // The GNU C Library is distributed in the hope that it will be useful,
  1264. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1265. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1266. // Lesser General Public License for more details.
  1267. //
  1268. // You should have received a copy of the GNU Lesser General Public
  1269. // License along with the GNU C Library; if not, see
  1270. // <https://www.gnu.org/licenses/>.
  1271. // For internal mutex and condition variable definitions.
  1272. // Common threading primitives definitions for both POSIX and C11.
  1273. // Copyright (C) 2017-2020 Free Software Foundation, Inc.
  1274. // This file is part of the GNU C Library.
  1275. //
  1276. // The GNU C Library is free software; you can redistribute it and/or
  1277. // modify it under the terms of the GNU Lesser General Public
  1278. // License as published by the Free Software Foundation; either
  1279. // version 2.1 of the License, or (at your option) any later version.
  1280. //
  1281. // The GNU C Library is distributed in the hope that it will be useful,
  1282. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1283. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1284. // Lesser General Public License for more details.
  1285. //
  1286. // You should have received a copy of the GNU Lesser General Public
  1287. // License along with the GNU C Library; if not, see
  1288. // <https://www.gnu.org/licenses/>.
  1289. // Arch-specific definitions. Each architecture must define the following
  1290. // macros to define the expected sizes of pthread data types:
  1291. //
  1292. // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
  1293. // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
  1294. // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
  1295. // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
  1296. // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
  1297. // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
  1298. // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
  1299. // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
  1300. // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  1301. //
  1302. // The additional macro defines any constraint for the lock alignment
  1303. // inside the thread structures:
  1304. //
  1305. // __LOCK_ALIGNMENT - for internal lock/futex usage.
  1306. //
  1307. // Same idea but for the once locking primitive:
  1308. //
  1309. // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  1310. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1311. //
  1312. // This file is part of the GNU C Library.
  1313. //
  1314. // The GNU C Library is free software; you can redistribute it and/or
  1315. // modify it under the terms of the GNU Lesser General Public
  1316. // License as published by the Free Software Foundation; either
  1317. // version 2.1 of the License, or (at your option) any later version.
  1318. //
  1319. // The GNU C Library is distributed in the hope that it will be useful,
  1320. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1321. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1322. // Lesser General Public License for more details.
  1323. //
  1324. // You should have received a copy of the GNU Lesser General Public
  1325. // License along with the GNU C Library; if not, see
  1326. // <https://www.gnu.org/licenses/>.
  1327. // Endian macros for string.h functions
  1328. // Copyright (C) 1992-2020 Free Software Foundation, Inc.
  1329. // This file is part of the GNU C Library.
  1330. //
  1331. // The GNU C Library is free software; you can redistribute it and/or
  1332. // modify it under the terms of the GNU Lesser General Public
  1333. // License as published by the Free Software Foundation; either
  1334. // version 2.1 of the License, or (at your option) any later version.
  1335. //
  1336. // The GNU C Library is distributed in the hope that it will be useful,
  1337. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1338. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1339. // Lesser General Public License for more details.
  1340. //
  1341. // You should have received a copy of the GNU Lesser General Public
  1342. // License along with the GNU C Library; if not, see
  1343. // <http://www.gnu.org/licenses/>.
  1344. // Common definition of pthread_mutex_t.
  1345. type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
  1346. type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
  1347. type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
  1348. // Arch-specific mutex definitions. A generic implementation is provided
  1349. // by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
  1350. // can override it by defining:
  1351. //
  1352. // 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
  1353. // definition). It should contains at least the internal members
  1354. // defined in the generic version.
  1355. //
  1356. // 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
  1357. // atomic operations.
  1358. //
  1359. // 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
  1360. // It should initialize the mutex internal flag.
  1361. // Default mutex implementation struct definitions.
  1362. // Copyright (C) 2019-2020 Free Software Foundation, Inc.
  1363. // This file is part of the GNU C Library.
  1364. //
  1365. // The GNU C Library is free software; you can redistribute it and/or
  1366. // modify it under the terms of the GNU Lesser General Public
  1367. // License as published by the Free Software Foundation; either
  1368. // version 2.1 of the License, or (at your option) any later version.
  1369. //
  1370. // The GNU C Library is distributed in the hope that it will be useful,
  1371. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1372. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1373. // Lesser General Public License for more details.
  1374. //
  1375. // You should have received a copy of the GNU Lesser General Public
  1376. // License along with the GNU C Library; if not, see
  1377. // <http://www.gnu.org/licenses/>.
  1378. // Generic struct for both POSIX and C11 mutexes. New ports are expected
  1379. // to use the default layout, however architecture can redefine it to
  1380. // add arch-specific extension (such as lock-elision). The struct have
  1381. // a size of 32 bytes on LP32 and 40 bytes on LP64 architectures.
  1382. type X__pthread_mutex_s = struct {
  1383. F__lock int32
  1384. F__count uint32
  1385. F__owner int32
  1386. F__nusers uint32
  1387. F__kind int32
  1388. F__spins int32
  1389. F__list X__pthread_list_t
  1390. } /* struct_mutex.h:27:1 */
  1391. // Arch-sepecific read-write lock definitions. A generic implementation is
  1392. // provided by struct_rwlock.h. If required, an architecture can override it
  1393. // by defining:
  1394. //
  1395. // 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
  1396. // It should contain at least the internal members defined in the
  1397. // generic version.
  1398. //
  1399. // 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
  1400. // It should initialize the rwlock internal type.
  1401. // AArch64 internal rwlock struct definitions.
  1402. // Copyright (C) 2019-2020 Free Software Foundation, Inc.
  1403. //
  1404. // This file is part of the GNU C Library.
  1405. //
  1406. // The GNU C Library is free software; you can redistribute it and/or
  1407. // modify it under the terms of the GNU Lesser General Public
  1408. // License as published by the Free Software Foundation; either
  1409. // version 2.1 of the License, or (at your option) any later version.
  1410. //
  1411. // The GNU C Library is distributed in the hope that it will be useful,
  1412. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1413. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1414. // Lesser General Public License for more details.
  1415. //
  1416. // You should have received a copy of the GNU Lesser General Public
  1417. // License along with the GNU C Library; if not, see
  1418. // <http://www.gnu.org/licenses/>.
  1419. type X__pthread_rwlock_arch_t = struct {
  1420. F__readers uint32
  1421. F__writers uint32
  1422. F__wrphase_futex uint32
  1423. F__writers_futex uint32
  1424. F__pad3 uint32
  1425. F__pad4 uint32
  1426. F__cur_writer int32
  1427. F__shared int32
  1428. F__pad1 uint64
  1429. F__pad2 uint64
  1430. F__flags uint32
  1431. F__ccgo_pad1 [4]byte
  1432. } /* struct_rwlock.h:23:1 */
  1433. // Common definition of pthread_cond_t.
  1434. type X__pthread_cond_s = struct {
  1435. F__0 struct{ F__wseq uint64 }
  1436. F__8 struct{ F__g1_start uint64 }
  1437. F__g_refs [2]uint32
  1438. F__g_size [2]uint32
  1439. F__g1_orig_size uint32
  1440. F__wrefs uint32
  1441. F__g_signals [2]uint32
  1442. } /* thread-shared-types.h:92:1 */
  1443. // Thread identifiers. The structure of the attribute type is not
  1444. //
  1445. // exposed on purpose.
  1446. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */
  1447. // Data structures for mutex handling. The structure of the attribute
  1448. //
  1449. // type is not exposed on purpose.
  1450. type Pthread_mutexattr_t = struct {
  1451. F__ccgo_pad1 [0]uint32
  1452. F__size [8]uint8
  1453. } /* pthreadtypes.h:36:3 */
  1454. // Data structure for condition variable handling. The structure of
  1455. //
  1456. // the attribute type is not exposed on purpose.
  1457. type Pthread_condattr_t = struct {
  1458. F__ccgo_pad1 [0]uint32
  1459. F__size [8]uint8
  1460. } /* pthreadtypes.h:45:3 */
  1461. // Keys for thread-specific data
  1462. type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
  1463. // Once-only execution
  1464. type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
  1465. type Pthread_attr_t1 = struct {
  1466. F__ccgo_pad1 [0]uint64
  1467. F__size [64]uint8
  1468. } /* pthreadtypes.h:56:1 */
  1469. type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */
  1470. type Pthread_mutex_t = struct {
  1471. F__data X__pthread_mutex_s
  1472. F__ccgo_pad1 [8]byte
  1473. } /* pthreadtypes.h:72:3 */
  1474. type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */
  1475. // Data structure for reader-writer lock variable handling. The
  1476. //
  1477. // structure of the attribute type is deliberately not exposed.
  1478. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
  1479. type Pthread_rwlockattr_t = struct {
  1480. F__ccgo_pad1 [0]uint64
  1481. F__size [8]uint8
  1482. } /* pthreadtypes.h:97:3 */
  1483. // POSIX spinlock data type.
  1484. type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
  1485. // POSIX barriers data type. The structure of the type is
  1486. //
  1487. // deliberately not exposed.
  1488. type Pthread_barrier_t = struct {
  1489. F__ccgo_pad1 [0]uint64
  1490. F__size [32]uint8
  1491. } /* pthreadtypes.h:112:3 */
  1492. type Pthread_barrierattr_t = struct {
  1493. F__ccgo_pad1 [0]uint32
  1494. F__size [8]uint8
  1495. } /* pthreadtypes.h:118:3 */
  1496. // Type for length arguments in socket calls.
  1497. type Socklen_t = X__socklen_t /* socket.h:33:21 */
  1498. // Protocol families.
  1499. // Address families.
  1500. // Socket level values. Others are defined in the appropriate headers.
  1501. //
  1502. // XXX These definitions also should go into the appropriate headers as
  1503. // far as they are available.
  1504. // Maximum queue length specifiable by listen.
  1505. // Get the definition of the macro to define the common sockaddr members.
  1506. // Definition of struct sockaddr_* common members and sizes, generic version.
  1507. // Copyright (C) 1995-2020 Free Software Foundation, Inc.
  1508. // This file is part of the GNU C Library.
  1509. //
  1510. // The GNU C Library is free software; you can redistribute it and/or
  1511. // modify it under the terms of the GNU Lesser General Public
  1512. // License as published by the Free Software Foundation; either
  1513. // version 2.1 of the License, or (at your option) any later version.
  1514. //
  1515. // The GNU C Library is distributed in the hope that it will be useful,
  1516. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1517. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1518. // Lesser General Public License for more details.
  1519. //
  1520. // You should have received a copy of the GNU Lesser General Public
  1521. // License along with the GNU C Library; if not, see
  1522. // <https://www.gnu.org/licenses/>.
  1523. // Never include this file directly; use <sys/socket.h> instead.
  1524. // POSIX.1g specifies this type name for the `sa_family' member.
  1525. type Sa_family_t = uint16 /* sockaddr.h:28:28 */
  1526. // This macro is used to declare the initial common members
  1527. // of the data types used for socket addresses, `struct sockaddr',
  1528. // `struct sockaddr_in', `struct sockaddr_un', etc.
  1529. // Size of struct sockaddr_storage.
  1530. // Structure describing a generic socket address.
  1531. type Sockaddr = struct {
  1532. Fsa_family Sa_family_t
  1533. Fsa_data [14]uint8
  1534. } /* socket.h:178:1 */
  1535. // Structure large enough to hold any socket address (with the historical
  1536. // exception of AF_UNIX).
  1537. type Sockaddr_storage = struct {
  1538. Fss_family Sa_family_t
  1539. F__ss_padding [118]uint8
  1540. F__ss_align uint64
  1541. } /* socket.h:191:1 */
  1542. // Structure describing messages sent by
  1543. //
  1544. // `sendmsg' and received by `recvmsg'.
  1545. type Msghdr = struct {
  1546. Fmsg_name uintptr
  1547. Fmsg_namelen Socklen_t
  1548. F__ccgo_pad1 [4]byte
  1549. Fmsg_iov uintptr
  1550. Fmsg_iovlen Size_t
  1551. Fmsg_control uintptr
  1552. Fmsg_controllen Size_t
  1553. Fmsg_flags int32
  1554. F__ccgo_pad2 [4]byte
  1555. } /* socket.h:257:1 */
  1556. // Structure used for storage of ancillary data object information.
  1557. type Cmsghdr = struct {
  1558. F__ccgo_pad1 [0]uint64
  1559. Fcmsg_len Size_t
  1560. Fcmsg_level int32
  1561. Fcmsg_type int32
  1562. } /* socket.h:275:1 */
  1563. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1564. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1565. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1566. // This allows for 1024 file descriptors: if NR_OPEN is ever grown
  1567. // beyond that you'll have to change this too. But 1024 fd's seem to be
  1568. // enough even for such "real" unices like OSF/1, so hopefully this is
  1569. // one limit that doesn't have to be changed [again].
  1570. //
  1571. // Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in
  1572. // <sys/time.h> (and thus <linux/time.h>) - but this is a more logical
  1573. // place for them. Solved by having dummy defines in <sys/time.h>.
  1574. // This macro may have been defined in <gnu/types.h>. But we always
  1575. // use the one here.
  1576. type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */
  1577. // Type of a signal handler.
  1578. type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */
  1579. // Type of a SYSV IPC key.
  1580. type X__kernel_key_t = int32 /* posix_types.h:33:13 */
  1581. type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */
  1582. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1583. type X__kernel_old_uid_t = uint16 /* posix_types.h:5:24 */
  1584. type X__kernel_old_gid_t = uint16 /* posix_types.h:6:24 */
  1585. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1586. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1587. // Copyright (C) 2012 ARM Ltd.
  1588. //
  1589. // This program is free software; you can redistribute it and/or modify
  1590. // it under the terms of the GNU General Public License version 2 as
  1591. // published by the Free Software Foundation.
  1592. //
  1593. // This program is distributed in the hope that it will be useful,
  1594. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1595. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1596. // GNU General Public License for more details.
  1597. //
  1598. // You should have received a copy of the GNU General Public License
  1599. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  1600. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1601. // There seems to be no way of detecting this automatically from user
  1602. // space, so 64 bit architectures should override this in their
  1603. // bitsperlong.h. In particular, an architecture that supports
  1604. // both 32 and 64 bit user space must not rely on CONFIG_64BIT
  1605. // to decide it, but rather check a compiler provided macro.
  1606. // This file is generally used by user-level software, so you need to
  1607. // be a little careful about namespace pollution etc.
  1608. //
  1609. // First the types that are often defined in different ways across
  1610. // architectures, so that you can override them.
  1611. type X__kernel_long_t = int64 /* posix_types.h:15:15 */
  1612. type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */
  1613. type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */
  1614. type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */
  1615. type X__kernel_pid_t = int32 /* posix_types.h:28:14 */
  1616. type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */
  1617. type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */
  1618. type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */
  1619. type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */
  1620. type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */
  1621. type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */
  1622. type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */
  1623. type X__kernel_old_dev_t = uint32 /* posix_types.h:59:22 */
  1624. // Most 32 bit architectures use "unsigned int" size_t,
  1625. // and all 64 bit architectures use "unsigned long" size_t.
  1626. type X__kernel_size_t = X__kernel_ulong_t /* posix_types.h:72:26 */
  1627. type X__kernel_ssize_t = X__kernel_long_t /* posix_types.h:73:25 */
  1628. type X__kernel_ptrdiff_t = X__kernel_long_t /* posix_types.h:74:25 */
  1629. type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */
  1630. // anything below here should be completely generic
  1631. type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */
  1632. type X__kernel_loff_t = int64 /* posix_types.h:88:19 */
  1633. type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */
  1634. type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */
  1635. type X__kernel_time64_t = int64 /* posix_types.h:91:19 */
  1636. type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */
  1637. type X__kernel_timer_t = int32 /* posix_types.h:93:14 */
  1638. type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */
  1639. type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */
  1640. type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */
  1641. type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */
  1642. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1643. // Socket-level I/O control calls.
  1644. // For setsockopt(2)
  1645. // Security levels - as per NRL IPv6 - don't actually do anything
  1646. // Socket filtering
  1647. // Instruct lower device to use last 4-bytes of skb data as FCS
  1648. // on 64-bit and x32, avoid the ?: operator
  1649. // Structure used to manipulate the SO_LINGER option.
  1650. type Linger = struct {
  1651. Fl_onoff int32
  1652. Fl_linger int32
  1653. } /* socket.h:361:1 */
  1654. // This is the 4.3 BSD `struct sockaddr' format, which is used as wire
  1655. //
  1656. // format in the grotty old 4.3 `talk' protocol.
  1657. type Osockaddr = struct {
  1658. Fsa_family uint16
  1659. Fsa_data [14]uint8
  1660. } /* struct_osockaddr.h:6:1 */
  1661. // Define some macros helping to catch buffer overflows.
  1662. var _ uint8 /* gen.c:2:13: */