socket_linux_386.go 73 KB

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