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