github.com/afumu/libc@v0.0.6/fcntl/fcntl_darwin_arm64.go (about)

     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_darwin_arm64.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                             = 0x0010     // fcntl.h:168:1:
    19  	AT_FDCWD                               = -2         // fcntl.h:163:1:
    20  	AT_FDONLY                              = 0x0400     // fcntl.h:174:1:
    21  	AT_REALDEV                             = 0x0200     // fcntl.h:173:1:
    22  	AT_REMOVEDIR                           = 0x0080     // fcntl.h:171:1:
    23  	AT_SYMLINK_FOLLOW                      = 0x0040     // fcntl.h:170:1:
    24  	AT_SYMLINK_NOFOLLOW                    = 0x0020     // fcntl.h:169:1:
    25  	AT_SYMLINK_NOFOLLOW_ANY                = 0x0800     // fcntl.h:175:1:
    26  	CPF_IGNORE_MODE                        = 0x0002     // fcntl.h:208:1:
    27  	CPF_MASK                               = 3          // fcntl.h:209:1:
    28  	CPF_OVERWRITE                          = 0x0001     // fcntl.h:207:1:
    29  	FAPPEND                                = 8          // fcntl.h:193:1:
    30  	FASYNC                                 = 64         // fcntl.h:194:1:
    31  	FCNTL_FS_SPECIFIC_BASE                 = 0x00010000 // fcntl.h:315:1:
    32  	FD_CLOEXEC                             = 1          // fcntl.h:324:1:
    33  	FFDSYNC                                = 4194304    // fcntl.h:196:1:
    34  	FFSYNC                                 = 128        // fcntl.h:195:1:
    35  	FNDELAY                                = 4          // fcntl.h:198:1:
    36  	FNONBLOCK                              = 4          // fcntl.h:197:1:
    37  	FREAD                                  = 0x00000001 // fcntl.h:110:1:
    38  	FWRITE                                 = 0x00000002 // fcntl.h:111:1:
    39  	F_ADDFILESIGS                          = 61         // fcntl.h:253:1:
    40  	F_ADDFILESIGS_FOR_DYLD_SIM             = 83         // fcntl.h:292:1:
    41  	F_ADDFILESIGS_INFO                     = 103        // fcntl.h:309:1:
    42  	F_ADDFILESIGS_RETURN                   = 97         // fcntl.h:298:1:
    43  	F_ADDFILESUPPL                         = 104        // fcntl.h:310:1:
    44  	F_ADDSIGS                              = 59         // fcntl.h:250:1:
    45  	F_ALLOCATEALL                          = 0x00000004 // fcntl.h:348:1:
    46  	F_ALLOCATECONTIG                       = 0x00000002 // fcntl.h:347:1:
    47  	F_BARRIERFSYNC                         = 85         // fcntl.h:295:1:
    48  	F_CHECK_LV                             = 98         // fcntl.h:299:1:
    49  	F_CHKCLEAN                             = 41         // fcntl.h:232:1:
    50  	F_DUPFD                                = 0          // fcntl.h:217:1:
    51  	F_DUPFD_CLOEXEC                        = 67         // fcntl.h:320:1:
    52  	F_FINDSIGS                             = 78         // fcntl.h:289:1:
    53  	F_FLUSH_DATA                           = 40         // fcntl.h:231:1:
    54  	F_FREEZE_FS                            = 53         // fcntl.h:245:1:
    55  	F_FSRESERVED                           = 106        // fcntl.h:312:1:
    56  	F_FULLFSYNC                            = 51         // fcntl.h:243:1:
    57  	F_GETCODEDIR                           = 72         // fcntl.h:277:1:
    58  	F_GETFD                                = 1          // fcntl.h:218:1:
    59  	F_GETFL                                = 3          // fcntl.h:220:1:
    60  	F_GETLK                                = 7          // fcntl.h:224:1:
    61  	F_GETLKPID                             = 66         // fcntl.h:263:1:
    62  	F_GETNOSIGPIPE                         = 74         // fcntl.h:280:1:
    63  	F_GETOWN                               = 5          // fcntl.h:222:1:
    64  	F_GETPATH                              = 50         // fcntl.h:242:1:
    65  	F_GETPATH_MTMINFO                      = 71         // fcntl.h:275:1:
    66  	F_GETPATH_NOFIRMLINK                   = 102        // fcntl.h:307:1:
    67  	F_GETPROTECTIONCLASS                   = 63         // fcntl.h:258:1:
    68  	F_GETPROTECTIONLEVEL                   = 77         // fcntl.h:287:1:
    69  	F_GETSIGSINFO                          = 105        // fcntl.h:311:1:
    70  	F_GLOBAL_NOCACHE                       = 55         // fcntl.h:247:1:
    71  	F_LOG2PHYS                             = 49         // fcntl.h:241:1:
    72  	F_LOG2PHYS_EXT                         = 65         // fcntl.h:261:1:
    73  	F_NOCACHE                              = 48         // fcntl.h:240:1:
    74  	F_NODIRECT                             = 62         // fcntl.h:255:1:
    75  	F_PATHPKG_CHECK                        = 52         // fcntl.h:244:1:
    76  	F_PEOFPOSMODE                          = 3          // fcntl.h:352:1:
    77  	F_PREALLOCATE                          = 42         // fcntl.h:233:1:
    78  	F_PUNCHHOLE                            = 99         // fcntl.h:301:1:
    79  	F_RDADVISE                             = 44         // fcntl.h:235:1:
    80  	F_RDAHEAD                              = 45         // fcntl.h:236:1:
    81  	F_RDLCK                                = 1          // fcntl.h:327:1:
    82  	F_SETBACKINGSTORE                      = 70         // fcntl.h:274:1:
    83  	F_SETFD                                = 2          // fcntl.h:219:1:
    84  	F_SETFL                                = 4          // fcntl.h:221:1:
    85  	F_SETLK                                = 8          // fcntl.h:225:1:
    86  	F_SETLKW                               = 9          // fcntl.h:226:1:
    87  	F_SETLKWTIMEOUT                        = 10         // fcntl.h:228:1:
    88  	F_SETNOSIGPIPE                         = 73         // fcntl.h:279:1:
    89  	F_SETOWN                               = 6          // fcntl.h:223:1:
    90  	F_SETPROTECTIONCLASS                   = 64         // fcntl.h:259:1:
    91  	F_SETSIZE                              = 43         // fcntl.h:234:1:
    92  	F_SINGLE_WRITER                        = 76         // fcntl.h:284:1:
    93  	F_SPECULATIVE_READ                     = 101        // fcntl.h:305:1:
    94  	F_THAW_FS                              = 54         // fcntl.h:246:1:
    95  	F_TRANSCODEKEY                         = 75         // fcntl.h:282:1:
    96  	F_TRIM_ACTIVE_FILE                     = 100        // fcntl.h:303:1:
    97  	F_UNLCK                                = 2          // fcntl.h:328:1:
    98  	F_VOLPOSMODE                           = 4          // fcntl.h:354:1:
    99  	F_WRLCK                                = 3          // fcntl.h:329:1:
   100  	GETSIGSINFO_PLATFORM_BINARY            = 1          // fcntl.h:444:1:
   101  	LOCK_EX                                = 0x02       // fcntl.h:456:1:
   102  	LOCK_NB                                = 0x04       // fcntl.h:457:1:
   103  	LOCK_SH                                = 0x01       // fcntl.h:455:1:
   104  	LOCK_UN                                = 0x08       // fcntl.h:458:1:
   105  	MAC_OS_VERSION_11_0                    = 110000     // AvailabilityVersions.h:238:1:
   106  	MAC_OS_VERSION_12_0                    = 120000     // AvailabilityVersions.h:239:1:
   107  	MAC_OS_X_VERSION_10_0                  = 1000       // AvailabilityVersions.h:206:1:
   108  	MAC_OS_X_VERSION_10_1                  = 1010       // AvailabilityVersions.h:207:1:
   109  	MAC_OS_X_VERSION_10_10                 = 101000     // AvailabilityVersions.h:216:1:
   110  	MAC_OS_X_VERSION_10_10_2               = 101002     // AvailabilityVersions.h:217:1:
   111  	MAC_OS_X_VERSION_10_10_3               = 101003     // AvailabilityVersions.h:218:1:
   112  	MAC_OS_X_VERSION_10_11                 = 101100     // AvailabilityVersions.h:219:1:
   113  	MAC_OS_X_VERSION_10_11_2               = 101102     // AvailabilityVersions.h:220:1:
   114  	MAC_OS_X_VERSION_10_11_3               = 101103     // AvailabilityVersions.h:221:1:
   115  	MAC_OS_X_VERSION_10_11_4               = 101104     // AvailabilityVersions.h:222:1:
   116  	MAC_OS_X_VERSION_10_12                 = 101200     // AvailabilityVersions.h:223:1:
   117  	MAC_OS_X_VERSION_10_12_1               = 101201     // AvailabilityVersions.h:224:1:
   118  	MAC_OS_X_VERSION_10_12_2               = 101202     // AvailabilityVersions.h:225:1:
   119  	MAC_OS_X_VERSION_10_12_4               = 101204     // AvailabilityVersions.h:226:1:
   120  	MAC_OS_X_VERSION_10_13                 = 101300     // AvailabilityVersions.h:227:1:
   121  	MAC_OS_X_VERSION_10_13_1               = 101301     // AvailabilityVersions.h:228:1:
   122  	MAC_OS_X_VERSION_10_13_2               = 101302     // AvailabilityVersions.h:229:1:
   123  	MAC_OS_X_VERSION_10_13_4               = 101304     // AvailabilityVersions.h:230:1:
   124  	MAC_OS_X_VERSION_10_14                 = 101400     // AvailabilityVersions.h:231:1:
   125  	MAC_OS_X_VERSION_10_14_1               = 101401     // AvailabilityVersions.h:232:1:
   126  	MAC_OS_X_VERSION_10_14_4               = 101404     // AvailabilityVersions.h:233:1:
   127  	MAC_OS_X_VERSION_10_14_6               = 101406     // AvailabilityVersions.h:234:1:
   128  	MAC_OS_X_VERSION_10_15                 = 101500     // AvailabilityVersions.h:235:1:
   129  	MAC_OS_X_VERSION_10_15_1               = 101501     // AvailabilityVersions.h:236:1:
   130  	MAC_OS_X_VERSION_10_16                 = 101600     // AvailabilityVersions.h:237:1:
   131  	MAC_OS_X_VERSION_10_2                  = 1020       // AvailabilityVersions.h:208:1:
   132  	MAC_OS_X_VERSION_10_3                  = 1030       // AvailabilityVersions.h:209:1:
   133  	MAC_OS_X_VERSION_10_4                  = 1040       // AvailabilityVersions.h:210:1:
   134  	MAC_OS_X_VERSION_10_5                  = 1050       // AvailabilityVersions.h:211:1:
   135  	MAC_OS_X_VERSION_10_6                  = 1060       // AvailabilityVersions.h:212:1:
   136  	MAC_OS_X_VERSION_10_7                  = 1070       // AvailabilityVersions.h:213:1:
   137  	MAC_OS_X_VERSION_10_8                  = 1080       // AvailabilityVersions.h:214:1:
   138  	MAC_OS_X_VERSION_10_9                  = 1090       // AvailabilityVersions.h:215:1:
   139  	O_ACCMODE                              = 0x0003     // fcntl.h:99:1:
   140  	O_ALERT                                = 0x20000000 // fcntl.h:537:1:
   141  	O_APPEND                               = 0x00000008 // fcntl.h:114:1:
   142  	O_ASYNC                                = 0x00000040 // fcntl.h:121:1:
   143  	O_CLOEXEC                              = 0x01000000 // fcntl.h:150:1:
   144  	O_CREAT                                = 0x00000200 // fcntl.h:125:1:
   145  	O_DIRECTORY                            = 0x00100000 // fcntl.h:138:1:
   146  	O_DP_GETRAWENCRYPTED                   = 0x0001     // fcntl.h:181:1:
   147  	O_DP_GETRAWUNENCRYPTED                 = 0x0002     // fcntl.h:182:1:
   148  	O_DSYNC                                = 0x400000   // _o_dsync.h:29:1:
   149  	O_EVTONLY                              = 0x00008000 // fcntl.h:130:1:
   150  	O_EXCL                                 = 0x00000800 // fcntl.h:127:1:
   151  	O_EXLOCK                               = 0x00000020 // fcntl.h:120:1:
   152  	O_FSYNC                                = 128        // fcntl.h:122:1:
   153  	O_NDELAY                               = 4          // fcntl.h:199:1:
   154  	O_NOCTTY                               = 0x00020000 // fcntl.h:134:1:
   155  	O_NOFOLLOW                             = 0x00000100 // fcntl.h:123:1:
   156  	O_NOFOLLOW_ANY                         = 0x20000000 // fcntl.h:155:1:
   157  	O_NONBLOCK                             = 0x00000004 // fcntl.h:113:1:
   158  	O_POPUP                                = 0x80000000 // fcntl.h:536:1:
   159  	O_RDONLY                               = 0x0000     // fcntl.h:96:1:
   160  	O_RDWR                                 = 0x0002     // fcntl.h:98:1:
   161  	O_SHLOCK                               = 0x00000010 // fcntl.h:119:1:
   162  	O_SYMLINK                              = 0x00200000 // fcntl.h:142:1:
   163  	O_SYNC                                 = 0x0080     // _o_sync.h:29:1:
   164  	O_TRUNC                                = 0x00000400 // fcntl.h:126:1:
   165  	O_WRONLY                               = 0x0001     // fcntl.h:97:1:
   166  	SEEK_CUR                               = 1          // _seek_set.h:34:1:
   167  	SEEK_DATA                              = 4          // _seek_set.h:44:1:
   168  	SEEK_END                               = 2          // _seek_set.h:35:1:
   169  	SEEK_HOLE                              = 3          // _seek_set.h:40:1:
   170  	SEEK_SET                               = 0          // _seek_set.h:33:1:
   171  	S_IEXEC                                = 64         // _s_ifmt.h:72:1:
   172  	S_IFBLK                                = 0060000    // _s_ifmt.h:39:1:
   173  	S_IFCHR                                = 0020000    // _s_ifmt.h:37:1:
   174  	S_IFDIR                                = 0040000    // _s_ifmt.h:38:1:
   175  	S_IFIFO                                = 0010000    // _s_ifmt.h:36:1:
   176  	S_IFLNK                                = 0120000    // _s_ifmt.h:41:1:
   177  	S_IFMT                                 = 0170000    // _s_ifmt.h:35:1:
   178  	S_IFREG                                = 0100000    // _s_ifmt.h:40:1:
   179  	S_IFSOCK                               = 0140000    // _s_ifmt.h:42:1:
   180  	S_IFWHT                                = 0160000    // _s_ifmt.h:44:1:
   181  	S_IREAD                                = 256        // _s_ifmt.h:70:1:
   182  	S_IRGRP                                = 0000040    // _s_ifmt.h:55:1:
   183  	S_IROTH                                = 0000004    // _s_ifmt.h:60:1:
   184  	S_IRUSR                                = 0000400    // _s_ifmt.h:50:1:
   185  	S_IRWXG                                = 0000070    // _s_ifmt.h:54:1:
   186  	S_IRWXO                                = 0000007    // _s_ifmt.h:59:1:
   187  	S_IRWXU                                = 0000700    // _s_ifmt.h:49:1:
   188  	S_ISGID                                = 0002000    // _s_ifmt.h:65:1:
   189  	S_ISTXT                                = 512        // _s_ifmt.h:69:1:
   190  	S_ISUID                                = 0004000    // _s_ifmt.h:64:1:
   191  	S_ISVTX                                = 0001000    // _s_ifmt.h:66:1:
   192  	S_IWGRP                                = 0000020    // _s_ifmt.h:56:1:
   193  	S_IWOTH                                = 0000002    // _s_ifmt.h:61:1:
   194  	S_IWRITE                               = 128        // _s_ifmt.h:71:1:
   195  	S_IWUSR                                = 0000200    // _s_ifmt.h:51:1:
   196  	S_IXGRP                                = 0000010    // _s_ifmt.h:57:1:
   197  	S_IXOTH                                = 0000001    // _s_ifmt.h:62:1:
   198  	S_IXUSR                                = 0000100    // _s_ifmt.h:52:1:
   199  	USER_FSIGNATURES_CDHASH_LEN            = 20         // fcntl.h:401:1:
   200  	X_ARM_MACHTYPES_H_                     = 0          // types.h:43:1:
   201  	X_BSD_ARM__TYPES_H_                    = 0          // _types.h:5:1:
   202  	X_BSD_MACHINE_TYPES_H_                 = 0          // types.h:32:1:
   203  	X_BSD_MACHINE__TYPES_H_                = 0          // _types.h:29:1:
   204  	X_CDEFS_H_                             = 0          // cdefs.h:68:1:
   205  	X_DARWIN_FEATURE_64_BIT_INODE          = 1          // cdefs.h:774:1:
   206  	X_DARWIN_FEATURE_ONLY_64_BIT_INODE     = 1          // cdefs.h:784:1:
   207  	X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1          // cdefs.h:800:1:
   208  	X_DARWIN_FEATURE_ONLY_VERS_1050        = 1          // cdefs.h:792:1:
   209  	X_DARWIN_FEATURE_UNIX_CONFORMANCE      = 3          // cdefs.h:808:1:
   210  	X_FILESEC_T                            = 0          // _filesec_t.h:29:1:
   211  	X_FILE_OFFSET_BITS                     = 64         // <builtin>:25:1:
   212  	X_INT16_T                              = 0          // _int16_t.h:29:1:
   213  	X_INT32_T                              = 0          // _int32_t.h:29:1:
   214  	X_INT64_T                              = 0          // _int64_t.h:29:1:
   215  	X_INT8_T                               = 0          // _int8_t.h:29:1:
   216  	X_INTPTR_T                             = 0          // _intptr_t.h:29:1:
   217  	X_LP64                                 = 1          // <predefined>:1:1:
   218  	X_MACHTYPES_H_                         = 0          // types.h:44:1:
   219  	X_MODE_T                               = 0          // _mode_t.h:29:1:
   220  	X_Nonnull                              = 0          // cdefs.h:268:1:
   221  	X_Null_unspecified                     = 0          // cdefs.h:271:1:
   222  	X_Nullable                             = 0          // cdefs.h:265:1:
   223  	X_OFF_T                                = 0          // _off_t.h:29:1:
   224  	X_PID_T                                = 0          // _pid_t.h:29:1:
   225  	X_SIZE_T                               = 0          // _size_t.h:29:1:
   226  	X_SYS_FCNTL_H_                         = 0          // fcntl.h:71:1:
   227  	X_SYS__PTHREAD_TYPES_H_                = 0          // _pthread_types.h:30:1:
   228  	X_SYS__TYPES_H_                        = 0          // _types.h:30:1:
   229  	X_UINTPTR_T                            = 0          // _uintptr_t.h:29:1:
   230  	X_U_INT16_T                            = 0          // _u_int16_t.h:29:1:
   231  	X_U_INT32_T                            = 0          // _u_int32_t.h:29:1:
   232  	X_U_INT64_T                            = 0          // _u_int64_t.h:29:1:
   233  	X_U_INT8_T                             = 0          // _u_int8_t.h:29:1:
   234  )
   235  
   236  const ( /* fcntl.h:547:1: */
   237  	FILESEC_OWNER   = 1
   238  	FILESEC_GROUP   = 2
   239  	FILESEC_UUID    = 3
   240  	FILESEC_MODE    = 4
   241  	FILESEC_ACL     = 5
   242  	FILESEC_GRPUUID = 6
   243  
   244  	// XXX these are private to the implementation
   245  	FILESEC_ACL_RAW       = 100
   246  	FILESEC_ACL_ALLOCSIZE = 101
   247  )
   248  
   249  type Ptrdiff_t = int64 /* <builtin>:3:26 */
   250  
   251  type Size_t = uint64 /* <builtin>:9:23 */
   252  
   253  type Wchar_t = int32 /* <builtin>:15:24 */
   254  
   255  type X__int128_t = struct {
   256  	Flo int64
   257  	Fhi int64
   258  } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
   259  type X__uint128_t = struct {
   260  	Flo uint64
   261  	Fhi uint64
   262  } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
   263  
   264  type X__builtin_va_list = uintptr /* <builtin>:46:14 */
   265  type X__float128 = float64        /* <builtin>:47:21 */
   266  
   267  var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */
   268  
   269  // Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
   270  //
   271  // @APPLE_LICENSE_HEADER_START@
   272  //
   273  // This file contains Original Code and/or Modifications of Original Code
   274  // as defined in and that are subject to the Apple Public Source License
   275  // Version 2.0 (the 'License'). You may not use this file except in
   276  // compliance with the License. Please obtain a copy of the License at
   277  // http://www.opensource.apple.com/apsl/ and read it before using this
   278  // file.
   279  //
   280  // The Original Code and all software distributed under the License are
   281  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   282  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   283  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   284  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   285  // Please see the License for the specific language governing rights and
   286  // limitations under the License.
   287  //
   288  // @APPLE_LICENSE_HEADER_END@
   289  // Copyright (c) 2000-2013 Apple Inc. All rights reserved.
   290  //
   291  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
   292  //
   293  // This file contains Original Code and/or Modifications of Original Code
   294  // as defined in and that are subject to the Apple Public Source License
   295  // Version 2.0 (the 'License'). You may not use this file except in
   296  // compliance with the License. The rights granted to you under the License
   297  // may not be used to create, or enable the creation or redistribution of,
   298  // unlawful or unlicensed copies of an Apple operating system, or to
   299  // circumvent, violate, or enable the circumvention or violation of, any
   300  // terms of an Apple operating system software license agreement.
   301  //
   302  // Please obtain a copy of the License at
   303  // http://www.opensource.apple.com/apsl/ and read it before using this file.
   304  //
   305  // The Original Code and all software distributed under the License are
   306  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   307  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   308  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   309  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   310  // Please see the License for the specific language governing rights and
   311  // limitations under the License.
   312  //
   313  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   314  // Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
   315  // -
   316  // Copyright (c) 1983, 1990, 1993
   317  //	The Regents of the University of California.  All rights reserved.
   318  // (c) UNIX System Laboratories, Inc.
   319  // All or some portions of this file are derived from material licensed
   320  // to the University of California by American Telephone and Telegraph
   321  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
   322  // the permission of UNIX System Laboratories, Inc.
   323  //
   324  // Redistribution and use in source and binary forms, with or without
   325  // modification, are permitted provided that the following conditions
   326  // are met:
   327  // 1. Redistributions of source code must retain the above copyright
   328  //    notice, this list of conditions and the following disclaimer.
   329  // 2. Redistributions in binary form must reproduce the above copyright
   330  //    notice, this list of conditions and the following disclaimer in the
   331  //    documentation and/or other materials provided with the distribution.
   332  // 3. All advertising materials mentioning features or use of this software
   333  //    must display the following acknowledgement:
   334  //	This product includes software developed by the University of
   335  //	California, Berkeley and its contributors.
   336  // 4. Neither the name of the University nor the names of its contributors
   337  //    may be used to endorse or promote products derived from this software
   338  //    without specific prior written permission.
   339  //
   340  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   341  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   342  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   343  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   344  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   345  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   346  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   347  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   348  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   349  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   350  // SUCH DAMAGE.
   351  //
   352  //	@(#)fcntl.h	8.3 (Berkeley) 1/21/94
   353  
   354  // This file includes the definitions for open and fcntl
   355  // described by POSIX for <fcntl.h>; it also includes
   356  // related kernel definitions.
   357  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
   358  //
   359  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
   360  //
   361  // This file contains Original Code and/or Modifications of Original Code
   362  // as defined in and that are subject to the Apple Public Source License
   363  // Version 2.0 (the 'License'). You may not use this file except in
   364  // compliance with the License. The rights granted to you under the License
   365  // may not be used to create, or enable the creation or redistribution of,
   366  // unlawful or unlicensed copies of an Apple operating system, or to
   367  // circumvent, violate, or enable the circumvention or violation of, any
   368  // terms of an Apple operating system software license agreement.
   369  //
   370  // Please obtain a copy of the License at
   371  // http://www.opensource.apple.com/apsl/ and read it before using this file.
   372  //
   373  // The Original Code and all software distributed under the License are
   374  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   375  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   376  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   377  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   378  // Please see the License for the specific language governing rights and
   379  // limitations under the License.
   380  //
   381  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   382  
   383  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
   384  //
   385  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
   386  //
   387  // This file contains Original Code and/or Modifications of Original Code
   388  // as defined in and that are subject to the Apple Public Source License
   389  // Version 2.0 (the 'License'). You may not use this file except in
   390  // compliance with the License. The rights granted to you under the License
   391  // may not be used to create, or enable the creation or redistribution of,
   392  // unlawful or unlicensed copies of an Apple operating system, or to
   393  // circumvent, violate, or enable the circumvention or violation of, any
   394  // terms of an Apple operating system software license agreement.
   395  //
   396  // Please obtain a copy of the License at
   397  // http://www.opensource.apple.com/apsl/ and read it before using this file.
   398  //
   399  // The Original Code and all software distributed under the License are
   400  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   401  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   402  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   403  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   404  // Please see the License for the specific language governing rights and
   405  // limitations under the License.
   406  //
   407  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   408  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
   409  // Copyright (c) 1991, 1993
   410  //	The Regents of the University of California.  All rights reserved.
   411  //
   412  // This code is derived from software contributed to Berkeley by
   413  // Berkeley Software Design, Inc.
   414  //
   415  // Redistribution and use in source and binary forms, with or without
   416  // modification, are permitted provided that the following conditions
   417  // are met:
   418  // 1. Redistributions of source code must retain the above copyright
   419  //    notice, this list of conditions and the following disclaimer.
   420  // 2. Redistributions in binary form must reproduce the above copyright
   421  //    notice, this list of conditions and the following disclaimer in the
   422  //    documentation and/or other materials provided with the distribution.
   423  // 3. All advertising materials mentioning features or use of this software
   424  //    must display the following acknowledgement:
   425  //	This product includes software developed by the University of
   426  //	California, Berkeley and its contributors.
   427  // 4. Neither the name of the University nor the names of its contributors
   428  //    may be used to endorse or promote products derived from this software
   429  //    without specific prior written permission.
   430  //
   431  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   432  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   433  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   434  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   435  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   436  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   437  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   438  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   439  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   440  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   441  // SUCH DAMAGE.
   442  //
   443  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
   444  
   445  // This SDK is designed to work with clang and specific versions of
   446  // gcc >= 4.0 with Apple's patch sets
   447  
   448  // Compatibility with compilers and environments that don't support compiler
   449  // feature checking function-like macros.
   450  
   451  // The __CONCAT macro is used to concatenate parts of symbol names, e.g.
   452  // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
   453  // The __CONCAT macro is a bit tricky -- make sure you don't put spaces
   454  // in between its arguments.  __CONCAT can also concatenate double-quoted
   455  // strings produced by the __STRING macro, but this only works with ANSI C.
   456  
   457  // In non-ANSI C environments, new programs will want ANSI-only C keywords
   458  // deleted from the program and old programs will want them left alone.
   459  // When using a compiler other than gcc, programs using the ANSI C keywords
   460  // const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
   461  // When using "gcc -traditional", we assume that this is the intent; if
   462  // __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
   463  
   464  // __pure2 can be used for functions that are only a function of their scalar
   465  // arguments (meaning they can't dereference pointers).
   466  //
   467  // __stateful_pure can be used for functions that have no side effects,
   468  // but depend on the state of the memory.
   469  
   470  // __unused denotes variables and functions that may not be used, preventing
   471  // the compiler from warning about it if not used.
   472  
   473  // __used forces variables and functions to be included even if it appears
   474  // to the compiler that they are not used (and would thust be discarded).
   475  
   476  // __cold marks code used for debugging or that is rarely taken
   477  // and tells the compiler to optimize for size and outline code.
   478  
   479  // __exported denotes symbols that should be exported even when symbols
   480  // are hidden by default.
   481  // __exported_push/_exported_pop are pragmas used to delimit a range of
   482  //  symbols that should be exported even when symbols are hidden by default.
   483  
   484  // __deprecated causes the compiler to produce a warning when encountering
   485  // code using the deprecated functionality.
   486  // __deprecated_msg() does the same, and compilers that support it will print
   487  // a message along with the deprecation warning.
   488  // This may require turning on such warning with the -Wdeprecated flag.
   489  // __deprecated_enum_msg() should be used on enums, and compilers that support
   490  // it will print the deprecation warning.
   491  // __kpi_deprecated() specifically indicates deprecation of kernel programming
   492  // interfaces in Kernel.framework used by KEXTs.
   493  
   494  // __unavailable causes the compiler to error out when encountering
   495  // code using the tagged function
   496  
   497  // Delete pseudo-keywords wherever they are not available or needed.
   498  
   499  // We use `__restrict' as a way to define the `restrict' type qualifier
   500  // without disturbing older software that is unaware of C99 keywords.
   501  
   502  // Compatibility with compilers and environments that don't support the
   503  // nullability feature.
   504  
   505  // __disable_tail_calls causes the compiler to not perform tail call
   506  // optimization inside the marked function.
   507  
   508  // __not_tail_called causes the compiler to prevent tail call optimization
   509  // on statically bound calls to the function.  It has no effect on indirect
   510  // calls.  Virtual functions, objective-c methods, and functions marked as
   511  // "always_inline" cannot be marked as __not_tail_called.
   512  
   513  // __result_use_check warns callers of a function that not using the function
   514  // return value is a bug, i.e. dismissing malloc() return value results in a
   515  // memory leak.
   516  
   517  // __swift_unavailable causes the compiler to mark a symbol as specifically
   518  // unavailable in Swift, regardless of any other availability in C.
   519  
   520  // __abortlike is the attribute to put on functions like abort() that are
   521  // typically used to mark assertions. These optimize the codegen
   522  // for outlining while still maintaining debugability.
   523  
   524  // Declaring inline functions within headers is error-prone due to differences
   525  // across various versions of the C language and extensions.  __header_inline
   526  // can be used to declare inline functions within system headers.  In cases
   527  // where you want to force inlining instead of letting the compiler make
   528  // the decision, you can use __header_always_inline.
   529  //
   530  // Be aware that using inline for functions which compilers may also provide
   531  // builtins can behave differently under various compilers.  If you intend to
   532  // provide an inline version of such a function, you may want to use a macro
   533  // instead.
   534  //
   535  // The check for !__GNUC__ || __clang__ is because gcc doesn't correctly
   536  // support c99 inline in some cases:
   537  // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55965
   538  
   539  // Compiler-dependent macros that bracket portions of code where the
   540  // "-Wunreachable-code" warning should be ignored. Please use sparingly.
   541  
   542  // Compiler-dependent macros to declare that functions take printf-like
   543  // or scanf-like arguments.  They are null except for versions of gcc
   544  // that are known to support the features properly.  Functions declared
   545  // with these attributes will cause compilation warnings if there is a
   546  // mismatch between the format string and subsequent function parameter
   547  // types.
   548  
   549  // Source compatibility only, ID string not emitted in object file
   550  
   551  // __alloc_size can be used to label function arguments that represent the
   552  // size of memory that the function allocates and returns. The one-argument
   553  // form labels a single argument that gives the allocation size (where the
   554  // arguments are numbered from 1):
   555  //
   556  // void	*malloc(size_t __size) __alloc_size(1);
   557  //
   558  // The two-argument form handles the case where the size is calculated as the
   559  // product of two arguments:
   560  //
   561  // void	*calloc(size_t __count, size_t __size) __alloc_size(1,2);
   562  
   563  // COMPILATION ENVIRONMENTS -- see compat(5) for additional detail
   564  //
   565  // DEFAULT	By default newly complied code will get POSIX APIs plus
   566  //		Apple API extensions in scope.
   567  //
   568  //		Most users will use this compilation environment to avoid
   569  //		behavioral differences between 32 and 64 bit code.
   570  //
   571  // LEGACY	Defining _NONSTD_SOURCE will get pre-POSIX APIs plus Apple
   572  //		API extensions in scope.
   573  //
   574  //		This is generally equivalent to the Tiger release compilation
   575  //		environment, except that it cannot be applied to 64 bit code;
   576  //		its use is discouraged.
   577  //
   578  //		We expect this environment to be deprecated in the future.
   579  //
   580  // STRICT	Defining _POSIX_C_SOURCE or _XOPEN_SOURCE restricts the
   581  //		available APIs to exactly the set of APIs defined by the
   582  //		corresponding standard, based on the value defined.
   583  //
   584  //		A correct, portable definition for _POSIX_C_SOURCE is 200112L.
   585  //		A correct, portable definition for _XOPEN_SOURCE is 600L.
   586  //
   587  //		Apple API extensions are not visible in this environment,
   588  //		which can cause Apple specific code to fail to compile,
   589  //		or behave incorrectly if prototypes are not in scope or
   590  //		warnings about missing prototypes are not enabled or ignored.
   591  //
   592  // In any compilation environment, for correct symbol resolution to occur,
   593  // function prototypes must be in scope.  It is recommended that all Apple
   594  // tools users add either the "-Wall" or "-Wimplicit-function-declaration"
   595  // compiler flags to their projects to be warned when a function is being
   596  // used without a prototype in scope.
   597  
   598  // These settings are particular to each product.
   599  // Platform: MacOSX
   600  
   601  // The __DARWIN_ALIAS macros are used to do symbol renaming; they allow
   602  // legacy code to use the old symbol, thus maintaining binary compatibility
   603  // while new code can use a standards compliant version of the same function.
   604  //
   605  // __DARWIN_ALIAS is used by itself if the function signature has not
   606  // changed, it is used along with a #ifdef check for __DARWIN_UNIX03
   607  // if the signature has changed.  Because the __LP64__ environment
   608  // only supports UNIX03 semantics it causes __DARWIN_UNIX03 to be
   609  // defined, but causes __DARWIN_ALIAS to do no symbol mangling.
   610  //
   611  // As a special case, when XCode is used to target a specific version of the
   612  // OS, the manifest constant __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
   613  // will be defined by the compiler, with the digits representing major version
   614  // time 100 + minor version times 10 (e.g. 10.5 := 1050).  If we are targeting
   615  // pre-10.5, and it is the default compilation environment, revert the
   616  // compilation environment to pre-__DARWIN_UNIX03.
   617  
   618  // symbol suffixes used for symbol versioning
   619  
   620  // symbol versioning macros
   621  
   622  // symbol release macros
   623  // Copyright (c) 2010 Apple Inc. All rights reserved.
   624  //
   625  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
   626  //
   627  // This file contains Original Code and/or Modifications of Original Code
   628  // as defined in and that are subject to the Apple Public Source License
   629  // Version 2.0 (the 'License'). You may not use this file except in
   630  // compliance with the License. The rights granted to you under the License
   631  // may not be used to create, or enable the creation or redistribution of,
   632  // unlawful or unlicensed copies of an Apple operating system, or to
   633  // circumvent, violate, or enable the circumvention or violation of, any
   634  // terms of an Apple operating system software license agreement.
   635  //
   636  // Please obtain a copy of the License at
   637  // http://www.opensource.apple.com/apsl/ and read it before using this file.
   638  //
   639  // The Original Code and all software distributed under the License are
   640  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   641  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   642  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   643  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   644  // Please see the License for the specific language governing rights and
   645  // limitations under the License.
   646  //
   647  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   648  
   649  // POSIX.1 requires that the macros we test be defined before any standard
   650  // header file is included.  This permits us to convert values for feature
   651  // testing, as necessary, using only _POSIX_C_SOURCE.
   652  //
   653  // Here's a quick run-down of the versions:
   654  //  defined(_POSIX_SOURCE)		1003.1-1988
   655  //  _POSIX_C_SOURCE == 1L		1003.1-1990
   656  //  _POSIX_C_SOURCE == 2L		1003.2-1992 C Language Binding Option
   657  //  _POSIX_C_SOURCE == 199309L		1003.1b-1993
   658  //  _POSIX_C_SOURCE == 199506L		1003.1c-1995, 1003.1i-1995,
   659  //					and the omnibus ISO/IEC 9945-1: 1996
   660  //  _POSIX_C_SOURCE == 200112L		1003.1-2001
   661  //  _POSIX_C_SOURCE == 200809L		1003.1-2008
   662  //
   663  // In addition, the X/Open Portability Guide, which is now the Single UNIX
   664  // Specification, defines a feature-test macro which indicates the version of
   665  // that specification, and which subsumes _POSIX_C_SOURCE.
   666  
   667  // Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1L.
   668  
   669  // Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2L.
   670  
   671  // Deal with various X/Open Portability Guides and Single UNIX Spec.
   672  
   673  // Deal with all versions of POSIX.  The ordering relative to the tests above is
   674  // important.
   675  
   676  // POSIX C deprecation macros
   677  // Copyright (c) 2010 Apple Inc. All rights reserved.
   678  //
   679  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
   680  //
   681  // This file contains Original Code and/or Modifications of Original Code
   682  // as defined in and that are subject to the Apple Public Source License
   683  // Version 2.0 (the 'License'). You may not use this file except in
   684  // compliance with the License. The rights granted to you under the License
   685  // may not be used to create, or enable the creation or redistribution of,
   686  // unlawful or unlicensed copies of an Apple operating system, or to
   687  // circumvent, violate, or enable the circumvention or violation of, any
   688  // terms of an Apple operating system software license agreement.
   689  //
   690  // Please obtain a copy of the License at
   691  // http://www.opensource.apple.com/apsl/ and read it before using this file.
   692  //
   693  // The Original Code and all software distributed under the License are
   694  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   695  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   696  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   697  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   698  // Please see the License for the specific language governing rights and
   699  // limitations under the License.
   700  //
   701  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   702  
   703  // Set a single macro which will always be defined and can be used to determine
   704  // the appropriate namespace.  For POSIX, these values will correspond to
   705  // _POSIX_C_SOURCE value.  Currently there are two additional levels corresponding
   706  // to ANSI (_ANSI_SOURCE) and Darwin extensions (_DARWIN_C_SOURCE)
   707  
   708  // If the developer has neither requested a strict language mode nor a version
   709  // of POSIX, turn on functionality provided by __STDC_WANT_LIB_EXT1__ as part
   710  // of __DARWIN_C_FULL.
   711  
   712  // long long is not supported in c89 (__STRICT_ANSI__), but g++ -ansi and
   713  // c99 still want long longs.  While not perfect, we allow long longs for
   714  // g++.
   715  
   716  // ****************************************
   717  //
   718  //  Public darwin-specific feature macros
   719  //
   720  
   721  // _DARWIN_FEATURE_64_BIT_INODE indicates that the ino_t type is 64-bit, and
   722  // structures modified for 64-bit inodes (like struct stat) will be used.
   723  
   724  // _DARWIN_FEATURE_64_ONLY_BIT_INODE indicates that the ino_t type may only
   725  // be 64-bit; there is no support for 32-bit ino_t when this macro is defined
   726  // (and non-zero).  There is no struct stat64 either, as the regular
   727  // struct stat will already be the 64-bit version.
   728  
   729  // _DARWIN_FEATURE_ONLY_VERS_1050 indicates that only those APIs updated
   730  // in 10.5 exists; no pre-10.5 variants are available.
   731  
   732  // _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE indicates only UNIX conforming API
   733  // are available (the legacy BSD APIs are not available)
   734  
   735  // _DARWIN_FEATURE_UNIX_CONFORMANCE indicates whether UNIX conformance is on,
   736  // and specifies the conformance level (3 is SUSv3)
   737  
   738  // This macro casts away the qualifier from the variable
   739  //
   740  // Note: use at your own risk, removing qualifiers can result in
   741  // catastrophic run-time failures.
   742  
   743  // __XNU_PRIVATE_EXTERN is a linkage decoration indicating that a symbol can be
   744  // used from other compilation units, but not other libraries or executables.
   745  
   746  // We intentionally define to nothing pointer attributes which do not have an
   747  // impact on the ABI. __indexable and __bidi_indexable are not defined because
   748  // of the ABI incompatibility that makes the diagnostic preferable.
   749  
   750  // Similarly, we intentionally define to nothing the
   751  // __ptrcheck_abi_assume_single and __ptrcheck_abi_assume_unsafe_indexable
   752  // macros because they do not lead to an ABI incompatibility. However, we do not
   753  // define the indexable and unsafe_indexable ones because the diagnostic is
   754  // better than the silent ABI break.
   755  
   756  // __unsafe_forge intrinsics are defined as regular C casts.
   757  
   758  // decay operates normally; attribute is meaningless without pointer checks.
   759  
   760  // Architecture validation for current SDK
   761  
   762  // Similar to OS_ENUM/OS_CLOSED_ENUM/OS_OPTIONS/OS_CLOSED_OPTIONS
   763  //
   764  // This provides more advanced type checking on compilers supporting
   765  // the proper extensions, even in C.
   766  
   767  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
   768  //
   769  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
   770  //
   771  // This file contains Original Code and/or Modifications of Original Code
   772  // as defined in and that are subject to the Apple Public Source License
   773  // Version 2.0 (the 'License'). You may not use this file except in
   774  // compliance with the License. The rights granted to you under the License
   775  // may not be used to create, or enable the creation or redistribution of,
   776  // unlawful or unlicensed copies of an Apple operating system, or to
   777  // circumvent, violate, or enable the circumvention or violation of, any
   778  // terms of an Apple operating system software license agreement.
   779  //
   780  // Please obtain a copy of the License at
   781  // http://www.opensource.apple.com/apsl/ and read it before using this file.
   782  //
   783  // The Original Code and all software distributed under the License are
   784  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   785  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   786  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   787  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   788  // Please see the License for the specific language governing rights and
   789  // limitations under the License.
   790  //
   791  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   792  
   793  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
   794  
   795  // This header file contains integer types.  It's intended to also contain
   796  // flotaing point and other arithmetic types, as needed, later.
   797  
   798  type X__int8_t = int8     /* _types.h:15:33 */
   799  type X__uint8_t = uint8   /* _types.h:19:33 */
   800  type X__int16_t = int16   /* _types.h:20:33 */
   801  type X__uint16_t = uint16 /* _types.h:21:33 */
   802  type X__int32_t = int32   /* _types.h:22:33 */
   803  type X__uint32_t = uint32 /* _types.h:23:33 */
   804  type X__int64_t = int64   /* _types.h:24:33 */
   805  type X__uint64_t = uint64 /* _types.h:25:33 */
   806  
   807  type X__darwin_intptr_t = int64   /* _types.h:27:33 */
   808  type X__darwin_natural_t = uint32 /* _types.h:28:33 */
   809  
   810  // The rune type below is declared to be an ``int'' instead of the more natural
   811  // ``unsigned long'' or ``long''.  Two things are happening here.  It is not
   812  // unsigned so that EOF (-1) can be naturally assigned to it and used.  Also,
   813  // it looks like 10646 will be a 31 bit standard.  This means that if your
   814  // ints cannot hold 32 bits, you will be in trouble.  The reason an int was
   815  // chosen over a long is that the is*() and to*() routines take ints (says
   816  // ANSI C), but they use __darwin_ct_rune_t instead of int.  By changing it
   817  // here, you lose a bit of ANSI conformance, but your programs will still
   818  // work.
   819  //
   820  // NOTE: rune_t is not covered by ANSI nor other standards, and should not
   821  // be instantiated outside of lib/libc/locale.  Use wchar_t.  wchar_t and
   822  // rune_t must be the same type.  Also wint_t must be no narrower than
   823  // wchar_t, and should also be able to hold all members of the largest
   824  // character set plus one extra value (WEOF). wint_t must be at least 16 bits.
   825  
   826  type X__darwin_ct_rune_t = int32 /* _types.h:48:33 */ // ct_rune_t
   827  
   828  // mbstate_t is an opaque object to keep conversion state, during multibyte
   829  // stream conversions.  The content must not be referenced by user programs.
   830  type X__mbstate_t = struct {
   831  	F__ccgo_pad1 [0]uint64
   832  	F__mbstate8  [128]int8
   833  } /* _types.h:57:3 */
   834  
   835  type X__darwin_mbstate_t = X__mbstate_t /* _types.h:59:33 */ // mbstate_t
   836  
   837  type X__darwin_ptrdiff_t = int64 /* _types.h:62:33 */ // ptr1 - ptr2
   838  
   839  type X__darwin_size_t = uint64 /* _types.h:70:33 */ // sizeof()
   840  
   841  type X__darwin_va_list = X__builtin_va_list /* _types.h:76:33 */ // va_list
   842  
   843  type X__darwin_wchar_t = int32 /* _types.h:82:33 */ // wchar_t
   844  
   845  type X__darwin_rune_t = X__darwin_wchar_t /* _types.h:87:33 */ // rune_t
   846  
   847  type X__darwin_wint_t = int32 /* _types.h:90:33 */ // wint_t
   848  
   849  type X__darwin_clock_t = uint64        /* _types.h:95:33 */ // clock()
   850  type X__darwin_socklen_t = X__uint32_t /* _types.h:96:33 */ // socklen_t (duh)
   851  type X__darwin_ssize_t = int64         /* _types.h:97:33 */ // byte count or error
   852  type X__darwin_time_t = int64          /* _types.h:98:33 */ // time()
   853  
   854  // Type definitions; takes common type definitions that must be used
   855  // in multiple header files due to [XSI], removes them from the system
   856  // space, and puts them in the implementation space.
   857  
   858  type X__darwin_blkcnt_t = X__int64_t                    /* _types.h:55:25 */ // total blocks
   859  type X__darwin_blksize_t = X__int32_t                   /* _types.h:56:25 */ // preferred block size
   860  type X__darwin_dev_t = X__int32_t                       /* _types.h:57:25 */ // dev_t
   861  type X__darwin_fsblkcnt_t = uint32                      /* _types.h:58:25 */ // Used by statvfs and fstatvfs
   862  type X__darwin_fsfilcnt_t = uint32                      /* _types.h:59:25 */ // Used by statvfs and fstatvfs
   863  type X__darwin_gid_t = X__uint32_t                      /* _types.h:60:25 */ // [???] process and group IDs
   864  type X__darwin_id_t = X__uint32_t                       /* _types.h:61:25 */ // [XSI] pid_t, uid_t, or gid_t
   865  type X__darwin_ino64_t = X__uint64_t                    /* _types.h:62:25 */ // [???] Used for 64 bit inodes
   866  type X__darwin_ino_t = X__darwin_ino64_t                /* _types.h:64:26 */ // [???] Used for inodes
   867  type X__darwin_mach_port_name_t = X__darwin_natural_t   /* _types.h:68:28 */ // Used by mach
   868  type X__darwin_mach_port_t = X__darwin_mach_port_name_t /* _types.h:69:35 */ // Used by mach
   869  type X__darwin_mode_t = X__uint16_t                     /* _types.h:70:25 */ // [???] Some file attributes
   870  type X__darwin_off_t = X__int64_t                       /* _types.h:71:25 */ // [???] Used for file sizes
   871  type X__darwin_pid_t = X__int32_t                       /* _types.h:72:25 */ // [???] process and group IDs
   872  type X__darwin_sigset_t = X__uint32_t                   /* _types.h:73:25 */ // [???] signal set
   873  type X__darwin_suseconds_t = X__int32_t                 /* _types.h:74:25 */ // [???] microseconds
   874  type X__darwin_uid_t = X__uint32_t                      /* _types.h:75:25 */ // [???] user IDs
   875  type X__darwin_useconds_t = X__uint32_t                 /* _types.h:76:25 */ // [???] microseconds
   876  type X__darwin_uuid_t = [16]uint8                       /* _types.h:77:25 */
   877  type X__darwin_uuid_string_t = [37]int8                 /* _types.h:78:17 */
   878  
   879  // Copyright (c) 2003-2013 Apple Inc. All rights reserved.
   880  //
   881  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
   882  //
   883  // This file contains Original Code and/or Modifications of Original Code
   884  // as defined in and that are subject to the Apple Public Source License
   885  // Version 2.0 (the 'License'). You may not use this file except in
   886  // compliance with the License. The rights granted to you under the License
   887  // may not be used to create, or enable the creation or redistribution of,
   888  // unlawful or unlicensed copies of an Apple operating system, or to
   889  // circumvent, violate, or enable the circumvention or violation of, any
   890  // terms of an Apple operating system software license agreement.
   891  //
   892  // Please obtain a copy of the License at
   893  // http://www.opensource.apple.com/apsl/ and read it before using this file.
   894  //
   895  // The Original Code and all software distributed under the License are
   896  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   897  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   898  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   899  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   900  // Please see the License for the specific language governing rights and
   901  // limitations under the License.
   902  //
   903  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   904  
   905  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
   906  //
   907  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
   908  //
   909  // This file contains Original Code and/or Modifications of Original Code
   910  // as defined in and that are subject to the Apple Public Source License
   911  // Version 2.0 (the 'License'). You may not use this file except in
   912  // compliance with the License. The rights granted to you under the License
   913  // may not be used to create, or enable the creation or redistribution of,
   914  // unlawful or unlicensed copies of an Apple operating system, or to
   915  // circumvent, violate, or enable the circumvention or violation of, any
   916  // terms of an Apple operating system software license agreement.
   917  //
   918  // Please obtain a copy of the License at
   919  // http://www.opensource.apple.com/apsl/ and read it before using this file.
   920  //
   921  // The Original Code and all software distributed under the License are
   922  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   923  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   924  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   925  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   926  // Please see the License for the specific language governing rights and
   927  // limitations under the License.
   928  //
   929  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   930  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
   931  // Copyright (c) 1991, 1993
   932  //	The Regents of the University of California.  All rights reserved.
   933  //
   934  // This code is derived from software contributed to Berkeley by
   935  // Berkeley Software Design, Inc.
   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  // 3. All advertising materials mentioning features or use of this software
   946  //    must display the following acknowledgement:
   947  //	This product includes software developed by the University of
   948  //	California, Berkeley and its contributors.
   949  // 4. Neither the name of the University nor the names of its contributors
   950  //    may be used to endorse or promote products derived from this software
   951  //    without specific prior written permission.
   952  //
   953  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   954  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   955  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   956  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   957  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   958  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   959  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   960  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   961  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   962  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   963  // SUCH DAMAGE.
   964  //
   965  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
   966  
   967  // pthread opaque structures
   968  
   969  type X__darwin_pthread_handler_rec = struct {
   970  	F__routine uintptr
   971  	F__arg     uintptr
   972  	F__next    uintptr
   973  } /* _pthread_types.h:57:1 */
   974  
   975  type X_opaque_pthread_attr_t = struct {
   976  	F__sig    int64
   977  	F__opaque [56]int8
   978  } /* _pthread_types.h:63:1 */
   979  
   980  type X_opaque_pthread_cond_t = struct {
   981  	F__sig    int64
   982  	F__opaque [40]int8
   983  } /* _pthread_types.h:68:1 */
   984  
   985  type X_opaque_pthread_condattr_t = struct {
   986  	F__sig    int64
   987  	F__opaque [8]int8
   988  } /* _pthread_types.h:73:1 */
   989  
   990  type X_opaque_pthread_mutex_t = struct {
   991  	F__sig    int64
   992  	F__opaque [56]int8
   993  } /* _pthread_types.h:78:1 */
   994  
   995  type X_opaque_pthread_mutexattr_t = struct {
   996  	F__sig    int64
   997  	F__opaque [8]int8
   998  } /* _pthread_types.h:83:1 */
   999  
  1000  type X_opaque_pthread_once_t = struct {
  1001  	F__sig    int64
  1002  	F__opaque [8]int8
  1003  } /* _pthread_types.h:88:1 */
  1004  
  1005  type X_opaque_pthread_rwlock_t = struct {
  1006  	F__sig    int64
  1007  	F__opaque [192]int8
  1008  } /* _pthread_types.h:93:1 */
  1009  
  1010  type X_opaque_pthread_rwlockattr_t = struct {
  1011  	F__sig    int64
  1012  	F__opaque [16]int8
  1013  } /* _pthread_types.h:98:1 */
  1014  
  1015  type X_opaque_pthread_t = struct {
  1016  	F__sig           int64
  1017  	F__cleanup_stack uintptr
  1018  	F__opaque        [8176]int8
  1019  } /* _pthread_types.h:103:1 */
  1020  
  1021  type X__darwin_pthread_attr_t = X_opaque_pthread_attr_t             /* _pthread_types.h:109:39 */
  1022  type X__darwin_pthread_cond_t = X_opaque_pthread_cond_t             /* _pthread_types.h:110:39 */
  1023  type X__darwin_pthread_condattr_t = X_opaque_pthread_condattr_t     /* _pthread_types.h:111:43 */
  1024  type X__darwin_pthread_key_t = uint64                               /* _pthread_types.h:112:23 */
  1025  type X__darwin_pthread_mutex_t = X_opaque_pthread_mutex_t           /* _pthread_types.h:113:40 */
  1026  type X__darwin_pthread_mutexattr_t = X_opaque_pthread_mutexattr_t   /* _pthread_types.h:114:44 */
  1027  type X__darwin_pthread_once_t = X_opaque_pthread_once_t             /* _pthread_types.h:115:39 */
  1028  type X__darwin_pthread_rwlock_t = X_opaque_pthread_rwlock_t         /* _pthread_types.h:116:41 */
  1029  type X__darwin_pthread_rwlockattr_t = X_opaque_pthread_rwlockattr_t /* _pthread_types.h:117:45 */
  1030  type X__darwin_pthread_t = uintptr                                  /* _pthread_types.h:118:34 */
  1031  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1032  //
  1033  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1034  //
  1035  // This file contains Original Code and/or Modifications of Original Code
  1036  // as defined in and that are subject to the Apple Public Source License
  1037  // Version 2.0 (the 'License'). You may not use this file except in
  1038  // compliance with the License. The rights granted to you under the License
  1039  // may not be used to create, or enable the creation or redistribution of,
  1040  // unlawful or unlicensed copies of an Apple operating system, or to
  1041  // circumvent, violate, or enable the circumvention or violation of, any
  1042  // terms of an Apple operating system software license agreement.
  1043  //
  1044  // Please obtain a copy of the License at
  1045  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1046  //
  1047  // The Original Code and all software distributed under the License are
  1048  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1049  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1050  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1051  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1052  // Please see the License for the specific language governing rights and
  1053  // limitations under the License.
  1054  //
  1055  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1056  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  1057  //
  1058  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1059  //
  1060  // This file contains Original Code and/or Modifications of Original Code
  1061  // as defined in and that are subject to the Apple Public Source License
  1062  // Version 2.0 (the 'License'). You may not use this file except in
  1063  // compliance with the License. The rights granted to you under the License
  1064  // may not be used to create, or enable the creation or redistribution of,
  1065  // unlawful or unlicensed copies of an Apple operating system, or to
  1066  // circumvent, violate, or enable the circumvention or violation of, any
  1067  // terms of an Apple operating system software license agreement.
  1068  //
  1069  // Please obtain a copy of the License at
  1070  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1071  //
  1072  // The Original Code and all software distributed under the License are
  1073  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1074  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1075  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1076  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1077  // Please see the License for the specific language governing rights and
  1078  // limitations under the License.
  1079  //
  1080  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1081  
  1082  type Mode_t = X__darwin_mode_t /* _mode_t.h:31:33 */
  1083  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1084  //
  1085  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1086  //
  1087  // This file contains Original Code and/or Modifications of Original Code
  1088  // as defined in and that are subject to the Apple Public Source License
  1089  // Version 2.0 (the 'License'). You may not use this file except in
  1090  // compliance with the License. The rights granted to you under the License
  1091  // may not be used to create, or enable the creation or redistribution of,
  1092  // unlawful or unlicensed copies of an Apple operating system, or to
  1093  // circumvent, violate, or enable the circumvention or violation of, any
  1094  // terms of an Apple operating system software license agreement.
  1095  //
  1096  // Please obtain a copy of the License at
  1097  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1098  //
  1099  // The Original Code and all software distributed under the License are
  1100  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1101  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1102  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1103  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1104  // Please see the License for the specific language governing rights and
  1105  // limitations under the License.
  1106  //
  1107  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1108  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  1109  //
  1110  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1111  //
  1112  // This file contains Original Code and/or Modifications of Original Code
  1113  // as defined in and that are subject to the Apple Public Source License
  1114  // Version 2.0 (the 'License'). You may not use this file except in
  1115  // compliance with the License. The rights granted to you under the License
  1116  // may not be used to create, or enable the creation or redistribution of,
  1117  // unlawful or unlicensed copies of an Apple operating system, or to
  1118  // circumvent, violate, or enable the circumvention or violation of, any
  1119  // terms of an Apple operating system software license agreement.
  1120  //
  1121  // Please obtain a copy of the License at
  1122  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1123  //
  1124  // The Original Code and all software distributed under the License are
  1125  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1126  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1127  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1128  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1129  // Please see the License for the specific language governing rights and
  1130  // limitations under the License.
  1131  //
  1132  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1133  
  1134  type Off_t = X__darwin_off_t /* _off_t.h:31:33 */
  1135  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1136  //
  1137  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1138  //
  1139  // This file contains Original Code and/or Modifications of Original Code
  1140  // as defined in and that are subject to the Apple Public Source License
  1141  // Version 2.0 (the 'License'). You may not use this file except in
  1142  // compliance with the License. The rights granted to you under the License
  1143  // may not be used to create, or enable the creation or redistribution of,
  1144  // unlawful or unlicensed copies of an Apple operating system, or to
  1145  // circumvent, violate, or enable the circumvention or violation of, any
  1146  // terms of an Apple operating system software license agreement.
  1147  //
  1148  // Please obtain a copy of the License at
  1149  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1150  //
  1151  // The Original Code and all software distributed under the License are
  1152  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1153  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1154  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1155  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1156  // Please see the License for the specific language governing rights and
  1157  // limitations under the License.
  1158  //
  1159  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1160  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  1161  //
  1162  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1163  //
  1164  // This file contains Original Code and/or Modifications of Original Code
  1165  // as defined in and that are subject to the Apple Public Source License
  1166  // Version 2.0 (the 'License'). You may not use this file except in
  1167  // compliance with the License. The rights granted to you under the License
  1168  // may not be used to create, or enable the creation or redistribution of,
  1169  // unlawful or unlicensed copies of an Apple operating system, or to
  1170  // circumvent, violate, or enable the circumvention or violation of, any
  1171  // terms of an Apple operating system software license agreement.
  1172  //
  1173  // Please obtain a copy of the License at
  1174  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1175  //
  1176  // The Original Code and all software distributed under the License are
  1177  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1178  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1179  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1180  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1181  // Please see the License for the specific language governing rights and
  1182  // limitations under the License.
  1183  //
  1184  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1185  
  1186  type Pid_t = X__darwin_pid_t /* _pid_t.h:31:31 */
  1187  
  1188  // File status flags: these are used by open(2), fcntl(2).
  1189  // They are also used (indirectly) in the kernel file structure f_flags,
  1190  // which is a superset of the open/fcntl flags.  Open flags and f_flags
  1191  // are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags).
  1192  // Open/fcntl flags begin with O_; kernel-internal flags begin with F.
  1193  // open-only flags
  1194  
  1195  // Kernel encoding of open mode; separate read and write bits that are
  1196  // independently testable: 1 greater than the above.
  1197  //
  1198  // XXX
  1199  // FREAD and FWRITE are excluded from the #ifdef KERNEL so that TIOCFLUSH,
  1200  // which was documented to use FREAD/FWRITE, continues to work.
  1201  
  1202  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1203  //
  1204  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1205  //
  1206  // This file contains Original Code and/or Modifications of Original Code
  1207  // as defined in and that are subject to the Apple Public Source License
  1208  // Version 2.0 (the 'License'). You may not use this file except in
  1209  // compliance with the License. The rights granted to you under the License
  1210  // may not be used to create, or enable the creation or redistribution of,
  1211  // unlawful or unlicensed copies of an Apple operating system, or to
  1212  // circumvent, violate, or enable the circumvention or violation of, any
  1213  // terms of an Apple operating system software license agreement.
  1214  //
  1215  // Please obtain a copy of the License at
  1216  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1217  //
  1218  // The Original Code and all software distributed under the License are
  1219  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1220  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1221  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1222  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1223  // Please see the License for the specific language governing rights and
  1224  // limitations under the License.
  1225  //
  1226  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1227  
  1228  //      O_DSYNC         0x00400000      /* synch I/O data integrity */
  1229  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1230  //
  1231  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1232  //
  1233  // This file contains Original Code and/or Modifications of Original Code
  1234  // as defined in and that are subject to the Apple Public Source License
  1235  // Version 2.0 (the 'License'). You may not use this file except in
  1236  // compliance with the License. The rights granted to you under the License
  1237  // may not be used to create, or enable the creation or redistribution of,
  1238  // unlawful or unlicensed copies of an Apple operating system, or to
  1239  // circumvent, violate, or enable the circumvention or violation of, any
  1240  // terms of an Apple operating system software license agreement.
  1241  //
  1242  // Please obtain a copy of the License at
  1243  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1244  //
  1245  // The Original Code and all software distributed under the License are
  1246  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1247  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1248  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1249  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1250  // Please see the License for the specific language governing rights and
  1251  // limitations under the License.
  1252  //
  1253  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1254  
  1255  // Descriptor value for the current working directory
  1256  
  1257  // Flags for the at functions
  1258  
  1259  // Data Protection Flags
  1260  
  1261  // The O_* flags used to have only F* names, which were used in the kernel
  1262  // and by fcntl.  We retain the F* names for the kernel f_flags field
  1263  // and for backward compatibility for fcntl.
  1264  
  1265  // Flags used for copyfile(2)
  1266  
  1267  // Constants used for fcntl(2)
  1268  
  1269  // command values
  1270  // 46,47 used to be F_READBOOTSTRAP and F_WRITEBOOTSTRAP
  1271  
  1272  // should not be used (i.e. its ok to temporaily create cached pages)
  1273  
  1274  // See F_DUPFD_CLOEXEC below for 67
  1275  
  1276  // may be broken into smaller chunks with throttling in between
  1277  
  1278  // FS-specific fcntl()'s numbers begin at 0x00010000 and go up
  1279  
  1280  // file descriptor flags (F_GETFD, F_SETFD)
  1281  
  1282  // record locking flags (F_GETLK, F_SETLK, F_SETLKW)
  1283  
  1284  // [XSI] The values used for l_whence shall be defined as described
  1285  // in <unistd.h>
  1286  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1287  //
  1288  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1289  //
  1290  // This file contains Original Code and/or Modifications of Original Code
  1291  // as defined in and that are subject to the Apple Public Source License
  1292  // Version 2.0 (the 'License'). You may not use this file except in
  1293  // compliance with the License. The rights granted to you under the License
  1294  // may not be used to create, or enable the creation or redistribution of,
  1295  // unlawful or unlicensed copies of an Apple operating system, or to
  1296  // circumvent, violate, or enable the circumvention or violation of, any
  1297  // terms of an Apple operating system software license agreement.
  1298  //
  1299  // Please obtain a copy of the License at
  1300  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1301  //
  1302  // The Original Code and all software distributed under the License are
  1303  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1304  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1305  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1306  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1307  // Please see the License for the specific language governing rights and
  1308  // limitations under the License.
  1309  //
  1310  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1311  
  1312  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  1313  //
  1314  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1315  //
  1316  // This file contains Original Code and/or Modifications of Original Code
  1317  // as defined in and that are subject to the Apple Public Source License
  1318  // Version 2.0 (the 'License'). You may not use this file except in
  1319  // compliance with the License. The rights granted to you under the License
  1320  // may not be used to create, or enable the creation or redistribution of,
  1321  // unlawful or unlicensed copies of an Apple operating system, or to
  1322  // circumvent, violate, or enable the circumvention or violation of, any
  1323  // terms of an Apple operating system software license agreement.
  1324  //
  1325  // Please obtain a copy of the License at
  1326  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1327  //
  1328  // The Original Code and all software distributed under the License are
  1329  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1330  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1331  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1332  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1333  // Please see the License for the specific language governing rights and
  1334  // limitations under the License.
  1335  //
  1336  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1337  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  1338  // Copyright (c) 1991, 1993
  1339  //	The Regents of the University of California.  All rights reserved.
  1340  //
  1341  // This code is derived from software contributed to Berkeley by
  1342  // Berkeley Software Design, Inc.
  1343  //
  1344  // Redistribution and use in source and binary forms, with or without
  1345  // modification, are permitted provided that the following conditions
  1346  // are met:
  1347  // 1. Redistributions of source code must retain the above copyright
  1348  //    notice, this list of conditions and the following disclaimer.
  1349  // 2. Redistributions in binary form must reproduce the above copyright
  1350  //    notice, this list of conditions and the following disclaimer in the
  1351  //    documentation and/or other materials provided with the distribution.
  1352  // 3. All advertising materials mentioning features or use of this software
  1353  //    must display the following acknowledgement:
  1354  //	This product includes software developed by the University of
  1355  //	California, Berkeley and its contributors.
  1356  // 4. Neither the name of the University nor the names of its contributors
  1357  //    may be used to endorse or promote products derived from this software
  1358  //    without specific prior written permission.
  1359  //
  1360  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1361  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1362  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1363  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1364  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1365  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1366  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1367  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1368  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1369  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1370  // SUCH DAMAGE.
  1371  //
  1372  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  1373  
  1374  // whence values for lseek(2)
  1375  
  1376  // [XSI] The symbolic names for file modes for use as values of mode_t
  1377  // shall be defined as described in <sys/stat.h>
  1378  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1379  //
  1380  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1381  //
  1382  // This file contains Original Code and/or Modifications of Original Code
  1383  // as defined in and that are subject to the Apple Public Source License
  1384  // Version 2.0 (the 'License'). You may not use this file except in
  1385  // compliance with the License. The rights granted to you under the License
  1386  // may not be used to create, or enable the creation or redistribution of,
  1387  // unlawful or unlicensed copies of an Apple operating system, or to
  1388  // circumvent, violate, or enable the circumvention or violation of, any
  1389  // terms of an Apple operating system software license agreement.
  1390  //
  1391  // Please obtain a copy of the License at
  1392  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1393  //
  1394  // The Original Code and all software distributed under the License are
  1395  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1396  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1397  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1398  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1399  // Please see the License for the specific language governing rights and
  1400  // limitations under the License.
  1401  //
  1402  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1403  
  1404  // [XSI] The symbolic names for file modes for use as values of mode_t
  1405  // shall be defined as described in <sys/stat.h>
  1406  // File type
  1407  
  1408  // File mode
  1409  // Read, write, execute/search by owner
  1410  // Read, write, execute/search by group
  1411  // Read, write, execute/search by others
  1412  
  1413  // allocate flags (F_PREALLOCATE)
  1414  
  1415  // Position Modes (fst_posmode) for F_PREALLOCATE
  1416  
  1417  // we can keep them in sync should we desire
  1418  
  1419  // Advisory file segment locking data type -
  1420  // information passed to system by user
  1421  type Flock = struct {
  1422  	Fl_start  Off_t
  1423  	Fl_len    Off_t
  1424  	Fl_pid    Pid_t
  1425  	Fl_type   int16
  1426  	Fl_whence int16
  1427  } /* fcntl.h:361:1 */
  1428  
  1429  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1430  //
  1431  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1432  //
  1433  // This file contains Original Code and/or Modifications of Original Code
  1434  // as defined in and that are subject to the Apple Public Source License
  1435  // Version 2.0 (the 'License'). You may not use this file except in
  1436  // compliance with the License. The rights granted to you under the License
  1437  // may not be used to create, or enable the creation or redistribution of,
  1438  // unlawful or unlicensed copies of an Apple operating system, or to
  1439  // circumvent, violate, or enable the circumvention or violation of, any
  1440  // terms of an Apple operating system software license agreement.
  1441  //
  1442  // Please obtain a copy of the License at
  1443  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1444  //
  1445  // The Original Code and all software distributed under the License are
  1446  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1447  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1448  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1449  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1450  // Please see the License for the specific language governing rights and
  1451  // limitations under the License.
  1452  //
  1453  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1454  
  1455  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  1456  //
  1457  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1458  //
  1459  // This file contains Original Code and/or Modifications of Original Code
  1460  // as defined in and that are subject to the Apple Public Source License
  1461  // Version 2.0 (the 'License'). You may not use this file except in
  1462  // compliance with the License. The rights granted to you under the License
  1463  // may not be used to create, or enable the creation or redistribution of,
  1464  // unlawful or unlicensed copies of an Apple operating system, or to
  1465  // circumvent, violate, or enable the circumvention or violation of, any
  1466  // terms of an Apple operating system software license agreement.
  1467  //
  1468  // Please obtain a copy of the License at
  1469  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1470  //
  1471  // The Original Code and all software distributed under the License are
  1472  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1473  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1474  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1475  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1476  // Please see the License for the specific language governing rights and
  1477  // limitations under the License.
  1478  //
  1479  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1480  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  1481  
  1482  // Copyright (c) 2000-2008 Apple Inc. All rights reserved.
  1483  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  1484  // Copyright (c) 1990, 1993
  1485  //	The Regents of the University of California.  All rights reserved.
  1486  //
  1487  // Redistribution and use in source and binary forms, with or without
  1488  // modification, are permitted provided that the following conditions
  1489  // are met:
  1490  // 1. Redistributions of source code must retain the above copyright
  1491  //    notice, this list of conditions and the following disclaimer.
  1492  // 2. Redistributions in binary form must reproduce the above copyright
  1493  //    notice, this list of conditions and the following disclaimer in the
  1494  //    documentation and/or other materials provided with the distribution.
  1495  // 3. All advertising materials mentioning features or use of this software
  1496  //    must display the following acknowledgement:
  1497  //	This product includes software developed by the University of
  1498  //	California, Berkeley and its contributors.
  1499  // 4. Neither the name of the University nor the names of its contributors
  1500  //    may be used to endorse or promote products derived from this software
  1501  //    without specific prior written permission.
  1502  //
  1503  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1504  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1505  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1506  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1507  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1508  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1509  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1510  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1511  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1512  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1513  // SUCH DAMAGE.
  1514  //
  1515  //	@(#)types.h	8.3 (Berkeley) 1/5/94
  1516  
  1517  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  1518  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  1519  //
  1520  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1521  //
  1522  // This file contains Original Code and/or Modifications of Original Code
  1523  // as defined in and that are subject to the Apple Public Source License
  1524  // Version 2.0 (the 'License'). You may not use this file except in
  1525  // compliance with the License. The rights granted to you under the License
  1526  // may not be used to create, or enable the creation or redistribution of,
  1527  // unlawful or unlicensed copies of an Apple operating system, or to
  1528  // circumvent, violate, or enable the circumvention or violation of, any
  1529  // terms of an Apple operating system software license agreement.
  1530  //
  1531  // Please obtain a copy of the License at
  1532  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1533  //
  1534  // The Original Code and all software distributed under the License are
  1535  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1536  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1537  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1538  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1539  // Please see the License for the specific language governing rights and
  1540  // limitations under the License.
  1541  //
  1542  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1543  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  1544  // Copyright (c) 1991, 1993
  1545  //	The Regents of the University of California.  All rights reserved.
  1546  //
  1547  // This code is derived from software contributed to Berkeley by
  1548  // Berkeley Software Design, Inc.
  1549  //
  1550  // Redistribution and use in source and binary forms, with or without
  1551  // modification, are permitted provided that the following conditions
  1552  // are met:
  1553  // 1. Redistributions of source code must retain the above copyright
  1554  //    notice, this list of conditions and the following disclaimer.
  1555  // 2. Redistributions in binary form must reproduce the above copyright
  1556  //    notice, this list of conditions and the following disclaimer in the
  1557  //    documentation and/or other materials provided with the distribution.
  1558  // 3. All advertising materials mentioning features or use of this software
  1559  //    must display the following acknowledgement:
  1560  //	This product includes software developed by the University of
  1561  //	California, Berkeley and its contributors.
  1562  // 4. Neither the name of the University nor the names of its contributors
  1563  //    may be used to endorse or promote products derived from this software
  1564  //    without specific prior written permission.
  1565  //
  1566  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1567  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1568  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1569  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1570  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1571  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1572  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1573  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1574  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1575  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1576  // SUCH DAMAGE.
  1577  //
  1578  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  1579  
  1580  // Basic integral types.  Omit the typedef if
  1581  // not possible for a machine/compiler combination.
  1582  // Copyright (c) 2012 Apple Inc. All rights reserved.
  1583  //
  1584  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1585  //
  1586  // This file contains Original Code and/or Modifications of Original Code
  1587  // as defined in and that are subject to the Apple Public Source License
  1588  // Version 2.0 (the 'License'). You may not use this file except in
  1589  // compliance with the License. The rights granted to you under the License
  1590  // may not be used to create, or enable the creation or redistribution of,
  1591  // unlawful or unlicensed copies of an Apple operating system, or to
  1592  // circumvent, violate, or enable the circumvention or violation of, any
  1593  // terms of an Apple operating system software license agreement.
  1594  //
  1595  // Please obtain a copy of the License at
  1596  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1597  //
  1598  // The Original Code and all software distributed under the License are
  1599  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1600  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1601  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1602  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1603  // Please see the License for the specific language governing rights and
  1604  // limitations under the License.
  1605  //
  1606  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1607  type Int8_t = int8 /* _int8_t.h:30:31 */
  1608  // Copyright (c) 2012 Apple Inc. All rights reserved.
  1609  //
  1610  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1611  //
  1612  // This file contains Original Code and/or Modifications of Original Code
  1613  // as defined in and that are subject to the Apple Public Source License
  1614  // Version 2.0 (the 'License'). You may not use this file except in
  1615  // compliance with the License. The rights granted to you under the License
  1616  // may not be used to create, or enable the creation or redistribution of,
  1617  // unlawful or unlicensed copies of an Apple operating system, or to
  1618  // circumvent, violate, or enable the circumvention or violation of, any
  1619  // terms of an Apple operating system software license agreement.
  1620  //
  1621  // Please obtain a copy of the License at
  1622  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1623  //
  1624  // The Original Code and all software distributed under the License are
  1625  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1626  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1627  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1628  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1629  // Please see the License for the specific language governing rights and
  1630  // limitations under the License.
  1631  //
  1632  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1633  type Int16_t = int16 /* _int16_t.h:30:33 */
  1634  // Copyright (c) 2012 Apple Inc. All rights reserved.
  1635  //
  1636  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1637  //
  1638  // This file contains Original Code and/or Modifications of Original Code
  1639  // as defined in and that are subject to the Apple Public Source License
  1640  // Version 2.0 (the 'License'). You may not use this file except in
  1641  // compliance with the License. The rights granted to you under the License
  1642  // may not be used to create, or enable the creation or redistribution of,
  1643  // unlawful or unlicensed copies of an Apple operating system, or to
  1644  // circumvent, violate, or enable the circumvention or violation of, any
  1645  // terms of an Apple operating system software license agreement.
  1646  //
  1647  // Please obtain a copy of the License at
  1648  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1649  //
  1650  // The Original Code and all software distributed under the License are
  1651  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1652  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1653  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1654  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1655  // Please see the License for the specific language governing rights and
  1656  // limitations under the License.
  1657  //
  1658  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1659  type Int32_t = int32 /* _int32_t.h:30:33 */
  1660  // Copyright (c) 2012 Apple Inc. All rights reserved.
  1661  //
  1662  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1663  //
  1664  // This file contains Original Code and/or Modifications of Original Code
  1665  // as defined in and that are subject to the Apple Public Source License
  1666  // Version 2.0 (the 'License'). You may not use this file except in
  1667  // compliance with the License. The rights granted to you under the License
  1668  // may not be used to create, or enable the creation or redistribution of,
  1669  // unlawful or unlicensed copies of an Apple operating system, or to
  1670  // circumvent, violate, or enable the circumvention or violation of, any
  1671  // terms of an Apple operating system software license agreement.
  1672  //
  1673  // Please obtain a copy of the License at
  1674  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1675  //
  1676  // The Original Code and all software distributed under the License are
  1677  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1678  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1679  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1680  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1681  // Please see the License for the specific language governing rights and
  1682  // limitations under the License.
  1683  //
  1684  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1685  type Int64_t = int64 /* _int64_t.h:30:33 */
  1686  
  1687  // Copyright (c) 2016 Apple Inc. All rights reserved.
  1688  //
  1689  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1690  //
  1691  // This file contains Original Code and/or Modifications of Original Code
  1692  // as defined in and that are subject to the Apple Public Source License
  1693  // Version 2.0 (the 'License'). You may not use this file except in
  1694  // compliance with the License. The rights granted to you under the License
  1695  // may not be used to create, or enable the creation or redistribution of,
  1696  // unlawful or unlicensed copies of an Apple operating system, or to
  1697  // circumvent, violate, or enable the circumvention or violation of, any
  1698  // terms of an Apple operating system software license agreement.
  1699  //
  1700  // Please obtain a copy of the License at
  1701  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1702  //
  1703  // The Original Code and all software distributed under the License are
  1704  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1705  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1706  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1707  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1708  // Please see the License for the specific language governing rights and
  1709  // limitations under the License.
  1710  //
  1711  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1712  type U_int8_t = uint8 /* _u_int8_t.h:30:33 */
  1713  // Copyright (c) 2012 Apple Inc. All rights reserved.
  1714  //
  1715  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1716  //
  1717  // This file contains Original Code and/or Modifications of Original Code
  1718  // as defined in and that are subject to the Apple Public Source License
  1719  // Version 2.0 (the 'License'). You may not use this file except in
  1720  // compliance with the License. The rights granted to you under the License
  1721  // may not be used to create, or enable the creation or redistribution of,
  1722  // unlawful or unlicensed copies of an Apple operating system, or to
  1723  // circumvent, violate, or enable the circumvention or violation of, any
  1724  // terms of an Apple operating system software license agreement.
  1725  //
  1726  // Please obtain a copy of the License at
  1727  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1728  //
  1729  // The Original Code and all software distributed under the License are
  1730  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1731  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1732  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1733  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1734  // Please see the License for the specific language governing rights and
  1735  // limitations under the License.
  1736  //
  1737  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1738  type U_int16_t = uint16 /* _u_int16_t.h:30:41 */
  1739  // Copyright (c) 2012 Apple Inc. All rights reserved.
  1740  //
  1741  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1742  //
  1743  // This file contains Original Code and/or Modifications of Original Code
  1744  // as defined in and that are subject to the Apple Public Source License
  1745  // Version 2.0 (the 'License'). You may not use this file except in
  1746  // compliance with the License. The rights granted to you under the License
  1747  // may not be used to create, or enable the creation or redistribution of,
  1748  // unlawful or unlicensed copies of an Apple operating system, or to
  1749  // circumvent, violate, or enable the circumvention or violation of, any
  1750  // terms of an Apple operating system software license agreement.
  1751  //
  1752  // Please obtain a copy of the License at
  1753  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1754  //
  1755  // The Original Code and all software distributed under the License are
  1756  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1757  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1758  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1759  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1760  // Please see the License for the specific language governing rights and
  1761  // limitations under the License.
  1762  //
  1763  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1764  type U_int32_t = uint32 /* _u_int32_t.h:30:33 */
  1765  // Copyright (c) 2012 Apple Inc. All rights reserved.
  1766  //
  1767  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1768  //
  1769  // This file contains Original Code and/or Modifications of Original Code
  1770  // as defined in and that are subject to the Apple Public Source License
  1771  // Version 2.0 (the 'License'). You may not use this file except in
  1772  // compliance with the License. The rights granted to you under the License
  1773  // may not be used to create, or enable the creation or redistribution of,
  1774  // unlawful or unlicensed copies of an Apple operating system, or to
  1775  // circumvent, violate, or enable the circumvention or violation of, any
  1776  // terms of an Apple operating system software license agreement.
  1777  //
  1778  // Please obtain a copy of the License at
  1779  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1780  //
  1781  // The Original Code and all software distributed under the License are
  1782  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1783  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1784  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1785  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1786  // Please see the License for the specific language governing rights and
  1787  // limitations under the License.
  1788  //
  1789  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1790  type U_int64_t = uint64 /* _u_int64_t.h:30:33 */
  1791  
  1792  type Register_t = Int64_t /* types.h:66:33 */
  1793  
  1794  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1795  //
  1796  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1797  //
  1798  // This file contains Original Code and/or Modifications of Original Code
  1799  // as defined in and that are subject to the Apple Public Source License
  1800  // Version 2.0 (the 'License'). You may not use this file except in
  1801  // compliance with the License. The rights granted to you under the License
  1802  // may not be used to create, or enable the creation or redistribution of,
  1803  // unlawful or unlicensed copies of an Apple operating system, or to
  1804  // circumvent, violate, or enable the circumvention or violation of, any
  1805  // terms of an Apple operating system software license agreement.
  1806  //
  1807  // Please obtain a copy of the License at
  1808  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1809  //
  1810  // The Original Code and all software distributed under the License are
  1811  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1812  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1813  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1814  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1815  // Please see the License for the specific language governing rights and
  1816  // limitations under the License.
  1817  //
  1818  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1819  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  1820  //
  1821  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1822  //
  1823  // This file contains Original Code and/or Modifications of Original Code
  1824  // as defined in and that are subject to the Apple Public Source License
  1825  // Version 2.0 (the 'License'). You may not use this file except in
  1826  // compliance with the License. The rights granted to you under the License
  1827  // may not be used to create, or enable the creation or redistribution of,
  1828  // unlawful or unlicensed copies of an Apple operating system, or to
  1829  // circumvent, violate, or enable the circumvention or violation of, any
  1830  // terms of an Apple operating system software license agreement.
  1831  //
  1832  // Please obtain a copy of the License at
  1833  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1834  //
  1835  // The Original Code and all software distributed under the License are
  1836  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1837  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1838  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1839  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1840  // Please see the License for the specific language governing rights and
  1841  // limitations under the License.
  1842  //
  1843  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1844  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  1845  
  1846  type Intptr_t = X__darwin_intptr_t /* _intptr_t.h:32:33 */
  1847  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1848  //
  1849  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1850  //
  1851  // This file contains Original Code and/or Modifications of Original Code
  1852  // as defined in and that are subject to the Apple Public Source License
  1853  // Version 2.0 (the 'License'). You may not use this file except in
  1854  // compliance with the License. The rights granted to you under the License
  1855  // may not be used to create, or enable the creation or redistribution of,
  1856  // unlawful or unlicensed copies of an Apple operating system, or to
  1857  // circumvent, violate, or enable the circumvention or violation of, any
  1858  // terms of an Apple operating system software license agreement.
  1859  //
  1860  // Please obtain a copy of the License at
  1861  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1862  //
  1863  // The Original Code and all software distributed under the License are
  1864  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1865  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1866  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1867  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1868  // Please see the License for the specific language governing rights and
  1869  // limitations under the License.
  1870  //
  1871  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1872  
  1873  type Uintptr_t = uint64 /* _uintptr_t.h:34:33 */
  1874  
  1875  // These types are used for reserving the largest possible size.
  1876  type User_addr_t = U_int64_t  /* types.h:77:33 */
  1877  type User_size_t = U_int64_t  /* types.h:78:33 */
  1878  type User_ssize_t = Int64_t   /* types.h:79:33 */
  1879  type User_long_t = Int64_t    /* types.h:80:33 */
  1880  type User_ulong_t = U_int64_t /* types.h:81:33 */
  1881  type User_time_t = Int64_t    /* types.h:82:33 */
  1882  type User_off_t = Int64_t     /* types.h:83:33 */
  1883  
  1884  // This defines the size of syscall arguments after copying into the kernel:
  1885  type Syscall_arg_t = U_int64_t /* types.h:104:33 */
  1886  
  1887  type Timespec = struct {
  1888  	Ftv_sec  X__darwin_time_t
  1889  	Ftv_nsec int64
  1890  } /* _timespec.h:33:1 */
  1891  
  1892  // Advisory file segment locking with time out -
  1893  // Information passed to system by user for F_SETLKWTIMEOUT
  1894  type Flocktimeout = struct {
  1895  	Ffl struct {
  1896  		Fl_start  Off_t
  1897  		Fl_len    Off_t
  1898  		Fl_pid    Pid_t
  1899  		Fl_type   int16
  1900  		Fl_whence int16
  1901  	}
  1902  	Ftimeout struct {
  1903  		Ftv_sec  X__darwin_time_t
  1904  		Ftv_nsec int64
  1905  	}
  1906  } /* fcntl.h:376:1 */
  1907  
  1908  // advisory file read data type -
  1909  // information passed by user to system
  1910  
  1911  type Radvisory = struct {
  1912  	Fra_offset   Off_t
  1913  	Fra_count    int32
  1914  	F__ccgo_pad1 [4]byte
  1915  } /* fcntl.h:389:1 */
  1916  
  1917  // detached code signatures data type -
  1918  // information passed by user to system used by F_ADDSIGS and F_ADDFILESIGS.
  1919  // F_ADDFILESIGS is a shortcut for files that contain their own signature and
  1920  // doesn't require mapping of the file in order to load the signature.
  1921  type Fsignatures = struct {
  1922  	Ffs_file_start       Off_t
  1923  	Ffs_blob_start       uintptr
  1924  	Ffs_blob_size        Size_t
  1925  	Ffs_fsignatures_size Size_t
  1926  	Ffs_cdhash           [20]int8
  1927  	Ffs_hash_type        int32
  1928  } /* fcntl.h:402:9 */
  1929  
  1930  // detached code signatures data type -
  1931  // information passed by user to system used by F_ADDSIGS and F_ADDFILESIGS.
  1932  // F_ADDFILESIGS is a shortcut for files that contain their own signature and
  1933  // doesn't require mapping of the file in order to load the signature.
  1934  type Fsignatures_t = Fsignatures /* fcntl.h:412:3 */
  1935  
  1936  type Fsupplement = struct {
  1937  	Ffs_file_start Off_t
  1938  	Ffs_blob_start Off_t
  1939  	Ffs_blob_size  Size_t
  1940  	Ffs_orig_fd    int32
  1941  	F__ccgo_pad1   [4]byte
  1942  } /* fcntl.h:414:9 */
  1943  
  1944  type Fsupplement_t = Fsupplement /* fcntl.h:419:3 */
  1945  
  1946  // DYLD needs to check if the object is allowed to be combined
  1947  // into the main binary. This is done between the code signature
  1948  // is loaded and dyld is doing all the work to process the LOAD commands.
  1949  //
  1950  // While this could be done in F_ADDFILESIGS.* family the hook into
  1951  // the MAC module doesn't say no when LV isn't enabled and then that
  1952  // is cached on the vnode, and the MAC module never gets change once
  1953  // a process that library validation enabled.
  1954  type Fchecklv = struct {
  1955  	Flv_file_start         Off_t
  1956  	Flv_error_message_size Size_t
  1957  	Flv_error_message      uintptr
  1958  } /* fcntl.h:433:9 */
  1959  
  1960  // DYLD needs to check if the object is allowed to be combined
  1961  // into the main binary. This is done between the code signature
  1962  // is loaded and dyld is doing all the work to process the LOAD commands.
  1963  //
  1964  // While this could be done in F_ADDFILESIGS.* family the hook into
  1965  // the MAC module doesn't say no when LV isn't enabled and then that
  1966  // is cached on the vnode, and the MAC module never gets change once
  1967  // a process that library validation enabled.
  1968  type Fchecklv_t = Fchecklv /* fcntl.h:437:3 */
  1969  
  1970  // At this time F_GETSIGSINFO can only indicate platformness.
  1971  //  As additional requestable information is defined, new keys will be added and the
  1972  //  fgetsigsinfo_t structure will be lengthened to add space for the additional information
  1973  
  1974  // fgetsigsinfo_t used by F_GETSIGSINFO command
  1975  type Fgetsigsinfo = struct {
  1976  	Ffg_file_start      Off_t
  1977  	Ffg_info_request    int32
  1978  	Ffg_sig_is_platform int32
  1979  } /* fcntl.h:447:9 */
  1980  
  1981  // At this time F_GETSIGSINFO can only indicate platformness.
  1982  //  As additional requestable information is defined, new keys will be added and the
  1983  //  fgetsigsinfo_t structure will be lengthened to add space for the additional information
  1984  
  1985  // fgetsigsinfo_t used by F_GETSIGSINFO command
  1986  type Fgetsigsinfo_t = Fgetsigsinfo /* fcntl.h:451:3 */
  1987  
  1988  // lock operations for flock(2)
  1989  
  1990  // fstore_t type used by F_PREALLOCATE command
  1991  
  1992  type Fstore = struct {
  1993  	Ffst_flags      uint32
  1994  	Ffst_posmode    int32
  1995  	Ffst_offset     Off_t
  1996  	Ffst_length     Off_t
  1997  	Ffst_bytesalloc Off_t
  1998  } /* fcntl.h:462:9 */
  1999  
  2000  // lock operations for flock(2)
  2001  
  2002  // fstore_t type used by F_PREALLOCATE command
  2003  
  2004  type Fstore_t = Fstore /* fcntl.h:468:3 */
  2005  
  2006  // fpunchhole_t used by F_PUNCHHOLE
  2007  type Fpunchhole = struct {
  2008  	Ffp_flags  uint32
  2009  	Freserved  uint32
  2010  	Ffp_offset Off_t
  2011  	Ffp_length Off_t
  2012  } /* fcntl.h:471:9 */
  2013  
  2014  // fpunchhole_t used by F_PUNCHHOLE
  2015  type Fpunchhole_t = Fpunchhole /* fcntl.h:476:3 */
  2016  
  2017  // factive_file_trim_t used by F_TRIM_ACTIVE_FILE
  2018  type Ftrimactivefile = struct {
  2019  	Ffta_offset Off_t
  2020  	Ffta_length Off_t
  2021  } /* fcntl.h:479:9 */
  2022  
  2023  // factive_file_trim_t used by F_TRIM_ACTIVE_FILE
  2024  type Ftrimactivefile_t = Ftrimactivefile /* fcntl.h:482:3 */
  2025  
  2026  // fspecread_t used by F_SPECULATIVE_READ
  2027  type Fspecread = struct {
  2028  	Ffsr_flags  uint32
  2029  	Freserved   uint32
  2030  	Ffsr_offset Off_t
  2031  	Ffsr_length Off_t
  2032  } /* fcntl.h:485:9 */
  2033  
  2034  // fspecread_t used by F_SPECULATIVE_READ
  2035  type Fspecread_t = Fspecread /* fcntl.h:490:3 */
  2036  
  2037  // fbootstraptransfer_t used by F_READBOOTSTRAP and F_WRITEBOOTSTRAP commands
  2038  
  2039  type Fbootstraptransfer = struct {
  2040  	Ffbt_offset Off_t
  2041  	Ffbt_length Size_t
  2042  	Ffbt_buffer uintptr
  2043  } /* fcntl.h:494:9 */
  2044  
  2045  // fbootstraptransfer_t used by F_READBOOTSTRAP and F_WRITEBOOTSTRAP commands
  2046  
  2047  type Fbootstraptransfer_t = Fbootstraptransfer /* fcntl.h:498:3 */
  2048  
  2049  // For F_LOG2PHYS this information is passed back to user
  2050  // Currently only devoffset is returned - that is the VOP_BMAP
  2051  // result - the disk device address corresponding to the
  2052  // current file offset (likely set with an lseek).
  2053  //
  2054  // The flags could hold an indication of whether the # of
  2055  // contiguous bytes reflects the true extent length on disk,
  2056  // or is an advisory value that indicates there is at least that
  2057  // many bytes contiguous.  For some filesystems it might be too
  2058  // inefficient to provide anything beyond the advisory value.
  2059  // Flags and contiguous bytes return values are not yet implemented.
  2060  // For them the fcntl will nedd to switch from using BMAP to CMAP
  2061  // and a per filesystem type flag will be needed to interpret the
  2062  // contiguous bytes count result from CMAP.
  2063  //
  2064  // F_LOG2PHYS_EXT is a variant of F_LOG2PHYS that uses a passed in
  2065  // file offset and length instead of the current file offset.
  2066  // F_LOG2PHYS_EXT operates on the same structure as F_LOG2PHYS, but
  2067  // treats it as an in/out.
  2068  
  2069  type Log2phys = struct {
  2070  	Fl2p_flags       uint32
  2071  	F__ccgo_pad1     [4]byte
  2072  	Fl2p_contigbytes Off_t
  2073  	Fl2p_devoffset   Off_t
  2074  } /* fcntl.h:524:1 */
  2075  
  2076  type Filesec_t = uintptr /* _filesec_t.h:31:25 */
  2077  
  2078  type Filesec_property_t = uint32 /* fcntl.h:558:3 */
  2079  
  2080  var _ int8 /* gen.c:2:13: */