github.com/afumu/libc@v0.0.6/dirent/dirent_netbsd_arm.go (about)

     1  // Code generated by 'ccgo dirent/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 dirent/dirent_netbsd_arm.go -pkgname dirent', DO NOT EDIT.
     2  
     3  package dirent
     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  	BIG_ENDIAN                    = 4321                 // endian.h:101:1:
    19  	BYTE_ORDER                    = 1234                 // endian.h:103:1:
    20  	DIRBLKSIZ                     = 1024                 // dirent.h:55:1:
    21  	DTF_HIDEW                     = 0x0001               // dirent.h:79:1:
    22  	DTF_NODUP                     = 0x0002               // dirent.h:80:1:
    23  	DTF_REWIND                    = 0x0004               // dirent.h:81:1:
    24  	DT_BLK                        = 6                    // dirent.h:71:1:
    25  	DT_CHR                        = 2                    // dirent.h:69:1:
    26  	DT_DIR                        = 4                    // dirent.h:70:1:
    27  	DT_FIFO                       = 1                    // dirent.h:68:1:
    28  	DT_LNK                        = 10                   // dirent.h:73:1:
    29  	DT_REG                        = 8                    // dirent.h:72:1:
    30  	DT_SOCK                       = 12                   // dirent.h:74:1:
    31  	DT_UNKNOWN                    = 0                    // dirent.h:67:1:
    32  	DT_WHT                        = 14                   // dirent.h:75:1:
    33  	FD_SETSIZE                    = 256                  // fd_set.h:59:1:
    34  	INT16_MAX                     = 32767                // common_int_limits.h:53:1:
    35  	INT16_MIN                     = -32768               // common_int_limits.h:47:1:
    36  	INT32_MAX                     = 2147483647           // common_int_limits.h:54:1:
    37  	INT32_MIN                     = -2147483648          // common_int_limits.h:48:1:
    38  	INT64_MAX                     = 9223372036854775807  // common_int_limits.h:55:1:
    39  	INT64_MIN                     = -9223372036854775808 // common_int_limits.h:49:1:
    40  	INT8_MAX                      = 127                  // common_int_limits.h:52:1:
    41  	INT8_MIN                      = -128                 // common_int_limits.h:46:1:
    42  	INTMAX_MAX                    = 9223372036854775807  // common_int_limits.h:111:1:
    43  	INTMAX_MIN                    = -9223372036854775808 // common_int_limits.h:110:1:
    44  	INTPTR_MAX                    = 2147483647           // common_int_limits.h:105:1:
    45  	INTPTR_MIN                    = -2147483648          // common_int_limits.h:104:1:
    46  	INT_FAST16_MAX                = 2147483647           // common_int_limits.h:93:1:
    47  	INT_FAST16_MIN                = -2147483648          // common_int_limits.h:87:1:
    48  	INT_FAST32_MAX                = 2147483647           // common_int_limits.h:94:1:
    49  	INT_FAST32_MIN                = -2147483648          // common_int_limits.h:88:1:
    50  	INT_FAST64_MAX                = 9223372036854775807  // common_int_limits.h:95:1:
    51  	INT_FAST64_MIN                = -9223372036854775808 // common_int_limits.h:89:1:
    52  	INT_FAST8_MAX                 = 2147483647           // common_int_limits.h:92:1:
    53  	INT_FAST8_MIN                 = -2147483648          // common_int_limits.h:86:1:
    54  	INT_LEAST16_MAX               = 32767                // common_int_limits.h:73:1:
    55  	INT_LEAST16_MIN               = -32768               // common_int_limits.h:67:1:
    56  	INT_LEAST32_MAX               = 2147483647           // common_int_limits.h:74:1:
    57  	INT_LEAST32_MIN               = -2147483648          // common_int_limits.h:68:1:
    58  	INT_LEAST64_MAX               = 9223372036854775807  // common_int_limits.h:75:1:
    59  	INT_LEAST64_MIN               = -9223372036854775808 // common_int_limits.h:69:1:
    60  	INT_LEAST8_MAX                = 127                  // common_int_limits.h:72:1:
    61  	INT_LEAST8_MIN                = -128                 // common_int_limits.h:66:1:
    62  	LITTLE_ENDIAN                 = 1234                 // endian.h:100:1:
    63  	MAXNAMLEN                     = 511                  // dirent.h:56:1:
    64  	NBBY                          = 8                    // types.h:316:1:
    65  	NFDBITS                       = 32                   // fd_set.h:93:1:
    66  	NODEVMAJOR                    = -1                   // types.h:258:1:
    67  	PDP_ENDIAN                    = 3412                 // endian.h:102:1:
    68  	PTRDIFF_MAX                   = 2147483647           // common_int_limits.h:121:1:
    69  	PTRDIFF_MIN                   = -2147483648          // common_int_limits.h:120:1:
    70  	SIG_ATOMIC_MAX                = 2147483647           // common_int_limits.h:125:1:
    71  	SIG_ATOMIC_MIN                = -2147483648          // common_int_limits.h:124:1:
    72  	SIZE_MAX                      = 4294967295           // common_int_limits.h:128:1:
    73  	UINT16_MAX                    = 65535                // common_int_limits.h:59:1:
    74  	UINT32_MAX                    = 4294967295           // common_int_limits.h:60:1:
    75  	UINT64_MAX                    = 18446744073709551615 // common_int_limits.h:61:1:
    76  	UINT8_MAX                     = 255                  // common_int_limits.h:58:1:
    77  	UINTMAX_MAX                   = 18446744073709551615 // common_int_limits.h:112:1:
    78  	UINTPTR_MAX                   = 4294967295           // common_int_limits.h:106:1:
    79  	UINT_FAST16_MAX               = 4294967295           // common_int_limits.h:99:1:
    80  	UINT_FAST32_MAX               = 4294967295           // common_int_limits.h:100:1:
    81  	UINT_FAST64_MAX               = 18446744073709551615 // common_int_limits.h:101:1:
    82  	UINT_FAST8_MAX                = 4294967295           // common_int_limits.h:98:1:
    83  	UINT_LEAST16_MAX              = 65535                // common_int_limits.h:79:1:
    84  	UINT_LEAST32_MAX              = 4294967295           // common_int_limits.h:80:1:
    85  	UINT_LEAST64_MAX              = 18446744073709551615 // common_int_limits.h:81:1:
    86  	UINT_LEAST8_MAX               = 255                  // common_int_limits.h:78:1:
    87  	WCHAR_MAX                     = 2147483647           // wchar_limits.h:50:1:
    88  	WCHAR_MIN                     = -2147483648          // wchar_limits.h:42:1:
    89  	WINT_MAX                      = 2147483647           // wchar_limits.h:68:1:
    90  	WINT_MIN                      = -2147483648          // wchar_limits.h:60:1:
    91  	X_ARM_ARCH_4T                 = 0                    // cdefs.h:44:1:
    92  	X_ARM_ARCH_5                  = 0                    // cdefs.h:40:1:
    93  	X_ARM_ARCH_5T                 = 0                    // cdefs.h:36:1:
    94  	X_ARM_ARCH_6                  = 0                    // cdefs.h:31:1:
    95  	X_ARM_ARCH_7                  = 0                    // cdefs.h:20:1:
    96  	X_ARM_ARCH_DWORD_OK           = 0                    // cdefs.h:51:1:
    97  	X_ARM_ARCH_T2                 = 0                    // cdefs.h:24:1:
    98  	X_ARM_BSWAP_H_                = 0                    // bswap.h:4:1:
    99  	X_ARM_BYTE_SWAP_H_            = 0                    // byte_swap.h:33:1:
   100  	X_ARM_CDEFS_H_                = 0                    // cdefs.h:4:1:
   101  	X_ARM_INT_CONST_H_            = 0                    // int_const.h:33:1:
   102  	X_ARM_INT_LIMITS_H_           = 0                    // int_limits.h:33:1:
   103  	X_ARM_INT_MWGWTYPES_H_        = 0                    // int_mwgwtypes.h:33:1:
   104  	X_ARM_INT_TYPES_H_            = 0                    // int_types.h:33:1:
   105  	X_ARM_TYPES_H_                = 0                    // types.h:35:1:
   106  	X_ARM_WCHAR_LIMITS_H_         = 0                    // wchar_limits.h:33:1:
   107  	X_BIG_ENDIAN                  = 4321                 // endian.h:44:1:
   108  	X_BSD_INT16_T_                = 0                    // types.h:65:1:
   109  	X_BSD_INT32_T_                = 0                    // types.h:75:1:
   110  	X_BSD_INT64_T_                = 0                    // types.h:85:1:
   111  	X_BSD_INT8_T_                 = 0                    // types.h:55:1:
   112  	X_BSD_INTPTR_T_               = 0                    // stdint.h:80:1:
   113  	X_BSD_UINT16_T_               = 0                    // types.h:70:1:
   114  	X_BSD_UINT32_T_               = 0                    // types.h:80:1:
   115  	X_BSD_UINT64_T_               = 0                    // types.h:90:1:
   116  	X_BSD_UINT8_T_                = 0                    // types.h:60:1:
   117  	X_BSD_UINTPTR_T_              = 0                    // stdint.h:85:1:
   118  	X_BYTE_ORDER                  = 1234                 // endian_machdep.h:7:1:
   119  	X_DIRENT_H_                   = 0                    // dirent.h:35:1:
   120  	X_FILE_OFFSET_BITS            = 64                   // <builtin>:25:1:
   121  	X_LIB_PTHREAD_TYPES_H         = 0                    // pthread_types.h:33:1:
   122  	X_LITTLE_ENDIAN               = 1234                 // endian.h:43:1:
   123  	X_NETBSD_SOURCE               = 1                    // featuretest.h:70:1:
   124  	X_PDP_ENDIAN                  = 3412                 // endian.h:45:1:
   125  	X_PT_BARRIERATTR_DEAD         = 0xDEAD0808           // pthread_types.h:278:1:
   126  	X_PT_BARRIERATTR_MAGIC        = 0x88880808           // pthread_types.h:277:1:
   127  	X_PT_BARRIER_DEAD             = 0xDEAD0008           // pthread_types.h:270:1:
   128  	X_PT_BARRIER_MAGIC            = 0x88880008           // pthread_types.h:269:1:
   129  	X_PT_CONDATTR_DEAD            = 0xDEAD0006           // pthread_types.h:197:1:
   130  	X_PT_CONDATTR_MAGIC           = 0x66660006           // pthread_types.h:196:1:
   131  	X_PT_COND_DEAD                = 0xDEAD0005           // pthread_types.h:182:1:
   132  	X_PT_COND_MAGIC               = 0x55550005           // pthread_types.h:181:1:
   133  	X_PT_MUTEXATTR_DEAD           = 0xDEAD0004           // pthread_types.h:167:1:
   134  	X_PT_MUTEXATTR_MAGIC          = 0x44440004           // pthread_types.h:166:1:
   135  	X_PT_MUTEX_DEAD               = 0xDEAD0003           // pthread_types.h:139:1:
   136  	X_PT_MUTEX_MAGIC              = 0x33330003           // pthread_types.h:138:1:
   137  	X_PT_RWLOCKATTR_DEAD          = 0xDEAD0909           // pthread_types.h:253:1:
   138  	X_PT_RWLOCKATTR_MAGIC         = 0x99990909           // pthread_types.h:252:1:
   139  	X_PT_RWLOCK_DEAD              = 0xDEAD0009           // pthread_types.h:236:1:
   140  	X_PT_RWLOCK_MAGIC             = 0x99990009           // pthread_types.h:235:1:
   141  	X_PT_SPINLOCK_DEAD            = 0xDEAD0007           // pthread_types.h:213:1:
   142  	X_PT_SPINLOCK_MAGIC           = 0x77770007           // pthread_types.h:212:1:
   143  	X_PT_SPINLOCK_PSHARED         = 0x00000001           // pthread_types.h:214:1:
   144  	X_QUAD_HIGHWORD               = 1                    // endian.h:84:1:
   145  	X_QUAD_LOWWORD                = 0                    // endian.h:85:1:
   146  	X_SIZE_T                      = 0                    // types.h:279:1:
   147  	X_SYS_ANSI_H_                 = 0                    // ansi.h:33:1:
   148  	X_SYS_BSWAP_H_                = 0                    // bswap.h:6:1:
   149  	X_SYS_CDEFS_ELF_H_            = 0                    // cdefs_elf.h:31:1:
   150  	X_SYS_CDEFS_H_                = 0                    // cdefs.h:37:1:
   151  	X_SYS_COMMON_ANSI_H_          = 0                    // common_ansi.h:33:1:
   152  	X_SYS_COMMON_INT_LIMITS_H_    = 0                    // common_int_limits.h:33:1:
   153  	X_SYS_COMMON_INT_MWGWTYPES_H_ = 0                    // common_int_mwgwtypes.h:33:1:
   154  	X_SYS_COMMON_INT_TYPES_H_     = 0                    // common_int_types.h:33:1:
   155  	X_SYS_DIRENT_H_               = 0                    // dirent.h:35:1:
   156  	X_SYS_ENDIAN_H_               = 0                    // endian.h:35:1:
   157  	X_SYS_FD_SET_H_               = 0                    // fd_set.h:35:1:
   158  	X_SYS_NULL_H_                 = 0                    // null.h:9:1:
   159  	X_SYS_STDINT_H_               = 0                    // stdint.h:33:1:
   160  	X_SYS_TYPES_H_                = 0                    // types.h:40:1:
   161  )
   162  
   163  type Ptrdiff_t = int32 /* <builtin>:3:26 */
   164  
   165  type Size_t = uint32 /* <builtin>:9:23 */
   166  
   167  type Wchar_t = int32 /* <builtin>:15:24 */
   168  
   169  type X__builtin_va_list = uintptr /* <builtin>:46:14 */
   170  type X__float128 = float64        /* <builtin>:47:21 */
   171  
   172  // return true if value 'a' fits in type 't'
   173  
   174  //	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
   175  
   176  // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
   177  // Public domain.
   178  //
   179  // NOTE: Do not protect this header against multiple inclusion.  Doing
   180  // so can have subtle side-effects due to header file inclusion order
   181  // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
   182  // protect each CPP macro that we want to supply.
   183  
   184  // Feature-test macros are defined by several standards, and allow an
   185  // application to specify what symbols they want the system headers to
   186  // expose, and hence what standard they want them to conform to.
   187  // There are two classes of feature-test macros.  The first class
   188  // specify complete standards, and if one of these is defined, header
   189  // files will try to conform to the relevant standard.  They are:
   190  //
   191  // ANSI macros:
   192  // _ANSI_SOURCE			ANSI C89
   193  //
   194  // POSIX macros:
   195  // _POSIX_SOURCE == 1		IEEE Std 1003.1 (version?)
   196  // _POSIX_C_SOURCE == 1		IEEE Std 1003.1-1990
   197  // _POSIX_C_SOURCE == 2		IEEE Std 1003.2-1992
   198  // _POSIX_C_SOURCE == 199309L	IEEE Std 1003.1b-1993
   199  // _POSIX_C_SOURCE == 199506L	ISO/IEC 9945-1:1996
   200  // _POSIX_C_SOURCE == 200112L	IEEE Std 1003.1-2001
   201  // _POSIX_C_SOURCE == 200809L   IEEE Std 1003.1-2008
   202  //
   203  // X/Open macros:
   204  // _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
   205  // _XOPEN_SOURCE_EXTENDED == 1	XSH4.2 UNIX extensions
   206  // _XOPEN_SOURCE == 500		System Interfaces and Headers, Issue 5
   207  // _XOPEN_SOURCE == 520		Networking Services (XNS), Issue 5.2
   208  // _XOPEN_SOURCE == 600		IEEE Std 1003.1-2001, XSI option
   209  // _XOPEN_SOURCE == 700		IEEE Std 1003.1-2008, XSI option
   210  //
   211  // NetBSD macros:
   212  // _NETBSD_SOURCE == 1		Make all NetBSD features available.
   213  //
   214  // If more than one of these "major" feature-test macros is defined,
   215  // then the set of facilities provided (and namespace used) is the
   216  // union of that specified by the relevant standards, and in case of
   217  // conflict, the earlier standard in the above list has precedence (so
   218  // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
   219  // of rename() that's used is the POSIX one).  If none of the "major"
   220  // feature-test macros is defined, _NETBSD_SOURCE is assumed.
   221  //
   222  // There are also "minor" feature-test macros, which enable extra
   223  // functionality in addition to some base standard.  They should be
   224  // defined along with one of the "major" macros.  The "minor" macros
   225  // are:
   226  //
   227  // _REENTRANT
   228  // _ISOC99_SOURCE
   229  // _ISOC11_SOURCE
   230  // _LARGEFILE_SOURCE		Large File Support
   231  //		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
   232  
   233  //	$NetBSD: int_types.h,v 1.17 2014/07/25 21:43:13 joerg Exp $
   234  
   235  // -
   236  // Copyright (c) 2014 The NetBSD Foundation, Inc.
   237  // All rights reserved.
   238  //
   239  // This code is derived from software contributed to The NetBSD Foundation
   240  // by Matt Thomas of 3am Software Foundry.
   241  //
   242  // Redistribution and use in source and binary forms, with or without
   243  // modification, are permitted provided that the following conditions
   244  // are met:
   245  // 1. Redistributions of source code must retain the above copyright
   246  //    notice, this list of conditions and the following disclaimer.
   247  // 2. Redistributions in binary form must reproduce the above copyright
   248  //    notice, this list of conditions and the following disclaimer in the
   249  //    documentation and/or other materials provided with the distribution.
   250  //
   251  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   252  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   253  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   254  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   255  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   256  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   257  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   258  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   259  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   260  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   261  // POSSIBILITY OF SUCH DAMAGE.
   262  
   263  //	$NetBSD: common_int_types.h,v 1.1 2014/07/25 21:43:13 joerg Exp $
   264  
   265  // -
   266  // Copyright (c) 2014 The NetBSD Foundation, Inc.
   267  // All rights reserved.
   268  //
   269  // This code is derived from software contributed to The NetBSD Foundation
   270  // by Joerg Sonnenberger.
   271  //
   272  // Redistribution and use in source and binary forms, with or without
   273  // modification, are permitted provided that the following conditions
   274  // are met:
   275  // 1. Redistributions of source code must retain the above copyright
   276  //    notice, this list of conditions and the following disclaimer.
   277  // 2. Redistributions in binary form must reproduce the above copyright
   278  //    notice, this list of conditions and the following disclaimer in the
   279  //    documentation and/or other materials provided with the distribution.
   280  //
   281  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   282  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   283  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   284  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   285  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   286  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   287  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   288  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   289  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   290  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   291  // POSSIBILITY OF SUCH DAMAGE.
   292  
   293  // 7.18.1 Integer types
   294  
   295  // 7.18.1.1 Exact-width integer types
   296  
   297  type X__int8_t = int8     /* common_int_types.h:45:27 */
   298  type X__uint8_t = uint8   /* common_int_types.h:46:27 */
   299  type X__int16_t = int16   /* common_int_types.h:47:27 */
   300  type X__uint16_t = uint16 /* common_int_types.h:48:27 */
   301  type X__int32_t = int32   /* common_int_types.h:49:27 */
   302  type X__uint32_t = uint32 /* common_int_types.h:50:27 */
   303  type X__int64_t = int64   /* common_int_types.h:51:27 */
   304  type X__uint64_t = uint64 /* common_int_types.h:52:27 */
   305  
   306  // 7.18.1.4 Integer types capable of holding object pointers
   307  
   308  type X__intptr_t = int32   /* common_int_types.h:58:27 */
   309  type X__uintptr_t = uint32 /* common_int_types.h:59:26 */
   310  
   311  // This should have always been an 8-bit type, but since it's been exposed
   312  // to user-space, we don't want ABI breakage there.
   313  type X__cpu_simple_lock_nv_t = int32 /* types.h:75:14 */
   314  type X__register_t = int32           /* types.h:77:14 */
   315  
   316  //	$NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $
   317  
   318  //	$NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $
   319  
   320  // -
   321  // Copyright (c) 2014 The NetBSD Foundation, Inc.
   322  // All rights reserved.
   323  //
   324  // This code is derived from software contributed to The NetBSD Foundation
   325  // by Matt Thomas of 3am Software Foundry.
   326  //
   327  // Redistribution and use in source and binary forms, with or without
   328  // modification, are permitted provided that the following conditions
   329  // are met:
   330  // 1. Redistributions of source code must retain the above copyright
   331  //    notice, this list of conditions and the following disclaimer.
   332  // 2. Redistributions in binary form must reproduce the above copyright
   333  //    notice, this list of conditions and the following disclaimer in the
   334  //    documentation and/or other materials provided with the distribution.
   335  //
   336  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   337  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   338  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   339  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   340  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   341  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   342  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   343  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   344  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   345  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   346  // POSSIBILITY OF SUCH DAMAGE.
   347  
   348  //	$NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $
   349  
   350  // * Copyright (c) 1991, 1993
   351  //	The Regents of the University of California.  All rights reserved.
   352  //
   353  // This code is derived from software contributed to Berkeley by
   354  // Berkeley Software Design, Inc.
   355  //
   356  // Redistribution and use in source and binary forms, with or without
   357  // modification, are permitted provided that the following conditions
   358  // are met:
   359  // 1. Redistributions of source code must retain the above copyright
   360  //    notice, this list of conditions and the following disclaimer.
   361  // 2. Redistributions in binary form must reproduce the above copyright
   362  //    notice, this list of conditions and the following disclaimer in the
   363  //    documentation and/or other materials provided with the distribution.
   364  // 3. Neither the name of the University nor the names of its contributors
   365  //    may be used to endorse or promote products derived from this software
   366  //    without specific prior written permission.
   367  //
   368  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   369  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   370  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   371  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   372  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   373  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   374  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   375  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   376  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   377  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   378  // SUCH DAMAGE.
   379  //
   380  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
   381  
   382  //	$NetBSD: int_types.h,v 1.17 2014/07/25 21:43:13 joerg Exp $
   383  
   384  // -
   385  // Copyright (c) 2014 The NetBSD Foundation, Inc.
   386  // All rights reserved.
   387  //
   388  // This code is derived from software contributed to The NetBSD Foundation
   389  // by Matt Thomas of 3am Software Foundry.
   390  //
   391  // Redistribution and use in source and binary forms, with or without
   392  // modification, are permitted provided that the following conditions
   393  // are met:
   394  // 1. Redistributions of source code must retain the above copyright
   395  //    notice, this list of conditions and the following disclaimer.
   396  // 2. Redistributions in binary form must reproduce the above copyright
   397  //    notice, this list of conditions and the following disclaimer in the
   398  //    documentation and/or other materials provided with the distribution.
   399  //
   400  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   401  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   402  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   403  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   404  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   405  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   406  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   407  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   408  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   409  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   410  // POSSIBILITY OF SUCH DAMAGE.
   411  
   412  // Types which are fundamental to the implementation and may appear in
   413  // more than one standard header are defined here.  Standard headers
   414  // then use:
   415  //	#ifdef	_BSD_SIZE_T_
   416  //	typedef	_BSD_SIZE_T_ size_t;
   417  //	#undef	_BSD_SIZE_T_
   418  //	#endif
   419  
   420  //	$NetBSD: int_types.h,v 1.17 2014/07/25 21:43:13 joerg Exp $
   421  
   422  // -
   423  // Copyright (c) 2014 The NetBSD Foundation, Inc.
   424  // All rights reserved.
   425  //
   426  // This code is derived from software contributed to The NetBSD Foundation
   427  // by Matt Thomas of 3am Software Foundry.
   428  //
   429  // Redistribution and use in source and binary forms, with or without
   430  // modification, are permitted provided that the following conditions
   431  // are met:
   432  // 1. Redistributions of source code must retain the above copyright
   433  //    notice, this list of conditions and the following disclaimer.
   434  // 2. Redistributions in binary form must reproduce the above copyright
   435  //    notice, this list of conditions and the following disclaimer in the
   436  //    documentation and/or other materials provided with the distribution.
   437  //
   438  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   439  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   440  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   441  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   442  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   443  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   444  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   445  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   446  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   447  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   448  // POSSIBILITY OF SUCH DAMAGE.
   449  
   450  //	$NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $
   451  
   452  // -
   453  // Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
   454  // All rights reserved.
   455  //
   456  // This code is derived from software contributed to The NetBSD Foundation
   457  // by Jun-ichiro itojun Hagino and by Klaus Klein.
   458  //
   459  // Redistribution and use in source and binary forms, with or without
   460  // modification, are permitted provided that the following conditions
   461  // are met:
   462  // 1. Redistributions of source code must retain the above copyright
   463  //    notice, this list of conditions and the following disclaimer.
   464  // 2. Redistributions in binary form must reproduce the above copyright
   465  //    notice, this list of conditions and the following disclaimer in the
   466  //    documentation and/or other materials provided with the distribution.
   467  //
   468  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   469  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   470  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   471  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   472  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   473  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   474  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   475  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   476  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   477  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   478  // POSSIBILITY OF SUCH DAMAGE.
   479  
   480  //	$NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $
   481  
   482  //	$NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $
   483  
   484  // -
   485  // Copyright (c) 2014 The NetBSD Foundation, Inc.
   486  // All rights reserved.
   487  //
   488  // This code is derived from software contributed to The NetBSD Foundation
   489  // by Matt Thomas of 3am Software Foundry.
   490  //
   491  // Redistribution and use in source and binary forms, with or without
   492  // modification, are permitted provided that the following conditions
   493  // are met:
   494  // 1. Redistributions of source code must retain the above copyright
   495  //    notice, this list of conditions and the following disclaimer.
   496  // 2. Redistributions in binary form must reproduce the above copyright
   497  //    notice, this list of conditions and the following disclaimer in the
   498  //    documentation and/or other materials provided with the distribution.
   499  //
   500  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   501  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   502  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   503  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   504  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   505  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   506  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   507  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   508  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   509  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   510  // POSSIBILITY OF SUCH DAMAGE.
   511  
   512  type X__caddr_t = uintptr        /* ansi.h:37:14 */ // core address
   513  type X__gid_t = X__uint32_t      /* ansi.h:38:20 */ // group id
   514  type X__in_addr_t = X__uint32_t  /* ansi.h:39:20 */ // IP(v4) address
   515  type X__in_port_t = X__uint16_t  /* ansi.h:40:20 */ // "Internet" port number
   516  type X__mode_t = X__uint32_t     /* ansi.h:41:20 */ // file permissions
   517  type X__off_t = X__int64_t       /* ansi.h:42:19 */ // file offset
   518  type X__pid_t = X__int32_t       /* ansi.h:43:19 */ // process id
   519  type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family
   520  type X__socklen_t = uint32       /* ansi.h:45:22 */ // socket-related datum length
   521  type X__uid_t = X__uint32_t      /* ansi.h:46:20 */ // user id
   522  type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs)
   523  type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */
   524  type X__wctrans_t = uintptr      /* ansi.h:51:32 */
   525  type X__wctype_t = uintptr       /* ansi.h:54:31 */
   526  
   527  // mbstate_t is an opaque object to keep conversion state, during multibyte
   528  // stream conversions.  The content must not be referenced by user programs.
   529  type X__mbstate_t = struct {
   530  	F__mbstateL  X__int64_t
   531  	F__ccgo_pad1 [120]byte
   532  } /* ansi.h:63:3 */
   533  
   534  type X__va_list = X__builtin_va_list /* ansi.h:72:27 */
   535  
   536  type Int8_t = X__int8_t /* types.h:54:18 */
   537  
   538  type Uint8_t = X__uint8_t /* types.h:59:19 */
   539  
   540  type Int16_t = X__int16_t /* types.h:64:19 */
   541  
   542  type Uint16_t = X__uint16_t /* types.h:69:20 */
   543  
   544  type Int32_t = X__int32_t /* types.h:74:19 */
   545  
   546  type Uint32_t = X__uint32_t /* types.h:79:20 */
   547  
   548  type Int64_t = X__int64_t /* types.h:84:19 */
   549  
   550  type Uint64_t = X__uint64_t /* types.h:89:20 */
   551  
   552  type U_int8_t = Uint8_t   /* types.h:93:18 */
   553  type U_int16_t = Uint16_t /* types.h:94:18 */
   554  type U_int32_t = Uint32_t /* types.h:95:18 */
   555  type U_int64_t = Uint64_t /* types.h:96:18 */
   556  
   557  //	$NetBSD: endian.h,v 1.3 2001/06/23 12:20:27 bjh21 Exp $
   558  
   559  //	$NetBSD: endian.h,v 1.30 2016/02/27 21:37:35 christos Exp $
   560  
   561  // Copyright (c) 1987, 1991, 1993
   562  //	The Regents of the University of California.  All rights reserved.
   563  //
   564  // Redistribution and use in source and binary forms, with or without
   565  // modification, are permitted provided that the following conditions
   566  // are met:
   567  // 1. Redistributions of source code must retain the above copyright
   568  //    notice, this list of conditions and the following disclaimer.
   569  // 2. Redistributions in binary form must reproduce the above copyright
   570  //    notice, this list of conditions and the following disclaimer in the
   571  //    documentation and/or other materials provided with the distribution.
   572  // 3. Neither the name of the University nor the names of its contributors
   573  //    may be used to endorse or promote products derived from this software
   574  //    without specific prior written permission.
   575  //
   576  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   577  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   578  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   579  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   580  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   581  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   582  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   583  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   584  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   585  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   586  // SUCH DAMAGE.
   587  //
   588  //	@(#)endian.h	8.1 (Berkeley) 6/11/93
   589  
   590  //	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
   591  
   592  // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
   593  // Public domain.
   594  //
   595  // NOTE: Do not protect this header against multiple inclusion.  Doing
   596  // so can have subtle side-effects due to header file inclusion order
   597  // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
   598  // protect each CPP macro that we want to supply.
   599  
   600  // Feature-test macros are defined by several standards, and allow an
   601  // application to specify what symbols they want the system headers to
   602  // expose, and hence what standard they want them to conform to.
   603  // There are two classes of feature-test macros.  The first class
   604  // specify complete standards, and if one of these is defined, header
   605  // files will try to conform to the relevant standard.  They are:
   606  //
   607  // ANSI macros:
   608  // _ANSI_SOURCE			ANSI C89
   609  //
   610  // POSIX macros:
   611  // _POSIX_SOURCE == 1		IEEE Std 1003.1 (version?)
   612  // _POSIX_C_SOURCE == 1		IEEE Std 1003.1-1990
   613  // _POSIX_C_SOURCE == 2		IEEE Std 1003.2-1992
   614  // _POSIX_C_SOURCE == 199309L	IEEE Std 1003.1b-1993
   615  // _POSIX_C_SOURCE == 199506L	ISO/IEC 9945-1:1996
   616  // _POSIX_C_SOURCE == 200112L	IEEE Std 1003.1-2001
   617  // _POSIX_C_SOURCE == 200809L   IEEE Std 1003.1-2008
   618  //
   619  // X/Open macros:
   620  // _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
   621  // _XOPEN_SOURCE_EXTENDED == 1	XSH4.2 UNIX extensions
   622  // _XOPEN_SOURCE == 500		System Interfaces and Headers, Issue 5
   623  // _XOPEN_SOURCE == 520		Networking Services (XNS), Issue 5.2
   624  // _XOPEN_SOURCE == 600		IEEE Std 1003.1-2001, XSI option
   625  // _XOPEN_SOURCE == 700		IEEE Std 1003.1-2008, XSI option
   626  //
   627  // NetBSD macros:
   628  // _NETBSD_SOURCE == 1		Make all NetBSD features available.
   629  //
   630  // If more than one of these "major" feature-test macros is defined,
   631  // then the set of facilities provided (and namespace used) is the
   632  // union of that specified by the relevant standards, and in case of
   633  // conflict, the earlier standard in the above list has precedence (so
   634  // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
   635  // of rename() that's used is the POSIX one).  If none of the "major"
   636  // feature-test macros is defined, _NETBSD_SOURCE is assumed.
   637  //
   638  // There are also "minor" feature-test macros, which enable extra
   639  // functionality in addition to some base standard.  They should be
   640  // defined along with one of the "major" macros.  The "minor" macros
   641  // are:
   642  //
   643  // _REENTRANT
   644  // _ISOC99_SOURCE
   645  // _ISOC11_SOURCE
   646  // _LARGEFILE_SOURCE		Large File Support
   647  //		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
   648  
   649  // Definitions for byte order, according to byte significance from low
   650  // address to high.
   651  
   652  // C-family endian-ness definitions
   653  
   654  //	$NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $
   655  
   656  // -
   657  // Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
   658  // All rights reserved.
   659  //
   660  // This code is derived from software contributed to The NetBSD Foundation
   661  // by Jun-ichiro itojun Hagino and by Klaus Klein.
   662  //
   663  // Redistribution and use in source and binary forms, with or without
   664  // modification, are permitted provided that the following conditions
   665  // are met:
   666  // 1. Redistributions of source code must retain the above copyright
   667  //    notice, this list of conditions and the following disclaimer.
   668  // 2. Redistributions in binary form must reproduce the above copyright
   669  //    notice, this list of conditions and the following disclaimer in the
   670  //    documentation and/or other materials provided with the distribution.
   671  //
   672  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   673  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   674  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   675  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   676  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   677  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   678  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   679  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   680  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   681  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   682  // POSSIBILITY OF SUCH DAMAGE.
   683  
   684  //	$NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $
   685  
   686  // * Copyright (c) 1991, 1993
   687  //	The Regents of the University of California.  All rights reserved.
   688  //
   689  // This code is derived from software contributed to Berkeley by
   690  // Berkeley Software Design, Inc.
   691  //
   692  // Redistribution and use in source and binary forms, with or without
   693  // modification, are permitted provided that the following conditions
   694  // are met:
   695  // 1. Redistributions of source code must retain the above copyright
   696  //    notice, this list of conditions and the following disclaimer.
   697  // 2. Redistributions in binary form must reproduce the above copyright
   698  //    notice, this list of conditions and the following disclaimer in the
   699  //    documentation and/or other materials provided with the distribution.
   700  // 3. Neither the name of the University nor the names of its contributors
   701  //    may be used to endorse or promote products derived from this software
   702  //    without specific prior written permission.
   703  //
   704  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   705  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   706  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   707  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   708  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   709  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   710  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   711  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   712  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   713  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   714  // SUCH DAMAGE.
   715  //
   716  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
   717  
   718  //	$NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya Exp $
   719  
   720  // -
   721  // Copyright (c) 1982, 1986, 1991, 1993, 1994
   722  //	The Regents of the University of California.  All rights reserved.
   723  // (c) UNIX System Laboratories, Inc.
   724  // All or some portions of this file are derived from material licensed
   725  // to the University of California by American Telephone and Telegraph
   726  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
   727  // the permission of UNIX System Laboratories, Inc.
   728  //
   729  // Redistribution and use in source and binary forms, with or without
   730  // modification, are permitted provided that the following conditions
   731  // are met:
   732  // 1. Redistributions of source code must retain the above copyright
   733  //    notice, this list of conditions and the following disclaimer.
   734  // 2. Redistributions in binary form must reproduce the above copyright
   735  //    notice, this list of conditions and the following disclaimer in the
   736  //    documentation and/or other materials provided with the distribution.
   737  // 3. Neither the name of the University nor the names of its contributors
   738  //    may be used to endorse or promote products derived from this software
   739  //    without specific prior written permission.
   740  //
   741  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   742  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   743  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   744  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   745  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   746  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   747  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   748  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   749  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   750  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   751  // SUCH DAMAGE.
   752  //
   753  //	@(#)types.h	8.4 (Berkeley) 1/21/94
   754  
   755  type In_addr_t = X__in_addr_t /* endian.h:58:21 */
   756  
   757  type In_port_t = X__in_port_t /* endian.h:63:21 */
   758  
   759  //      $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $
   760  
   761  // Written by Manuel Bouyer. Public domain
   762  
   763  //	$NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya Exp $
   764  
   765  // -
   766  // Copyright (c) 2001, 2004 The NetBSD Foundation, Inc.
   767  // All rights reserved.
   768  //
   769  // This code is derived from software contributed to The NetBSD Foundation
   770  // by Klaus Klein.
   771  //
   772  // Redistribution and use in source and binary forms, with or without
   773  // modification, are permitted provided that the following conditions
   774  // are met:
   775  // 1. Redistributions of source code must retain the above copyright
   776  //    notice, this list of conditions and the following disclaimer.
   777  // 2. Redistributions in binary form must reproduce the above copyright
   778  //    notice, this list of conditions and the following disclaimer in the
   779  //    documentation and/or other materials provided with the distribution.
   780  //
   781  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   782  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   783  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   784  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   785  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   786  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   787  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   788  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   789  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   790  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   791  // POSSIBILITY OF SUCH DAMAGE.
   792  
   793  //	$NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $
   794  
   795  // * Copyright (c) 1991, 1993
   796  //	The Regents of the University of California.  All rights reserved.
   797  //
   798  // This code is derived from software contributed to Berkeley by
   799  // Berkeley Software Design, Inc.
   800  //
   801  // Redistribution and use in source and binary forms, with or without
   802  // modification, are permitted provided that the following conditions
   803  // are met:
   804  // 1. Redistributions of source code must retain the above copyright
   805  //    notice, this list of conditions and the following disclaimer.
   806  // 2. Redistributions in binary form must reproduce the above copyright
   807  //    notice, this list of conditions and the following disclaimer in the
   808  //    documentation and/or other materials provided with the distribution.
   809  // 3. Neither the name of the University nor the names of its contributors
   810  //    may be used to endorse or promote products derived from this software
   811  //    without specific prior written permission.
   812  //
   813  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   814  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   815  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   816  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   817  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   818  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   819  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   820  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   821  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   822  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   823  // SUCH DAMAGE.
   824  //
   825  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
   826  
   827  //	$NetBSD: int_types.h,v 1.17 2014/07/25 21:43:13 joerg Exp $
   828  
   829  // -
   830  // Copyright (c) 2014 The NetBSD Foundation, Inc.
   831  // All rights reserved.
   832  //
   833  // This code is derived from software contributed to The NetBSD Foundation
   834  // by Matt Thomas of 3am Software Foundry.
   835  //
   836  // Redistribution and use in source and binary forms, with or without
   837  // modification, are permitted provided that the following conditions
   838  // are met:
   839  // 1. Redistributions of source code must retain the above copyright
   840  //    notice, this list of conditions and the following disclaimer.
   841  // 2. Redistributions in binary form must reproduce the above copyright
   842  //    notice, this list of conditions and the following disclaimer in the
   843  //    documentation and/or other materials provided with the distribution.
   844  //
   845  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   846  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   847  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   848  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   849  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   850  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   851  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   852  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   853  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   854  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   855  // POSSIBILITY OF SUCH DAMAGE.
   856  
   857  type Intptr_t = X__intptr_t /* stdint.h:79:20 */
   858  
   859  type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */
   860  
   861  // $NetBSD: int_mwgwtypes.h,v 1.7 2014/07/25 21:43:13 joerg Exp $
   862  
   863  // -
   864  // Copyright (c) 2014 The NetBSD Foundation, Inc.
   865  // All rights reserved.
   866  //
   867  // This code is derived from software contributed to The NetBSD Foundation
   868  // by Matt Thomas of 3am Software Foundry.
   869  //
   870  // Redistribution and use in source and binary forms, with or without
   871  // modification, are permitted provided that the following conditions
   872  // are met:
   873  // 1. Redistributions of source code must retain the above copyright
   874  //    notice, this list of conditions and the following disclaimer.
   875  // 2. Redistributions in binary form must reproduce the above copyright
   876  //    notice, this list of conditions and the following disclaimer in the
   877  //    documentation and/or other materials provided with the distribution.
   878  //
   879  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   880  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   881  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   882  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   883  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   884  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   885  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   886  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   887  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   888  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   889  // POSSIBILITY OF SUCH DAMAGE.
   890  
   891  //	$NetBSD: common_int_mwgwtypes.h,v 1.1 2014/07/25 21:43:13 joerg Exp $
   892  
   893  // -
   894  // Copyright (c) 2014 The NetBSD Foundation, Inc.
   895  // All rights reserved.
   896  //
   897  // This code is derived from software contributed to The NetBSD Foundation
   898  // by Joerg Sonnenberger.
   899  //
   900  // Redistribution and use in source and binary forms, with or without
   901  // modification, are permitted provided that the following conditions
   902  // are met:
   903  // 1. Redistributions of source code must retain the above copyright
   904  //    notice, this list of conditions and the following disclaimer.
   905  // 2. Redistributions in binary form must reproduce the above copyright
   906  //    notice, this list of conditions and the following disclaimer in the
   907  //    documentation and/or other materials provided with the distribution.
   908  //
   909  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   910  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   911  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   912  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   913  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   914  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   915  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   916  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   917  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   918  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   919  // POSSIBILITY OF SUCH DAMAGE.
   920  
   921  // 7.18.1 Integer types
   922  
   923  // 7.18.1.2 Minimum-width integer types
   924  
   925  type Int_least8_t = int8     /* common_int_mwgwtypes.h:45:32 */
   926  type Uint_least8_t = uint8   /* common_int_mwgwtypes.h:46:32 */
   927  type Int_least16_t = int16   /* common_int_mwgwtypes.h:47:32 */
   928  type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */
   929  type Int_least32_t = int32   /* common_int_mwgwtypes.h:49:32 */
   930  type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */
   931  type Int_least64_t = int64   /* common_int_mwgwtypes.h:51:32 */
   932  type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */
   933  
   934  // 7.18.1.3 Fastest minimum-width integer types
   935  type Int_fast8_t = int32    /* common_int_mwgwtypes.h:55:32 */
   936  type Uint_fast8_t = uint32  /* common_int_mwgwtypes.h:56:32 */
   937  type Int_fast16_t = int32   /* common_int_mwgwtypes.h:57:32 */
   938  type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */
   939  type Int_fast32_t = int32   /* common_int_mwgwtypes.h:59:32 */
   940  type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */
   941  type Int_fast64_t = int64   /* common_int_mwgwtypes.h:61:32 */
   942  type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */
   943  
   944  // 7.18.1.5 Greatest-width integer types
   945  
   946  type Intmax_t = int64   /* common_int_mwgwtypes.h:66:33 */
   947  type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */
   948  
   949  type U_char = uint8   /* types.h:101:23 */
   950  type U_short = uint16 /* types.h:102:24 */
   951  type U_int = uint32   /* types.h:103:22 */
   952  type U_long = uint32  /* types.h:104:23 */
   953  
   954  type Unchar = uint8  /* types.h:106:23 */ // Sys V compatibility
   955  type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility
   956  type Uint = uint32   /* types.h:108:22 */ // Sys V compatibility
   957  type Ulong = uint32  /* types.h:109:23 */ // Sys V compatibility
   958  
   959  type U_quad_t = Uint64_t /* types.h:112:18 */ // quads
   960  type Quad_t = Int64_t    /* types.h:113:18 */
   961  type Qaddr_t = uintptr   /* types.h:114:16 */
   962  
   963  // The types longlong_t and u_longlong_t exist for use with the
   964  // Sun-derived XDR routines involving these types, and their usage
   965  // in other contexts is discouraged.  Further note that these types
   966  // may not be equivalent to "long long" and "unsigned long long",
   967  // they are only guaranteed to be signed and unsigned 64-bit types
   968  // respectively.  Portable programs that need 64-bit types should use
   969  // the C99 types int64_t and uint64_t instead.
   970  
   971  type Longlong_t = Int64_t    /* types.h:126:18 */ // for XDR
   972  type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR
   973  
   974  type Blkcnt_t = Int64_t  /* types.h:129:18 */ // fs block count
   975  type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size
   976  
   977  type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs)
   978  
   979  type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count
   980  
   981  // We don't and shouldn't use caddr_t in the kernel anymore
   982  type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address
   983  
   984  type Daddr_t = Int64_t /* types.h:154:18 */ // disk address
   985  
   986  type Dev_t = Uint64_t   /* types.h:157:18 */ // device number
   987  type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number
   988  
   989  type Gid_t = X__gid_t /* types.h:161:18 */ // group id
   990  
   991  type Id_t = Uint32_t  /* types.h:165:18 */ // group id, process id or user id
   992  type Ino_t = Uint64_t /* types.h:166:18 */ // inode number
   993  type Key_t = int32    /* types.h:167:15 */ // IPC key (for Sys V IPC)
   994  
   995  type Mode_t = X__mode_t /* types.h:170:18 */ // permissions
   996  
   997  type Nlink_t = Uint32_t /* types.h:174:18 */ // link count
   998  
   999  type Off_t = X__off_t /* types.h:177:18 */ // file offset
  1000  
  1001  type Pid_t = X__pid_t  /* types.h:182:18 */ // process id
  1002  type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id
  1003  type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit
  1004  type Segsz_t = Int32_t /* types.h:187:18 */ // segment size
  1005  type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset
  1006  
  1007  type Uid_t = X__uid_t /* types.h:191:18 */ // user id
  1008  
  1009  type Mqd_t = int32 /* types.h:195:14 */
  1010  
  1011  type Cpuid_t = uint32 /* types.h:197:23 */
  1012  
  1013  type Psetid_t = int32 /* types.h:199:14 */
  1014  
  1015  type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */
  1016  
  1017  // Major, minor numbers, dev_t's.
  1018  type X__devmajor_t = Int32_t /* types.h:255:17 */
  1019  type X__devminor_t = Int32_t /* types.h:255:31 */
  1020  
  1021  type Clock_t = uint32 /* types.h:268:24 */
  1022  
  1023  type Ssize_t = int32 /* types.h:284:24 */
  1024  
  1025  type Time_t = X__int64_t /* types.h:289:23 */
  1026  
  1027  type Clockid_t = int32 /* types.h:294:26 */
  1028  
  1029  type Timer_t = int32 /* types.h:299:24 */
  1030  
  1031  type Suseconds_t = int32 /* types.h:304:27 */
  1032  
  1033  type Useconds_t = uint32 /* types.h:309:26 */
  1034  
  1035  //	$NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil Exp $
  1036  
  1037  // -
  1038  // Copyright (c) 1992, 1993
  1039  //	The Regents of the University of California.  All rights reserved.
  1040  //
  1041  // Redistribution and use in source and binary forms, with or without
  1042  // modification, are permitted provided that the following conditions
  1043  // are met:
  1044  // 1. Redistributions of source code must retain the above copyright
  1045  //    notice, this list of conditions and the following disclaimer.
  1046  // 2. Redistributions in binary form must reproduce the above copyright
  1047  //    notice, this list of conditions and the following disclaimer in the
  1048  //    documentation and/or other materials provided with the distribution.
  1049  // 3. Neither the name of the University nor the names of its contributors
  1050  //    may be used to endorse or promote products derived from this software
  1051  //    without specific prior written permission.
  1052  //
  1053  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1054  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1055  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1056  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1057  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1058  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1059  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1060  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1061  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1062  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1063  // SUCH DAMAGE.
  1064  //
  1065  //	from: @(#)types.h	8.4 (Berkeley) 1/21/94
  1066  
  1067  //	$NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $
  1068  
  1069  // * Copyright (c) 1991, 1993
  1070  //	The Regents of the University of California.  All rights reserved.
  1071  //
  1072  // This code is derived from software contributed to Berkeley by
  1073  // Berkeley Software Design, Inc.
  1074  //
  1075  // Redistribution and use in source and binary forms, with or without
  1076  // modification, are permitted provided that the following conditions
  1077  // are met:
  1078  // 1. Redistributions of source code must retain the above copyright
  1079  //    notice, this list of conditions and the following disclaimer.
  1080  // 2. Redistributions in binary form must reproduce the above copyright
  1081  //    notice, this list of conditions and the following disclaimer in the
  1082  //    documentation and/or other materials provided with the distribution.
  1083  // 3. Neither the name of the University nor the names of its contributors
  1084  //    may be used to endorse or promote products derived from this software
  1085  //    without specific prior written permission.
  1086  //
  1087  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1088  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1089  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1090  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1091  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1092  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1093  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1094  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1095  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1096  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1097  // SUCH DAMAGE.
  1098  //
  1099  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  1100  
  1101  //	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
  1102  
  1103  // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  1104  // Public domain.
  1105  //
  1106  // NOTE: Do not protect this header against multiple inclusion.  Doing
  1107  // so can have subtle side-effects due to header file inclusion order
  1108  // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  1109  // protect each CPP macro that we want to supply.
  1110  
  1111  // Feature-test macros are defined by several standards, and allow an
  1112  // application to specify what symbols they want the system headers to
  1113  // expose, and hence what standard they want them to conform to.
  1114  // There are two classes of feature-test macros.  The first class
  1115  // specify complete standards, and if one of these is defined, header
  1116  // files will try to conform to the relevant standard.  They are:
  1117  //
  1118  // ANSI macros:
  1119  // _ANSI_SOURCE			ANSI C89
  1120  //
  1121  // POSIX macros:
  1122  // _POSIX_SOURCE == 1		IEEE Std 1003.1 (version?)
  1123  // _POSIX_C_SOURCE == 1		IEEE Std 1003.1-1990
  1124  // _POSIX_C_SOURCE == 2		IEEE Std 1003.2-1992
  1125  // _POSIX_C_SOURCE == 199309L	IEEE Std 1003.1b-1993
  1126  // _POSIX_C_SOURCE == 199506L	ISO/IEC 9945-1:1996
  1127  // _POSIX_C_SOURCE == 200112L	IEEE Std 1003.1-2001
  1128  // _POSIX_C_SOURCE == 200809L   IEEE Std 1003.1-2008
  1129  //
  1130  // X/Open macros:
  1131  // _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  1132  // _XOPEN_SOURCE_EXTENDED == 1	XSH4.2 UNIX extensions
  1133  // _XOPEN_SOURCE == 500		System Interfaces and Headers, Issue 5
  1134  // _XOPEN_SOURCE == 520		Networking Services (XNS), Issue 5.2
  1135  // _XOPEN_SOURCE == 600		IEEE Std 1003.1-2001, XSI option
  1136  // _XOPEN_SOURCE == 700		IEEE Std 1003.1-2008, XSI option
  1137  //
  1138  // NetBSD macros:
  1139  // _NETBSD_SOURCE == 1		Make all NetBSD features available.
  1140  //
  1141  // If more than one of these "major" feature-test macros is defined,
  1142  // then the set of facilities provided (and namespace used) is the
  1143  // union of that specified by the relevant standards, and in case of
  1144  // conflict, the earlier standard in the above list has precedence (so
  1145  // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  1146  // of rename() that's used is the POSIX one).  If none of the "major"
  1147  // feature-test macros is defined, _NETBSD_SOURCE is assumed.
  1148  //
  1149  // There are also "minor" feature-test macros, which enable extra
  1150  // functionality in addition to some base standard.  They should be
  1151  // defined along with one of the "major" macros.  The "minor" macros
  1152  // are:
  1153  //
  1154  // _REENTRANT
  1155  // _ISOC99_SOURCE
  1156  // _ISOC11_SOURCE
  1157  // _LARGEFILE_SOURCE		Large File Support
  1158  //		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  1159  
  1160  //	$NetBSD: int_types.h,v 1.17 2014/07/25 21:43:13 joerg Exp $
  1161  
  1162  // -
  1163  // Copyright (c) 2014 The NetBSD Foundation, Inc.
  1164  // All rights reserved.
  1165  //
  1166  // This code is derived from software contributed to The NetBSD Foundation
  1167  // by Matt Thomas of 3am Software Foundry.
  1168  //
  1169  // Redistribution and use in source and binary forms, with or without
  1170  // modification, are permitted provided that the following conditions
  1171  // are met:
  1172  // 1. Redistributions of source code must retain the above copyright
  1173  //    notice, this list of conditions and the following disclaimer.
  1174  // 2. Redistributions in binary form must reproduce the above copyright
  1175  //    notice, this list of conditions and the following disclaimer in the
  1176  //    documentation and/or other materials provided with the distribution.
  1177  //
  1178  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  1179  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  1180  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  1181  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  1182  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  1183  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  1184  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  1185  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  1186  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  1187  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  1188  // POSSIBILITY OF SUCH DAMAGE.
  1189  
  1190  // Implementation dependent defines, hidden from user space.
  1191  // POSIX does not specify them.
  1192  
  1193  type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */
  1194  
  1195  // 32 = 2 ^ 5
  1196  
  1197  // Select uses bit fields of file descriptors.  These macros manipulate
  1198  // such bit fields.  Note: FD_SETSIZE may be defined by the user.
  1199  
  1200  type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */
  1201  
  1202  // 32 = 2 ^ 5
  1203  
  1204  // Select uses bit fields of file descriptors.  These macros manipulate
  1205  // such bit fields.  Note: FD_SETSIZE may be defined by the user.
  1206  
  1207  type Fd_set = Fd_set1 /* fd_set.h:68:3 */
  1208  
  1209  // Expose our internals if we are not required to hide them.
  1210  
  1211  type Kauth_cred_t = uintptr /* types.h:318:27 */
  1212  
  1213  type Pri_t = int32 /* types.h:320:13 */
  1214  
  1215  //	$NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil Exp $
  1216  
  1217  // -
  1218  // Copyright (c) 2001, 2008 The NetBSD Foundation, Inc.
  1219  // All rights reserved.
  1220  //
  1221  // This code is derived from software contributed to The NetBSD Foundation
  1222  // by Nathan J. Williams.
  1223  //
  1224  // Redistribution and use in source and binary forms, with or without
  1225  // modification, are permitted provided that the following conditions
  1226  // are met:
  1227  // 1. Redistributions of source code must retain the above copyright
  1228  //    notice, this list of conditions and the following disclaimer.
  1229  // 2. Redistributions in binary form must reproduce the above copyright
  1230  //    notice, this list of conditions and the following disclaimer in the
  1231  //    documentation and/or other materials provided with the distribution.
  1232  //
  1233  // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  1234  // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  1235  // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  1236  // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  1237  // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  1238  // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  1239  // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  1240  // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  1241  // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  1242  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  1243  // POSSIBILITY OF SUCH DAMAGE.
  1244  
  1245  // We use the "pthread_spin_t" name internally; "pthread_spinlock_t" is the
  1246  // POSIX spinlock object.
  1247  //
  1248  // C++ expects to be using PTHREAD_FOO_INITIALIZER as a member initializer.
  1249  // This does not work for volatile types.  Since C++ does not touch the guts
  1250  // of those types, we do not include volatile in the C++ definitions.
  1251  type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */
  1252  type X__pthread_spin_t = Pthread_spin_t    /* pthread_types.h:48:24 */
  1253  
  1254  // Copied from PTQ_HEAD in pthread_queue.h
  1255  
  1256  type Pthread_queue_struct_t = struct {
  1257  	Fptqh_first uintptr
  1258  	Fptqh_last  uintptr
  1259  } /* pthread_types.h:61:1 */
  1260  
  1261  type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */
  1262  type X__pthread_attr_st = struct {
  1263  	Fpta_magic   uint32
  1264  	Fpta_flags   int32
  1265  	Fpta_private uintptr
  1266  } /* pthread_types.h:65:1 */
  1267  
  1268  type X__pthread_mutex_st = struct {
  1269  	Fptm_magic      uint32
  1270  	Fptm_errorcheck X__pthread_spin_t
  1271  	F__8            struct {
  1272  		F__ccgo_pad1 [0]uint32
  1273  		Fptm_ceiling uint8
  1274  		F__ccgo_pad2 [3]byte
  1275  	}
  1276  	Fptm_owner    Pthread_t
  1277  	Fptm_waiters  uintptr
  1278  	Fptm_recursed uint32
  1279  	Fptm_spare2   uintptr
  1280  } /* pthread_types.h:66:1 */
  1281  
  1282  type X__pthread_mutexattr_st = struct {
  1283  	Fptma_magic   uint32
  1284  	Fptma_private uintptr
  1285  } /* pthread_types.h:67:1 */
  1286  
  1287  type X__pthread_cond_st = struct {
  1288  	Fptc_magic   uint32
  1289  	Fptc_lock    X__pthread_spin_t
  1290  	Fptc_waiters Pthread_queue_t
  1291  	Fptc_mutex   uintptr
  1292  	Fptc_private uintptr
  1293  } /* pthread_types.h:68:1 */
  1294  
  1295  type X__pthread_condattr_st = struct {
  1296  	Fptca_magic   uint32
  1297  	Fptca_private uintptr
  1298  } /* pthread_types.h:69:1 */
  1299  
  1300  type X__pthread_rwlock_st = struct {
  1301  	Fptr_magic     uint32
  1302  	Fptr_interlock X__pthread_spin_t
  1303  	Fptr_rblocked  Pthread_queue_t
  1304  	Fptr_wblocked  Pthread_queue_t
  1305  	Fptr_nreaders  uint32
  1306  	Fptr_owner     Pthread_t
  1307  	Fptr_private   uintptr
  1308  } /* pthread_types.h:71:1 */
  1309  
  1310  type X__pthread_rwlockattr_st = struct {
  1311  	Fptra_magic   uint32
  1312  	Fptra_private uintptr
  1313  } /* pthread_types.h:72:1 */
  1314  
  1315  type X__pthread_barrier_st = struct {
  1316  	Fptb_magic      uint32
  1317  	Fptb_lock       Pthread_spin_t
  1318  	Fptb_waiters    Pthread_queue_t
  1319  	Fptb_initcount  uint32
  1320  	Fptb_curcount   uint32
  1321  	Fptb_generation uint32
  1322  	Fptb_private    uintptr
  1323  } /* pthread_types.h:73:1 */
  1324  
  1325  type X__pthread_barrierattr_st = struct {
  1326  	Fptba_magic   uint32
  1327  	Fptba_private uintptr
  1328  } /* pthread_types.h:74:1 */
  1329  
  1330  type Pthread_t = uintptr                           /* pthread_types.h:76:29 */
  1331  type Pthread_attr_t = X__pthread_attr_st           /* pthread_types.h:77:34 */
  1332  type Pthread_mutex_t = X__pthread_mutex_st         /* pthread_types.h:78:35 */
  1333  type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */
  1334  type Pthread_cond_t = X__pthread_cond_st           /* pthread_types.h:80:34 */
  1335  type Pthread_condattr_t = X__pthread_condattr_st   /* pthread_types.h:81:38 */
  1336  type X__pthread_once_st = struct {
  1337  	Fpto_mutex Pthread_mutex_t
  1338  	Fpto_done  int32
  1339  } /* pthread_types.h:82:9 */
  1340  
  1341  type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */
  1342  type X__pthread_spinlock_st = struct {
  1343  	Fpts_magic uint32
  1344  	Fpts_spin  X__pthread_spin_t
  1345  	Fpts_flags int32
  1346  } /* pthread_types.h:83:9 */
  1347  
  1348  type Pthread_spinlock_t = X__pthread_spinlock_st       /* pthread_types.h:83:38 */
  1349  type Pthread_rwlock_t = X__pthread_rwlock_st           /* pthread_types.h:84:36 */
  1350  type Pthread_rwlockattr_t = X__pthread_rwlockattr_st   /* pthread_types.h:85:40 */
  1351  type Pthread_barrier_t = X__pthread_barrier_st         /* pthread_types.h:86:37 */
  1352  type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */
  1353  type Pthread_key_t = int32                             /* pthread_types.h:88:13 */
  1354  
  1355  // The kernel defines the format of directory entries returned by
  1356  // the getdents(2) system call.
  1357  //	$NetBSD: dirent.h,v 1.30 2016/01/22 23:31:30 dholland Exp $
  1358  
  1359  // -
  1360  // Copyright (c) 1989, 1993
  1361  //	The Regents of the University of California.  All rights reserved.
  1362  //
  1363  // Redistribution and use in source and binary forms, with or without
  1364  // modification, are permitted provided that the following conditions
  1365  // are met:
  1366  // 1. Redistributions of source code must retain the above copyright
  1367  //    notice, this list of conditions and the following disclaimer.
  1368  // 2. Redistributions in binary form must reproduce the above copyright
  1369  //    notice, this list of conditions and the following disclaimer in the
  1370  //    documentation and/or other materials provided with the distribution.
  1371  // 3. Neither the name of the University nor the names of its contributors
  1372  //    may be used to endorse or promote products derived from this software
  1373  //    without specific prior written permission.
  1374  //
  1375  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1376  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1377  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1378  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1379  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1380  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1381  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1382  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1383  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1384  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1385  // SUCH DAMAGE.
  1386  //
  1387  //	@(#)dirent.h	8.3 (Berkeley) 8/10/94
  1388  
  1389  //	$NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $
  1390  
  1391  // * Copyright (c) 1991, 1993
  1392  //	The Regents of the University of California.  All rights reserved.
  1393  //
  1394  // This code is derived from software contributed to Berkeley by
  1395  // Berkeley Software Design, Inc.
  1396  //
  1397  // Redistribution and use in source and binary forms, with or without
  1398  // modification, are permitted provided that the following conditions
  1399  // are met:
  1400  // 1. Redistributions of source code must retain the above copyright
  1401  //    notice, this list of conditions and the following disclaimer.
  1402  // 2. Redistributions in binary form must reproduce the above copyright
  1403  //    notice, this list of conditions and the following disclaimer in the
  1404  //    documentation and/or other materials provided with the distribution.
  1405  // 3. Neither the name of the University nor the names of its contributors
  1406  //    may be used to endorse or promote products derived from this software
  1407  //    without specific prior written permission.
  1408  //
  1409  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1410  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1411  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1412  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1413  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1414  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1415  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1416  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1417  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1418  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1419  // SUCH DAMAGE.
  1420  //
  1421  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  1422  
  1423  //	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
  1424  
  1425  // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  1426  // Public domain.
  1427  //
  1428  // NOTE: Do not protect this header against multiple inclusion.  Doing
  1429  // so can have subtle side-effects due to header file inclusion order
  1430  // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  1431  // protect each CPP macro that we want to supply.
  1432  
  1433  // Feature-test macros are defined by several standards, and allow an
  1434  // application to specify what symbols they want the system headers to
  1435  // expose, and hence what standard they want them to conform to.
  1436  // There are two classes of feature-test macros.  The first class
  1437  // specify complete standards, and if one of these is defined, header
  1438  // files will try to conform to the relevant standard.  They are:
  1439  //
  1440  // ANSI macros:
  1441  // _ANSI_SOURCE			ANSI C89
  1442  //
  1443  // POSIX macros:
  1444  // _POSIX_SOURCE == 1		IEEE Std 1003.1 (version?)
  1445  // _POSIX_C_SOURCE == 1		IEEE Std 1003.1-1990
  1446  // _POSIX_C_SOURCE == 2		IEEE Std 1003.2-1992
  1447  // _POSIX_C_SOURCE == 199309L	IEEE Std 1003.1b-1993
  1448  // _POSIX_C_SOURCE == 199506L	ISO/IEC 9945-1:1996
  1449  // _POSIX_C_SOURCE == 200112L	IEEE Std 1003.1-2001
  1450  // _POSIX_C_SOURCE == 200809L   IEEE Std 1003.1-2008
  1451  //
  1452  // X/Open macros:
  1453  // _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  1454  // _XOPEN_SOURCE_EXTENDED == 1	XSH4.2 UNIX extensions
  1455  // _XOPEN_SOURCE == 500		System Interfaces and Headers, Issue 5
  1456  // _XOPEN_SOURCE == 520		Networking Services (XNS), Issue 5.2
  1457  // _XOPEN_SOURCE == 600		IEEE Std 1003.1-2001, XSI option
  1458  // _XOPEN_SOURCE == 700		IEEE Std 1003.1-2008, XSI option
  1459  //
  1460  // NetBSD macros:
  1461  // _NETBSD_SOURCE == 1		Make all NetBSD features available.
  1462  //
  1463  // If more than one of these "major" feature-test macros is defined,
  1464  // then the set of facilities provided (and namespace used) is the
  1465  // union of that specified by the relevant standards, and in case of
  1466  // conflict, the earlier standard in the above list has precedence (so
  1467  // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  1468  // of rename() that's used is the POSIX one).  If none of the "major"
  1469  // feature-test macros is defined, _NETBSD_SOURCE is assumed.
  1470  //
  1471  // There are also "minor" feature-test macros, which enable extra
  1472  // functionality in addition to some base standard.  They should be
  1473  // defined along with one of the "major" macros.  The "minor" macros
  1474  // are:
  1475  //
  1476  // _REENTRANT
  1477  // _ISOC99_SOURCE
  1478  // _ISOC11_SOURCE
  1479  // _LARGEFILE_SOURCE		Large File Support
  1480  //		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  1481  
  1482  // The dirent structure defines the format of directory entries returned by
  1483  // the getdents(2) system call.
  1484  //
  1485  // A directory entry has a struct dirent at the front of it, containing its
  1486  // inode number, the length of the entry, and the length of the name
  1487  // contained in the entry.  These are followed by the name padded to
  1488  // _DIRENT_ALIGN() byte boundary with null bytes.  All names are guaranteed
  1489  // NUL terminated.  The maximum length of a name in a directory is MAXNAMLEN.
  1490  type Dirent = struct {
  1491  	Fd_fileno    Ino_t
  1492  	Fd_reclen    Uint16_t
  1493  	Fd_namlen    Uint16_t
  1494  	Fd_type      Uint8_t
  1495  	Fd_name      [512]uint8
  1496  	F__ccgo_pad1 [3]byte
  1497  } /* dirent.h:50:1 */
  1498  
  1499  // File types
  1500  
  1501  // Caution: the following macros are used by the ufs/ffs code on ffs's
  1502  // struct direct as well as the exposed struct dirent. The two
  1503  // structures are not the same, so it's important (until ufs is fixed,
  1504  // XXX) that the macro definitions remain type-polymorphic.
  1505  
  1506  // The _DIRENT_ALIGN macro returns the alignment of struct dirent.
  1507  // struct direct and struct dirent12 used 4 byte alignment but
  1508  // struct dirent uses 8.
  1509  // The _DIRENT_NAMEOFF macro returns the offset of the d_name field in
  1510  // struct dirent
  1511  // The _DIRENT_RECLEN macro gives the minimum record length which will hold
  1512  // a name of size "namlen".  This requires the amount of space in struct dirent
  1513  // without the d_name field, plus enough space for the name with a terminating
  1514  // null byte (namlen+1), rounded up to a the appropriate byte boundary.
  1515  // The _DIRENT_SIZE macro returns the minimum record length required for
  1516  // name name stored in the current record.
  1517  // The _DIRENT_NEXT macro advances to the next dirent record.
  1518  // The _DIRENT_MINSIZE returns the size of an empty (invalid) record.
  1519  
  1520  // Convert between stat structure types and directory types.
  1521  
  1522  type X_dirdesc = struct {
  1523  	Fdd_fd       int32
  1524  	Fdd_loc      int32
  1525  	Fdd_size     int32
  1526  	Fdd_buf      uintptr
  1527  	Fdd_len      int32
  1528  	F__ccgo_pad1 [4]byte
  1529  	Fdd_seek     X__off_t
  1530  	Fdd_internal uintptr
  1531  	Fdd_flags    int32
  1532  	Fdd_lock     uintptr
  1533  	F__ccgo_pad2 [4]byte
  1534  } /* dirent.h:50:9 */
  1535  
  1536  // File types
  1537  
  1538  // Caution: the following macros are used by the ufs/ffs code on ffs's
  1539  // struct direct as well as the exposed struct dirent. The two
  1540  // structures are not the same, so it's important (until ufs is fixed,
  1541  // XXX) that the macro definitions remain type-polymorphic.
  1542  
  1543  // The _DIRENT_ALIGN macro returns the alignment of struct dirent.
  1544  // struct direct and struct dirent12 used 4 byte alignment but
  1545  // struct dirent uses 8.
  1546  // The _DIRENT_NAMEOFF macro returns the offset of the d_name field in
  1547  // struct dirent
  1548  // The _DIRENT_RECLEN macro gives the minimum record length which will hold
  1549  // a name of size "namlen".  This requires the amount of space in struct dirent
  1550  // without the d_name field, plus enough space for the name with a terminating
  1551  // null byte (namlen+1), rounded up to a the appropriate byte boundary.
  1552  // The _DIRENT_SIZE macro returns the minimum record length required for
  1553  // name name stored in the current record.
  1554  // The _DIRENT_NEXT macro advances to the next dirent record.
  1555  // The _DIRENT_MINSIZE returns the size of an empty (invalid) record.
  1556  
  1557  // Convert between stat structure types and directory types.
  1558  
  1559  type DIR = X_dirdesc /* dirent.h:50:25 */
  1560  
  1561  var _ uint8 /* gen.c:2:13: */