socket_linux_arm.go 78 KB

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