gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

fcntl_netbsd_amd64.go (72683B)


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