github.com/afumu/libc@v0.0.6/netdb/netdb_linux_riscv64.go (about)

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