github.com/afumu/libc@v0.0.6/sys/socket/socket_linux_386.go (about)

     1  // Code generated by 'ccgo sys/socket/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys/socket/socket_linux_386.go -pkgname socket', DO NOT EDIT.
     2  
     3  package socket
     4  
     5  import (
     6  	"math"
     7  	"reflect"
     8  	"sync/atomic"
     9  	"unsafe"
    10  )
    11  
    12  var _ = math.Pi
    13  var _ reflect.Kind
    14  var _ atomic.Value
    15  var _ unsafe.Pointer
    16  
    17  const (
    18  	AF_ALG                           = 38
    19  	AF_APPLETALK                     = 5
    20  	AF_ASH                           = 18
    21  	AF_ATMPVC                        = 8
    22  	AF_ATMSVC                        = 20
    23  	AF_AX25                          = 3
    24  	AF_BLUETOOTH                     = 31
    25  	AF_BRIDGE                        = 7
    26  	AF_CAIF                          = 37
    27  	AF_CAN                           = 29
    28  	AF_DECnet                        = 12
    29  	AF_ECONET                        = 19
    30  	AF_FILE                          = 1
    31  	AF_IB                            = 27
    32  	AF_IEEE802154                    = 36
    33  	AF_INET                          = 2
    34  	AF_INET6                         = 10
    35  	AF_IPX                           = 4
    36  	AF_IRDA                          = 23
    37  	AF_ISDN                          = 34
    38  	AF_IUCV                          = 32
    39  	AF_KCM                           = 41
    40  	AF_KEY                           = 15
    41  	AF_LLC                           = 26
    42  	AF_LOCAL                         = 1
    43  	AF_MAX                           = 45
    44  	AF_MPLS                          = 28
    45  	AF_NETBEUI                       = 13
    46  	AF_NETLINK                       = 16
    47  	AF_NETROM                        = 6
    48  	AF_NFC                           = 39
    49  	AF_PACKET                        = 17
    50  	AF_PHONET                        = 35
    51  	AF_PPPOX                         = 24
    52  	AF_QIPCRTR                       = 42
    53  	AF_RDS                           = 21
    54  	AF_ROSE                          = 11
    55  	AF_ROUTE                         = 16
    56  	AF_RXRPC                         = 33
    57  	AF_SECURITY                      = 14
    58  	AF_SMC                           = 43
    59  	AF_SNA                           = 22
    60  	AF_TIPC                          = 30
    61  	AF_UNIX                          = 1
    62  	AF_UNSPEC                        = 0
    63  	AF_VSOCK                         = 40
    64  	AF_WANPIPE                       = 25
    65  	AF_X25                           = 9
    66  	AF_XDP                           = 44
    67  	BIG_ENDIAN                       = 4321
    68  	BYTE_ORDER                       = 1234
    69  	FD_SETSIZE                       = 1024
    70  	FIOGETOWN                        = 0x8903
    71  	FIOSETOWN                        = 0x8901
    72  	LITTLE_ENDIAN                    = 1234
    73  	PDP_ENDIAN                       = 3412
    74  	PF_ALG                           = 38
    75  	PF_APPLETALK                     = 5
    76  	PF_ASH                           = 18
    77  	PF_ATMPVC                        = 8
    78  	PF_ATMSVC                        = 20
    79  	PF_AX25                          = 3
    80  	PF_BLUETOOTH                     = 31
    81  	PF_BRIDGE                        = 7
    82  	PF_CAIF                          = 37
    83  	PF_CAN                           = 29
    84  	PF_DECnet                        = 12
    85  	PF_ECONET                        = 19
    86  	PF_FILE                          = 1
    87  	PF_IB                            = 27
    88  	PF_IEEE802154                    = 36
    89  	PF_INET                          = 2
    90  	PF_INET6                         = 10
    91  	PF_IPX                           = 4
    92  	PF_IRDA                          = 23
    93  	PF_ISDN                          = 34
    94  	PF_IUCV                          = 32
    95  	PF_KCM                           = 41
    96  	PF_KEY                           = 15
    97  	PF_LLC                           = 26
    98  	PF_LOCAL                         = 1
    99  	PF_MAX                           = 45
   100  	PF_MPLS                          = 28
   101  	PF_NETBEUI                       = 13
   102  	PF_NETLINK                       = 16
   103  	PF_NETROM                        = 6
   104  	PF_NFC                           = 39
   105  	PF_PACKET                        = 17
   106  	PF_PHONET                        = 35
   107  	PF_PPPOX                         = 24
   108  	PF_QIPCRTR                       = 42
   109  	PF_RDS                           = 21
   110  	PF_ROSE                          = 11
   111  	PF_ROUTE                         = 16
   112  	PF_RXRPC                         = 33
   113  	PF_SECURITY                      = 14
   114  	PF_SMC                           = 43
   115  	PF_SNA                           = 22
   116  	PF_TIPC                          = 30
   117  	PF_UNIX                          = 1
   118  	PF_UNSPEC                        = 0
   119  	PF_VSOCK                         = 40
   120  	PF_WANPIPE                       = 25
   121  	PF_X25                           = 9
   122  	PF_XDP                           = 44
   123  	SCM_TIMESTAMPING_OPT_STATS       = 54
   124  	SCM_TIMESTAMPING_PKTINFO         = 58
   125  	SCM_TXTIME                       = 61
   126  	SCM_WIFI_STATUS                  = 41
   127  	SIOCATMARK                       = 0x8905
   128  	SIOCGPGRP                        = 0x8904
   129  	SIOCGSTAMP                       = 0x8906
   130  	SIOCGSTAMPNS                     = 0x8907
   131  	SIOCSPGRP                        = 0x8902
   132  	SOL_AAL                          = 265
   133  	SOL_ALG                          = 279
   134  	SOL_ATM                          = 264
   135  	SOL_BLUETOOTH                    = 274
   136  	SOL_CAIF                         = 278
   137  	SOL_DCCP                         = 269
   138  	SOL_DECNET                       = 261
   139  	SOL_IRDA                         = 266
   140  	SOL_IUCV                         = 277
   141  	SOL_KCM                          = 281
   142  	SOL_LLC                          = 268
   143  	SOL_NETBEUI                      = 267
   144  	SOL_NETLINK                      = 270
   145  	SOL_NFC                          = 280
   146  	SOL_PACKET                       = 263
   147  	SOL_PNPIPE                       = 275
   148  	SOL_PPPOL2TP                     = 273
   149  	SOL_RAW                          = 255
   150  	SOL_RDS                          = 276
   151  	SOL_RXRPC                        = 272
   152  	SOL_SOCKET                       = 1
   153  	SOL_TIPC                         = 271
   154  	SOL_TLS                          = 282
   155  	SOL_X25                          = 262
   156  	SOL_XDP                          = 283
   157  	SOMAXCONN                        = 4096
   158  	SO_ACCEPTCONN                    = 30
   159  	SO_ATTACH_BPF                    = 50
   160  	SO_ATTACH_FILTER                 = 26
   161  	SO_ATTACH_REUSEPORT_CBPF         = 51
   162  	SO_ATTACH_REUSEPORT_EBPF         = 52
   163  	SO_BINDTODEVICE                  = 25
   164  	SO_BINDTOIFINDEX                 = 62
   165  	SO_BPF_EXTENSIONS                = 48
   166  	SO_BROADCAST                     = 6
   167  	SO_BSDCOMPAT                     = 14
   168  	SO_BUSY_POLL                     = 46
   169  	SO_CNX_ADVICE                    = 53
   170  	SO_COOKIE                        = 57
   171  	SO_DEBUG                         = 1
   172  	SO_DETACH_BPF                    = 27
   173  	SO_DETACH_FILTER                 = 27
   174  	SO_DETACH_REUSEPORT_BPF          = 68
   175  	SO_DOMAIN                        = 39
   176  	SO_DONTROUTE                     = 5
   177  	SO_ERROR                         = 4
   178  	SO_GET_FILTER                    = 26
   179  	SO_INCOMING_CPU                  = 49
   180  	SO_INCOMING_NAPI_ID              = 56
   181  	SO_KEEPALIVE                     = 9
   182  	SO_LINGER                        = 13
   183  	SO_LOCK_FILTER                   = 44
   184  	SO_MARK                          = 36
   185  	SO_MAX_PACING_RATE               = 47
   186  	SO_MEMINFO                       = 55
   187  	SO_NOFCS                         = 43
   188  	SO_NO_CHECK                      = 11
   189  	SO_OOBINLINE                     = 10
   190  	SO_PASSCRED                      = 16
   191  	SO_PASSSEC                       = 34
   192  	SO_PEEK_OFF                      = 42
   193  	SO_PEERCRED                      = 17
   194  	SO_PEERGROUPS                    = 59
   195  	SO_PEERNAME                      = 28
   196  	SO_PEERSEC                       = 31
   197  	SO_PRIORITY                      = 12
   198  	SO_PROTOCOL                      = 38
   199  	SO_RCVBUF                        = 8
   200  	SO_RCVBUFFORCE                   = 33
   201  	SO_RCVLOWAT                      = 18
   202  	SO_RCVTIMEO_NEW                  = 66
   203  	SO_RCVTIMEO_OLD                  = 20
   204  	SO_REUSEADDR                     = 2
   205  	SO_REUSEPORT                     = 15
   206  	SO_RXQ_OVFL                      = 40
   207  	SO_SECURITY_AUTHENTICATION       = 22
   208  	SO_SECURITY_ENCRYPTION_NETWORK   = 24
   209  	SO_SECURITY_ENCRYPTION_TRANSPORT = 23
   210  	SO_SELECT_ERR_QUEUE              = 45
   211  	SO_SNDBUF                        = 7
   212  	SO_SNDBUFFORCE                   = 32
   213  	SO_SNDLOWAT                      = 19
   214  	SO_SNDTIMEO_NEW                  = 67
   215  	SO_SNDTIMEO_OLD                  = 21
   216  	SO_TIMESTAMPING_NEW              = 65
   217  	SO_TIMESTAMPING_OLD              = 37
   218  	SO_TIMESTAMPNS_NEW               = 64
   219  	SO_TIMESTAMPNS_OLD               = 35
   220  	SO_TIMESTAMP_NEW                 = 63
   221  	SO_TIMESTAMP_OLD                 = 29
   222  	SO_TXTIME                        = 61
   223  	SO_TYPE                          = 3
   224  	SO_WIFI_STATUS                   = 41
   225  	SO_ZEROCOPY                      = 60
   226  	X_ASM_X86_POSIX_TYPES_32_H       = 0
   227  	X_ATFILE_SOURCE                  = 1
   228  	X_BITS_BYTESWAP_H                = 1
   229  	X_BITS_ENDIANNESS_H              = 1
   230  	X_BITS_ENDIAN_H                  = 1
   231  	X_BITS_PTHREADTYPES_ARCH_H       = 1
   232  	X_BITS_PTHREADTYPES_COMMON_H     = 1
   233  	X_BITS_SOCKADDR_H                = 1
   234  	X_BITS_STDINT_INTN_H             = 1
   235  	X_BITS_TIME64_H                  = 1
   236  	X_BITS_TYPESIZES_H               = 1
   237  	X_BITS_TYPES_H                   = 1
   238  	X_BITS_UINTN_IDENTITY_H          = 1
   239  	X_BSD_SIZE_T_                    = 0
   240  	X_BSD_SIZE_T_DEFINED_            = 0
   241  	X_DEFAULT_SOURCE                 = 1
   242  	X_ENDIAN_H                       = 1
   243  	X_FEATURES_H                     = 1
   244  	X_FILE_OFFSET_BITS               = 64
   245  	X_GCC_SIZE_T                     = 0
   246  	X_ILP32                          = 1
   247  	X_LINUX_POSIX_TYPES_H            = 0
   248  	X_POSIX_C_SOURCE                 = 200809
   249  	X_POSIX_SOURCE                   = 1
   250  	X_RWLOCK_INTERNAL_H              = 0
   251  	X_SIZET_                         = 0
   252  	X_SIZE_T                         = 0
   253  	X_SIZE_T_                        = 0
   254  	X_SIZE_T_DECLARED                = 0
   255  	X_SIZE_T_DEFINED                 = 0
   256  	X_SIZE_T_DEFINED_                = 0
   257  	X_SS_SIZE                        = 128
   258  	X_STDC_PREDEF_H                  = 1
   259  	X_STRUCT_TIMESPEC                = 1
   260  	X_SYS_CDEFS_H                    = 1
   261  	X_SYS_SELECT_H                   = 1
   262  	X_SYS_SIZE_T_H                   = 0
   263  	X_SYS_SOCKET_H                   = 1
   264  	X_SYS_TYPES_H                    = 1
   265  	X_THREAD_MUTEX_INTERNAL_H        = 1
   266  	X_THREAD_SHARED_TYPES_H          = 1
   267  	X_T_SIZE                         = 0
   268  	X_T_SIZE_                        = 0
   269  	I386                             = 1
   270  	Linux                            = 1
   271  	Unix                             = 1
   272  )
   273  
   274  // Bits in the FLAGS argument to `send', `recv', et al.
   275  const ( /* socket.h:200:1: */
   276  	MSG_OOB        = 1  // Process out-of-band data.
   277  	MSG_PEEK       = 2  // Peek at incoming messages.
   278  	MSG_DONTROUTE  = 4  // Don't use local routing.
   279  	MSG_CTRUNC     = 8  // Control data lost before delivery.
   280  	MSG_PROXY      = 16 // Supply or ask second address.
   281  	MSG_TRUNC      = 32
   282  	MSG_DONTWAIT   = 64  // Nonblocking IO.
   283  	MSG_EOR        = 128 // End of record.
   284  	MSG_WAITALL    = 256 // Wait for a full request.
   285  	MSG_FIN        = 512
   286  	MSG_SYN        = 1024
   287  	MSG_CONFIRM    = 2048 // Confirm path validity.
   288  	MSG_RST        = 4096
   289  	MSG_ERRQUEUE   = 8192      // Fetch message from error queue.
   290  	MSG_NOSIGNAL   = 16384     // Do not generate SIGPIPE.
   291  	MSG_MORE       = 32768     // Sender will send more.
   292  	MSG_WAITFORONE = 65536     // Wait for at least one packet to return.
   293  	MSG_BATCH      = 262144    // sendmmsg: more messages coming.
   294  	MSG_ZEROCOPY   = 67108864  // Use user data in kernel path.
   295  	MSG_FASTOPEN   = 536870912 // Send data in TCP SYN.
   296  
   297  	MSG_CMSG_CLOEXEC = 1073741824
   298  )
   299  
   300  // Socket level message types.  This must match the definitions in
   301  //
   302  //	<linux/socket.h>.
   303  const ( /* socket.h:332:1: */
   304  	SCM_RIGHTS = 1
   305  )
   306  
   307  // Get the architecture-dependent definition of enum __socket_type.
   308  // Define enum __socket_type for generic Linux.
   309  //    Copyright (C) 1991-2020 Free Software Foundation, Inc.
   310  //    This file is part of the GNU C Library.
   311  //
   312  //    The GNU C Library is free software; you can redistribute it and/or
   313  //    modify it under the terms of the GNU Lesser General Public
   314  //    License as published by the Free Software Foundation; either
   315  //    version 2.1 of the License, or (at your option) any later version.
   316  //
   317  //    The GNU C Library is distributed in the hope that it will be useful,
   318  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   319  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   320  //    Lesser General Public License for more details.
   321  //
   322  //    You should have received a copy of the GNU Lesser General Public
   323  //    License along with the GNU C Library; if not, see
   324  //    <https://www.gnu.org/licenses/>.
   325  
   326  // Types of sockets.
   327  const ( /* socket_type.h:24:1: */
   328  	SOCK_STREAM = 1 // Sequenced, reliable, connection-based
   329  	// 				   byte streams.
   330  	SOCK_DGRAM = 2 // Connectionless, unreliable datagrams
   331  	// 				   of fixed maximum length.
   332  	SOCK_RAW       = 3 // Raw protocol interface.
   333  	SOCK_RDM       = 4 // Reliably-delivered messages.
   334  	SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based,
   335  	// 				   datagrams of fixed maximum length.
   336  	SOCK_DCCP   = 6  // Datagram Congestion Control Protocol.
   337  	SOCK_PACKET = 10 // Linux specific way of getting packets
   338  	// 				   at the dev level.  For writing rarp and
   339  	// 				   other similar things on the user level.
   340  
   341  	// Flags to be ORed into the type parameter of socket and socketpair and
   342  	//      used for the flags parameter of paccept.
   343  
   344  	SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the
   345  	// 				   new descriptor(s).
   346  	SOCK_NONBLOCK = 2048
   347  )
   348  
   349  // The following constants should be used for the second parameter of
   350  //
   351  //	`shutdown'.
   352  const ( /* socket.h:41:1: */
   353  	SHUT_RD   = 0 // No more receptions.
   354  	SHUT_WR   = 1 // No more transmissions.
   355  	SHUT_RDWR = 2
   356  )
   357  
   358  type Ptrdiff_t = int32 /* <builtin>:3:26 */
   359  
   360  type Size_t = uint32 /* <builtin>:9:23 */
   361  
   362  type Wchar_t = int32 /* <builtin>:15:24 */
   363  
   364  type X__builtin_va_list = uintptr /* <builtin>:46:14 */
   365  type X__float128 = float64        /* <builtin>:47:21 */
   366  
   367  // Wide character type.
   368  //    Locale-writers should change this as necessary to
   369  //    be big enough to hold unique values not between 0 and 127,
   370  //    and not (wchar_t) -1, for each defined multibyte character.
   371  
   372  // Define this type if we are doing the whole job,
   373  //    or if we want this type in particular.
   374  
   375  // A null pointer constant.
   376  
   377  // Structure for scatter/gather I/O.
   378  type Iovec = struct {
   379  	Fiov_base uintptr
   380  	Fiov_len  Size_t
   381  } /* struct_iovec.h:26:1 */
   382  
   383  // Copyright (C) 1989-2020 Free Software Foundation, Inc.
   384  //
   385  // This file is part of GCC.
   386  //
   387  // GCC is free software; you can redistribute it and/or modify
   388  // it under the terms of the GNU General Public License as published by
   389  // the Free Software Foundation; either version 3, or (at your option)
   390  // any later version.
   391  //
   392  // GCC is distributed in the hope that it will be useful,
   393  // but WITHOUT ANY WARRANTY; without even the implied warranty of
   394  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   395  // GNU General Public License for more details.
   396  //
   397  // Under Section 7 of GPL version 3, you are granted additional
   398  // permissions described in the GCC Runtime Library Exception, version
   399  // 3.1, as published by the Free Software Foundation.
   400  //
   401  // You should have received a copy of the GNU General Public License and
   402  // a copy of the GCC Runtime Library Exception along with this program;
   403  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
   404  // <http://www.gnu.org/licenses/>.
   405  
   406  // ISO C Standard:  7.17  Common definitions  <stddef.h>
   407  
   408  // Any one of these symbols __need_* means that GNU libc
   409  //    wants us just to define one data type.  So don't define
   410  //    the symbols that indicate this file's entire job has been done.
   411  
   412  // This avoids lossage on SunOS but only if stdtypes.h comes first.
   413  //    There's no way to win with the other order!  Sun lossage.
   414  
   415  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
   416  //    Just ignore it.
   417  
   418  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
   419  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
   420  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
   421  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
   422  //    If we find that the macros are still defined at this point, we must
   423  //    invoke them so that the type is defined as expected.
   424  
   425  // In case nobody has defined these types, but we aren't running under
   426  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
   427  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
   428  //    parts of GCC is compiled by an older compiler, that actually
   429  //    include gstddef.h, such as collect2.
   430  
   431  // Signed type of difference of two pointers.
   432  
   433  // Define this type if we are doing the whole job,
   434  //    or if we want this type in particular.
   435  
   436  // Unsigned type of `sizeof' something.
   437  
   438  // Define this type if we are doing the whole job,
   439  //    or if we want this type in particular.
   440  
   441  // Wide character type.
   442  //    Locale-writers should change this as necessary to
   443  //    be big enough to hold unique values not between 0 and 127,
   444  //    and not (wchar_t) -1, for each defined multibyte character.
   445  
   446  // Define this type if we are doing the whole job,
   447  //    or if we want this type in particular.
   448  
   449  // A null pointer constant.
   450  
   451  // This operating system-specific header file defines the SOCK_*, PF_*,
   452  //    AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr',
   453  //    `struct msghdr', and `struct linger' types.
   454  // System-specific socket constants and types.  Linux version.
   455  //    Copyright (C) 1991-2020 Free Software Foundation, Inc.
   456  //    This file is part of the GNU C Library.
   457  //
   458  //    The GNU C Library is free software; you can redistribute it and/or
   459  //    modify it under the terms of the GNU Lesser General Public
   460  //    License as published by the Free Software Foundation; either
   461  //    version 2.1 of the License, or (at your option) any later version.
   462  //
   463  //    The GNU C Library is distributed in the hope that it will be useful,
   464  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   465  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   466  //    Lesser General Public License for more details.
   467  //
   468  //    You should have received a copy of the GNU Lesser General Public
   469  //    License along with the GNU C Library; if not, see
   470  //    <https://www.gnu.org/licenses/>.
   471  
   472  // Copyright (C) 1989-2020 Free Software Foundation, Inc.
   473  //
   474  // This file is part of GCC.
   475  //
   476  // GCC is free software; you can redistribute it and/or modify
   477  // it under the terms of the GNU General Public License as published by
   478  // the Free Software Foundation; either version 3, or (at your option)
   479  // any later version.
   480  //
   481  // GCC is distributed in the hope that it will be useful,
   482  // but WITHOUT ANY WARRANTY; without even the implied warranty of
   483  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   484  // GNU General Public License for more details.
   485  //
   486  // Under Section 7 of GPL version 3, you are granted additional
   487  // permissions described in the GCC Runtime Library Exception, version
   488  // 3.1, as published by the Free Software Foundation.
   489  //
   490  // You should have received a copy of the GNU General Public License and
   491  // a copy of the GCC Runtime Library Exception along with this program;
   492  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
   493  // <http://www.gnu.org/licenses/>.
   494  
   495  // ISO C Standard:  7.17  Common definitions  <stddef.h>
   496  
   497  // Any one of these symbols __need_* means that GNU libc
   498  //    wants us just to define one data type.  So don't define
   499  //    the symbols that indicate this file's entire job has been done.
   500  
   501  // This avoids lossage on SunOS but only if stdtypes.h comes first.
   502  //    There's no way to win with the other order!  Sun lossage.
   503  
   504  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
   505  //    Just ignore it.
   506  
   507  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
   508  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
   509  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
   510  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
   511  //    If we find that the macros are still defined at this point, we must
   512  //    invoke them so that the type is defined as expected.
   513  
   514  // In case nobody has defined these types, but we aren't running under
   515  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
   516  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
   517  //    parts of GCC is compiled by an older compiler, that actually
   518  //    include gstddef.h, such as collect2.
   519  
   520  // Signed type of difference of two pointers.
   521  
   522  // Define this type if we are doing the whole job,
   523  //    or if we want this type in particular.
   524  
   525  // Unsigned type of `sizeof' something.
   526  
   527  // Define this type if we are doing the whole job,
   528  //    or if we want this type in particular.
   529  
   530  // Wide character type.
   531  //    Locale-writers should change this as necessary to
   532  //    be big enough to hold unique values not between 0 and 127,
   533  //    and not (wchar_t) -1, for each defined multibyte character.
   534  
   535  // Define this type if we are doing the whole job,
   536  //    or if we want this type in particular.
   537  
   538  // A null pointer constant.
   539  
   540  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   541  //    This file is part of the GNU C Library.
   542  //
   543  //    The GNU C Library is free software; you can redistribute it and/or
   544  //    modify it under the terms of the GNU Lesser General Public
   545  //    License as published by the Free Software Foundation; either
   546  //    version 2.1 of the License, or (at your option) any later version.
   547  //
   548  //    The GNU C Library is distributed in the hope that it will be useful,
   549  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   550  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   551  //    Lesser General Public License for more details.
   552  //
   553  //    You should have received a copy of the GNU Lesser General Public
   554  //    License along with the GNU C Library; if not, see
   555  //    <https://www.gnu.org/licenses/>.
   556  
   557  //	POSIX Standard: 2.6 Primitive System Data Types	<sys/types.h>
   558  
   559  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   560  //    This file is part of the GNU C Library.
   561  //
   562  //    The GNU C Library is free software; you can redistribute it and/or
   563  //    modify it under the terms of the GNU Lesser General Public
   564  //    License as published by the Free Software Foundation; either
   565  //    version 2.1 of the License, or (at your option) any later version.
   566  //
   567  //    The GNU C Library is distributed in the hope that it will be useful,
   568  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   569  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   570  //    Lesser General Public License for more details.
   571  //
   572  //    You should have received a copy of the GNU Lesser General Public
   573  //    License along with the GNU C Library; if not, see
   574  //    <https://www.gnu.org/licenses/>.
   575  
   576  // bits/types.h -- definitions of __*_t types underlying *_t types.
   577  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
   578  //    This file is part of the GNU C Library.
   579  //
   580  //    The GNU C Library is free software; you can redistribute it and/or
   581  //    modify it under the terms of the GNU Lesser General Public
   582  //    License as published by the Free Software Foundation; either
   583  //    version 2.1 of the License, or (at your option) any later version.
   584  //
   585  //    The GNU C Library is distributed in the hope that it will be useful,
   586  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   587  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   588  //    Lesser General Public License for more details.
   589  //
   590  //    You should have received a copy of the GNU Lesser General Public
   591  //    License along with the GNU C Library; if not, see
   592  //    <https://www.gnu.org/licenses/>.
   593  
   594  // Never include this file directly; use <sys/types.h> instead.
   595  
   596  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   597  //    This file is part of the GNU C Library.
   598  //
   599  //    The GNU C Library is free software; you can redistribute it and/or
   600  //    modify it under the terms of the GNU Lesser General Public
   601  //    License as published by the Free Software Foundation; either
   602  //    version 2.1 of the License, or (at your option) any later version.
   603  //
   604  //    The GNU C Library is distributed in the hope that it will be useful,
   605  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   606  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   607  //    Lesser General Public License for more details.
   608  //
   609  //    You should have received a copy of the GNU Lesser General Public
   610  //    License along with the GNU C Library; if not, see
   611  //    <https://www.gnu.org/licenses/>.
   612  
   613  // Determine the wordsize from the preprocessor defines.
   614  
   615  // Bit size of the time_t type at glibc build time, x86-64 and x32 case.
   616  //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
   617  //    This file is part of the GNU C Library.
   618  //
   619  //    The GNU C Library is free software; you can redistribute it and/or
   620  //    modify it under the terms of the GNU Lesser General Public
   621  //    License as published by the Free Software Foundation; either
   622  //    version 2.1 of the License, or (at your option) any later version.
   623  //
   624  //    The GNU C Library is distributed in the hope that it will be useful,
   625  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   626  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   627  //    Lesser General Public License for more details.
   628  //
   629  //    You should have received a copy of the GNU Lesser General Public
   630  //    License along with the GNU C Library; if not, see
   631  //    <https://www.gnu.org/licenses/>.
   632  
   633  // For others, time size is word size.
   634  
   635  // Convenience types.
   636  type X__u_char = uint8   /* types.h:31:23 */
   637  type X__u_short = uint16 /* types.h:32:28 */
   638  type X__u_int = uint32   /* types.h:33:22 */
   639  type X__u_long = uint32  /* types.h:34:27 */
   640  
   641  // Fixed-size types, underlying types depend on word size and compiler.
   642  type X__int8_t = int8     /* types.h:37:21 */
   643  type X__uint8_t = uint8   /* types.h:38:23 */
   644  type X__int16_t = int16   /* types.h:39:26 */
   645  type X__uint16_t = uint16 /* types.h:40:28 */
   646  type X__int32_t = int32   /* types.h:41:20 */
   647  type X__uint32_t = uint32 /* types.h:42:22 */
   648  type X__int64_t = int64   /* types.h:47:44 */
   649  type X__uint64_t = uint64 /* types.h:48:46 */
   650  
   651  // Smallest types with at least a given width.
   652  type X__int_least8_t = X__int8_t     /* types.h:52:18 */
   653  type X__uint_least8_t = X__uint8_t   /* types.h:53:19 */
   654  type X__int_least16_t = X__int16_t   /* types.h:54:19 */
   655  type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
   656  type X__int_least32_t = X__int32_t   /* types.h:56:19 */
   657  type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
   658  type X__int_least64_t = X__int64_t   /* types.h:58:19 */
   659  type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
   660  
   661  // quad_t is also 64 bits.
   662  type X__quad_t = int64    /* types.h:66:37 */
   663  type X__u_quad_t = uint64 /* types.h:67:46 */
   664  
   665  // Largest integral types.
   666  type X__intmax_t = int64   /* types.h:75:37 */
   667  type X__uintmax_t = uint64 /* types.h:76:46 */
   668  
   669  // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
   670  //    macros for each of the OS types we define below.  The definitions
   671  //    of those macros must use the following macros for underlying types.
   672  //    We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
   673  //    variants of each of the following integer types on this machine.
   674  //
   675  // 	16		-- "natural" 16-bit type (always short)
   676  // 	32		-- "natural" 32-bit type (always int)
   677  // 	64		-- "natural" 64-bit type (long or long long)
   678  // 	LONG32		-- 32-bit type, traditionally long
   679  // 	QUAD		-- 64-bit type, traditionally long long
   680  // 	WORD		-- natural type of __WORDSIZE bits (int or long)
   681  // 	LONGWORD	-- type of __WORDSIZE bits, traditionally long
   682  //
   683  //    We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
   684  //    conventional uses of `long' or `long long' type modifiers match the
   685  //    types we define, even when a less-adorned type would be the same size.
   686  //    This matters for (somewhat) portably writing printf/scanf formats for
   687  //    these types, where using the appropriate l or ll format modifiers can
   688  //    make the typedefs and the formats match up across all GNU platforms.  If
   689  //    we used `long' when it's 64 bits where `long long' is expected, then the
   690  //    compiler would warn about the formats not matching the argument types,
   691  //    and the programmer changing them to shut up the compiler would break the
   692  //    program's portability.
   693  //
   694  //    Here we assume what is presently the case in all the GCC configurations
   695  //    we support: long long is always 64 bits, long is always word/address size,
   696  //    and int is always 32 bits.
   697  
   698  // We want __extension__ before typedef's that use nonstandard base types
   699  //    such as `long long' in C89 mode.
   700  // bits/typesizes.h -- underlying types for *_t.  Linux/x86-64 version.
   701  //    Copyright (C) 2012-2020 Free Software Foundation, Inc.
   702  //    This file is part of the GNU C Library.
   703  //
   704  //    The GNU C Library is free software; you can redistribute it and/or
   705  //    modify it under the terms of the GNU Lesser General Public
   706  //    License as published by the Free Software Foundation; either
   707  //    version 2.1 of the License, or (at your option) any later version.
   708  //
   709  //    The GNU C Library is distributed in the hope that it will be useful,
   710  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   711  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   712  //    Lesser General Public License for more details.
   713  //
   714  //    You should have received a copy of the GNU Lesser General Public
   715  //    License along with the GNU C Library; if not, see
   716  //    <https://www.gnu.org/licenses/>.
   717  
   718  // See <bits/types.h> for the meaning of these macros.  This file exists so
   719  //    that <bits/types.h> need not vary across different GNU platforms.
   720  
   721  // X32 kernel interface is 64-bit.
   722  
   723  // Number of descriptors that can fit in an `fd_set'.
   724  
   725  // bits/time64.h -- underlying types for __time64_t.  Generic version.
   726  //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
   727  //    This file is part of the GNU C Library.
   728  //
   729  //    The GNU C Library is free software; you can redistribute it and/or
   730  //    modify it under the terms of the GNU Lesser General Public
   731  //    License as published by the Free Software Foundation; either
   732  //    version 2.1 of the License, or (at your option) any later version.
   733  //
   734  //    The GNU C Library is distributed in the hope that it will be useful,
   735  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   736  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   737  //    Lesser General Public License for more details.
   738  //
   739  //    You should have received a copy of the GNU Lesser General Public
   740  //    License along with the GNU C Library; if not, see
   741  //    <https://www.gnu.org/licenses/>.
   742  
   743  // Define __TIME64_T_TYPE so that it is always a 64-bit type.
   744  
   745  // Define a 64-bit time type alongsize the 32-bit one.
   746  
   747  type X__dev_t = X__uint64_t                /* types.h:145:25 */ // Type of device numbers.
   748  type X__uid_t = uint32                     /* types.h:146:25 */ // Type of user identifications.
   749  type X__gid_t = uint32                     /* types.h:147:25 */ // Type of group identifications.
   750  type X__ino_t = uint32                     /* types.h:148:25 */ // Type of file serial numbers.
   751  type X__ino64_t = X__uint64_t              /* types.h:149:27 */ // Type of file serial numbers (LFS).
   752  type X__mode_t = uint32                    /* types.h:150:26 */ // Type of file attribute bitmasks.
   753  type X__nlink_t = uint32                   /* types.h:151:27 */ // Type of file link counts.
   754  type X__off_t = int32                      /* types.h:152:25 */ // Type of file sizes and offsets.
   755  type X__off64_t = X__int64_t               /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
   756  type X__pid_t = int32                      /* types.h:154:25 */ // Type of process identifications.
   757  type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
   758  type X__clock_t = int32                    /* types.h:156:27 */ // Type of CPU usage counts.
   759  type X__rlim_t = uint32                    /* types.h:157:26 */ // Type for resource measurement.
   760  type X__rlim64_t = X__uint64_t             /* types.h:158:28 */ // Type for resource measurement (LFS).
   761  type X__id_t = uint32                      /* types.h:159:24 */ // General type for IDs.
   762  type X__time_t = int32                     /* types.h:160:26 */ // Seconds since the Epoch.
   763  type X__useconds_t = uint32                /* types.h:161:30 */ // Count of microseconds.
   764  type X__suseconds_t = int32                /* types.h:162:31 */ // Signed count of microseconds.
   765  
   766  type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
   767  type X__key_t = int32   /* types.h:165:25 */ // Type of an IPC key.
   768  
   769  // Clock ID used in clock and timer functions.
   770  type X__clockid_t = int32 /* types.h:168:29 */
   771  
   772  // Timer ID returned by `timer_create'.
   773  type X__timer_t = uintptr /* types.h:171:12 */
   774  
   775  // Type to represent block size.
   776  type X__blksize_t = int32 /* types.h:174:29 */
   777  
   778  // Types from the Large File Support interface.
   779  
   780  // Type to count number of disk blocks.
   781  type X__blkcnt_t = int32        /* types.h:179:28 */
   782  type X__blkcnt64_t = X__int64_t /* types.h:180:30 */
   783  
   784  // Type to count file system blocks.
   785  type X__fsblkcnt_t = uint32        /* types.h:183:30 */
   786  type X__fsblkcnt64_t = X__uint64_t /* types.h:184:32 */
   787  
   788  // Type to count file system nodes.
   789  type X__fsfilcnt_t = uint32        /* types.h:187:30 */
   790  type X__fsfilcnt64_t = X__uint64_t /* types.h:188:32 */
   791  
   792  // Type of miscellaneous file system fields.
   793  type X__fsword_t = int32 /* types.h:191:28 */
   794  
   795  type X__ssize_t = int32 /* types.h:193:27 */ // Type of a byte count, or error.
   796  
   797  // Signed long type used in system calls.
   798  type X__syscall_slong_t = int32 /* types.h:196:33 */
   799  // Unsigned long type used in system calls.
   800  type X__syscall_ulong_t = uint32 /* types.h:198:33 */
   801  
   802  // These few don't really vary by system, they always correspond
   803  //
   804  //	to one of the other defined types.
   805  type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
   806  type X__caddr_t = uintptr   /* types.h:203:14 */
   807  
   808  // Duplicates info from stdint.h but this is used in unistd.h.
   809  type X__intptr_t = int32 /* types.h:206:25 */
   810  
   811  // Duplicate info from sys/socket.h.
   812  type X__socklen_t = uint32 /* types.h:209:23 */
   813  
   814  // C99: An integer type that can be accessed as an atomic entity,
   815  //
   816  //	even in the presence of asynchronous interrupts.
   817  //	It is not currently necessary for this to be machine-specific.
   818  type X__sig_atomic_t = int32 /* types.h:214:13 */
   819  
   820  // Seconds since the Epoch, visible to user code when time_t is too
   821  //
   822  //	narrow only for consistency with the old way of widening too-narrow
   823  //	types.  User code should never use __time64_t.
   824  type X__time64_t = X__int64_t /* types.h:222:28 */
   825  
   826  type U_char = X__u_char     /* types.h:33:18 */
   827  type U_short = X__u_short   /* types.h:34:19 */
   828  type U_int = X__u_int       /* types.h:35:17 */
   829  type U_long = X__u_long     /* types.h:36:18 */
   830  type Quad_t = X__quad_t     /* types.h:37:18 */
   831  type U_quad_t = X__u_quad_t /* types.h:38:20 */
   832  type Fsid_t = X__fsid_t     /* types.h:39:18 */
   833  type Loff_t = X__loff_t     /* types.h:42:18 */
   834  
   835  type Ino_t = X__ino64_t /* types.h:49:19 */
   836  
   837  type Dev_t = X__dev_t /* types.h:59:17 */
   838  
   839  type Gid_t = X__gid_t /* types.h:64:17 */
   840  
   841  type Mode_t = X__mode_t /* types.h:69:18 */
   842  
   843  type Nlink_t = X__nlink_t /* types.h:74:19 */
   844  
   845  type Uid_t = X__uid_t /* types.h:79:17 */
   846  
   847  type Off_t = X__off64_t /* types.h:87:19 */
   848  
   849  type Pid_t = X__pid_t /* types.h:97:17 */
   850  
   851  type Id_t = X__id_t /* types.h:103:16 */
   852  
   853  type Ssize_t = X__ssize_t /* types.h:108:19 */
   854  
   855  type Daddr_t = X__daddr_t /* types.h:114:19 */
   856  type Caddr_t = X__caddr_t /* types.h:115:19 */
   857  
   858  type Key_t = X__key_t /* types.h:121:17 */
   859  
   860  // bits/types.h -- definitions of __*_t types underlying *_t types.
   861  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
   862  //    This file is part of the GNU C Library.
   863  //
   864  //    The GNU C Library is free software; you can redistribute it and/or
   865  //    modify it under the terms of the GNU Lesser General Public
   866  //    License as published by the Free Software Foundation; either
   867  //    version 2.1 of the License, or (at your option) any later version.
   868  //
   869  //    The GNU C Library is distributed in the hope that it will be useful,
   870  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   871  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   872  //    Lesser General Public License for more details.
   873  //
   874  //    You should have received a copy of the GNU Lesser General Public
   875  //    License along with the GNU C Library; if not, see
   876  //    <https://www.gnu.org/licenses/>.
   877  
   878  // Never include this file directly; use <sys/types.h> instead.
   879  
   880  // Returned by `clock'.
   881  type Clock_t = X__clock_t /* clock_t.h:7:19 */
   882  
   883  // bits/types.h -- definitions of __*_t types underlying *_t types.
   884  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
   885  //    This file is part of the GNU C Library.
   886  //
   887  //    The GNU C Library is free software; you can redistribute it and/or
   888  //    modify it under the terms of the GNU Lesser General Public
   889  //    License as published by the Free Software Foundation; either
   890  //    version 2.1 of the License, or (at your option) any later version.
   891  //
   892  //    The GNU C Library is distributed in the hope that it will be useful,
   893  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   894  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   895  //    Lesser General Public License for more details.
   896  //
   897  //    You should have received a copy of the GNU Lesser General Public
   898  //    License along with the GNU C Library; if not, see
   899  //    <https://www.gnu.org/licenses/>.
   900  
   901  // Never include this file directly; use <sys/types.h> instead.
   902  
   903  // Clock ID used in clock and timer functions.
   904  type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
   905  
   906  // bits/types.h -- definitions of __*_t types underlying *_t types.
   907  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
   908  //    This file is part of the GNU C Library.
   909  //
   910  //    The GNU C Library is free software; you can redistribute it and/or
   911  //    modify it under the terms of the GNU Lesser General Public
   912  //    License as published by the Free Software Foundation; either
   913  //    version 2.1 of the License, or (at your option) any later version.
   914  //
   915  //    The GNU C Library is distributed in the hope that it will be useful,
   916  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   917  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   918  //    Lesser General Public License for more details.
   919  //
   920  //    You should have received a copy of the GNU Lesser General Public
   921  //    License along with the GNU C Library; if not, see
   922  //    <https://www.gnu.org/licenses/>.
   923  
   924  // Never include this file directly; use <sys/types.h> instead.
   925  
   926  // Returned by `time'.
   927  type Time_t = X__time_t /* time_t.h:7:18 */
   928  
   929  // bits/types.h -- definitions of __*_t types underlying *_t types.
   930  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
   931  //    This file is part of the GNU C Library.
   932  //
   933  //    The GNU C Library is free software; you can redistribute it and/or
   934  //    modify it under the terms of the GNU Lesser General Public
   935  //    License as published by the Free Software Foundation; either
   936  //    version 2.1 of the License, or (at your option) any later version.
   937  //
   938  //    The GNU C Library is distributed in the hope that it will be useful,
   939  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   940  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   941  //    Lesser General Public License for more details.
   942  //
   943  //    You should have received a copy of the GNU Lesser General Public
   944  //    License along with the GNU C Library; if not, see
   945  //    <https://www.gnu.org/licenses/>.
   946  
   947  // Never include this file directly; use <sys/types.h> instead.
   948  
   949  // Timer ID returned by `timer_create'.
   950  type Timer_t = X__timer_t /* timer_t.h:7:19 */
   951  
   952  // Copyright (C) 1989-2020 Free Software Foundation, Inc.
   953  //
   954  // This file is part of GCC.
   955  //
   956  // GCC is free software; you can redistribute it and/or modify
   957  // it under the terms of the GNU General Public License as published by
   958  // the Free Software Foundation; either version 3, or (at your option)
   959  // any later version.
   960  //
   961  // GCC is distributed in the hope that it will be useful,
   962  // but WITHOUT ANY WARRANTY; without even the implied warranty of
   963  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   964  // GNU General Public License for more details.
   965  //
   966  // Under Section 7 of GPL version 3, you are granted additional
   967  // permissions described in the GCC Runtime Library Exception, version
   968  // 3.1, as published by the Free Software Foundation.
   969  //
   970  // You should have received a copy of the GNU General Public License and
   971  // a copy of the GCC Runtime Library Exception along with this program;
   972  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
   973  // <http://www.gnu.org/licenses/>.
   974  
   975  // ISO C Standard:  7.17  Common definitions  <stddef.h>
   976  
   977  // Any one of these symbols __need_* means that GNU libc
   978  //    wants us just to define one data type.  So don't define
   979  //    the symbols that indicate this file's entire job has been done.
   980  
   981  // This avoids lossage on SunOS but only if stdtypes.h comes first.
   982  //    There's no way to win with the other order!  Sun lossage.
   983  
   984  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
   985  //    Just ignore it.
   986  
   987  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
   988  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
   989  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
   990  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
   991  //    If we find that the macros are still defined at this point, we must
   992  //    invoke them so that the type is defined as expected.
   993  
   994  // In case nobody has defined these types, but we aren't running under
   995  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
   996  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
   997  //    parts of GCC is compiled by an older compiler, that actually
   998  //    include gstddef.h, such as collect2.
   999  
  1000  // Signed type of difference of two pointers.
  1001  
  1002  // Define this type if we are doing the whole job,
  1003  //    or if we want this type in particular.
  1004  
  1005  // Unsigned type of `sizeof' something.
  1006  
  1007  // Define this type if we are doing the whole job,
  1008  //    or if we want this type in particular.
  1009  
  1010  // Wide character type.
  1011  //    Locale-writers should change this as necessary to
  1012  //    be big enough to hold unique values not between 0 and 127,
  1013  //    and not (wchar_t) -1, for each defined multibyte character.
  1014  
  1015  // Define this type if we are doing the whole job,
  1016  //    or if we want this type in particular.
  1017  
  1018  // A null pointer constant.
  1019  
  1020  // Old compatibility names for C types.
  1021  type Ulong = uint32  /* types.h:148:27 */
  1022  type Ushort = uint16 /* types.h:149:28 */
  1023  type Uint = uint32   /* types.h:150:22 */
  1024  
  1025  // These size-specific names are used by some of the inet code.
  1026  
  1027  // Define intN_t types.
  1028  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  1029  //    This file is part of the GNU C Library.
  1030  //
  1031  //    The GNU C Library is free software; you can redistribute it and/or
  1032  //    modify it under the terms of the GNU Lesser General Public
  1033  //    License as published by the Free Software Foundation; either
  1034  //    version 2.1 of the License, or (at your option) any later version.
  1035  //
  1036  //    The GNU C Library is distributed in the hope that it will be useful,
  1037  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1038  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1039  //    Lesser General Public License for more details.
  1040  //
  1041  //    You should have received a copy of the GNU Lesser General Public
  1042  //    License along with the GNU C Library; if not, see
  1043  //    <https://www.gnu.org/licenses/>.
  1044  
  1045  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1046  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1047  //    This file is part of the GNU C Library.
  1048  //
  1049  //    The GNU C Library is free software; you can redistribute it and/or
  1050  //    modify it under the terms of the GNU Lesser General Public
  1051  //    License as published by the Free Software Foundation; either
  1052  //    version 2.1 of the License, or (at your option) any later version.
  1053  //
  1054  //    The GNU C Library is distributed in the hope that it will be useful,
  1055  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1056  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1057  //    Lesser General Public License for more details.
  1058  //
  1059  //    You should have received a copy of the GNU Lesser General Public
  1060  //    License along with the GNU C Library; if not, see
  1061  //    <https://www.gnu.org/licenses/>.
  1062  
  1063  // Never include this file directly; use <sys/types.h> instead.
  1064  
  1065  type Int8_t = X__int8_t   /* stdint-intn.h:24:18 */
  1066  type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
  1067  type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
  1068  type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
  1069  
  1070  // These were defined by ISO C without the first `_'.
  1071  type U_int8_t = X__uint8_t   /* types.h:158:19 */
  1072  type U_int16_t = X__uint16_t /* types.h:159:20 */
  1073  type U_int32_t = X__uint32_t /* types.h:160:20 */
  1074  type U_int64_t = X__uint64_t /* types.h:161:20 */
  1075  
  1076  type Register_t = int32 /* types.h:164:13 */
  1077  
  1078  // It also defines `fd_set' and the FD_* macros for `select'.
  1079  // `fd_set' type and related macros, and `select'/`pselect' declarations.
  1080  //    Copyright (C) 1996-2020 Free Software Foundation, Inc.
  1081  //    This file is part of the GNU C Library.
  1082  //
  1083  //    The GNU C Library is free software; you can redistribute it and/or
  1084  //    modify it under the terms of the GNU Lesser General Public
  1085  //    License as published by the Free Software Foundation; either
  1086  //    version 2.1 of the License, or (at your option) any later version.
  1087  //
  1088  //    The GNU C Library is distributed in the hope that it will be useful,
  1089  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1090  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1091  //    Lesser General Public License for more details.
  1092  //
  1093  //    You should have received a copy of the GNU Lesser General Public
  1094  //    License along with the GNU C Library; if not, see
  1095  //    <https://www.gnu.org/licenses/>.
  1096  
  1097  //	POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
  1098  
  1099  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  1100  //    This file is part of the GNU C Library.
  1101  //
  1102  //    The GNU C Library is free software; you can redistribute it and/or
  1103  //    modify it under the terms of the GNU Lesser General Public
  1104  //    License as published by the Free Software Foundation; either
  1105  //    version 2.1 of the License, or (at your option) any later version.
  1106  //
  1107  //    The GNU C Library is distributed in the hope that it will be useful,
  1108  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1109  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1110  //    Lesser General Public License for more details.
  1111  //
  1112  //    You should have received a copy of the GNU Lesser General Public
  1113  //    License along with the GNU C Library; if not, see
  1114  //    <https://www.gnu.org/licenses/>.
  1115  
  1116  // Get definition of needed basic types.
  1117  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1118  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1119  //    This file is part of the GNU C Library.
  1120  //
  1121  //    The GNU C Library is free software; you can redistribute it and/or
  1122  //    modify it under the terms of the GNU Lesser General Public
  1123  //    License as published by the Free Software Foundation; either
  1124  //    version 2.1 of the License, or (at your option) any later version.
  1125  //
  1126  //    The GNU C Library is distributed in the hope that it will be useful,
  1127  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1128  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1129  //    Lesser General Public License for more details.
  1130  //
  1131  //    You should have received a copy of the GNU Lesser General Public
  1132  //    License along with the GNU C Library; if not, see
  1133  //    <https://www.gnu.org/licenses/>.
  1134  
  1135  // Never include this file directly; use <sys/types.h> instead.
  1136  
  1137  // Get __FD_* definitions.
  1138  // Copyright (C) 1997-2020 Free Software Foundation, Inc.
  1139  //    This file is part of the GNU C Library.
  1140  //
  1141  //    The GNU C Library is free software; you can redistribute it and/or
  1142  //    modify it under the terms of the GNU Lesser General Public
  1143  //    License as published by the Free Software Foundation; either
  1144  //    version 2.1 of the License, or (at your option) any later version.
  1145  //
  1146  //    The GNU C Library is distributed in the hope that it will be useful,
  1147  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1148  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1149  //    Lesser General Public License for more details.
  1150  //
  1151  //    You should have received a copy of the GNU Lesser General Public
  1152  //    License along with the GNU C Library; if not, see
  1153  //    <https://www.gnu.org/licenses/>.
  1154  
  1155  // Determine the wordsize from the preprocessor defines.
  1156  
  1157  // Get sigset_t.
  1158  
  1159  type X__sigset_t = struct{ F__val [32]uint32 } /* __sigset_t.h:8:3 */
  1160  
  1161  // A set of signals to be blocked, unblocked, or waited for.
  1162  type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
  1163  
  1164  // Get definition of timer specification structures.
  1165  
  1166  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1167  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1168  //    This file is part of the GNU C Library.
  1169  //
  1170  //    The GNU C Library is free software; you can redistribute it and/or
  1171  //    modify it under the terms of the GNU Lesser General Public
  1172  //    License as published by the Free Software Foundation; either
  1173  //    version 2.1 of the License, or (at your option) any later version.
  1174  //
  1175  //    The GNU C Library is distributed in the hope that it will be useful,
  1176  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1177  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1178  //    Lesser General Public License for more details.
  1179  //
  1180  //    You should have received a copy of the GNU Lesser General Public
  1181  //    License along with the GNU C Library; if not, see
  1182  //    <https://www.gnu.org/licenses/>.
  1183  
  1184  // Never include this file directly; use <sys/types.h> instead.
  1185  
  1186  // A time value that is accurate to the nearest
  1187  //
  1188  //	microsecond but also has a range of years.
  1189  type Timeval = struct {
  1190  	Ftv_sec  X__time_t
  1191  	Ftv_usec X__suseconds_t
  1192  } /* struct_timeval.h:8:1 */
  1193  
  1194  // NB: Include guard matches what <linux/time.h> uses.
  1195  
  1196  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1197  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1198  //    This file is part of the GNU C Library.
  1199  //
  1200  //    The GNU C Library is free software; you can redistribute it and/or
  1201  //    modify it under the terms of the GNU Lesser General Public
  1202  //    License as published by the Free Software Foundation; either
  1203  //    version 2.1 of the License, or (at your option) any later version.
  1204  //
  1205  //    The GNU C Library is distributed in the hope that it will be useful,
  1206  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1207  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1208  //    Lesser General Public License for more details.
  1209  //
  1210  //    You should have received a copy of the GNU Lesser General Public
  1211  //    License along with the GNU C Library; if not, see
  1212  //    <https://www.gnu.org/licenses/>.
  1213  
  1214  // Never include this file directly; use <sys/types.h> instead.
  1215  
  1216  // Endian macros for string.h functions
  1217  //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
  1218  //    This file is part of the GNU C Library.
  1219  //
  1220  //    The GNU C Library is free software; you can redistribute it and/or
  1221  //    modify it under the terms of the GNU Lesser General Public
  1222  //    License as published by the Free Software Foundation; either
  1223  //    version 2.1 of the License, or (at your option) any later version.
  1224  //
  1225  //    The GNU C Library is distributed in the hope that it will be useful,
  1226  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1227  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1228  //    Lesser General Public License for more details.
  1229  //
  1230  //    You should have received a copy of the GNU Lesser General Public
  1231  //    License along with the GNU C Library; if not, see
  1232  //    <http://www.gnu.org/licenses/>.
  1233  
  1234  // POSIX.1b structure for a time value.  This is like a `struct timeval' but
  1235  //
  1236  //	has nanoseconds instead of microseconds.
  1237  type Timespec = struct {
  1238  	Ftv_sec  X__time_t
  1239  	Ftv_nsec X__syscall_slong_t
  1240  } /* struct_timespec.h:10:1 */
  1241  
  1242  type Suseconds_t = X__suseconds_t /* select.h:43:23 */
  1243  
  1244  // The fd_set member is required to be an array of longs.
  1245  type X__fd_mask = int32 /* select.h:49:18 */
  1246  
  1247  // Some versions of <linux/posix_types.h> define this macros.
  1248  // It's easier to assume 8-bit bytes than to get CHAR_BIT.
  1249  
  1250  // fd_set for select and pselect.
  1251  type Fd_set = struct{ F__fds_bits [32]X__fd_mask } /* select.h:70:5 */
  1252  
  1253  // Maximum number of file descriptors in `fd_set'.
  1254  
  1255  // Sometimes the fd_set member is assumed to have this type.
  1256  type Fd_mask = X__fd_mask /* select.h:77:19 */
  1257  
  1258  // Define some inlines helping to catch common problems.
  1259  
  1260  type Blksize_t = X__blksize_t /* types.h:185:21 */
  1261  
  1262  // Types from the Large File Support interface.
  1263  type Blkcnt_t = X__blkcnt64_t     /* types.h:205:22 */ // Type to count number of disk blocks.
  1264  type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
  1265  type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
  1266  
  1267  // Now add the thread types.
  1268  // Declaration of common pthread types for all architectures.
  1269  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  1270  //    This file is part of the GNU C Library.
  1271  //
  1272  //    The GNU C Library is free software; you can redistribute it and/or
  1273  //    modify it under the terms of the GNU Lesser General Public
  1274  //    License as published by the Free Software Foundation; either
  1275  //    version 2.1 of the License, or (at your option) any later version.
  1276  //
  1277  //    The GNU C Library is distributed in the hope that it will be useful,
  1278  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1279  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1280  //    Lesser General Public License for more details.
  1281  //
  1282  //    You should have received a copy of the GNU Lesser General Public
  1283  //    License along with the GNU C Library; if not, see
  1284  //    <https://www.gnu.org/licenses/>.
  1285  
  1286  // For internal mutex and condition variable definitions.
  1287  // Common threading primitives definitions for both POSIX and C11.
  1288  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  1289  //    This file is part of the GNU C Library.
  1290  //
  1291  //    The GNU C Library is free software; you can redistribute it and/or
  1292  //    modify it under the terms of the GNU Lesser General Public
  1293  //    License as published by the Free Software Foundation; either
  1294  //    version 2.1 of the License, or (at your option) any later version.
  1295  //
  1296  //    The GNU C Library is distributed in the hope that it will be useful,
  1297  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1298  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1299  //    Lesser General Public License for more details.
  1300  //
  1301  //    You should have received a copy of the GNU Lesser General Public
  1302  //    License along with the GNU C Library; if not, see
  1303  //    <https://www.gnu.org/licenses/>.
  1304  
  1305  // Arch-specific definitions.  Each architecture must define the following
  1306  //    macros to define the expected sizes of pthread data types:
  1307  //
  1308  //    __SIZEOF_PTHREAD_ATTR_T        - size of pthread_attr_t.
  1309  //    __SIZEOF_PTHREAD_MUTEX_T       - size of pthread_mutex_t.
  1310  //    __SIZEOF_PTHREAD_MUTEXATTR_T   - size of pthread_mutexattr_t.
  1311  //    __SIZEOF_PTHREAD_COND_T        - size of pthread_cond_t.
  1312  //    __SIZEOF_PTHREAD_CONDATTR_T    - size of pthread_condattr_t.
  1313  //    __SIZEOF_PTHREAD_RWLOCK_T      - size of pthread_rwlock_t.
  1314  //    __SIZEOF_PTHREAD_RWLOCKATTR_T  - size of pthread_rwlockattr_t.
  1315  //    __SIZEOF_PTHREAD_BARRIER_T     - size of pthread_barrier_t.
  1316  //    __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  1317  //
  1318  //    The additional macro defines any constraint for the lock alignment
  1319  //    inside the thread structures:
  1320  //
  1321  //    __LOCK_ALIGNMENT - for internal lock/futex usage.
  1322  //
  1323  //    Same idea but for the once locking primitive:
  1324  //
  1325  //    __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  1326  
  1327  // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1328  //    This file is part of the GNU C Library.
  1329  //
  1330  //    The GNU C Library is free software; you can redistribute it and/or
  1331  //    modify it under the terms of the GNU Lesser General Public
  1332  //    License as published by the Free Software Foundation; either
  1333  //    version 2.1 of the License, or (at your option) any later version.
  1334  //
  1335  //    The GNU C Library is distributed in the hope that it will be useful,
  1336  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1337  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1338  //    Lesser General Public License for more details.
  1339  //
  1340  //    You should have received a copy of the GNU Lesser General Public
  1341  //    License along with the GNU C Library; if not, see
  1342  //    <https://www.gnu.org/licenses/>.
  1343  
  1344  // Determine the wordsize from the preprocessor defines.
  1345  
  1346  // Extra attributes for the cleanup functions.
  1347  
  1348  // Common definition of pthread_mutex_t.
  1349  
  1350  type X__pthread_internal_list = struct {
  1351  	F__prev uintptr
  1352  	F__next uintptr
  1353  } /* thread-shared-types.h:49:9 */
  1354  
  1355  // Type to count file system inodes.
  1356  
  1357  // Now add the thread types.
  1358  // Declaration of common pthread types for all architectures.
  1359  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  1360  //    This file is part of the GNU C Library.
  1361  //
  1362  //    The GNU C Library is free software; you can redistribute it and/or
  1363  //    modify it under the terms of the GNU Lesser General Public
  1364  //    License as published by the Free Software Foundation; either
  1365  //    version 2.1 of the License, or (at your option) any later version.
  1366  //
  1367  //    The GNU C Library is distributed in the hope that it will be useful,
  1368  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1369  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1370  //    Lesser General Public License for more details.
  1371  //
  1372  //    You should have received a copy of the GNU Lesser General Public
  1373  //    License along with the GNU C Library; if not, see
  1374  //    <https://www.gnu.org/licenses/>.
  1375  
  1376  // For internal mutex and condition variable definitions.
  1377  // Common threading primitives definitions for both POSIX and C11.
  1378  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  1379  //    This file is part of the GNU C Library.
  1380  //
  1381  //    The GNU C Library is free software; you can redistribute it and/or
  1382  //    modify it under the terms of the GNU Lesser General Public
  1383  //    License as published by the Free Software Foundation; either
  1384  //    version 2.1 of the License, or (at your option) any later version.
  1385  //
  1386  //    The GNU C Library is distributed in the hope that it will be useful,
  1387  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1388  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1389  //    Lesser General Public License for more details.
  1390  //
  1391  //    You should have received a copy of the GNU Lesser General Public
  1392  //    License along with the GNU C Library; if not, see
  1393  //    <https://www.gnu.org/licenses/>.
  1394  
  1395  // Arch-specific definitions.  Each architecture must define the following
  1396  //    macros to define the expected sizes of pthread data types:
  1397  //
  1398  //    __SIZEOF_PTHREAD_ATTR_T        - size of pthread_attr_t.
  1399  //    __SIZEOF_PTHREAD_MUTEX_T       - size of pthread_mutex_t.
  1400  //    __SIZEOF_PTHREAD_MUTEXATTR_T   - size of pthread_mutexattr_t.
  1401  //    __SIZEOF_PTHREAD_COND_T        - size of pthread_cond_t.
  1402  //    __SIZEOF_PTHREAD_CONDATTR_T    - size of pthread_condattr_t.
  1403  //    __SIZEOF_PTHREAD_RWLOCK_T      - size of pthread_rwlock_t.
  1404  //    __SIZEOF_PTHREAD_RWLOCKATTR_T  - size of pthread_rwlockattr_t.
  1405  //    __SIZEOF_PTHREAD_BARRIER_T     - size of pthread_barrier_t.
  1406  //    __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  1407  //
  1408  //    The additional macro defines any constraint for the lock alignment
  1409  //    inside the thread structures:
  1410  //
  1411  //    __LOCK_ALIGNMENT - for internal lock/futex usage.
  1412  //
  1413  //    Same idea but for the once locking primitive:
  1414  //
  1415  //    __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  1416  
  1417  // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1418  //    This file is part of the GNU C Library.
  1419  //
  1420  //    The GNU C Library is free software; you can redistribute it and/or
  1421  //    modify it under the terms of the GNU Lesser General Public
  1422  //    License as published by the Free Software Foundation; either
  1423  //    version 2.1 of the License, or (at your option) any later version.
  1424  //
  1425  //    The GNU C Library is distributed in the hope that it will be useful,
  1426  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1427  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1428  //    Lesser General Public License for more details.
  1429  //
  1430  //    You should have received a copy of the GNU Lesser General Public
  1431  //    License along with the GNU C Library; if not, see
  1432  //    <https://www.gnu.org/licenses/>.
  1433  
  1434  // Determine the wordsize from the preprocessor defines.
  1435  
  1436  // Extra attributes for the cleanup functions.
  1437  
  1438  // Common definition of pthread_mutex_t.
  1439  
  1440  type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
  1441  
  1442  type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
  1443  
  1444  type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
  1445  
  1446  // Arch-specific mutex definitions.  A generic implementation is provided
  1447  //    by sysdeps/nptl/bits/struct_mutex.h.  If required, an architecture
  1448  //    can override it by defining:
  1449  //
  1450  //    1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
  1451  //       definition).  It should contains at least the internal members
  1452  //       defined in the generic version.
  1453  //
  1454  //    2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
  1455  //       atomic operations.
  1456  //
  1457  //    3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
  1458  //       It should initialize the mutex internal flag.
  1459  
  1460  // x86 internal mutex struct definitions.
  1461  //    Copyright (C) 2019-2020 Free Software Foundation, Inc.
  1462  //    This file is part of the GNU C Library.
  1463  //
  1464  //    The GNU C Library is free software; you can redistribute it and/or
  1465  //    modify it under the terms of the GNU Lesser General Public
  1466  //    License as published by the Free Software Foundation; either
  1467  //    version 2.1 of the License, or (at your option) any later version.
  1468  //
  1469  //    The GNU C Library is distributed in the hope that it will be useful,
  1470  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1471  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1472  //    Lesser General Public License for more details.
  1473  //
  1474  //    You should have received a copy of the GNU Lesser General Public
  1475  //    License along with the GNU C Library; if not, see
  1476  //    <http://www.gnu.org/licenses/>.
  1477  
  1478  type X__pthread_mutex_s = struct {
  1479  	F__lock   int32
  1480  	F__count  uint32
  1481  	F__owner  int32
  1482  	F__kind   int32
  1483  	F__nusers uint32
  1484  	F__20     struct {
  1485  		F__ccgo_pad1    [0]uint32
  1486  		F__elision_data struct {
  1487  			F__espins   int16
  1488  			F__eelision int16
  1489  		}
  1490  	}
  1491  } /* struct_mutex.h:22:1 */
  1492  
  1493  // Arch-sepecific read-write lock definitions.  A generic implementation is
  1494  //    provided by struct_rwlock.h.  If required, an architecture can override it
  1495  //    by defining:
  1496  //
  1497  //    1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
  1498  //       It should contain at least the internal members defined in the
  1499  //       generic version.
  1500  //
  1501  //    2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
  1502  //       It should initialize the rwlock internal type.
  1503  
  1504  // x86 internal rwlock struct definitions.
  1505  //    Copyright (C) 2019-2020 Free Software Foundation, Inc.
  1506  //
  1507  //    This file is part of the GNU C Library.
  1508  //
  1509  //    The GNU C Library is free software; you can redistribute it and/or
  1510  //    modify it under the terms of the GNU Lesser General Public
  1511  //    License as published by the Free Software Foundation; either
  1512  //    version 2.1 of the License, or (at your option) any later version.
  1513  //
  1514  //    The GNU C Library is distributed in the hope that it will be useful,
  1515  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1516  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1517  //    Lesser General Public License for more details.
  1518  //
  1519  //    You should have received a copy of the GNU Lesser General Public
  1520  //    License along with the GNU C Library; if not, see
  1521  //    <http://www.gnu.org/licenses/>.
  1522  
  1523  type X__pthread_rwlock_arch_t = struct {
  1524  	F__readers       uint32
  1525  	F__writers       uint32
  1526  	F__wrphase_futex uint32
  1527  	F__writers_futex uint32
  1528  	F__pad3          uint32
  1529  	F__pad4          uint32
  1530  	F__flags         uint8
  1531  	F__shared        uint8
  1532  	F__rwelision     int8
  1533  	F__pad2          uint8
  1534  	F__cur_writer    int32
  1535  } /* struct_rwlock.h:23:1 */
  1536  
  1537  // Common definition of pthread_cond_t.
  1538  
  1539  type X__pthread_cond_s = struct {
  1540  	F__0            struct{ F__wseq uint64 }
  1541  	F__8            struct{ F__g1_start uint64 }
  1542  	F__g_refs       [2]uint32
  1543  	F__g_size       [2]uint32
  1544  	F__g1_orig_size uint32
  1545  	F__wrefs        uint32
  1546  	F__g_signals    [2]uint32
  1547  } /* thread-shared-types.h:92:1 */
  1548  
  1549  // Thread identifiers.  The structure of the attribute type is not
  1550  //
  1551  //	exposed on purpose.
  1552  type Pthread_t = uint32 /* pthreadtypes.h:27:27 */
  1553  
  1554  // Data structures for mutex handling.  The structure of the attribute
  1555  //
  1556  //	type is not exposed on purpose.
  1557  type Pthread_mutexattr_t = struct {
  1558  	F__ccgo_pad1 [0]uint32
  1559  	F__size      [4]int8
  1560  } /* pthreadtypes.h:36:3 */
  1561  
  1562  // Data structure for condition variable handling.  The structure of
  1563  //
  1564  //	the attribute type is not exposed on purpose.
  1565  type Pthread_condattr_t = struct {
  1566  	F__ccgo_pad1 [0]uint32
  1567  	F__size      [4]int8
  1568  } /* pthreadtypes.h:45:3 */
  1569  
  1570  // Keys for thread-specific data
  1571  type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
  1572  
  1573  // Once-only execution
  1574  type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
  1575  
  1576  type Pthread_attr_t1 = struct {
  1577  	F__ccgo_pad1 [0]uint32
  1578  	F__size      [36]int8
  1579  } /* pthreadtypes.h:56:1 */
  1580  
  1581  type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */
  1582  
  1583  type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */
  1584  
  1585  type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */
  1586  
  1587  // Data structure for reader-writer lock variable handling.  The
  1588  //
  1589  //	structure of the attribute type is deliberately not exposed.
  1590  type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
  1591  
  1592  type Pthread_rwlockattr_t = struct {
  1593  	F__ccgo_pad1 [0]uint32
  1594  	F__size      [8]int8
  1595  } /* pthreadtypes.h:97:3 */
  1596  
  1597  // POSIX spinlock data type.
  1598  type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
  1599  
  1600  // POSIX barriers data type.  The structure of the type is
  1601  //
  1602  //	deliberately not exposed.
  1603  type Pthread_barrier_t = struct {
  1604  	F__ccgo_pad1 [0]uint32
  1605  	F__size      [20]int8
  1606  } /* pthreadtypes.h:112:3 */
  1607  
  1608  type Pthread_barrierattr_t = struct {
  1609  	F__ccgo_pad1 [0]uint32
  1610  	F__size      [4]int8
  1611  } /* pthreadtypes.h:118:3 */
  1612  
  1613  // Type for length arguments in socket calls.
  1614  type Socklen_t = X__socklen_t /* socket.h:33:21 */
  1615  
  1616  // Protocol families.
  1617  
  1618  // Address families.
  1619  
  1620  // Socket level values.  Others are defined in the appropriate headers.
  1621  //
  1622  //    XXX These definitions also should go into the appropriate headers as
  1623  //    far as they are available.
  1624  
  1625  // Maximum queue length specifiable by listen.
  1626  
  1627  // Get the definition of the macro to define the common sockaddr members.
  1628  // Definition of struct sockaddr_* common members and sizes, generic version.
  1629  //    Copyright (C) 1995-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  // Never include this file directly; use <sys/socket.h> instead.
  1647  
  1648  // POSIX.1g specifies this type name for the `sa_family' member.
  1649  type Sa_family_t = uint16 /* sockaddr.h:28:28 */
  1650  
  1651  // This macro is used to declare the initial common members
  1652  //    of the data types used for socket addresses, `struct sockaddr',
  1653  //    `struct sockaddr_in', `struct sockaddr_un', etc.
  1654  
  1655  // Size of struct sockaddr_storage.
  1656  
  1657  // Structure describing a generic socket address.
  1658  type Sockaddr = struct {
  1659  	Fsa_family Sa_family_t
  1660  	Fsa_data   [14]int8
  1661  } /* socket.h:178:1 */
  1662  
  1663  // Structure large enough to hold any socket address (with the historical
  1664  //    exception of AF_UNIX).
  1665  
  1666  type Sockaddr_storage = struct {
  1667  	Fss_family    Sa_family_t
  1668  	F__ss_padding [122]int8
  1669  	F__ss_align   uint32
  1670  } /* socket.h:191:1 */
  1671  
  1672  // Structure describing messages sent by
  1673  //
  1674  //	`sendmsg' and received by `recvmsg'.
  1675  type Msghdr = struct {
  1676  	Fmsg_name       uintptr
  1677  	Fmsg_namelen    Socklen_t
  1678  	Fmsg_iov        uintptr
  1679  	Fmsg_iovlen     Size_t
  1680  	Fmsg_control    uintptr
  1681  	Fmsg_controllen Size_t
  1682  	Fmsg_flags      int32
  1683  } /* socket.h:257:1 */
  1684  
  1685  // Structure used for storage of ancillary data object information.
  1686  type Cmsghdr = struct {
  1687  	F__ccgo_pad1 [0]uint32
  1688  	Fcmsg_len    Size_t
  1689  	Fcmsg_level  int32
  1690  	Fcmsg_type   int32
  1691  } /* socket.h:275:1 */
  1692  
  1693  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1694  
  1695  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1696  
  1697  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1698  
  1699  // This allows for 1024 file descriptors: if NR_OPEN is ever grown
  1700  // beyond that you'll have to change this too. But 1024 fd's seem to be
  1701  // enough even for such "real" unices like OSF/1, so hopefully this is
  1702  // one limit that doesn't have to be changed [again].
  1703  //
  1704  // Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in
  1705  // <sys/time.h> (and thus <linux/time.h>) - but this is a more logical
  1706  // place for them. Solved by having dummy defines in <sys/time.h>.
  1707  
  1708  // This macro may have been defined in <gnu/types.h>. But we always
  1709  // use the one here.
  1710  
  1711  type X__kernel_fd_set = struct{ Ffds_bits [32]uint32 } /* posix_types.h:27:3 */
  1712  
  1713  // Type of a signal handler.
  1714  type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */
  1715  
  1716  // Type of a SYSV IPC key.
  1717  type X__kernel_key_t = int32 /* posix_types.h:33:13 */
  1718  type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */
  1719  
  1720  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1721  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1722  
  1723  // This file is generally used by user-level software, so you need to
  1724  // be a little careful about namespace pollution etc.  Also, we cannot
  1725  // assume GCC is being used.
  1726  
  1727  type X__kernel_mode_t = uint16 /* posix_types_32.h:11:24 */
  1728  
  1729  type X__kernel_ipc_pid_t = uint16 /* posix_types_32.h:14:24 */
  1730  
  1731  type X__kernel_uid_t = uint16 /* posix_types_32.h:17:24 */
  1732  type X__kernel_gid_t = uint16 /* posix_types_32.h:18:24 */
  1733  
  1734  type X__kernel_old_dev_t = uint16 /* posix_types_32.h:21:24 */
  1735  
  1736  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1737  
  1738  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1739  
  1740  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1741  
  1742  // There seems to be no way of detecting this automatically from user
  1743  // space, so 64 bit architectures should override this in their
  1744  // bitsperlong.h. In particular, an architecture that supports
  1745  // both 32 and 64 bit user space must not rely on CONFIG_64BIT
  1746  // to decide it, but rather check a compiler provided macro.
  1747  
  1748  // This file is generally used by user-level software, so you need to
  1749  // be a little careful about namespace pollution etc.
  1750  //
  1751  // First the types that are often defined in different ways across
  1752  // architectures, so that you can override them.
  1753  
  1754  type X__kernel_long_t = int32   /* posix_types.h:15:15 */
  1755  type X__kernel_ulong_t = uint32 /* posix_types.h:16:23 */
  1756  
  1757  type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */
  1758  
  1759  type X__kernel_pid_t = int32 /* posix_types.h:28:14 */
  1760  
  1761  type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */
  1762  
  1763  type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */
  1764  
  1765  type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */
  1766  type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */
  1767  
  1768  type X__kernel_old_uid_t = X__kernel_uid_t /* posix_types.h:54:24 */
  1769  type X__kernel_old_gid_t = X__kernel_gid_t /* posix_types.h:55:24 */
  1770  
  1771  // Most 32 bit architectures use "unsigned int" size_t,
  1772  // and all 64 bit architectures use "unsigned long" size_t.
  1773  type X__kernel_size_t = uint32   /* posix_types.h:68:22 */
  1774  type X__kernel_ssize_t = int32   /* posix_types.h:69:14 */
  1775  type X__kernel_ptrdiff_t = int32 /* posix_types.h:70:14 */
  1776  
  1777  type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */
  1778  
  1779  // anything below here should be completely generic
  1780  type X__kernel_off_t = X__kernel_long_t      /* posix_types.h:87:25 */
  1781  type X__kernel_loff_t = int64                /* posix_types.h:88:19 */
  1782  type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */
  1783  type X__kernel_time_t = X__kernel_long_t     /* posix_types.h:90:25 */
  1784  type X__kernel_time64_t = int64              /* posix_types.h:91:19 */
  1785  type X__kernel_clock_t = X__kernel_long_t    /* posix_types.h:92:25 */
  1786  type X__kernel_timer_t = int32               /* posix_types.h:93:14 */
  1787  type X__kernel_clockid_t = int32             /* posix_types.h:94:14 */
  1788  type X__kernel_caddr_t = uintptr             /* posix_types.h:95:14 */
  1789  type X__kernel_uid16_t = uint16              /* posix_types.h:96:24 */
  1790  type X__kernel_gid16_t = uint16              /* posix_types.h:97:24 */
  1791  
  1792  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1793  
  1794  // Socket-level I/O control calls.
  1795  
  1796  // For setsockopt(2)
  1797  
  1798  // Security levels - as per NRL IPv6 - don't actually do anything
  1799  
  1800  // Socket filtering
  1801  
  1802  // Instruct lower device to use last 4-bytes of skb data as FCS
  1803  
  1804  // Structure used to manipulate the SO_LINGER option.
  1805  type Linger = struct {
  1806  	Fl_onoff  int32
  1807  	Fl_linger int32
  1808  } /* socket.h:361:1 */
  1809  
  1810  // This is the 4.3 BSD `struct sockaddr' format, which is used as wire
  1811  //
  1812  //	format in the grotty old 4.3 `talk' protocol.
  1813  type Osockaddr = struct {
  1814  	Fsa_family uint16
  1815  	Fsa_data   [14]uint8
  1816  } /* struct_osockaddr.h:6:1 */
  1817  
  1818  // Define some macros helping to catch buffer overflows.
  1819  
  1820  var _ int8 /* gen.c:2:13: */