github.com/afumu/libc@v0.0.6/netinet/in/in_linux_arm.go (about)

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