Debian Codegraph @

netinet/in/in_linux_riscv64.go

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