Debian Codegraph @

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