github.com/jdgcs/sqlite3@v1.12.1-0.20210908114423-bc5f96e4dd51/internal/mptest/main_darwin_arm64.go (about)

     1  // Code generated by 'ccgo -export-defines "" -o internal/mptest/main_darwin_arm64.go -trace-translation-units testdata/sqlite-src-3360000/mptest/mptest.c -Itestdata/sqlite-amalgamation-3360000 -l modernc.org/sqlite/lib -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_MUTEX_NOOP -DSQLITE_OS_UNIX=1 -DSQLITE_WITHOUT_ZONEMALLOC', DO NOT EDIT.
     2  
     3  package main
     4  
     5  import (
     6  	"math"
     7  	"reflect"
     8  	"sync/atomic"
     9  	"unsafe"
    10  
    11  	"modernc.org/libc"
    12  	"modernc.org/libc/sys/types"
    13  	"modernc.org/sqlite/lib"
    14  )
    15  
    16  var _ = math.Pi
    17  var _ reflect.Kind
    18  var _ atomic.Value
    19  var _ unsafe.Pointer
    20  var _ types.Size_t
    21  
    22  func main() { libc.Start(main1) }
    23  
    24  const (
    25  	ACCESSX_MAX_DESCRIPTORS                   = 100
    26  	ACCESSX_MAX_TABLESIZE                     = 16384
    27  	BIG_ENDIAN                                = 4321
    28  	BUFSIZ                                    = 1024
    29  	BUS_ADRALN                                = 1
    30  	BUS_ADRERR                                = 2
    31  	BUS_NOOP                                  = 0
    32  	BUS_OBJERR                                = 3
    33  	BYTE_ORDER                                = 1234
    34  	CLD_CONTINUED                             = 6
    35  	CLD_DUMPED                                = 3
    36  	CLD_EXITED                                = 1
    37  	CLD_KILLED                                = 2
    38  	CLD_NOOP                                  = 0
    39  	CLD_STOPPED                               = 5
    40  	CLD_TRAPPED                               = 4
    41  	CPUMON_MAKE_FATAL                         = 0x1000
    42  	DEFAULT_TIMEOUT                           = 10000
    43  	E2BIG                                     = 7
    44  	EACCES                                    = 13
    45  	EADDRINUSE                                = 48
    46  	EADDRNOTAVAIL                             = 49
    47  	EAFNOSUPPORT                              = 47
    48  	EAGAIN                                    = 35
    49  	EALREADY                                  = 37
    50  	EAUTH                                     = 80
    51  	EBADARCH                                  = 86
    52  	EBADEXEC                                  = 85
    53  	EBADF                                     = 9
    54  	EBADMACHO                                 = 88
    55  	EBADMSG                                   = 94
    56  	EBADRPC                                   = 72
    57  	EBUSY                                     = 16
    58  	ECANCELED                                 = 89
    59  	ECHILD                                    = 10
    60  	ECONNABORTED                              = 53
    61  	ECONNREFUSED                              = 61
    62  	ECONNRESET                                = 54
    63  	EDEADLK                                   = 11
    64  	EDESTADDRREQ                              = 39
    65  	EDEVERR                                   = 83
    66  	EDOM                                      = 33
    67  	EDQUOT                                    = 69
    68  	EEXIST                                    = 17
    69  	EFAULT                                    = 14
    70  	EFBIG                                     = 27
    71  	EFTYPE                                    = 79
    72  	EHOSTDOWN                                 = 64
    73  	EHOSTUNREACH                              = 65
    74  	EIDRM                                     = 90
    75  	EILSEQ                                    = 92
    76  	EINPROGRESS                               = 36
    77  	EINTR                                     = 4
    78  	EINVAL                                    = 22
    79  	EIO                                       = 5
    80  	EISCONN                                   = 56
    81  	EISDIR                                    = 21
    82  	ELAST                                     = 106
    83  	ELOOP                                     = 62
    84  	EMFILE                                    = 24
    85  	EMLINK                                    = 31
    86  	EMSGSIZE                                  = 40
    87  	EMULTIHOP                                 = 95
    88  	ENAMETOOLONG                              = 63
    89  	ENEEDAUTH                                 = 81
    90  	ENETDOWN                                  = 50
    91  	ENETRESET                                 = 52
    92  	ENETUNREACH                               = 51
    93  	ENFILE                                    = 23
    94  	ENOATTR                                   = 93
    95  	ENOBUFS                                   = 55
    96  	ENODATA                                   = 96
    97  	ENODEV                                    = 19
    98  	ENOENT                                    = 2
    99  	ENOEXEC                                   = 8
   100  	ENOLCK                                    = 77
   101  	ENOLINK                                   = 97
   102  	ENOMEM                                    = 12
   103  	ENOMSG                                    = 91
   104  	ENOPOLICY                                 = 103
   105  	ENOPROTOOPT                               = 42
   106  	ENOSPC                                    = 28
   107  	ENOSR                                     = 98
   108  	ENOSTR                                    = 99
   109  	ENOSYS                                    = 78
   110  	ENOTBLK                                   = 15
   111  	ENOTCONN                                  = 57
   112  	ENOTDIR                                   = 20
   113  	ENOTEMPTY                                 = 66
   114  	ENOTRECOVERABLE                           = 104
   115  	ENOTSOCK                                  = 38
   116  	ENOTSUP                                   = 45
   117  	ENOTTY                                    = 25
   118  	ENXIO                                     = 6
   119  	EOF                                       = -1
   120  	EOPNOTSUPP                                = 102
   121  	EOVERFLOW                                 = 84
   122  	EOWNERDEAD                                = 105
   123  	EPERM                                     = 1
   124  	EPFNOSUPPORT                              = 46
   125  	EPIPE                                     = 32
   126  	EPROCLIM                                  = 67
   127  	EPROCUNAVAIL                              = 76
   128  	EPROGMISMATCH                             = 75
   129  	EPROGUNAVAIL                              = 74
   130  	EPROTO                                    = 100
   131  	EPROTONOSUPPORT                           = 43
   132  	EPROTOTYPE                                = 41
   133  	EPWROFF                                   = 82
   134  	EQFULL                                    = 106
   135  	ERANGE                                    = 34
   136  	EREMOTE                                   = 71
   137  	EROFS                                     = 30
   138  	ERPCMISMATCH                              = 73
   139  	ESHLIBVERS                                = 87
   140  	ESHUTDOWN                                 = 58
   141  	ESOCKTNOSUPPORT                           = 44
   142  	ESPIPE                                    = 29
   143  	ESRCH                                     = 3
   144  	ESTALE                                    = 70
   145  	ETIME                                     = 101
   146  	ETIMEDOUT                                 = 60
   147  	ETOOMANYREFS                              = 59
   148  	ETXTBSY                                   = 26
   149  	EUSERS                                    = 68
   150  	EWOULDBLOCK                               = 35
   151  	EXDEV                                     = 18
   152  	EXIT_FAILURE                              = 1
   153  	EXIT_SUCCESS                              = 0
   154  	FD_SETSIZE                                = 1024
   155  	FILENAME_MAX                              = 1024
   156  	FIXINC_WRAP_STDIO_H_STDIO_STDARG_H        = 1
   157  	FOOTPRINT_INTERVAL_RESET                  = 0x1
   158  	FOPEN_MAX                                 = 20
   159  	FPE_FLTDIV                                = 1
   160  	FPE_FLTINV                                = 5
   161  	FPE_FLTOVF                                = 2
   162  	FPE_FLTRES                                = 4
   163  	FPE_FLTSUB                                = 6
   164  	FPE_FLTUND                                = 3
   165  	FPE_INTDIV                                = 7
   166  	FPE_INTOVF                                = 8
   167  	FPE_NOOP                                  = 0
   168  	FTS5_TOKENIZE_AUX                         = 0x0008
   169  	FTS5_TOKENIZE_DOCUMENT                    = 0x0004
   170  	FTS5_TOKENIZE_PREFIX                      = 0x0002
   171  	FTS5_TOKENIZE_QUERY                       = 0x0001
   172  	FTS5_TOKEN_COLOCATED                      = 0x0001
   173  	FULLY_WITHIN                              = 2
   174  	F_LOCK                                    = 1
   175  	F_OK                                      = 0
   176  	F_TEST                                    = 3
   177  	F_TLOCK                                   = 2
   178  	F_ULOCK                                   = 0
   179  	HAVE_USLEEP                               = 1
   180  	ILL_BADSTK                                = 8
   181  	ILL_COPROC                                = 7
   182  	ILL_ILLADR                                = 5
   183  	ILL_ILLOPC                                = 1
   184  	ILL_ILLOPN                                = 4
   185  	ILL_ILLTRP                                = 2
   186  	ILL_NOOP                                  = 0
   187  	ILL_PRVOPC                                = 3
   188  	ILL_PRVREG                                = 6
   189  	INT16_MAX                                 = 32767
   190  	INT16_MIN                                 = -32768
   191  	INT32_MAX                                 = 2147483647
   192  	INT32_MIN                                 = -2147483648
   193  	INT64_MAX                                 = 9223372036854775807
   194  	INT64_MIN                                 = -9223372036854775808
   195  	INT8_MAX                                  = 127
   196  	INT8_MIN                                  = -128
   197  	INTMAX_MAX                                = 9223372036854775807
   198  	INTMAX_MIN                                = -9223372036854775808
   199  	INTPTR_MAX                                = 9223372036854775807
   200  	INTPTR_MIN                                = -9223372036854775808
   201  	INT_FAST16_MAX                            = 32767
   202  	INT_FAST16_MIN                            = -32768
   203  	INT_FAST32_MAX                            = 2147483647
   204  	INT_FAST32_MIN                            = -2147483648
   205  	INT_FAST64_MAX                            = 9223372036854775807
   206  	INT_FAST64_MIN                            = -9223372036854775808
   207  	INT_FAST8_MAX                             = 127
   208  	INT_FAST8_MIN                             = -128
   209  	INT_LEAST16_MAX                           = 32767
   210  	INT_LEAST16_MIN                           = -32768
   211  	INT_LEAST32_MAX                           = 2147483647
   212  	INT_LEAST32_MIN                           = -2147483648
   213  	INT_LEAST64_MAX                           = 9223372036854775807
   214  	INT_LEAST64_MIN                           = -9223372036854775808
   215  	INT_LEAST8_MAX                            = 127
   216  	INT_LEAST8_MIN                            = -128
   217  	IOPOL_APPLICATION                         = 5
   218  	IOPOL_ATIME_UPDATES_DEFAULT               = 0
   219  	IOPOL_ATIME_UPDATES_OFF                   = 1
   220  	IOPOL_DEFAULT                             = 0
   221  	IOPOL_IMPORTANT                           = 1
   222  	IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT  = 0
   223  	IOPOL_MATERIALIZE_DATALESS_FILES_OFF      = 1
   224  	IOPOL_MATERIALIZE_DATALESS_FILES_ON       = 2
   225  	IOPOL_NORMAL                              = 1
   226  	IOPOL_PASSIVE                             = 2
   227  	IOPOL_SCOPE_DARWIN_BG                     = 2
   228  	IOPOL_SCOPE_PROCESS                       = 0
   229  	IOPOL_SCOPE_THREAD                        = 1
   230  	IOPOL_STANDARD                            = 5
   231  	IOPOL_THROTTLE                            = 3
   232  	IOPOL_TYPE_DISK                           = 0
   233  	IOPOL_TYPE_VFS_ATIME_UPDATES              = 2
   234  	IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION  = 6
   235  	IOPOL_TYPE_VFS_IGNORE_PERMISSIONS         = 7
   236  	IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES = 3
   237  	IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE          = 8
   238  	IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME      = 4
   239  	IOPOL_TYPE_VFS_TRIGGER_RESOLVE            = 5
   240  	IOPOL_UTILITY                             = 4
   241  	IOPOL_VFS_CONTENT_PROTECTION_DEFAULT      = 0
   242  	IOPOL_VFS_CONTENT_PROTECTION_IGNORE       = 1
   243  	IOPOL_VFS_IGNORE_PERMISSIONS_OFF          = 0
   244  	IOPOL_VFS_IGNORE_PERMISSIONS_ON           = 1
   245  	IOPOL_VFS_SKIP_MTIME_UPDATE_OFF           = 0
   246  	IOPOL_VFS_SKIP_MTIME_UPDATE_ON            = 1
   247  	IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME     = 1
   248  	IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT   = 0
   249  	IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT         = 0
   250  	IOPOL_VFS_TRIGGER_RESOLVE_OFF             = 1
   251  	LITTLE_ENDIAN                             = 1234
   252  	L_INCR                                    = 1
   253  	L_SET                                     = 0
   254  	L_XTND                                    = 2
   255  	L_ctermid                                 = 1024
   256  	L_tmpnam                                  = 1024
   257  	MAC_OS_VERSION_11_0                       = 110000
   258  	MAC_OS_X_VERSION_10_0                     = 1000
   259  	MAC_OS_X_VERSION_10_1                     = 1010
   260  	MAC_OS_X_VERSION_10_10                    = 101000
   261  	MAC_OS_X_VERSION_10_10_2                  = 101002
   262  	MAC_OS_X_VERSION_10_10_3                  = 101003
   263  	MAC_OS_X_VERSION_10_11                    = 101100
   264  	MAC_OS_X_VERSION_10_11_2                  = 101102
   265  	MAC_OS_X_VERSION_10_11_3                  = 101103
   266  	MAC_OS_X_VERSION_10_11_4                  = 101104
   267  	MAC_OS_X_VERSION_10_12                    = 101200
   268  	MAC_OS_X_VERSION_10_12_1                  = 101201
   269  	MAC_OS_X_VERSION_10_12_2                  = 101202
   270  	MAC_OS_X_VERSION_10_12_4                  = 101204
   271  	MAC_OS_X_VERSION_10_13                    = 101300
   272  	MAC_OS_X_VERSION_10_13_1                  = 101301
   273  	MAC_OS_X_VERSION_10_13_2                  = 101302
   274  	MAC_OS_X_VERSION_10_13_4                  = 101304
   275  	MAC_OS_X_VERSION_10_14                    = 101400
   276  	MAC_OS_X_VERSION_10_14_1                  = 101401
   277  	MAC_OS_X_VERSION_10_14_4                  = 101404
   278  	MAC_OS_X_VERSION_10_14_6                  = 101406
   279  	MAC_OS_X_VERSION_10_15                    = 101500
   280  	MAC_OS_X_VERSION_10_15_1                  = 101501
   281  	MAC_OS_X_VERSION_10_16                    = 101600
   282  	MAC_OS_X_VERSION_10_2                     = 1020
   283  	MAC_OS_X_VERSION_10_3                     = 1030
   284  	MAC_OS_X_VERSION_10_4                     = 1040
   285  	MAC_OS_X_VERSION_10_5                     = 1050
   286  	MAC_OS_X_VERSION_10_6                     = 1060
   287  	MAC_OS_X_VERSION_10_7                     = 1070
   288  	MAC_OS_X_VERSION_10_8                     = 1080
   289  	MAC_OS_X_VERSION_10_9                     = 1090
   290  	MINSIGSTKSZ                               = 32768
   291  	MX_ARG                                    = 2
   292  	NDEBUG                                    = 1
   293  	NOT_WITHIN                                = 0
   294  	NSIG                                      = 32
   295  	PARTLY_WITHIN                             = 1
   296  	PDP_ENDIAN                                = 3412
   297  	POLL_ERR                                  = 4
   298  	POLL_HUP                                  = 6
   299  	POLL_IN                                   = 1
   300  	POLL_MSG                                  = 3
   301  	POLL_OUT                                  = 2
   302  	POLL_PRI                                  = 5
   303  	PRIO_DARWIN_BG                            = 0x1000
   304  	PRIO_DARWIN_NONUI                         = 0x1001
   305  	PRIO_DARWIN_PROCESS                       = 4
   306  	PRIO_DARWIN_THREAD                        = 3
   307  	PRIO_MAX                                  = 20
   308  	PRIO_MIN                                  = -20
   309  	PRIO_PGRP                                 = 1
   310  	PRIO_PROCESS                              = 0
   311  	PRIO_USER                                 = 2
   312  	PTRDIFF_MAX                               = 9223372036854775807
   313  	PTRDIFF_MIN                               = -9223372036854775808
   314  	P_tmpdir                                  = "/var/tmp/"
   315  	RAND_MAX                                  = 0x7fffffff
   316  	RENAME_EXCL                               = 0x00000004
   317  	RENAME_SECLUDE                            = 0x00000001
   318  	RENAME_SWAP                               = 0x00000002
   319  	RLIMIT_AS                                 = 5
   320  	RLIMIT_CORE                               = 4
   321  	RLIMIT_CPU                                = 0
   322  	RLIMIT_CPU_USAGE_MONITOR                  = 0x2
   323  	RLIMIT_DATA                               = 2
   324  	RLIMIT_FOOTPRINT_INTERVAL                 = 0x4
   325  	RLIMIT_FSIZE                              = 1
   326  	RLIMIT_MEMLOCK                            = 6
   327  	RLIMIT_NOFILE                             = 8
   328  	RLIMIT_NPROC                              = 7
   329  	RLIMIT_RSS                                = 5
   330  	RLIMIT_STACK                              = 3
   331  	RLIMIT_THREAD_CPULIMITS                   = 0x3
   332  	RLIMIT_WAKEUPS_MONITOR                    = 0x1
   333  	RLIM_NLIMITS                              = 9
   334  	RSIZE_MAX                                 = 9223372036854775807
   335  	RUSAGE_CHILDREN                           = -1
   336  	RUSAGE_INFO_CURRENT                       = 5
   337  	RUSAGE_INFO_V0                            = 0
   338  	RUSAGE_INFO_V1                            = 1
   339  	RUSAGE_INFO_V2                            = 2
   340  	RUSAGE_INFO_V3                            = 3
   341  	RUSAGE_INFO_V4                            = 4
   342  	RUSAGE_INFO_V5                            = 5
   343  	RUSAGE_SELF                               = 0
   344  	RU_PROC_RUNS_RESLIDE                      = 0x00000001
   345  	R_OK                                      = 4
   346  	SA_64REGSET                               = 0x0200
   347  	SA_NOCLDSTOP                              = 0x0008
   348  	SA_NOCLDWAIT                              = 0x0020
   349  	SA_NODEFER                                = 0x0010
   350  	SA_ONSTACK                                = 0x0001
   351  	SA_RESETHAND                              = 0x0004
   352  	SA_RESTART                                = 0x0002
   353  	SA_SIGINFO                                = 0x0040
   354  	SA_USERSPACE_MASK                         = 127
   355  	SA_USERTRAMP                              = 0x0100
   356  	SEEK_CUR                                  = 1
   357  	SEEK_DATA                                 = 4
   358  	SEEK_END                                  = 2
   359  	SEEK_HOLE                                 = 3
   360  	SEEK_SET                                  = 0
   361  	SEGV_ACCERR                               = 2
   362  	SEGV_MAPERR                               = 1
   363  	SEGV_NOOP                                 = 0
   364  	SIGABRT                                   = 6
   365  	SIGALRM                                   = 14
   366  	SIGBUS                                    = 10
   367  	SIGCHLD                                   = 20
   368  	SIGCONT                                   = 19
   369  	SIGEMT                                    = 7
   370  	SIGEV_NONE                                = 0
   371  	SIGEV_SIGNAL                              = 1
   372  	SIGEV_THREAD                              = 3
   373  	SIGFPE                                    = 8
   374  	SIGHUP                                    = 1
   375  	SIGILL                                    = 4
   376  	SIGINFO                                   = 29
   377  	SIGINT                                    = 2
   378  	SIGIO                                     = 23
   379  	SIGIOT                                    = 6
   380  	SIGKILL                                   = 9
   381  	SIGPIPE                                   = 13
   382  	SIGPROF                                   = 27
   383  	SIGQUIT                                   = 3
   384  	SIGSEGV                                   = 11
   385  	SIGSTKSZ                                  = 131072
   386  	SIGSTOP                                   = 17
   387  	SIGSYS                                    = 12
   388  	SIGTERM                                   = 15
   389  	SIGTRAP                                   = 5
   390  	SIGTSTP                                   = 18
   391  	SIGTTIN                                   = 21
   392  	SIGTTOU                                   = 22
   393  	SIGURG                                    = 16
   394  	SIGUSR1                                   = 30
   395  	SIGUSR2                                   = 31
   396  	SIGVTALRM                                 = 26
   397  	SIGWINCH                                  = 28
   398  	SIGXCPU                                   = 24
   399  	SIGXFSZ                                   = 25
   400  	SIG_ATOMIC_MAX                            = 2147483647
   401  	SIG_ATOMIC_MIN                            = -2147483648
   402  	SIG_BLOCK                                 = 1
   403  	SIG_SETMASK                               = 3
   404  	SIG_UNBLOCK                               = 2
   405  	SIZE_MAX                                  = 18446744073709551615
   406  	SI_ASYNCIO                                = 0x10004
   407  	SI_MESGQ                                  = 0x10005
   408  	SI_QUEUE                                  = 0x10002
   409  	SI_TIMER                                  = 0x10003
   410  	SI_USER                                   = 0x10001
   411  	SQLITE3_H                                 = 0
   412  	SQLITE3_TEXT                              = 3
   413  	SQLITE_ABORT                              = 4
   414  	SQLITE_ABORT_ROLLBACK                     = 516
   415  	SQLITE_ACCESS_EXISTS                      = 0
   416  	SQLITE_ACCESS_READ                        = 2
   417  	SQLITE_ACCESS_READWRITE                   = 1
   418  	SQLITE_ALTER_TABLE                        = 26
   419  	SQLITE_ANALYZE                            = 28
   420  	SQLITE_ANY                                = 5
   421  	SQLITE_API                                = 0
   422  	SQLITE_APICALL                            = 0
   423  	SQLITE_ATTACH                             = 24
   424  	SQLITE_AUTH                               = 23
   425  	SQLITE_AUTH_USER                          = 279
   426  	SQLITE_BLOB                               = 4
   427  	SQLITE_BUSY                               = 5
   428  	SQLITE_BUSY_RECOVERY                      = 261
   429  	SQLITE_BUSY_SNAPSHOT                      = 517
   430  	SQLITE_BUSY_TIMEOUT                       = 773
   431  	SQLITE_CALLBACK                           = 0
   432  	SQLITE_CANTOPEN                           = 14
   433  	SQLITE_CANTOPEN_CONVPATH                  = 1038
   434  	SQLITE_CANTOPEN_DIRTYWAL                  = 1294
   435  	SQLITE_CANTOPEN_FULLPATH                  = 782
   436  	SQLITE_CANTOPEN_ISDIR                     = 526
   437  	SQLITE_CANTOPEN_NOTEMPDIR                 = 270
   438  	SQLITE_CANTOPEN_SYMLINK                   = 1550
   439  	SQLITE_CDECL                              = 0
   440  	SQLITE_CHANGESETAPPLY_INVERT              = 0x0002
   441  	SQLITE_CHANGESETAPPLY_NOSAVEPOINT         = 0x0001
   442  	SQLITE_CHANGESETSTART_INVERT              = 0x0002
   443  	SQLITE_CHANGESET_ABORT                    = 2
   444  	SQLITE_CHANGESET_CONFLICT                 = 3
   445  	SQLITE_CHANGESET_CONSTRAINT               = 4
   446  	SQLITE_CHANGESET_DATA                     = 1
   447  	SQLITE_CHANGESET_FOREIGN_KEY              = 5
   448  	SQLITE_CHANGESET_NOTFOUND                 = 2
   449  	SQLITE_CHANGESET_OMIT                     = 0
   450  	SQLITE_CHANGESET_REPLACE                  = 1
   451  	SQLITE_CHECKPOINT_FULL                    = 1
   452  	SQLITE_CHECKPOINT_PASSIVE                 = 0
   453  	SQLITE_CHECKPOINT_RESTART                 = 2
   454  	SQLITE_CHECKPOINT_TRUNCATE                = 3
   455  	SQLITE_CONFIG_COVERING_INDEX_SCAN         = 20
   456  	SQLITE_CONFIG_GETMALLOC                   = 5
   457  	SQLITE_CONFIG_GETMUTEX                    = 11
   458  	SQLITE_CONFIG_GETPCACHE                   = 15
   459  	SQLITE_CONFIG_GETPCACHE2                  = 19
   460  	SQLITE_CONFIG_HEAP                        = 8
   461  	SQLITE_CONFIG_LOG                         = 16
   462  	SQLITE_CONFIG_LOOKASIDE                   = 13
   463  	SQLITE_CONFIG_MALLOC                      = 4
   464  	SQLITE_CONFIG_MEMDB_MAXSIZE               = 29
   465  	SQLITE_CONFIG_MEMSTATUS                   = 9
   466  	SQLITE_CONFIG_MMAP_SIZE                   = 22
   467  	SQLITE_CONFIG_MULTITHREAD                 = 2
   468  	SQLITE_CONFIG_MUTEX                       = 10
   469  	SQLITE_CONFIG_PAGECACHE                   = 7
   470  	SQLITE_CONFIG_PCACHE                      = 14
   471  	SQLITE_CONFIG_PCACHE2                     = 18
   472  	SQLITE_CONFIG_PCACHE_HDRSZ                = 24
   473  	SQLITE_CONFIG_PMASZ                       = 25
   474  	SQLITE_CONFIG_SCRATCH                     = 6
   475  	SQLITE_CONFIG_SERIALIZED                  = 3
   476  	SQLITE_CONFIG_SINGLETHREAD                = 1
   477  	SQLITE_CONFIG_SMALL_MALLOC                = 27
   478  	SQLITE_CONFIG_SORTERREF_SIZE              = 28
   479  	SQLITE_CONFIG_SQLLOG                      = 21
   480  	SQLITE_CONFIG_STMTJRNL_SPILL              = 26
   481  	SQLITE_CONFIG_URI                         = 17
   482  	SQLITE_CONFIG_WIN32_HEAPSIZE              = 23
   483  	SQLITE_CONSTRAINT                         = 19
   484  	SQLITE_CONSTRAINT_CHECK                   = 275
   485  	SQLITE_CONSTRAINT_COMMITHOOK              = 531
   486  	SQLITE_CONSTRAINT_FOREIGNKEY              = 787
   487  	SQLITE_CONSTRAINT_FUNCTION                = 1043
   488  	SQLITE_CONSTRAINT_NOTNULL                 = 1299
   489  	SQLITE_CONSTRAINT_PINNED                  = 2835
   490  	SQLITE_CONSTRAINT_PRIMARYKEY              = 1555
   491  	SQLITE_CONSTRAINT_ROWID                   = 2579
   492  	SQLITE_CONSTRAINT_TRIGGER                 = 1811
   493  	SQLITE_CONSTRAINT_UNIQUE                  = 2067
   494  	SQLITE_CONSTRAINT_VTAB                    = 2323
   495  	SQLITE_COPY                               = 0
   496  	SQLITE_CORE                               = 1
   497  	SQLITE_CORRUPT                            = 11
   498  	SQLITE_CORRUPT_INDEX                      = 779
   499  	SQLITE_CORRUPT_SEQUENCE                   = 523
   500  	SQLITE_CORRUPT_VTAB                       = 267
   501  	SQLITE_CREATE_INDEX                       = 1
   502  	SQLITE_CREATE_TABLE                       = 2
   503  	SQLITE_CREATE_TEMP_INDEX                  = 3
   504  	SQLITE_CREATE_TEMP_TABLE                  = 4
   505  	SQLITE_CREATE_TEMP_TRIGGER                = 5
   506  	SQLITE_CREATE_TEMP_VIEW                   = 6
   507  	SQLITE_CREATE_TRIGGER                     = 7
   508  	SQLITE_CREATE_VIEW                        = 8
   509  	SQLITE_CREATE_VTABLE                      = 29
   510  	SQLITE_DBCONFIG_DEFENSIVE                 = 1010
   511  	SQLITE_DBCONFIG_DQS_DDL                   = 1014
   512  	SQLITE_DBCONFIG_DQS_DML                   = 1013
   513  	SQLITE_DBCONFIG_ENABLE_FKEY               = 1002
   514  	SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER     = 1004
   515  	SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION     = 1005
   516  	SQLITE_DBCONFIG_ENABLE_QPSG               = 1007
   517  	SQLITE_DBCONFIG_ENABLE_TRIGGER            = 1003
   518  	SQLITE_DBCONFIG_ENABLE_VIEW               = 1015
   519  	SQLITE_DBCONFIG_LEGACY_ALTER_TABLE        = 1012
   520  	SQLITE_DBCONFIG_LEGACY_FILE_FORMAT        = 1016
   521  	SQLITE_DBCONFIG_LOOKASIDE                 = 1001
   522  	SQLITE_DBCONFIG_MAINDBNAME                = 1000
   523  	SQLITE_DBCONFIG_MAX                       = 1017
   524  	SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE          = 1006
   525  	SQLITE_DBCONFIG_RESET_DATABASE            = 1009
   526  	SQLITE_DBCONFIG_TRIGGER_EQP               = 1008
   527  	SQLITE_DBCONFIG_TRUSTED_SCHEMA            = 1017
   528  	SQLITE_DBCONFIG_WRITABLE_SCHEMA           = 1011
   529  	SQLITE_DBSTATUS_CACHE_HIT                 = 7
   530  	SQLITE_DBSTATUS_CACHE_MISS                = 8
   531  	SQLITE_DBSTATUS_CACHE_SPILL               = 12
   532  	SQLITE_DBSTATUS_CACHE_USED                = 1
   533  	SQLITE_DBSTATUS_CACHE_USED_SHARED         = 11
   534  	SQLITE_DBSTATUS_CACHE_WRITE               = 9
   535  	SQLITE_DBSTATUS_DEFERRED_FKS              = 10
   536  	SQLITE_DBSTATUS_LOOKASIDE_HIT             = 4
   537  	SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL       = 6
   538  	SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE       = 5
   539  	SQLITE_DBSTATUS_LOOKASIDE_USED            = 0
   540  	SQLITE_DBSTATUS_MAX                       = 12
   541  	SQLITE_DBSTATUS_SCHEMA_USED               = 2
   542  	SQLITE_DBSTATUS_STMT_USED                 = 3
   543  	SQLITE_DELETE                             = 9
   544  	SQLITE_DENY                               = 1
   545  	SQLITE_DEPRECATED                         = 0
   546  	SQLITE_DESERIALIZE_FREEONCLOSE            = 1
   547  	SQLITE_DESERIALIZE_READONLY               = 4
   548  	SQLITE_DESERIALIZE_RESIZEABLE             = 2
   549  	SQLITE_DETACH                             = 25
   550  	SQLITE_DETERMINISTIC                      = 0x000000800
   551  	SQLITE_DIRECTONLY                         = 0x000080000
   552  	SQLITE_DONE                               = 101
   553  	SQLITE_DROP_INDEX                         = 10
   554  	SQLITE_DROP_TABLE                         = 11
   555  	SQLITE_DROP_TEMP_INDEX                    = 12
   556  	SQLITE_DROP_TEMP_TABLE                    = 13
   557  	SQLITE_DROP_TEMP_TRIGGER                  = 14
   558  	SQLITE_DROP_TEMP_VIEW                     = 15
   559  	SQLITE_DROP_TRIGGER                       = 16
   560  	SQLITE_DROP_VIEW                          = 17
   561  	SQLITE_DROP_VTABLE                        = 30
   562  	SQLITE_EMPTY                              = 16
   563  	SQLITE_ENABLE_COLUMN_METADATA             = 1
   564  	SQLITE_ENABLE_FTS5                        = 1
   565  	SQLITE_ENABLE_GEOPOLY                     = 1
   566  	SQLITE_ENABLE_JSON1                       = 1
   567  	SQLITE_ENABLE_MEMORY_MANAGEMENT           = 1
   568  	SQLITE_ENABLE_OFFSET_SQL_FUNC             = 1
   569  	SQLITE_ENABLE_PREUPDATE_HOOK              = 1
   570  	SQLITE_ENABLE_RBU                         = 1
   571  	SQLITE_ENABLE_RTREE                       = 1
   572  	SQLITE_ENABLE_SESSION                     = 1
   573  	SQLITE_ENABLE_SNAPSHOT                    = 1
   574  	SQLITE_ENABLE_STAT4                       = 1
   575  	SQLITE_ENABLE_UNLOCK_NOTIFY               = 1
   576  	SQLITE_ERROR                              = 1
   577  	SQLITE_ERROR_MISSING_COLLSEQ              = 257
   578  	SQLITE_ERROR_RETRY                        = 513
   579  	SQLITE_ERROR_SNAPSHOT                     = 769
   580  	SQLITE_EXPERIMENTAL                       = 0
   581  	SQLITE_FAIL                               = 3
   582  	SQLITE_FCNTL_BEGIN_ATOMIC_WRITE           = 31
   583  	SQLITE_FCNTL_BUSYHANDLER                  = 15
   584  	SQLITE_FCNTL_CHUNK_SIZE                   = 6
   585  	SQLITE_FCNTL_CKPT_DONE                    = 37
   586  	SQLITE_FCNTL_CKPT_START                   = 39
   587  	SQLITE_FCNTL_CKSM_FILE                    = 41
   588  	SQLITE_FCNTL_COMMIT_ATOMIC_WRITE          = 32
   589  	SQLITE_FCNTL_COMMIT_PHASETWO              = 22
   590  	SQLITE_FCNTL_DATA_VERSION                 = 35
   591  	SQLITE_FCNTL_EXTERNAL_READER              = 40
   592  	SQLITE_FCNTL_FILE_POINTER                 = 7
   593  	SQLITE_FCNTL_GET_LOCKPROXYFILE            = 2
   594  	SQLITE_FCNTL_HAS_MOVED                    = 20
   595  	SQLITE_FCNTL_JOURNAL_POINTER              = 28
   596  	SQLITE_FCNTL_LAST_ERRNO                   = 4
   597  	SQLITE_FCNTL_LOCKSTATE                    = 1
   598  	SQLITE_FCNTL_LOCK_TIMEOUT                 = 34
   599  	SQLITE_FCNTL_MMAP_SIZE                    = 18
   600  	SQLITE_FCNTL_OVERWRITE                    = 11
   601  	SQLITE_FCNTL_PDB                          = 30
   602  	SQLITE_FCNTL_PERSIST_WAL                  = 10
   603  	SQLITE_FCNTL_POWERSAFE_OVERWRITE          = 13
   604  	SQLITE_FCNTL_PRAGMA                       = 14
   605  	SQLITE_FCNTL_RBU                          = 26
   606  	SQLITE_FCNTL_RESERVE_BYTES                = 38
   607  	SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE        = 33
   608  	SQLITE_FCNTL_SET_LOCKPROXYFILE            = 3
   609  	SQLITE_FCNTL_SIZE_HINT                    = 5
   610  	SQLITE_FCNTL_SIZE_LIMIT                   = 36
   611  	SQLITE_FCNTL_SYNC                         = 21
   612  	SQLITE_FCNTL_SYNC_OMITTED                 = 8
   613  	SQLITE_FCNTL_TEMPFILENAME                 = 16
   614  	SQLITE_FCNTL_TRACE                        = 19
   615  	SQLITE_FCNTL_VFSNAME                      = 12
   616  	SQLITE_FCNTL_VFS_POINTER                  = 27
   617  	SQLITE_FCNTL_WAL_BLOCK                    = 24
   618  	SQLITE_FCNTL_WIN32_AV_RETRY               = 9
   619  	SQLITE_FCNTL_WIN32_GET_HANDLE             = 29
   620  	SQLITE_FCNTL_WIN32_SET_HANDLE             = 23
   621  	SQLITE_FCNTL_ZIPVFS                       = 25
   622  	SQLITE_FLOAT                              = 2
   623  	SQLITE_FORMAT                             = 24
   624  	SQLITE_FULL                               = 13
   625  	SQLITE_FUNCTION                           = 31
   626  	SQLITE_GET_LOCKPROXYFILE                  = 2
   627  	SQLITE_IGNORE                             = 2
   628  	SQLITE_INDEX_CONSTRAINT_EQ                = 2
   629  	SQLITE_INDEX_CONSTRAINT_FUNCTION          = 150
   630  	SQLITE_INDEX_CONSTRAINT_GE                = 32
   631  	SQLITE_INDEX_CONSTRAINT_GLOB              = 66
   632  	SQLITE_INDEX_CONSTRAINT_GT                = 4
   633  	SQLITE_INDEX_CONSTRAINT_IS                = 72
   634  	SQLITE_INDEX_CONSTRAINT_ISNOT             = 69
   635  	SQLITE_INDEX_CONSTRAINT_ISNOTNULL         = 70
   636  	SQLITE_INDEX_CONSTRAINT_ISNULL            = 71
   637  	SQLITE_INDEX_CONSTRAINT_LE                = 8
   638  	SQLITE_INDEX_CONSTRAINT_LIKE              = 65
   639  	SQLITE_INDEX_CONSTRAINT_LT                = 16
   640  	SQLITE_INDEX_CONSTRAINT_MATCH             = 64
   641  	SQLITE_INDEX_CONSTRAINT_NE                = 68
   642  	SQLITE_INDEX_CONSTRAINT_REGEXP            = 67
   643  	SQLITE_INDEX_SCAN_UNIQUE                  = 1
   644  	SQLITE_INNOCUOUS                          = 0x000200000
   645  	SQLITE_INSERT                             = 18
   646  	SQLITE_INTEGER                            = 1
   647  	SQLITE_INTERNAL                           = 2
   648  	SQLITE_INTERRUPT                          = 9
   649  	SQLITE_IOCAP_ATOMIC                       = 0x00000001
   650  	SQLITE_IOCAP_ATOMIC16K                    = 0x00000040
   651  	SQLITE_IOCAP_ATOMIC1K                     = 0x00000004
   652  	SQLITE_IOCAP_ATOMIC2K                     = 0x00000008
   653  	SQLITE_IOCAP_ATOMIC32K                    = 0x00000080
   654  	SQLITE_IOCAP_ATOMIC4K                     = 0x00000010
   655  	SQLITE_IOCAP_ATOMIC512                    = 0x00000002
   656  	SQLITE_IOCAP_ATOMIC64K                    = 0x00000100
   657  	SQLITE_IOCAP_ATOMIC8K                     = 0x00000020
   658  	SQLITE_IOCAP_BATCH_ATOMIC                 = 0x00004000
   659  	SQLITE_IOCAP_IMMUTABLE                    = 0x00002000
   660  	SQLITE_IOCAP_POWERSAFE_OVERWRITE          = 0x00001000
   661  	SQLITE_IOCAP_SAFE_APPEND                  = 0x00000200
   662  	SQLITE_IOCAP_SEQUENTIAL                   = 0x00000400
   663  	SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN        = 0x00000800
   664  	SQLITE_IOERR                              = 10
   665  	SQLITE_IOERR_ACCESS                       = 3338
   666  	SQLITE_IOERR_AUTH                         = 7178
   667  	SQLITE_IOERR_BEGIN_ATOMIC                 = 7434
   668  	SQLITE_IOERR_BLOCKED                      = 2826
   669  	SQLITE_IOERR_CHECKRESERVEDLOCK            = 3594
   670  	SQLITE_IOERR_CLOSE                        = 4106
   671  	SQLITE_IOERR_COMMIT_ATOMIC                = 7690
   672  	SQLITE_IOERR_CONVPATH                     = 6666
   673  	SQLITE_IOERR_CORRUPTFS                    = 8458
   674  	SQLITE_IOERR_DATA                         = 8202
   675  	SQLITE_IOERR_DELETE                       = 2570
   676  	SQLITE_IOERR_DELETE_NOENT                 = 5898
   677  	SQLITE_IOERR_DIR_CLOSE                    = 4362
   678  	SQLITE_IOERR_DIR_FSYNC                    = 1290
   679  	SQLITE_IOERR_FSTAT                        = 1802
   680  	SQLITE_IOERR_FSYNC                        = 1034
   681  	SQLITE_IOERR_GETTEMPPATH                  = 6410
   682  	SQLITE_IOERR_LOCK                         = 3850
   683  	SQLITE_IOERR_MMAP                         = 6154
   684  	SQLITE_IOERR_NOMEM                        = 3082
   685  	SQLITE_IOERR_RDLOCK                       = 2314
   686  	SQLITE_IOERR_READ                         = 266
   687  	SQLITE_IOERR_ROLLBACK_ATOMIC              = 7946
   688  	SQLITE_IOERR_SEEK                         = 5642
   689  	SQLITE_IOERR_SHMLOCK                      = 5130
   690  	SQLITE_IOERR_SHMMAP                       = 5386
   691  	SQLITE_IOERR_SHMOPEN                      = 4618
   692  	SQLITE_IOERR_SHMSIZE                      = 4874
   693  	SQLITE_IOERR_SHORT_READ                   = 522
   694  	SQLITE_IOERR_TRUNCATE                     = 1546
   695  	SQLITE_IOERR_UNLOCK                       = 2058
   696  	SQLITE_IOERR_VNODE                        = 6922
   697  	SQLITE_IOERR_WRITE                        = 778
   698  	SQLITE_LAST_ERRNO                         = 4
   699  	SQLITE_LIKE_DOESNT_MATCH_BLOBS            = 1
   700  	SQLITE_LIMIT_ATTACHED                     = 7
   701  	SQLITE_LIMIT_COLUMN                       = 2
   702  	SQLITE_LIMIT_COMPOUND_SELECT              = 4
   703  	SQLITE_LIMIT_EXPR_DEPTH                   = 3
   704  	SQLITE_LIMIT_FUNCTION_ARG                 = 6
   705  	SQLITE_LIMIT_LENGTH                       = 0
   706  	SQLITE_LIMIT_LIKE_PATTERN_LENGTH          = 8
   707  	SQLITE_LIMIT_SQL_LENGTH                   = 1
   708  	SQLITE_LIMIT_TRIGGER_DEPTH                = 10
   709  	SQLITE_LIMIT_VARIABLE_NUMBER              = 9
   710  	SQLITE_LIMIT_VDBE_OP                      = 5
   711  	SQLITE_LIMIT_WORKER_THREADS               = 11
   712  	SQLITE_LOCKED                             = 6
   713  	SQLITE_LOCKED_SHAREDCACHE                 = 262
   714  	SQLITE_LOCKED_VTAB                        = 518
   715  	SQLITE_LOCK_EXCLUSIVE                     = 4
   716  	SQLITE_LOCK_NONE                          = 0
   717  	SQLITE_LOCK_PENDING                       = 3
   718  	SQLITE_LOCK_RESERVED                      = 2
   719  	SQLITE_LOCK_SHARED                        = 1
   720  	SQLITE_MISMATCH                           = 20
   721  	SQLITE_MISUSE                             = 21
   722  	SQLITE_MUTEX_APPDEF                       = 1
   723  	SQLITE_MUTEX_FAST                         = 0
   724  	SQLITE_MUTEX_NOOP                         = 1
   725  	SQLITE_MUTEX_RECURSIVE                    = 1
   726  	SQLITE_MUTEX_STATIC_APP1                  = 8
   727  	SQLITE_MUTEX_STATIC_APP2                  = 9
   728  	SQLITE_MUTEX_STATIC_APP3                  = 10
   729  	SQLITE_MUTEX_STATIC_LRU                   = 6
   730  	SQLITE_MUTEX_STATIC_LRU2                  = 7
   731  	SQLITE_MUTEX_STATIC_MAIN                  = 2
   732  	SQLITE_MUTEX_STATIC_MASTER                = 2
   733  	SQLITE_MUTEX_STATIC_MEM                   = 3
   734  	SQLITE_MUTEX_STATIC_MEM2                  = 4
   735  	SQLITE_MUTEX_STATIC_OPEN                  = 4
   736  	SQLITE_MUTEX_STATIC_PMEM                  = 7
   737  	SQLITE_MUTEX_STATIC_PRNG                  = 5
   738  	SQLITE_MUTEX_STATIC_VFS1                  = 11
   739  	SQLITE_MUTEX_STATIC_VFS2                  = 12
   740  	SQLITE_MUTEX_STATIC_VFS3                  = 13
   741  	SQLITE_NOLFS                              = 22
   742  	SQLITE_NOMEM                              = 7
   743  	SQLITE_NOTADB                             = 26
   744  	SQLITE_NOTFOUND                           = 12
   745  	SQLITE_NOTICE                             = 27
   746  	SQLITE_NOTICE_RECOVER_ROLLBACK            = 539
   747  	SQLITE_NOTICE_RECOVER_WAL                 = 283
   748  	SQLITE_NULL                               = 5
   749  	SQLITE_OK                                 = 0
   750  	SQLITE_OK_LOAD_PERMANENTLY                = 256
   751  	SQLITE_OK_SYMLINK                         = 512
   752  	SQLITE_OPEN_AUTOPROXY                     = 0x00000020
   753  	SQLITE_OPEN_CREATE                        = 0x00000004
   754  	SQLITE_OPEN_DELETEONCLOSE                 = 0x00000008
   755  	SQLITE_OPEN_EXCLUSIVE                     = 0x00000010
   756  	SQLITE_OPEN_FULLMUTEX                     = 0x00010000
   757  	SQLITE_OPEN_MAIN_DB                       = 0x00000100
   758  	SQLITE_OPEN_MAIN_JOURNAL                  = 0x00000800
   759  	SQLITE_OPEN_MASTER_JOURNAL                = 0x00004000
   760  	SQLITE_OPEN_MEMORY                        = 0x00000080
   761  	SQLITE_OPEN_NOFOLLOW                      = 0x01000000
   762  	SQLITE_OPEN_NOMUTEX                       = 0x00008000
   763  	SQLITE_OPEN_PRIVATECACHE                  = 0x00040000
   764  	SQLITE_OPEN_READONLY                      = 0x00000001
   765  	SQLITE_OPEN_READWRITE                     = 0x00000002
   766  	SQLITE_OPEN_SHAREDCACHE                   = 0x00020000
   767  	SQLITE_OPEN_SUBJOURNAL                    = 0x00002000
   768  	SQLITE_OPEN_SUPER_JOURNAL                 = 0x00004000
   769  	SQLITE_OPEN_TEMP_DB                       = 0x00000200
   770  	SQLITE_OPEN_TEMP_JOURNAL                  = 0x00001000
   771  	SQLITE_OPEN_TRANSIENT_DB                  = 0x00000400
   772  	SQLITE_OPEN_URI                           = 0x00000040
   773  	SQLITE_OPEN_WAL                           = 0x00080000
   774  	SQLITE_OS_UNIX                            = 1
   775  	SQLITE_PERM                               = 3
   776  	SQLITE_PRAGMA                             = 19
   777  	SQLITE_PREPARE_NORMALIZE                  = 0x02
   778  	SQLITE_PREPARE_NO_VTAB                    = 0x04
   779  	SQLITE_PREPARE_PERSISTENT                 = 0x01
   780  	SQLITE_PROTOCOL                           = 15
   781  	SQLITE_RANGE                              = 25
   782  	SQLITE_READ                               = 20
   783  	SQLITE_READONLY                           = 8
   784  	SQLITE_READONLY_CANTINIT                  = 1288
   785  	SQLITE_READONLY_CANTLOCK                  = 520
   786  	SQLITE_READONLY_DBMOVED                   = 1032
   787  	SQLITE_READONLY_DIRECTORY                 = 1544
   788  	SQLITE_READONLY_RECOVERY                  = 264
   789  	SQLITE_READONLY_ROLLBACK                  = 776
   790  	SQLITE_RECURSIVE                          = 33
   791  	SQLITE_REINDEX                            = 27
   792  	SQLITE_REPLACE                            = 5
   793  	SQLITE_ROLLBACK                           = 1
   794  	SQLITE_ROW                                = 100
   795  	SQLITE_SAVEPOINT                          = 32
   796  	SQLITE_SCANSTAT_EST                       = 2
   797  	SQLITE_SCANSTAT_EXPLAIN                   = 4
   798  	SQLITE_SCANSTAT_NAME                      = 3
   799  	SQLITE_SCANSTAT_NLOOP                     = 0
   800  	SQLITE_SCANSTAT_NVISIT                    = 1
   801  	SQLITE_SCANSTAT_SELECTID                  = 5
   802  	SQLITE_SCHEMA                             = 17
   803  	SQLITE_SELECT                             = 21
   804  	SQLITE_SERIALIZE_NOCOPY                   = 0x001
   805  	SQLITE_SESSION_CONFIG_STRMSIZE            = 1
   806  	SQLITE_SESSION_OBJCONFIG_SIZE             = 1
   807  	SQLITE_SET_LOCKPROXYFILE                  = 3
   808  	SQLITE_SHM_EXCLUSIVE                      = 8
   809  	SQLITE_SHM_LOCK                           = 2
   810  	SQLITE_SHM_NLOCK                          = 8
   811  	SQLITE_SHM_SHARED                         = 4
   812  	SQLITE_SHM_UNLOCK                         = 1
   813  	SQLITE_SOUNDEX                            = 1
   814  	SQLITE_SOURCE_ID                          = "2021-06-18 18:36:39 5c9a6c06871cb9fe42814af9c039eb6da5427a6ec28f187af7ebfb62eafa66e5"
   815  	SQLITE_STATUS_MALLOC_COUNT                = 9
   816  	SQLITE_STATUS_MALLOC_SIZE                 = 5
   817  	SQLITE_STATUS_MEMORY_USED                 = 0
   818  	SQLITE_STATUS_PAGECACHE_OVERFLOW          = 2
   819  	SQLITE_STATUS_PAGECACHE_SIZE              = 7
   820  	SQLITE_STATUS_PAGECACHE_USED              = 1
   821  	SQLITE_STATUS_PARSER_STACK                = 6
   822  	SQLITE_STATUS_SCRATCH_OVERFLOW            = 4
   823  	SQLITE_STATUS_SCRATCH_SIZE                = 8
   824  	SQLITE_STATUS_SCRATCH_USED                = 3
   825  	SQLITE_STDCALL                            = 0
   826  	SQLITE_STMTSTATUS_AUTOINDEX               = 3
   827  	SQLITE_STMTSTATUS_FULLSCAN_STEP           = 1
   828  	SQLITE_STMTSTATUS_MEMUSED                 = 99
   829  	SQLITE_STMTSTATUS_REPREPARE               = 5
   830  	SQLITE_STMTSTATUS_RUN                     = 6
   831  	SQLITE_STMTSTATUS_SORT                    = 2
   832  	SQLITE_STMTSTATUS_VM_STEP                 = 4
   833  	SQLITE_SUBTYPE                            = 0x000100000
   834  	SQLITE_SYNC_DATAONLY                      = 0x00010
   835  	SQLITE_SYNC_FULL                          = 0x00003
   836  	SQLITE_SYNC_NORMAL                        = 0x00002
   837  	SQLITE_SYSAPI                             = 0
   838  	SQLITE_TESTCTRL_ALWAYS                    = 13
   839  	SQLITE_TESTCTRL_ASSERT                    = 12
   840  	SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS       = 10
   841  	SQLITE_TESTCTRL_BITVEC_TEST               = 8
   842  	SQLITE_TESTCTRL_BYTEORDER                 = 22
   843  	SQLITE_TESTCTRL_EXPLAIN_STMT              = 19
   844  	SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS       = 29
   845  	SQLITE_TESTCTRL_FAULT_INSTALL             = 9
   846  	SQLITE_TESTCTRL_FIRST                     = 5
   847  	SQLITE_TESTCTRL_IMPOSTER                  = 25
   848  	SQLITE_TESTCTRL_INTERNAL_FUNCTIONS        = 17
   849  	SQLITE_TESTCTRL_ISINIT                    = 23
   850  	SQLITE_TESTCTRL_ISKEYWORD                 = 16
   851  	SQLITE_TESTCTRL_LAST                      = 32
   852  	SQLITE_TESTCTRL_LOCALTIME_FAULT           = 18
   853  	SQLITE_TESTCTRL_NEVER_CORRUPT             = 20
   854  	SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD      = 19
   855  	SQLITE_TESTCTRL_OPTIMIZATIONS             = 15
   856  	SQLITE_TESTCTRL_PARSER_COVERAGE           = 26
   857  	SQLITE_TESTCTRL_PENDING_BYTE              = 11
   858  	SQLITE_TESTCTRL_PRNG_RESET                = 7
   859  	SQLITE_TESTCTRL_PRNG_RESTORE              = 6
   860  	SQLITE_TESTCTRL_PRNG_SAVE                 = 5
   861  	SQLITE_TESTCTRL_PRNG_SEED                 = 28
   862  	SQLITE_TESTCTRL_RESERVE                   = 14
   863  	SQLITE_TESTCTRL_RESULT_INTREAL            = 27
   864  	SQLITE_TESTCTRL_SCRATCHMALLOC             = 17
   865  	SQLITE_TESTCTRL_SEEK_COUNT                = 30
   866  	SQLITE_TESTCTRL_SORTER_MMAP               = 24
   867  	SQLITE_TESTCTRL_TRACEFLAGS                = 31
   868  	SQLITE_TESTCTRL_TUNE                      = 32
   869  	SQLITE_TESTCTRL_VDBE_COVERAGE             = 21
   870  	SQLITE_TEXT                               = 3
   871  	SQLITE_THREADSAFE                         = 1
   872  	SQLITE_TOOBIG                             = 18
   873  	SQLITE_TRACE_CLOSE                        = 0x08
   874  	SQLITE_TRACE_PROFILE                      = 0x02
   875  	SQLITE_TRACE_ROW                          = 0x04
   876  	SQLITE_TRACE_STMT                         = 0x01
   877  	SQLITE_TRANSACTION                        = 22
   878  	SQLITE_TXN_NONE                           = 0
   879  	SQLITE_TXN_READ                           = 1
   880  	SQLITE_TXN_WRITE                          = 2
   881  	SQLITE_UPDATE                             = 23
   882  	SQLITE_UTF16                              = 4
   883  	SQLITE_UTF16BE                            = 3
   884  	SQLITE_UTF16LE                            = 2
   885  	SQLITE_UTF16_ALIGNED                      = 8
   886  	SQLITE_UTF8                               = 1
   887  	SQLITE_VERSION                            = "3.36.0"
   888  	SQLITE_VERSION_NUMBER                     = 3036000
   889  	SQLITE_VTAB_CONSTRAINT_SUPPORT            = 1
   890  	SQLITE_VTAB_DIRECTONLY                    = 3
   891  	SQLITE_VTAB_INNOCUOUS                     = 2
   892  	SQLITE_WARNING                            = 28
   893  	SQLITE_WARNING_AUTOINDEX                  = 284
   894  	SQLITE_WIN32_DATA_DIRECTORY_TYPE          = 1
   895  	SQLITE_WIN32_TEMP_DIRECTORY_TYPE          = 2
   896  	SQLITE_WITHOUT_ZONEMALLOC                 = 1
   897  	SS_DISABLE                                = 0x0004
   898  	SS_ONSTACK                                = 0x0001
   899  	STDERR_FILENO                             = 2
   900  	STDIN_FILENO                              = 0
   901  	STDOUT_FILENO                             = 1
   902  	SV_INTERRUPT                              = 2
   903  	SV_NOCLDSTOP                              = 8
   904  	SV_NODEFER                                = 16
   905  	SV_ONSTACK                                = 1
   906  	SV_RESETHAND                              = 4
   907  	SV_SIGINFO                                = 64
   908  	SYNC_VOLUME_FULLSYNC                      = 0x01
   909  	SYNC_VOLUME_WAIT                          = 0x02
   910  	TMP_MAX                                   = 308915776
   911  	TRAP_BRKPT                                = 1
   912  	TRAP_TRACE                                = 2
   913  	UINT16_MAX                                = 65535
   914  	UINT32_MAX                                = 4294967295
   915  	UINT64_MAX                                = 18446744073709551615
   916  	UINT8_MAX                                 = 255
   917  	UINTMAX_MAX                               = 18446744073709551615
   918  	UINTPTR_MAX                               = 18446744073709551615
   919  	UINT_FAST16_MAX                           = 65535
   920  	UINT_FAST32_MAX                           = 4294967295
   921  	UINT_FAST64_MAX                           = 18446744073709551615
   922  	UINT_FAST8_MAX                            = 255
   923  	UINT_LEAST16_MAX                          = 65535
   924  	UINT_LEAST32_MAX                          = 4294967295
   925  	UINT_LEAST64_MAX                          = 18446744073709551615
   926  	UINT_LEAST8_MAX                           = 255
   927  	WAIT_ANY                                  = -1
   928  	WAIT_MYPGRP                               = 0
   929  	WAKEMON_DISABLE                           = 0x02
   930  	WAKEMON_ENABLE                            = 0x01
   931  	WAKEMON_GET_PARAMS                        = 0x04
   932  	WAKEMON_MAKE_FATAL                        = 0x10
   933  	WAKEMON_SET_DEFAULTS                      = 0x08
   934  	WCHAR_MAX                                 = 2147483647
   935  	WCHAR_MIN                                 = -2147483648
   936  	WCONTINUED                                = 0x00000010
   937  	WCOREFLAG                                 = 0200
   938  	WEXITED                                   = 0x00000004
   939  	WINT_MAX                                  = 2147483647
   940  	WINT_MIN                                  = -2147483648
   941  	WNOHANG                                   = 0x00000001
   942  	WNOWAIT                                   = 0x00000020
   943  	WSTOPPED                                  = 0x00000008
   944  	WUNTRACED                                 = 0x00000002
   945  	W_OK                                      = 2
   946  	X_OK                                      = 1
   947  	X_ACCESS_EXTENDED_MASK                    = 4193792
   948  	X_ALLOCA_H_                               = 0
   949  	X_ANSI_STDARG_H_                          = 0
   950  	X_APPEND_OK                               = 8192
   951  	X_ARM_ARCH_H                              = 0
   952  	X_ARM_SIGNAL_                             = 1
   953  	X_ARM__ENDIAN_H_                          = 0
   954  	X_ASSERT_H_                               = 0
   955  	X_BSD_ARM__TYPES_H_                       = 0
   956  	X_BSD_MACHINE_ENDIAN_H_                   = 0
   957  	X_BSD_MACHINE_SIGNAL_H_                   = 0
   958  	X_BSD_MACHINE_TYPES_H_                    = 0
   959  	X_BSD_MACHINE__TYPES_H_                   = 0
   960  	X_CACHED_RUNES                            = 256
   961  	X_CDEFS_H_                                = 0
   962  	X_CHOWN_OK                                = 2097152
   963  	X_CRMASK                                  = -256
   964  	X_CS_DARWIN_USER_CACHE_DIR                = 65538
   965  	X_CS_DARWIN_USER_DIR                      = 65536
   966  	X_CS_DARWIN_USER_TEMP_DIR                 = 65537
   967  	X_CS_PATH                                 = 1
   968  	X_CS_POSIX_V6_ILP32_OFF32_CFLAGS          = 2
   969  	X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS         = 3
   970  	X_CS_POSIX_V6_ILP32_OFF32_LIBS            = 4
   971  	X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS         = 5
   972  	X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS        = 6
   973  	X_CS_POSIX_V6_ILP32_OFFBIG_LIBS           = 7
   974  	X_CS_POSIX_V6_LP64_OFF64_CFLAGS           = 8
   975  	X_CS_POSIX_V6_LP64_OFF64_LDFLAGS          = 9
   976  	X_CS_POSIX_V6_LP64_OFF64_LIBS             = 10
   977  	X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS         = 11
   978  	X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS        = 12
   979  	X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS           = 13
   980  	X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS       = 14
   981  	X_CS_XBS5_ILP32_OFF32_CFLAGS              = 20
   982  	X_CS_XBS5_ILP32_OFF32_LDFLAGS             = 21
   983  	X_CS_XBS5_ILP32_OFF32_LIBS                = 22
   984  	X_CS_XBS5_ILP32_OFF32_LINTFLAGS           = 23
   985  	X_CS_XBS5_ILP32_OFFBIG_CFLAGS             = 24
   986  	X_CS_XBS5_ILP32_OFFBIG_LDFLAGS            = 25
   987  	X_CS_XBS5_ILP32_OFFBIG_LIBS               = 26
   988  	X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS          = 27
   989  	X_CS_XBS5_LP64_OFF64_CFLAGS               = 28
   990  	X_CS_XBS5_LP64_OFF64_LDFLAGS              = 29
   991  	X_CS_XBS5_LP64_OFF64_LIBS                 = 30
   992  	X_CS_XBS5_LP64_OFF64_LINTFLAGS            = 31
   993  	X_CS_XBS5_LPBIG_OFFBIG_CFLAGS             = 32
   994  	X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS            = 33
   995  	X_CS_XBS5_LPBIG_OFFBIG_LIBS               = 34
   996  	X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS          = 35
   997  	X_CTERMID_H_                              = 0
   998  	X_CTYPE_A                                 = 0x00000100
   999  	X_CTYPE_B                                 = 0x00020000
  1000  	X_CTYPE_C                                 = 0x00000200
  1001  	X_CTYPE_D                                 = 0x00000400
  1002  	X_CTYPE_G                                 = 0x00000800
  1003  	X_CTYPE_H_                                = 0
  1004  	X_CTYPE_I                                 = 0x00080000
  1005  	X_CTYPE_L                                 = 0x00001000
  1006  	X_CTYPE_P                                 = 0x00002000
  1007  	X_CTYPE_Q                                 = 0x00200000
  1008  	X_CTYPE_R                                 = 0x00040000
  1009  	X_CTYPE_S                                 = 0x00004000
  1010  	X_CTYPE_SW0                               = 0x20000000
  1011  	X_CTYPE_SW1                               = 0x40000000
  1012  	X_CTYPE_SW2                               = 0x80000000
  1013  	X_CTYPE_SW3                               = 0xc0000000
  1014  	X_CTYPE_SWM                               = 0xe0000000
  1015  	X_CTYPE_SWS                               = 30
  1016  	X_CTYPE_T                                 = 0x00100000
  1017  	X_CTYPE_U                                 = 0x00008000
  1018  	X_CTYPE_X                                 = 0x00010000
  1019  	X_CT_RUNE_T                               = 0
  1020  	X_DARWIN_FEATURE_64_BIT_INODE             = 1
  1021  	X_DARWIN_FEATURE_ONLY_64_BIT_INODE        = 1
  1022  	X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE    = 1
  1023  	X_DARWIN_FEATURE_ONLY_VERS_1050           = 1
  1024  	X_DARWIN_FEATURE_UNIX_CONFORMANCE         = 3
  1025  	X_DELETE_OK                               = 4096
  1026  	X_DEV_T                                   = 0
  1027  	X_ERRNO_T                                 = 0
  1028  	X_EXECUTE_OK                              = 2048
  1029  	X_FD_SET                                  = 0
  1030  	X_FILE_OFFSET_BITS                        = 64
  1031  	X_FORTIFY_SOURCE                          = 2
  1032  	X_FSTDIO                                  = 0
  1033  	X_FTS5_H                                  = 0
  1034  	X_GCC_WRAP_STDINT_H                       = 0
  1035  	X_GID_T                                   = 0
  1036  	X_ID_T                                    = 0
  1037  	X_INT16_T                                 = 0
  1038  	X_INT32_T                                 = 0
  1039  	X_INT64_T                                 = 0
  1040  	X_INT8_T                                  = 0
  1041  	X_INTMAX_T                                = 0
  1042  	X_INTPTR_T                                = 0
  1043  	X_IOFBF                                   = 0
  1044  	X_IOLBF                                   = 1
  1045  	X_IONBF                                   = 2
  1046  	X_LP64                                    = 1
  1047  	X_MACHTYPES_H_                            = 0
  1048  	X_MACH_ARM__STRUCTS_H_                    = 0
  1049  	X_MACH_MACHINE__STRUCTS_H_                = 0
  1050  	X_MALLOC_UNDERSCORE_MALLOC_H_             = 0
  1051  	X_MCONTEXT_T                              = 0
  1052  	X_MODE_T                                  = 0
  1053  	X_Nonnull                                 = 0
  1054  	X_Null_unspecified                        = 0
  1055  	X_Nullable                                = 0
  1056  	X_OFF_T                                   = 0
  1057  	X_OS_OSBYTEORDERARM_H                     = 0
  1058  	X_OS__OSBYTEORDER_H                       = 0
  1059  	X_PC_2_SYMLINKS                           = 15
  1060  	X_PC_ALLOC_SIZE_MIN                       = 16
  1061  	X_PC_ASYNC_IO                             = 17
  1062  	X_PC_AUTH_OPAQUE_NP                       = 14
  1063  	X_PC_CASE_PRESERVING                      = 12
  1064  	X_PC_CASE_SENSITIVE                       = 11
  1065  	X_PC_CHOWN_RESTRICTED                     = 7
  1066  	X_PC_EXTENDED_SECURITY_NP                 = 13
  1067  	X_PC_FILESIZEBITS                         = 18
  1068  	X_PC_LINK_MAX                             = 1
  1069  	X_PC_MAX_CANON                            = 2
  1070  	X_PC_MAX_INPUT                            = 3
  1071  	X_PC_MIN_HOLE_SIZE                        = 27
  1072  	X_PC_NAME_CHARS_MAX                       = 10
  1073  	X_PC_NAME_MAX                             = 4
  1074  	X_PC_NO_TRUNC                             = 8
  1075  	X_PC_PATH_MAX                             = 5
  1076  	X_PC_PIPE_BUF                             = 6
  1077  	X_PC_PRIO_IO                              = 19
  1078  	X_PC_REC_INCR_XFER_SIZE                   = 20
  1079  	X_PC_REC_MAX_XFER_SIZE                    = 21
  1080  	X_PC_REC_MIN_XFER_SIZE                    = 22
  1081  	X_PC_REC_XFER_ALIGN                       = 23
  1082  	X_PC_SYMLINK_MAX                          = 24
  1083  	X_PC_SYNC_IO                              = 25
  1084  	X_PC_VDISABLE                             = 9
  1085  	X_PC_XATTR_SIZE_BITS                      = 26
  1086  	X_PID_T                                   = 0
  1087  	X_POSIX2_CHAR_TERM                        = 200112
  1088  	X_POSIX2_C_BIND                           = 200112
  1089  	X_POSIX2_C_DEV                            = 200112
  1090  	X_POSIX2_FORT_DEV                         = -1
  1091  	X_POSIX2_FORT_RUN                         = 200112
  1092  	X_POSIX2_LOCALEDEF                        = 200112
  1093  	X_POSIX2_PBS                              = -1
  1094  	X_POSIX2_PBS_ACCOUNTING                   = -1
  1095  	X_POSIX2_PBS_CHECKPOINT                   = -1
  1096  	X_POSIX2_PBS_LOCATE                       = -1
  1097  	X_POSIX2_PBS_MESSAGE                      = -1
  1098  	X_POSIX2_PBS_TRACK                        = -1
  1099  	X_POSIX2_SW_DEV                           = 200112
  1100  	X_POSIX2_UPE                              = 200112
  1101  	X_POSIX2_VERSION                          = 200112
  1102  	X_POSIX_ADVISORY_INFO                     = -1
  1103  	X_POSIX_ASYNCHRONOUS_IO                   = -1
  1104  	X_POSIX_BARRIERS                          = -1
  1105  	X_POSIX_CHOWN_RESTRICTED                  = 200112
  1106  	X_POSIX_CLOCK_SELECTION                   = -1
  1107  	X_POSIX_CPUTIME                           = -1
  1108  	X_POSIX_FSYNC                             = 200112
  1109  	X_POSIX_IPV6                              = 200112
  1110  	X_POSIX_JOB_CONTROL                       = 200112
  1111  	X_POSIX_MAPPED_FILES                      = 200112
  1112  	X_POSIX_MEMLOCK                           = -1
  1113  	X_POSIX_MEMLOCK_RANGE                     = -1
  1114  	X_POSIX_MEMORY_PROTECTION                 = 200112
  1115  	X_POSIX_MESSAGE_PASSING                   = -1
  1116  	X_POSIX_MONOTONIC_CLOCK                   = -1
  1117  	X_POSIX_NO_TRUNC                          = 200112
  1118  	X_POSIX_PRIORITIZED_IO                    = -1
  1119  	X_POSIX_PRIORITY_SCHEDULING               = -1
  1120  	X_POSIX_RAW_SOCKETS                       = -1
  1121  	X_POSIX_READER_WRITER_LOCKS               = 200112
  1122  	X_POSIX_REALTIME_SIGNALS                  = -1
  1123  	X_POSIX_REGEXP                            = 200112
  1124  	X_POSIX_SAVED_IDS                         = 200112
  1125  	X_POSIX_SEMAPHORES                        = -1
  1126  	X_POSIX_SHARED_MEMORY_OBJECTS             = -1
  1127  	X_POSIX_SHELL                             = 200112
  1128  	X_POSIX_SPAWN                             = -1
  1129  	X_POSIX_SPIN_LOCKS                        = -1
  1130  	X_POSIX_SPORADIC_SERVER                   = -1
  1131  	X_POSIX_SYNCHRONIZED_IO                   = -1
  1132  	X_POSIX_THREADS                           = 200112
  1133  	X_POSIX_THREAD_ATTR_STACKADDR             = 200112
  1134  	X_POSIX_THREAD_ATTR_STACKSIZE             = 200112
  1135  	X_POSIX_THREAD_CPUTIME                    = -1
  1136  	X_POSIX_THREAD_KEYS_MAX                   = 128
  1137  	X_POSIX_THREAD_PRIORITY_SCHEDULING        = -1
  1138  	X_POSIX_THREAD_PRIO_INHERIT               = -1
  1139  	X_POSIX_THREAD_PRIO_PROTECT               = -1
  1140  	X_POSIX_THREAD_PROCESS_SHARED             = 200112
  1141  	X_POSIX_THREAD_SAFE_FUNCTIONS             = 200112
  1142  	X_POSIX_THREAD_SPORADIC_SERVER            = -1
  1143  	X_POSIX_TIMEOUTS                          = -1
  1144  	X_POSIX_TIMERS                            = -1
  1145  	X_POSIX_TRACE                             = -1
  1146  	X_POSIX_TRACE_EVENT_FILTER                = -1
  1147  	X_POSIX_TRACE_INHERIT                     = -1
  1148  	X_POSIX_TRACE_LOG                         = -1
  1149  	X_POSIX_TYPED_MEMORY_OBJECTS              = -1
  1150  	X_POSIX_V6_ILP32_OFF32                    = -1
  1151  	X_POSIX_V6_ILP32_OFFBIG                   = -1
  1152  	X_POSIX_V6_LP64_OFF64                     = 1
  1153  	X_POSIX_V6_LPBIG_OFFBIG                   = 1
  1154  	X_POSIX_V7_ILP32_OFF32                    = -1
  1155  	X_POSIX_V7_ILP32_OFFBIG                   = -1
  1156  	X_POSIX_V7_LP64_OFF64                     = 1
  1157  	X_POSIX_V7_LPBIG_OFFBIG                   = 1
  1158  	X_POSIX_VERSION                           = 200112
  1159  	X_PTHREAD_ATTR_T                          = 0
  1160  	X_QUAD_HIGHWORD                           = 1
  1161  	X_QUAD_LOWWORD                            = 0
  1162  	X_RATTR_OK                                = 32768
  1163  	X_READ_OK                                 = 512
  1164  	X_REXT_OK                                 = 131072
  1165  	X_RLIMIT_POSIX_FLAG                       = 0x1000
  1166  	X_RMFILE_OK                               = 16384
  1167  	X_RPERM_OK                                = 524288
  1168  	X_RSIZE_T                                 = 0
  1169  	X_RUNETYPE_H_                             = 0
  1170  	X_RUNE_MAGIC_A                            = "RuneMagA"
  1171  	X_RUNE_T                                  = 0
  1172  	X_SC_2_CHAR_TERM                          = 20
  1173  	X_SC_2_C_BIND                             = 18
  1174  	X_SC_2_C_DEV                              = 19
  1175  	X_SC_2_FORT_DEV                           = 21
  1176  	X_SC_2_FORT_RUN                           = 22
  1177  	X_SC_2_LOCALEDEF                          = 23
  1178  	X_SC_2_PBS                                = 59
  1179  	X_SC_2_PBS_ACCOUNTING                     = 60
  1180  	X_SC_2_PBS_CHECKPOINT                     = 61
  1181  	X_SC_2_PBS_LOCATE                         = 62
  1182  	X_SC_2_PBS_MESSAGE                        = 63
  1183  	X_SC_2_PBS_TRACK                          = 64
  1184  	X_SC_2_SW_DEV                             = 24
  1185  	X_SC_2_UPE                                = 25
  1186  	X_SC_2_VERSION                            = 17
  1187  	X_SC_ADVISORY_INFO                        = 65
  1188  	X_SC_AIO_LISTIO_MAX                       = 42
  1189  	X_SC_AIO_MAX                              = 43
  1190  	X_SC_AIO_PRIO_DELTA_MAX                   = 44
  1191  	X_SC_ARG_MAX                              = 1
  1192  	X_SC_ASYNCHRONOUS_IO                      = 28
  1193  	X_SC_ATEXIT_MAX                           = 107
  1194  	X_SC_BARRIERS                             = 66
  1195  	X_SC_BC_BASE_MAX                          = 9
  1196  	X_SC_BC_DIM_MAX                           = 10
  1197  	X_SC_BC_SCALE_MAX                         = 11
  1198  	X_SC_BC_STRING_MAX                        = 12
  1199  	X_SC_CHILD_MAX                            = 2
  1200  	X_SC_CLK_TCK                              = 3
  1201  	X_SC_CLOCK_SELECTION                      = 67
  1202  	X_SC_COLL_WEIGHTS_MAX                     = 13
  1203  	X_SC_CPUTIME                              = 68
  1204  	X_SC_DELAYTIMER_MAX                       = 45
  1205  	X_SC_EXPR_NEST_MAX                        = 14
  1206  	X_SC_FILE_LOCKING                         = 69
  1207  	X_SC_FSYNC                                = 38
  1208  	X_SC_GETGR_R_SIZE_MAX                     = 70
  1209  	X_SC_GETPW_R_SIZE_MAX                     = 71
  1210  	X_SC_HOST_NAME_MAX                        = 72
  1211  	X_SC_IOV_MAX                              = 56
  1212  	X_SC_IPV6                                 = 118
  1213  	X_SC_JOB_CONTROL                          = 6
  1214  	X_SC_LINE_MAX                             = 15
  1215  	X_SC_LOGIN_NAME_MAX                       = 73
  1216  	X_SC_MAPPED_FILES                         = 47
  1217  	X_SC_MEMLOCK                              = 30
  1218  	X_SC_MEMLOCK_RANGE                        = 31
  1219  	X_SC_MEMORY_PROTECTION                    = 32
  1220  	X_SC_MESSAGE_PASSING                      = 33
  1221  	X_SC_MONOTONIC_CLOCK                      = 74
  1222  	X_SC_MQ_OPEN_MAX                          = 46
  1223  	X_SC_MQ_PRIO_MAX                          = 75
  1224  	X_SC_NGROUPS_MAX                          = 4
  1225  	X_SC_NPROCESSORS_CONF                     = 57
  1226  	X_SC_NPROCESSORS_ONLN                     = 58
  1227  	X_SC_OPEN_MAX                             = 5
  1228  	X_SC_PAGESIZE                             = 29
  1229  	X_SC_PAGE_SIZE                            = 29
  1230  	X_SC_PASS_MAX                             = 131
  1231  	X_SC_PHYS_PAGES                           = 200
  1232  	X_SC_PRIORITIZED_IO                       = 34
  1233  	X_SC_PRIORITY_SCHEDULING                  = 35
  1234  	X_SC_RAW_SOCKETS                          = 119
  1235  	X_SC_READER_WRITER_LOCKS                  = 76
  1236  	X_SC_REALTIME_SIGNALS                     = 36
  1237  	X_SC_REGEXP                               = 77
  1238  	X_SC_RE_DUP_MAX                           = 16
  1239  	X_SC_RTSIG_MAX                            = 48
  1240  	X_SC_SAVED_IDS                            = 7
  1241  	X_SC_SEMAPHORES                           = 37
  1242  	X_SC_SEM_NSEMS_MAX                        = 49
  1243  	X_SC_SEM_VALUE_MAX                        = 50
  1244  	X_SC_SHARED_MEMORY_OBJECTS                = 39
  1245  	X_SC_SHELL                                = 78
  1246  	X_SC_SIGQUEUE_MAX                         = 51
  1247  	X_SC_SPAWN                                = 79
  1248  	X_SC_SPIN_LOCKS                           = 80
  1249  	X_SC_SPORADIC_SERVER                      = 81
  1250  	X_SC_SS_REPL_MAX                          = 126
  1251  	X_SC_STREAM_MAX                           = 26
  1252  	X_SC_SYMLOOP_MAX                          = 120
  1253  	X_SC_SYNCHRONIZED_IO                      = 40
  1254  	X_SC_THREADS                              = 96
  1255  	X_SC_THREAD_ATTR_STACKADDR                = 82
  1256  	X_SC_THREAD_ATTR_STACKSIZE                = 83
  1257  	X_SC_THREAD_CPUTIME                       = 84
  1258  	X_SC_THREAD_DESTRUCTOR_ITERATIONS         = 85
  1259  	X_SC_THREAD_KEYS_MAX                      = 86
  1260  	X_SC_THREAD_PRIORITY_SCHEDULING           = 89
  1261  	X_SC_THREAD_PRIO_INHERIT                  = 87
  1262  	X_SC_THREAD_PRIO_PROTECT                  = 88
  1263  	X_SC_THREAD_PROCESS_SHARED                = 90
  1264  	X_SC_THREAD_SAFE_FUNCTIONS                = 91
  1265  	X_SC_THREAD_SPORADIC_SERVER               = 92
  1266  	X_SC_THREAD_STACK_MIN                     = 93
  1267  	X_SC_THREAD_THREADS_MAX                   = 94
  1268  	X_SC_TIMEOUTS                             = 95
  1269  	X_SC_TIMERS                               = 41
  1270  	X_SC_TIMER_MAX                            = 52
  1271  	X_SC_TRACE                                = 97
  1272  	X_SC_TRACE_EVENT_FILTER                   = 98
  1273  	X_SC_TRACE_EVENT_NAME_MAX                 = 127
  1274  	X_SC_TRACE_INHERIT                        = 99
  1275  	X_SC_TRACE_LOG                            = 100
  1276  	X_SC_TRACE_NAME_MAX                       = 128
  1277  	X_SC_TRACE_SYS_MAX                        = 129
  1278  	X_SC_TRACE_USER_EVENT_MAX                 = 130
  1279  	X_SC_TTY_NAME_MAX                         = 101
  1280  	X_SC_TYPED_MEMORY_OBJECTS                 = 102
  1281  	X_SC_TZNAME_MAX                           = 27
  1282  	X_SC_V6_ILP32_OFF32                       = 103
  1283  	X_SC_V6_ILP32_OFFBIG                      = 104
  1284  	X_SC_V6_LP64_OFF64                        = 105
  1285  	X_SC_V6_LPBIG_OFFBIG                      = 106
  1286  	X_SC_VERSION                              = 8
  1287  	X_SC_XBS5_ILP32_OFF32                     = 122
  1288  	X_SC_XBS5_ILP32_OFFBIG                    = 123
  1289  	X_SC_XBS5_LP64_OFF64                      = 124
  1290  	X_SC_XBS5_LPBIG_OFFBIG                    = 125
  1291  	X_SC_XOPEN_CRYPT                          = 108
  1292  	X_SC_XOPEN_ENH_I18N                       = 109
  1293  	X_SC_XOPEN_LEGACY                         = 110
  1294  	X_SC_XOPEN_REALTIME                       = 111
  1295  	X_SC_XOPEN_REALTIME_THREADS               = 112
  1296  	X_SC_XOPEN_SHM                            = 113
  1297  	X_SC_XOPEN_STREAMS                        = 114
  1298  	X_SC_XOPEN_UNIX                           = 115
  1299  	X_SC_XOPEN_VERSION                        = 116
  1300  	X_SC_XOPEN_XCU_VERSION                    = 121
  1301  	X_SECURE__COMMON_H_                       = 0
  1302  	X_SECURE__STDIO_H_                        = 0
  1303  	X_SECURE__STRINGS_H_                      = 0
  1304  	X_SECURE__STRING_H_                       = 0
  1305  	X_SIGSET_T                                = 0
  1306  	X_SIZE_T                                  = 0
  1307  	X_SQLITE3RTREE_H_                         = 0
  1308  	X_SSIZE_T                                 = 0
  1309  	X_STDARG_H                                = 0
  1310  	X_STDINT_H_                               = 0
  1311  	X_STDIO_H_                                = 0
  1312  	X_STDLIB_H_                               = 0
  1313  	X_STRINGS_H_                              = 0
  1314  	X_STRING_H_                               = 0
  1315  	X_SUSECONDS_T                             = 0
  1316  	X_SYS_ERRNO_H_                            = 0
  1317  	X_SYS_RESOURCE_H_                         = 0
  1318  	X_SYS_SELECT_H_                           = 0
  1319  	X_SYS_SIGNAL_H_                           = 0
  1320  	X_SYS_STDIO_H_                            = 0
  1321  	X_SYS_UNISTD_H_                           = 0
  1322  	X_SYS_WAIT_H_                             = 0
  1323  	X_SYS__ENDIAN_H_                          = 0
  1324  	X_SYS__PTHREAD_TYPES_H_                   = 0
  1325  	X_SYS__SELECT_H_                          = 0
  1326  	X_SYS__TYPES_H_                           = 0
  1327  	X_TIME_T                                  = 0
  1328  	X_UID_T                                   = 0
  1329  	X_UINT16_T                                = 0
  1330  	X_UINT32_T                                = 0
  1331  	X_UINT64_T                                = 0
  1332  	X_UINT8_T                                 = 0
  1333  	X_UINTMAX_T                               = 0
  1334  	X_UINTPTR_T                               = 0
  1335  	X_UNISTD_H_                               = 0
  1336  	X_USECONDS_T                              = 0
  1337  	X_USE_FORTIFY_LEVEL                       = 2
  1338  	X_UUID_T                                  = 0
  1339  	X_U_INT16_T                               = 0
  1340  	X_U_INT32_T                               = 0
  1341  	X_U_INT64_T                               = 0
  1342  	X_U_INT8_T                                = 0
  1343  	X_V6_ILP32_OFF32                          = -1
  1344  	X_V6_ILP32_OFFBIG                         = -1
  1345  	X_V6_LP64_OFF64                           = 1
  1346  	X_V6_LPBIG_OFFBIG                         = 1
  1347  	X_VA_LIST                                 = 0
  1348  	X_VA_LIST_                                = 0
  1349  	X_VA_LIST_DEFINED                         = 0
  1350  	X_VA_LIST_T                               = 0
  1351  	X_VA_LIST_T_H                             = 0
  1352  	X_WATTR_OK                                = 65536
  1353  	X_WCHAR_T                                 = 0
  1354  	X_WEXT_OK                                 = 262144
  1355  	X_WINT_T                                  = 0
  1356  	X_WPERM_OK                                = 1048576
  1357  	X_WRITE_OK                                = 1024
  1358  	X_WSTOPPED                                = 0177
  1359  	X_XBS5_ILP32_OFF32                        = -1
  1360  	X_XBS5_ILP32_OFFBIG                       = -1
  1361  	X_XBS5_LP64_OFF64                         = 1
  1362  	X_XBS5_LPBIG_OFFBIG                       = 1
  1363  	X_XOPEN_CRYPT                             = 1
  1364  	X_XOPEN_ENH_I18N                          = 1
  1365  	X_XOPEN_LEGACY                            = -1
  1366  	X_XOPEN_REALTIME                          = -1
  1367  	X_XOPEN_REALTIME_THREADS                  = -1
  1368  	X_XOPEN_SHM                               = 1
  1369  	X_XOPEN_STREAMS                           = -1
  1370  	X_XOPEN_UNIX                              = 1
  1371  	X_XOPEN_VERSION                           = 600
  1372  	X_XOPEN_XCU_VERSION                       = 4
  1373  )
  1374  
  1375  // Error codes
  1376  
  1377  // 11 was EAGAIN
  1378  
  1379  // math software
  1380  
  1381  // non-blocking and interrupt i/o
  1382  
  1383  // ipc/network software -- argument errors
  1384  
  1385  // ipc/network software -- operational errors
  1386  
  1387  // should be rearranged
  1388  
  1389  // quotas & mush
  1390  
  1391  // Network File System
  1392  
  1393  // Intelligent device errors
  1394  
  1395  // Program loading errors
  1396  
  1397  // This value is only discrete when compiling __DARWIN_UNIX03, or KERNEL
  1398  
  1399  // Copyright (c) 2000, 2002 - 2008 Apple Inc. All rights reserved.
  1400  //
  1401  // @APPLE_LICENSE_HEADER_START@
  1402  //
  1403  // This file contains Original Code and/or Modifications of Original Code
  1404  // as defined in and that are subject to the Apple Public Source License
  1405  // Version 2.0 (the 'License'). You may not use this file except in
  1406  // compliance with the License. Please obtain a copy of the License at
  1407  // http://www.opensource.apple.com/apsl/ and read it before using this
  1408  // file.
  1409  //
  1410  // The Original Code and all software distributed under the License are
  1411  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1412  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1413  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1414  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1415  // Please see the License for the specific language governing rights and
  1416  // limitations under the License.
  1417  //
  1418  // @APPLE_LICENSE_HEADER_END@
  1419  // -
  1420  // Copyright (c) 1990, 1993
  1421  //	The Regents of the University of California.  All rights reserved.
  1422  //
  1423  // Redistribution and use in source and binary forms, with or without
  1424  // modification, are permitted provided that the following conditions
  1425  // are met:
  1426  // 1. Redistributions of source code must retain the above copyright
  1427  //    notice, this list of conditions and the following disclaimer.
  1428  // 2. Redistributions in binary form must reproduce the above copyright
  1429  //    notice, this list of conditions and the following disclaimer in the
  1430  //    documentation and/or other materials provided with the distribution.
  1431  // 3. All advertising materials mentioning features or use of this software
  1432  //    must display the following acknowledgement:
  1433  //	This product includes software developed by the University of
  1434  //	California, Berkeley and its contributors.
  1435  // 4. Neither the name of the University nor the names of its contributors
  1436  //    may be used to endorse or promote products derived from this software
  1437  //    without specific prior written permission.
  1438  //
  1439  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1440  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1441  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1442  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1443  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1444  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1445  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1446  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1447  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1448  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1449  // SUCH DAMAGE.
  1450  //
  1451  //	@(#)stdlib.h	8.5 (Berkeley) 5/19/95
  1452  
  1453  // Copyright (c) 2007-2016 by Apple Inc.. All rights reserved.
  1454  //
  1455  // @APPLE_LICENSE_HEADER_START@
  1456  //
  1457  // This file contains Original Code and/or Modifications of Original Code
  1458  // as defined in and that are subject to the Apple Public Source License
  1459  // Version 2.0 (the 'License'). You may not use this file except in
  1460  // compliance with the License. Please obtain a copy of the License at
  1461  // http://www.opensource.apple.com/apsl/ and read it before using this
  1462  // file.
  1463  //
  1464  // The Original Code and all software distributed under the License are
  1465  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1466  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1467  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1468  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1469  // Please see the License for the specific language governing rights and
  1470  // limitations under the License.
  1471  //
  1472  // @APPLE_LICENSE_HEADER_END@
  1473  
  1474  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  1475  //
  1476  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1477  //
  1478  // This file contains Original Code and/or Modifications of Original Code
  1479  // as defined in and that are subject to the Apple Public Source License
  1480  // Version 2.0 (the 'License'). You may not use this file except in
  1481  // compliance with the License. The rights granted to you under the License
  1482  // may not be used to create, or enable the creation or redistribution of,
  1483  // unlawful or unlicensed copies of an Apple operating system, or to
  1484  // circumvent, violate, or enable the circumvention or violation of, any
  1485  // terms of an Apple operating system software license agreement.
  1486  //
  1487  // Please obtain a copy of the License at
  1488  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1489  //
  1490  // The Original Code and all software distributed under the License are
  1491  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1492  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1493  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1494  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1495  // Please see the License for the specific language governing rights and
  1496  // limitations under the License.
  1497  //
  1498  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1499  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  1500  // Copyright (c) 1991, 1993
  1501  //	The Regents of the University of California.  All rights reserved.
  1502  //
  1503  // This code is derived from software contributed to Berkeley by
  1504  // Berkeley Software Design, Inc.
  1505  //
  1506  // Redistribution and use in source and binary forms, with or without
  1507  // modification, are permitted provided that the following conditions
  1508  // are met:
  1509  // 1. Redistributions of source code must retain the above copyright
  1510  //    notice, this list of conditions and the following disclaimer.
  1511  // 2. Redistributions in binary form must reproduce the above copyright
  1512  //    notice, this list of conditions and the following disclaimer in the
  1513  //    documentation and/or other materials provided with the distribution.
  1514  // 3. All advertising materials mentioning features or use of this software
  1515  //    must display the following acknowledgement:
  1516  //	This product includes software developed by the University of
  1517  //	California, Berkeley and its contributors.
  1518  // 4. Neither the name of the University nor the names of its contributors
  1519  //    may be used to endorse or promote products derived from this software
  1520  //    without specific prior written permission.
  1521  //
  1522  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1523  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1524  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1525  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1526  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1527  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1528  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1529  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1530  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1531  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1532  // SUCH DAMAGE.
  1533  //
  1534  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  1535  
  1536  // Copyright (c) 2004, 2008, 2009 Apple Inc. All rights reserved.
  1537  //
  1538  // @APPLE_LICENSE_HEADER_START@
  1539  //
  1540  // This file contains Original Code and/or Modifications of Original Code
  1541  // as defined in and that are subject to the Apple Public Source License
  1542  // Version 2.0 (the 'License'). You may not use this file except in
  1543  // compliance with the License. Please obtain a copy of the License at
  1544  // http://www.opensource.apple.com/apsl/ and read it before using this
  1545  // file.
  1546  //
  1547  // The Original Code and all software distributed under the License are
  1548  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1549  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1550  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1551  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1552  // Please see the License for the specific language governing rights and
  1553  // limitations under the License.
  1554  //
  1555  // @APPLE_LICENSE_HEADER_END@
  1556  
  1557  // Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  1558  //
  1559  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1560  //
  1561  // This file contains Original Code and/or Modifications of Original Code
  1562  // as defined in and that are subject to the Apple Public Source License
  1563  // Version 2.0 (the 'License'). You may not use this file except in
  1564  // compliance with the License. The rights granted to you under the License
  1565  // may not be used to create, or enable the creation or redistribution of,
  1566  // unlawful or unlicensed copies of an Apple operating system, or to
  1567  // circumvent, violate, or enable the circumvention or violation of, any
  1568  // terms of an Apple operating system software license agreement.
  1569  //
  1570  // Please obtain a copy of the License at
  1571  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1572  //
  1573  // The Original Code and all software distributed under the License are
  1574  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1575  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1576  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1577  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1578  // Please see the License for the specific language governing rights and
  1579  // limitations under the License.
  1580  //
  1581  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1582  // Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
  1583  // Copyright (c) 1982, 1986, 1989, 1993, 1994
  1584  //	The Regents of the University of California.  All rights reserved.
  1585  //
  1586  // Redistribution and use in source and binary forms, with or without
  1587  // modification, are permitted provided that the following conditions
  1588  // are met:
  1589  // 1. Redistributions of source code must retain the above copyright
  1590  //    notice, this list of conditions and the following disclaimer.
  1591  // 2. Redistributions in binary form must reproduce the above copyright
  1592  //    notice, this list of conditions and the following disclaimer in the
  1593  //    documentation and/or other materials provided with the distribution.
  1594  // 3. All advertising materials mentioning features or use of this software
  1595  //    must display the following acknowledgement:
  1596  //	This product includes software developed by the University of
  1597  //	California, Berkeley and its contributors.
  1598  // 4. Neither the name of the University nor the names of its contributors
  1599  //    may be used to endorse or promote products derived from this software
  1600  //    without specific prior written permission.
  1601  //
  1602  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1603  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1604  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1605  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1606  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1607  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1608  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1609  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1610  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1611  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1612  // SUCH DAMAGE.
  1613  //
  1614  //	@(#)wait.h	8.2 (Berkeley) 7/10/94
  1615  
  1616  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  1617  //
  1618  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1619  //
  1620  // This file contains Original Code and/or Modifications of Original Code
  1621  // as defined in and that are subject to the Apple Public Source License
  1622  // Version 2.0 (the 'License'). You may not use this file except in
  1623  // compliance with the License. The rights granted to you under the License
  1624  // may not be used to create, or enable the creation or redistribution of,
  1625  // unlawful or unlicensed copies of an Apple operating system, or to
  1626  // circumvent, violate, or enable the circumvention or violation of, any
  1627  // terms of an Apple operating system software license agreement.
  1628  //
  1629  // Please obtain a copy of the License at
  1630  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1631  //
  1632  // The Original Code and all software distributed under the License are
  1633  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1634  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1635  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1636  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1637  // Please see the License for the specific language governing rights and
  1638  // limitations under the License.
  1639  //
  1640  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1641  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  1642  // Copyright (c) 1991, 1993
  1643  //	The Regents of the University of California.  All rights reserved.
  1644  //
  1645  // This code is derived from software contributed to Berkeley by
  1646  // Berkeley Software Design, Inc.
  1647  //
  1648  // Redistribution and use in source and binary forms, with or without
  1649  // modification, are permitted provided that the following conditions
  1650  // are met:
  1651  // 1. Redistributions of source code must retain the above copyright
  1652  //    notice, this list of conditions and the following disclaimer.
  1653  // 2. Redistributions in binary form must reproduce the above copyright
  1654  //    notice, this list of conditions and the following disclaimer in the
  1655  //    documentation and/or other materials provided with the distribution.
  1656  // 3. All advertising materials mentioning features or use of this software
  1657  //    must display the following acknowledgement:
  1658  //	This product includes software developed by the University of
  1659  //	California, Berkeley and its contributors.
  1660  // 4. Neither the name of the University nor the names of its contributors
  1661  //    may be used to endorse or promote products derived from this software
  1662  //    without specific prior written permission.
  1663  //
  1664  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1665  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1666  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1667  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1668  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1669  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1670  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1671  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1672  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1673  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1674  // SUCH DAMAGE.
  1675  //
  1676  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  1677  
  1678  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  1679  //
  1680  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1681  //
  1682  // This file contains Original Code and/or Modifications of Original Code
  1683  // as defined in and that are subject to the Apple Public Source License
  1684  // Version 2.0 (the 'License'). You may not use this file except in
  1685  // compliance with the License. The rights granted to you under the License
  1686  // may not be used to create, or enable the creation or redistribution of,
  1687  // unlawful or unlicensed copies of an Apple operating system, or to
  1688  // circumvent, violate, or enable the circumvention or violation of, any
  1689  // terms of an Apple operating system software license agreement.
  1690  //
  1691  // Please obtain a copy of the License at
  1692  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1693  //
  1694  // The Original Code and all software distributed under the License are
  1695  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1696  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1697  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1698  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1699  // Please see the License for the specific language governing rights and
  1700  // limitations under the License.
  1701  //
  1702  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1703  
  1704  // This file holds definitions relevent to the wait4 system call
  1705  // and the alternate interfaces that use it (wait, wait3, waitpid).
  1706  
  1707  // [XSI] The type idtype_t shall be defined as an enumeration type whose
  1708  // possible values shall include at least P_ALL, P_PID, and P_PGID.
  1709  const ( /* wait.h:79:1: */
  1710  	P_ALL  = 0
  1711  	P_PID  = 1
  1712  	P_PGID = 2
  1713  )
  1714  
  1715  type ptrdiff_t = int64 /* <builtin>:3:26 */
  1716  
  1717  type size_t = uint64 /* <builtin>:9:23 */
  1718  
  1719  type wchar_t = int32 /* <builtin>:15:24 */
  1720  
  1721  // Define the standard macros for the user,
  1722  //    if this invocation was from the user program.
  1723  
  1724  // Define va_list, if desired, from __gnuc_va_list.
  1725  // We deliberately do not define va_list when called from
  1726  //    stdio.h, because ANSI C says that stdio.h is not supposed to define
  1727  //    va_list.  stdio.h needs to have access to that data type,
  1728  //    but must not use that name.  It should use the name __gnuc_va_list,
  1729  //    which is safe because it is reserved for the implementation.
  1730  
  1731  // The macro _VA_LIST_ is the same thing used by this file in Ultrix.
  1732  //    But on BSD NET2 we must not test or define or undef it.
  1733  //    (Note that the comments in NET 2's ansi.h
  1734  //    are incorrect for _VA_LIST_--see stdio.h!)
  1735  // The macro _VA_LIST_DEFINED is used in Windows NT 3.5
  1736  // The macro _VA_LIST is used in SCO Unix 3.2.
  1737  // The macro _VA_LIST_T_H is used in the Bull dpx2
  1738  // The macro __va_list__ is used by BeOS.
  1739  type va_list = uintptr /* stdarg.h:99:24 */
  1740  
  1741  // CAPI3REF: 64-Bit Integer Types
  1742  // KEYWORDS: sqlite_int64 sqlite_uint64
  1743  //
  1744  // Because there is no cross-platform way to specify 64-bit integer types
  1745  // SQLite includes typedefs for 64-bit signed and unsigned integers.
  1746  //
  1747  // The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions.
  1748  // The sqlite_int64 and sqlite_uint64 types are supported for backwards
  1749  // compatibility only.
  1750  //
  1751  // ^The sqlite3_int64 and sqlite_int64 types can store integer values
  1752  // between -9223372036854775808 and +9223372036854775807 inclusive.  ^The
  1753  // sqlite3_uint64 and sqlite_uint64 types can store integer values
  1754  // between 0 and +18446744073709551615 inclusive.
  1755  type sqlite_int64 = int64           /* sqlite3.h:278:25 */
  1756  type sqlite_uint64 = uint64         /* sqlite3.h:279:34 */
  1757  type sqlite3_int64 = sqlite_int64   /* sqlite3.h:281:22 */
  1758  type sqlite3_uint64 = sqlite_uint64 /* sqlite3.h:282:23 */
  1759  
  1760  // The type for a callback function.
  1761  // This is legacy and deprecated.  It is included for historical
  1762  // compatibility and is not documented.
  1763  type sqlite3_callback = uintptr /* sqlite3.h:338:13 */
  1764  
  1765  // CAPI3REF: Result Codes
  1766  // KEYWORDS: {result code definitions}
  1767  //
  1768  // Many SQLite functions return an integer result code from the set shown
  1769  // here in order to indicate success or failure.
  1770  //
  1771  // New error codes may be added in future versions of SQLite.
  1772  //
  1773  // See also: [extended result code definitions]
  1774  // beginning-of-error-codes
  1775  // end-of-error-codes
  1776  
  1777  // CAPI3REF: Extended Result Codes
  1778  // KEYWORDS: {extended result code definitions}
  1779  //
  1780  // In its default configuration, SQLite API routines return one of 30 integer
  1781  // [result codes].  However, experience has shown that many of
  1782  // these result codes are too coarse-grained.  They do not provide as
  1783  // much information about problems as programmers might like.  In an effort to
  1784  // address this, newer versions of SQLite (version 3.3.8 [dateof:3.3.8]
  1785  // and later) include
  1786  // support for additional result codes that provide more detailed information
  1787  // about errors. These [extended result codes] are enabled or disabled
  1788  // on a per database connection basis using the
  1789  // [sqlite3_extended_result_codes()] API.  Or, the extended code for
  1790  // the most recent error can be obtained using
  1791  // [sqlite3_extended_errcode()].
  1792  
  1793  // CAPI3REF: Flags For File Open Operations
  1794  //
  1795  // These bit values are intended for use in the
  1796  // 3rd parameter to the [sqlite3_open_v2()] interface and
  1797  // in the 4th parameter to the [sqlite3_vfs.xOpen] method.
  1798  
  1799  // Reserved:                         0x00F00000
  1800  // Legacy compatibility:
  1801  
  1802  // CAPI3REF: Device Characteristics
  1803  //
  1804  // The xDeviceCharacteristics method of the [sqlite3_io_methods]
  1805  // object returns an integer which is a vector of these
  1806  // bit values expressing I/O characteristics of the mass storage
  1807  // device that holds the file that the [sqlite3_io_methods]
  1808  // refers to.
  1809  //
  1810  // The SQLITE_IOCAP_ATOMIC property means that all writes of
  1811  // any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values
  1812  // mean that writes of blocks that are nnn bytes in size and
  1813  // are aligned to an address which is an integer multiple of
  1814  // nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means
  1815  // that when data is appended to a file, the data is appended
  1816  // first then the size of the file is extended, never the other
  1817  // way around.  The SQLITE_IOCAP_SEQUENTIAL property means that
  1818  // information is written to disk in the same order as calls
  1819  // to xWrite().  The SQLITE_IOCAP_POWERSAFE_OVERWRITE property means that
  1820  // after reboot following a crash or power loss, the only bytes in a
  1821  // file that were written at the application level might have changed
  1822  // and that adjacent bytes, even bytes within the same sector are
  1823  // guaranteed to be unchanged.  The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
  1824  // flag indicates that a file cannot be deleted when open.  The
  1825  // SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on
  1826  // read-only media and cannot be changed even by processes with
  1827  // elevated privileges.
  1828  //
  1829  // The SQLITE_IOCAP_BATCH_ATOMIC property means that the underlying
  1830  // filesystem supports doing multiple write operations atomically when those
  1831  // write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and
  1832  // [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].
  1833  
  1834  // CAPI3REF: File Locking Levels
  1835  //
  1836  // SQLite uses one of these integer values as the second
  1837  // argument to calls it makes to the xLock() and xUnlock() methods
  1838  // of an [sqlite3_io_methods] object.
  1839  
  1840  // CAPI3REF: Synchronization Type Flags
  1841  //
  1842  // When SQLite invokes the xSync() method of an
  1843  // [sqlite3_io_methods] object it uses a combination of
  1844  // these integer values as the second argument.
  1845  //
  1846  // When the SQLITE_SYNC_DATAONLY flag is used, it means that the
  1847  // sync operation only needs to flush data to mass storage.  Inode
  1848  // information need not be flushed. If the lower four bits of the flag
  1849  // equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics.
  1850  // If the lower four bits equal SQLITE_SYNC_FULL, that means
  1851  // to use Mac OS X style fullsync instead of fsync().
  1852  //
  1853  // Do not confuse the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags
  1854  // with the [PRAGMA synchronous]=NORMAL and [PRAGMA synchronous]=FULL
  1855  // settings.  The [synchronous pragma] determines when calls to the
  1856  // xSync VFS method occur and applies uniformly across all platforms.
  1857  // The SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags determine how
  1858  // energetic or rigorous or forceful the sync operations are and
  1859  // only make a difference on Mac OSX for the default SQLite code.
  1860  // (Third-party VFS implementations might also make the distinction
  1861  // between SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL, but among the
  1862  // operating systems natively supported by SQLite, only Mac OSX
  1863  // cares about the difference.)
  1864  
  1865  // CAPI3REF: OS Interface Open File Handle
  1866  //
  1867  // An [sqlite3_file] object represents an open file in the
  1868  // [sqlite3_vfs | OS interface layer].  Individual OS interface
  1869  // implementations will
  1870  // want to subclass this object by appending additional fields
  1871  // for their own use.  The pMethods entry is a pointer to an
  1872  // [sqlite3_io_methods] object that defines methods for performing
  1873  // I/O operations on the open file.
  1874  type sqlite3_file1 = struct{ pMethods uintptr } /* sqlite3.h:684:9 */
  1875  
  1876  // CAPI3REF: Result Codes
  1877  // KEYWORDS: {result code definitions}
  1878  //
  1879  // Many SQLite functions return an integer result code from the set shown
  1880  // here in order to indicate success or failure.
  1881  //
  1882  // New error codes may be added in future versions of SQLite.
  1883  //
  1884  // See also: [extended result code definitions]
  1885  // beginning-of-error-codes
  1886  // end-of-error-codes
  1887  
  1888  // CAPI3REF: Extended Result Codes
  1889  // KEYWORDS: {extended result code definitions}
  1890  //
  1891  // In its default configuration, SQLite API routines return one of 30 integer
  1892  // [result codes].  However, experience has shown that many of
  1893  // these result codes are too coarse-grained.  They do not provide as
  1894  // much information about problems as programmers might like.  In an effort to
  1895  // address this, newer versions of SQLite (version 3.3.8 [dateof:3.3.8]
  1896  // and later) include
  1897  // support for additional result codes that provide more detailed information
  1898  // about errors. These [extended result codes] are enabled or disabled
  1899  // on a per database connection basis using the
  1900  // [sqlite3_extended_result_codes()] API.  Or, the extended code for
  1901  // the most recent error can be obtained using
  1902  // [sqlite3_extended_errcode()].
  1903  
  1904  // CAPI3REF: Flags For File Open Operations
  1905  //
  1906  // These bit values are intended for use in the
  1907  // 3rd parameter to the [sqlite3_open_v2()] interface and
  1908  // in the 4th parameter to the [sqlite3_vfs.xOpen] method.
  1909  
  1910  // Reserved:                         0x00F00000
  1911  // Legacy compatibility:
  1912  
  1913  // CAPI3REF: Device Characteristics
  1914  //
  1915  // The xDeviceCharacteristics method of the [sqlite3_io_methods]
  1916  // object returns an integer which is a vector of these
  1917  // bit values expressing I/O characteristics of the mass storage
  1918  // device that holds the file that the [sqlite3_io_methods]
  1919  // refers to.
  1920  //
  1921  // The SQLITE_IOCAP_ATOMIC property means that all writes of
  1922  // any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values
  1923  // mean that writes of blocks that are nnn bytes in size and
  1924  // are aligned to an address which is an integer multiple of
  1925  // nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means
  1926  // that when data is appended to a file, the data is appended
  1927  // first then the size of the file is extended, never the other
  1928  // way around.  The SQLITE_IOCAP_SEQUENTIAL property means that
  1929  // information is written to disk in the same order as calls
  1930  // to xWrite().  The SQLITE_IOCAP_POWERSAFE_OVERWRITE property means that
  1931  // after reboot following a crash or power loss, the only bytes in a
  1932  // file that were written at the application level might have changed
  1933  // and that adjacent bytes, even bytes within the same sector are
  1934  // guaranteed to be unchanged.  The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
  1935  // flag indicates that a file cannot be deleted when open.  The
  1936  // SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on
  1937  // read-only media and cannot be changed even by processes with
  1938  // elevated privileges.
  1939  //
  1940  // The SQLITE_IOCAP_BATCH_ATOMIC property means that the underlying
  1941  // filesystem supports doing multiple write operations atomically when those
  1942  // write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and
  1943  // [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].
  1944  
  1945  // CAPI3REF: File Locking Levels
  1946  //
  1947  // SQLite uses one of these integer values as the second
  1948  // argument to calls it makes to the xLock() and xUnlock() methods
  1949  // of an [sqlite3_io_methods] object.
  1950  
  1951  // CAPI3REF: Synchronization Type Flags
  1952  //
  1953  // When SQLite invokes the xSync() method of an
  1954  // [sqlite3_io_methods] object it uses a combination of
  1955  // these integer values as the second argument.
  1956  //
  1957  // When the SQLITE_SYNC_DATAONLY flag is used, it means that the
  1958  // sync operation only needs to flush data to mass storage.  Inode
  1959  // information need not be flushed. If the lower four bits of the flag
  1960  // equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics.
  1961  // If the lower four bits equal SQLITE_SYNC_FULL, that means
  1962  // to use Mac OS X style fullsync instead of fsync().
  1963  //
  1964  // Do not confuse the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags
  1965  // with the [PRAGMA synchronous]=NORMAL and [PRAGMA synchronous]=FULL
  1966  // settings.  The [synchronous pragma] determines when calls to the
  1967  // xSync VFS method occur and applies uniformly across all platforms.
  1968  // The SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags determine how
  1969  // energetic or rigorous or forceful the sync operations are and
  1970  // only make a difference on Mac OSX for the default SQLite code.
  1971  // (Third-party VFS implementations might also make the distinction
  1972  // between SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL, but among the
  1973  // operating systems natively supported by SQLite, only Mac OSX
  1974  // cares about the difference.)
  1975  
  1976  // CAPI3REF: OS Interface Open File Handle
  1977  //
  1978  // An [sqlite3_file] object represents an open file in the
  1979  // [sqlite3_vfs | OS interface layer].  Individual OS interface
  1980  // implementations will
  1981  // want to subclass this object by appending additional fields
  1982  // for their own use.  The pMethods entry is a pointer to an
  1983  // [sqlite3_io_methods] object that defines methods for performing
  1984  // I/O operations on the open file.
  1985  type sqlite3_file = sqlite3_file1 /* sqlite3.h:684:29 */
  1986  type sqlite3_io_methods1 = struct {
  1987  	iVersion               int32
  1988  	_                      [4]byte
  1989  	xClose                 uintptr
  1990  	xRead                  uintptr
  1991  	xWrite                 uintptr
  1992  	xTruncate              uintptr
  1993  	xSync                  uintptr
  1994  	xFileSize              uintptr
  1995  	xLock                  uintptr
  1996  	xUnlock                uintptr
  1997  	xCheckReservedLock     uintptr
  1998  	xFileControl           uintptr
  1999  	xSectorSize            uintptr
  2000  	xDeviceCharacteristics uintptr
  2001  	xShmMap                uintptr
  2002  	xShmLock               uintptr
  2003  	xShmBarrier            uintptr
  2004  	xShmUnmap              uintptr
  2005  	xFetch                 uintptr
  2006  	xUnfetch               uintptr
  2007  } /* sqlite3.h:684:9 */
  2008  
  2009  // CAPI3REF: OS Interface File Virtual Methods Object
  2010  //
  2011  // Every file opened by the [sqlite3_vfs.xOpen] method populates an
  2012  // [sqlite3_file] object (or, more commonly, a subclass of the
  2013  // [sqlite3_file] object) with a pointer to an instance of this object.
  2014  // This object defines the methods used to perform various operations
  2015  // against the open file represented by the [sqlite3_file] object.
  2016  //
  2017  // If the [sqlite3_vfs.xOpen] method sets the sqlite3_file.pMethods element
  2018  // to a non-NULL pointer, then the sqlite3_io_methods.xClose method
  2019  // may be invoked even if the [sqlite3_vfs.xOpen] reported that it failed.  The
  2020  // only way to prevent a call to xClose following a failed [sqlite3_vfs.xOpen]
  2021  // is for the [sqlite3_vfs.xOpen] to set the sqlite3_file.pMethods element
  2022  // to NULL.
  2023  //
  2024  // The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or
  2025  // [SQLITE_SYNC_FULL].  The first choice is the normal fsync().
  2026  // The second choice is a Mac OS X style fullsync.  The [SQLITE_SYNC_DATAONLY]
  2027  // flag may be ORed in to indicate that only the data of the file
  2028  // and not its inode needs to be synced.
  2029  //
  2030  // The integer values to xLock() and xUnlock() are one of
  2031  // <ul>
  2032  // <li> [SQLITE_LOCK_NONE],
  2033  // <li> [SQLITE_LOCK_SHARED],
  2034  // <li> [SQLITE_LOCK_RESERVED],
  2035  // <li> [SQLITE_LOCK_PENDING], or
  2036  // <li> [SQLITE_LOCK_EXCLUSIVE].
  2037  // </ul>
  2038  // xLock() increases the lock. xUnlock() decreases the lock.
  2039  // The xCheckReservedLock() method checks whether any database connection,
  2040  // either in this process or in some other process, is holding a RESERVED,
  2041  // PENDING, or EXCLUSIVE lock on the file.  It returns true
  2042  // if such a lock exists and false otherwise.
  2043  //
  2044  // The xFileControl() method is a generic interface that allows custom
  2045  // VFS implementations to directly control an open file using the
  2046  // [sqlite3_file_control()] interface.  The second "op" argument is an
  2047  // integer opcode.  The third argument is a generic pointer intended to
  2048  // point to a structure that may contain arguments or space in which to
  2049  // write return values.  Potential uses for xFileControl() might be
  2050  // functions to enable blocking locks with timeouts, to change the
  2051  // locking strategy (for example to use dot-file locks), to inquire
  2052  // about the status of a lock, or to break stale locks.  The SQLite
  2053  // core reserves all opcodes less than 100 for its own use.
  2054  // A [file control opcodes | list of opcodes] less than 100 is available.
  2055  // Applications that define a custom xFileControl method should use opcodes
  2056  // greater than 100 to avoid conflicts.  VFS implementations should
  2057  // return [SQLITE_NOTFOUND] for file control opcodes that they do not
  2058  // recognize.
  2059  //
  2060  // The xSectorSize() method returns the sector size of the
  2061  // device that underlies the file.  The sector size is the
  2062  // minimum write that can be performed without disturbing
  2063  // other bytes in the file.  The xDeviceCharacteristics()
  2064  // method returns a bit vector describing behaviors of the
  2065  // underlying device:
  2066  //
  2067  // <ul>
  2068  // <li> [SQLITE_IOCAP_ATOMIC]
  2069  // <li> [SQLITE_IOCAP_ATOMIC512]
  2070  // <li> [SQLITE_IOCAP_ATOMIC1K]
  2071  // <li> [SQLITE_IOCAP_ATOMIC2K]
  2072  // <li> [SQLITE_IOCAP_ATOMIC4K]
  2073  // <li> [SQLITE_IOCAP_ATOMIC8K]
  2074  // <li> [SQLITE_IOCAP_ATOMIC16K]
  2075  // <li> [SQLITE_IOCAP_ATOMIC32K]
  2076  // <li> [SQLITE_IOCAP_ATOMIC64K]
  2077  // <li> [SQLITE_IOCAP_SAFE_APPEND]
  2078  // <li> [SQLITE_IOCAP_SEQUENTIAL]
  2079  // <li> [SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN]
  2080  // <li> [SQLITE_IOCAP_POWERSAFE_OVERWRITE]
  2081  // <li> [SQLITE_IOCAP_IMMUTABLE]
  2082  // <li> [SQLITE_IOCAP_BATCH_ATOMIC]
  2083  // </ul>
  2084  //
  2085  // The SQLITE_IOCAP_ATOMIC property means that all writes of
  2086  // any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values
  2087  // mean that writes of blocks that are nnn bytes in size and
  2088  // are aligned to an address which is an integer multiple of
  2089  // nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means
  2090  // that when data is appended to a file, the data is appended
  2091  // first then the size of the file is extended, never the other
  2092  // way around.  The SQLITE_IOCAP_SEQUENTIAL property means that
  2093  // information is written to disk in the same order as calls
  2094  // to xWrite().
  2095  //
  2096  // If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill
  2097  // in the unread portions of the buffer with zeros.  A VFS that
  2098  // fails to zero-fill short reads might seem to work.  However,
  2099  // failure to zero-fill short reads will eventually lead to
  2100  // database corruption.
  2101  type sqlite3_io_methods = sqlite3_io_methods1 /* sqlite3.h:783:35 */
  2102  
  2103  // CAPI3REF: OS Interface Object
  2104  //
  2105  // An instance of the sqlite3_vfs object defines the interface between
  2106  // the SQLite core and the underlying operating system.  The "vfs"
  2107  // in the name of the object stands for "virtual file system".  See
  2108  // the [VFS | VFS documentation] for further information.
  2109  //
  2110  // The VFS interface is sometimes extended by adding new methods onto
  2111  // the end.  Each time such an extension occurs, the iVersion field
  2112  // is incremented.  The iVersion value started out as 1 in
  2113  // SQLite [version 3.5.0] on [dateof:3.5.0], then increased to 2
  2114  // with SQLite [version 3.7.0] on [dateof:3.7.0], and then increased
  2115  // to 3 with SQLite [version 3.7.6] on [dateof:3.7.6].  Additional fields
  2116  // may be appended to the sqlite3_vfs object and the iVersion value
  2117  // may increase again in future versions of SQLite.
  2118  // Note that due to an oversight, the structure
  2119  // of the sqlite3_vfs object changed in the transition from
  2120  // SQLite [version 3.5.9] to [version 3.6.0] on [dateof:3.6.0]
  2121  // and yet the iVersion field was not increased.
  2122  //
  2123  // The szOsFile field is the size of the subclassed [sqlite3_file]
  2124  // structure used by this VFS.  mxPathname is the maximum length of
  2125  // a pathname in this VFS.
  2126  //
  2127  // Registered sqlite3_vfs objects are kept on a linked list formed by
  2128  // the pNext pointer.  The [sqlite3_vfs_register()]
  2129  // and [sqlite3_vfs_unregister()] interfaces manage this list
  2130  // in a thread-safe way.  The [sqlite3_vfs_find()] interface
  2131  // searches the list.  Neither the application code nor the VFS
  2132  // implementation should use the pNext pointer.
  2133  //
  2134  // The pNext field is the only field in the sqlite3_vfs
  2135  // structure that SQLite will ever modify.  SQLite will only access
  2136  // or modify this field while holding a particular static mutex.
  2137  // The application should never modify anything within the sqlite3_vfs
  2138  // object once the object has been registered.
  2139  //
  2140  // The zName field holds the name of the VFS module.  The name must
  2141  // be unique across all VFS modules.
  2142  //
  2143  // [[sqlite3_vfs.xOpen]]
  2144  // ^SQLite guarantees that the zFilename parameter to xOpen
  2145  // is either a NULL pointer or string obtained
  2146  // from xFullPathname() with an optional suffix added.
  2147  // ^If a suffix is added to the zFilename parameter, it will
  2148  // consist of a single "-" character followed by no more than
  2149  // 11 alphanumeric and/or "-" characters.
  2150  // ^SQLite further guarantees that
  2151  // the string will be valid and unchanged until xClose() is
  2152  // called. Because of the previous sentence,
  2153  // the [sqlite3_file] can safely store a pointer to the
  2154  // filename if it needs to remember the filename for some reason.
  2155  // If the zFilename parameter to xOpen is a NULL pointer then xOpen
  2156  // must invent its own temporary name for the file.  ^Whenever the
  2157  // xFilename parameter is NULL it will also be the case that the
  2158  // flags parameter will include [SQLITE_OPEN_DELETEONCLOSE].
  2159  //
  2160  // The flags argument to xOpen() includes all bits set in
  2161  // the flags argument to [sqlite3_open_v2()].  Or if [sqlite3_open()]
  2162  // or [sqlite3_open16()] is used, then flags includes at least
  2163  // [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE].
  2164  // If xOpen() opens a file read-only then it sets *pOutFlags to
  2165  // include [SQLITE_OPEN_READONLY].  Other bits in *pOutFlags may be set.
  2166  //
  2167  // ^(SQLite will also add one of the following flags to the xOpen()
  2168  // call, depending on the object being opened:
  2169  //
  2170  // <ul>
  2171  // <li>  [SQLITE_OPEN_MAIN_DB]
  2172  // <li>  [SQLITE_OPEN_MAIN_JOURNAL]
  2173  // <li>  [SQLITE_OPEN_TEMP_DB]
  2174  // <li>  [SQLITE_OPEN_TEMP_JOURNAL]
  2175  // <li>  [SQLITE_OPEN_TRANSIENT_DB]
  2176  // <li>  [SQLITE_OPEN_SUBJOURNAL]
  2177  // <li>  [SQLITE_OPEN_SUPER_JOURNAL]
  2178  // <li>  [SQLITE_OPEN_WAL]
  2179  // </ul>)^
  2180  //
  2181  // The file I/O implementation can use the object type flags to
  2182  // change the way it deals with files.  For example, an application
  2183  // that does not care about crash recovery or rollback might make
  2184  // the open of a journal file a no-op.  Writes to this journal would
  2185  // also be no-ops, and any attempt to read the journal would return
  2186  // SQLITE_IOERR.  Or the implementation might recognize that a database
  2187  // file will be doing page-aligned sector reads and writes in a random
  2188  // order and set up its I/O subsystem accordingly.
  2189  //
  2190  // SQLite might also add one of the following flags to the xOpen method:
  2191  //
  2192  // <ul>
  2193  // <li> [SQLITE_OPEN_DELETEONCLOSE]
  2194  // <li> [SQLITE_OPEN_EXCLUSIVE]
  2195  // </ul>
  2196  //
  2197  // The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be
  2198  // deleted when it is closed.  ^The [SQLITE_OPEN_DELETEONCLOSE]
  2199  // will be set for TEMP databases and their journals, transient
  2200  // databases, and subjournals.
  2201  //
  2202  // ^The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction
  2203  // with the [SQLITE_OPEN_CREATE] flag, which are both directly
  2204  // analogous to the O_EXCL and O_CREAT flags of the POSIX open()
  2205  // API.  The SQLITE_OPEN_EXCLUSIVE flag, when paired with the
  2206  // SQLITE_OPEN_CREATE, is used to indicate that file should always
  2207  // be created, and that it is an error if it already exists.
  2208  // It is <i>not</i> used to indicate the file should be opened
  2209  // for exclusive access.
  2210  //
  2211  // ^At least szOsFile bytes of memory are allocated by SQLite
  2212  // to hold the [sqlite3_file] structure passed as the third
  2213  // argument to xOpen.  The xOpen method does not have to
  2214  // allocate the structure; it should just fill it in.  Note that
  2215  // the xOpen method must set the sqlite3_file.pMethods to either
  2216  // a valid [sqlite3_io_methods] object or to NULL.  xOpen must do
  2217  // this even if the open fails.  SQLite expects that the sqlite3_file.pMethods
  2218  // element will be valid after xOpen returns regardless of the success
  2219  // or failure of the xOpen call.
  2220  //
  2221  // [[sqlite3_vfs.xAccess]]
  2222  // ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS]
  2223  // to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to
  2224  // test whether a file is readable and writable, or [SQLITE_ACCESS_READ]
  2225  // to test whether a file is at least readable.  The SQLITE_ACCESS_READ
  2226  // flag is never actually used and is not implemented in the built-in
  2227  // VFSes of SQLite.  The file is named by the second argument and can be a
  2228  // directory. The xAccess method returns [SQLITE_OK] on success or some
  2229  // non-zero error code if there is an I/O error or if the name of
  2230  // the file given in the second argument is illegal.  If SQLITE_OK
  2231  // is returned, then non-zero or zero is written into *pResOut to indicate
  2232  // whether or not the file is accessible.
  2233  //
  2234  // ^SQLite will always allocate at least mxPathname+1 bytes for the
  2235  // output buffer xFullPathname.  The exact size of the output buffer
  2236  // is also passed as a parameter to both  methods. If the output buffer
  2237  // is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is
  2238  // handled as a fatal error by SQLite, vfs implementations should endeavor
  2239  // to prevent this by setting mxPathname to a sufficiently large value.
  2240  //
  2241  // The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64()
  2242  // interfaces are not strictly a part of the filesystem, but they are
  2243  // included in the VFS structure for completeness.
  2244  // The xRandomness() function attempts to return nBytes bytes
  2245  // of good-quality randomness into zOut.  The return value is
  2246  // the actual number of bytes of randomness obtained.
  2247  // The xSleep() method causes the calling thread to sleep for at
  2248  // least the number of microseconds given.  ^The xCurrentTime()
  2249  // method returns a Julian Day Number for the current date and time as
  2250  // a floating point value.
  2251  // ^The xCurrentTimeInt64() method returns, as an integer, the Julian
  2252  // Day Number multiplied by 86400000 (the number of milliseconds in
  2253  // a 24-hour day).
  2254  // ^SQLite will use the xCurrentTimeInt64() method to get the current
  2255  // date and time if that method is available (if iVersion is 2 or
  2256  // greater and the function pointer is not NULL) and will fall back
  2257  // to xCurrentTime() if xCurrentTimeInt64() is unavailable.
  2258  //
  2259  // ^The xSetSystemCall(), xGetSystemCall(), and xNestSystemCall() interfaces
  2260  // are not used by the SQLite core.  These optional interfaces are provided
  2261  // by some VFSes to facilitate testing of the VFS code. By overriding
  2262  // system calls with functions under its control, a test program can
  2263  // simulate faults and error conditions that would otherwise be difficult
  2264  // or impossible to induce.  The set of system calls that can be overridden
  2265  // varies from one VFS to another, and from one version of the same VFS to the
  2266  // next.  Applications that use these interfaces must be prepared for any
  2267  // or all of these interfaces to be NULL or for their behavior to change
  2268  // from one release to the next.  Applications must not attempt to access
  2269  // any of these methods if the iVersion of the VFS is less than 3.
  2270  type sqlite3_vfs1 = struct {
  2271  	iVersion          int32
  2272  	szOsFile          int32
  2273  	mxPathname        int32
  2274  	_                 [4]byte
  2275  	pNext             uintptr
  2276  	zName             uintptr
  2277  	pAppData          uintptr
  2278  	xOpen             uintptr
  2279  	xDelete           uintptr
  2280  	xAccess           uintptr
  2281  	xFullPathname     uintptr
  2282  	xDlOpen           uintptr
  2283  	xDlError          uintptr
  2284  	xDlSym            uintptr
  2285  	xDlClose          uintptr
  2286  	xRandomness       uintptr
  2287  	xSleep            uintptr
  2288  	xCurrentTime      uintptr
  2289  	xGetLastError     uintptr
  2290  	xCurrentTimeInt64 uintptr
  2291  	xSetSystemCall    uintptr
  2292  	xGetSystemCall    uintptr
  2293  	xNextSystemCall   uintptr
  2294  } /* sqlite3.h:1387:9 */
  2295  
  2296  // CAPI3REF: OS Interface Object
  2297  //
  2298  // An instance of the sqlite3_vfs object defines the interface between
  2299  // the SQLite core and the underlying operating system.  The "vfs"
  2300  // in the name of the object stands for "virtual file system".  See
  2301  // the [VFS | VFS documentation] for further information.
  2302  //
  2303  // The VFS interface is sometimes extended by adding new methods onto
  2304  // the end.  Each time such an extension occurs, the iVersion field
  2305  // is incremented.  The iVersion value started out as 1 in
  2306  // SQLite [version 3.5.0] on [dateof:3.5.0], then increased to 2
  2307  // with SQLite [version 3.7.0] on [dateof:3.7.0], and then increased
  2308  // to 3 with SQLite [version 3.7.6] on [dateof:3.7.6].  Additional fields
  2309  // may be appended to the sqlite3_vfs object and the iVersion value
  2310  // may increase again in future versions of SQLite.
  2311  // Note that due to an oversight, the structure
  2312  // of the sqlite3_vfs object changed in the transition from
  2313  // SQLite [version 3.5.9] to [version 3.6.0] on [dateof:3.6.0]
  2314  // and yet the iVersion field was not increased.
  2315  //
  2316  // The szOsFile field is the size of the subclassed [sqlite3_file]
  2317  // structure used by this VFS.  mxPathname is the maximum length of
  2318  // a pathname in this VFS.
  2319  //
  2320  // Registered sqlite3_vfs objects are kept on a linked list formed by
  2321  // the pNext pointer.  The [sqlite3_vfs_register()]
  2322  // and [sqlite3_vfs_unregister()] interfaces manage this list
  2323  // in a thread-safe way.  The [sqlite3_vfs_find()] interface
  2324  // searches the list.  Neither the application code nor the VFS
  2325  // implementation should use the pNext pointer.
  2326  //
  2327  // The pNext field is the only field in the sqlite3_vfs
  2328  // structure that SQLite will ever modify.  SQLite will only access
  2329  // or modify this field while holding a particular static mutex.
  2330  // The application should never modify anything within the sqlite3_vfs
  2331  // object once the object has been registered.
  2332  //
  2333  // The zName field holds the name of the VFS module.  The name must
  2334  // be unique across all VFS modules.
  2335  //
  2336  // [[sqlite3_vfs.xOpen]]
  2337  // ^SQLite guarantees that the zFilename parameter to xOpen
  2338  // is either a NULL pointer or string obtained
  2339  // from xFullPathname() with an optional suffix added.
  2340  // ^If a suffix is added to the zFilename parameter, it will
  2341  // consist of a single "-" character followed by no more than
  2342  // 11 alphanumeric and/or "-" characters.
  2343  // ^SQLite further guarantees that
  2344  // the string will be valid and unchanged until xClose() is
  2345  // called. Because of the previous sentence,
  2346  // the [sqlite3_file] can safely store a pointer to the
  2347  // filename if it needs to remember the filename for some reason.
  2348  // If the zFilename parameter to xOpen is a NULL pointer then xOpen
  2349  // must invent its own temporary name for the file.  ^Whenever the
  2350  // xFilename parameter is NULL it will also be the case that the
  2351  // flags parameter will include [SQLITE_OPEN_DELETEONCLOSE].
  2352  //
  2353  // The flags argument to xOpen() includes all bits set in
  2354  // the flags argument to [sqlite3_open_v2()].  Or if [sqlite3_open()]
  2355  // or [sqlite3_open16()] is used, then flags includes at least
  2356  // [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE].
  2357  // If xOpen() opens a file read-only then it sets *pOutFlags to
  2358  // include [SQLITE_OPEN_READONLY].  Other bits in *pOutFlags may be set.
  2359  //
  2360  // ^(SQLite will also add one of the following flags to the xOpen()
  2361  // call, depending on the object being opened:
  2362  //
  2363  // <ul>
  2364  // <li>  [SQLITE_OPEN_MAIN_DB]
  2365  // <li>  [SQLITE_OPEN_MAIN_JOURNAL]
  2366  // <li>  [SQLITE_OPEN_TEMP_DB]
  2367  // <li>  [SQLITE_OPEN_TEMP_JOURNAL]
  2368  // <li>  [SQLITE_OPEN_TRANSIENT_DB]
  2369  // <li>  [SQLITE_OPEN_SUBJOURNAL]
  2370  // <li>  [SQLITE_OPEN_SUPER_JOURNAL]
  2371  // <li>  [SQLITE_OPEN_WAL]
  2372  // </ul>)^
  2373  //
  2374  // The file I/O implementation can use the object type flags to
  2375  // change the way it deals with files.  For example, an application
  2376  // that does not care about crash recovery or rollback might make
  2377  // the open of a journal file a no-op.  Writes to this journal would
  2378  // also be no-ops, and any attempt to read the journal would return
  2379  // SQLITE_IOERR.  Or the implementation might recognize that a database
  2380  // file will be doing page-aligned sector reads and writes in a random
  2381  // order and set up its I/O subsystem accordingly.
  2382  //
  2383  // SQLite might also add one of the following flags to the xOpen method:
  2384  //
  2385  // <ul>
  2386  // <li> [SQLITE_OPEN_DELETEONCLOSE]
  2387  // <li> [SQLITE_OPEN_EXCLUSIVE]
  2388  // </ul>
  2389  //
  2390  // The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be
  2391  // deleted when it is closed.  ^The [SQLITE_OPEN_DELETEONCLOSE]
  2392  // will be set for TEMP databases and their journals, transient
  2393  // databases, and subjournals.
  2394  //
  2395  // ^The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction
  2396  // with the [SQLITE_OPEN_CREATE] flag, which are both directly
  2397  // analogous to the O_EXCL and O_CREAT flags of the POSIX open()
  2398  // API.  The SQLITE_OPEN_EXCLUSIVE flag, when paired with the
  2399  // SQLITE_OPEN_CREATE, is used to indicate that file should always
  2400  // be created, and that it is an error if it already exists.
  2401  // It is <i>not</i> used to indicate the file should be opened
  2402  // for exclusive access.
  2403  //
  2404  // ^At least szOsFile bytes of memory are allocated by SQLite
  2405  // to hold the [sqlite3_file] structure passed as the third
  2406  // argument to xOpen.  The xOpen method does not have to
  2407  // allocate the structure; it should just fill it in.  Note that
  2408  // the xOpen method must set the sqlite3_file.pMethods to either
  2409  // a valid [sqlite3_io_methods] object or to NULL.  xOpen must do
  2410  // this even if the open fails.  SQLite expects that the sqlite3_file.pMethods
  2411  // element will be valid after xOpen returns regardless of the success
  2412  // or failure of the xOpen call.
  2413  //
  2414  // [[sqlite3_vfs.xAccess]]
  2415  // ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS]
  2416  // to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to
  2417  // test whether a file is readable and writable, or [SQLITE_ACCESS_READ]
  2418  // to test whether a file is at least readable.  The SQLITE_ACCESS_READ
  2419  // flag is never actually used and is not implemented in the built-in
  2420  // VFSes of SQLite.  The file is named by the second argument and can be a
  2421  // directory. The xAccess method returns [SQLITE_OK] on success or some
  2422  // non-zero error code if there is an I/O error or if the name of
  2423  // the file given in the second argument is illegal.  If SQLITE_OK
  2424  // is returned, then non-zero or zero is written into *pResOut to indicate
  2425  // whether or not the file is accessible.
  2426  //
  2427  // ^SQLite will always allocate at least mxPathname+1 bytes for the
  2428  // output buffer xFullPathname.  The exact size of the output buffer
  2429  // is also passed as a parameter to both  methods. If the output buffer
  2430  // is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is
  2431  // handled as a fatal error by SQLite, vfs implementations should endeavor
  2432  // to prevent this by setting mxPathname to a sufficiently large value.
  2433  //
  2434  // The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64()
  2435  // interfaces are not strictly a part of the filesystem, but they are
  2436  // included in the VFS structure for completeness.
  2437  // The xRandomness() function attempts to return nBytes bytes
  2438  // of good-quality randomness into zOut.  The return value is
  2439  // the actual number of bytes of randomness obtained.
  2440  // The xSleep() method causes the calling thread to sleep for at
  2441  // least the number of microseconds given.  ^The xCurrentTime()
  2442  // method returns a Julian Day Number for the current date and time as
  2443  // a floating point value.
  2444  // ^The xCurrentTimeInt64() method returns, as an integer, the Julian
  2445  // Day Number multiplied by 86400000 (the number of milliseconds in
  2446  // a 24-hour day).
  2447  // ^SQLite will use the xCurrentTimeInt64() method to get the current
  2448  // date and time if that method is available (if iVersion is 2 or
  2449  // greater and the function pointer is not NULL) and will fall back
  2450  // to xCurrentTime() if xCurrentTimeInt64() is unavailable.
  2451  //
  2452  // ^The xSetSystemCall(), xGetSystemCall(), and xNestSystemCall() interfaces
  2453  // are not used by the SQLite core.  These optional interfaces are provided
  2454  // by some VFSes to facilitate testing of the VFS code. By overriding
  2455  // system calls with functions under its control, a test program can
  2456  // simulate faults and error conditions that would otherwise be difficult
  2457  // or impossible to induce.  The set of system calls that can be overridden
  2458  // varies from one VFS to another, and from one version of the same VFS to the
  2459  // next.  Applications that use these interfaces must be prepared for any
  2460  // or all of these interfaces to be NULL or for their behavior to change
  2461  // from one release to the next.  Applications must not attempt to access
  2462  // any of these methods if the iVersion of the VFS is less than 3.
  2463  type sqlite3_vfs = sqlite3_vfs1    /* sqlite3.h:1387:28 */
  2464  type sqlite3_syscall_ptr = uintptr /* sqlite3.h:1388:14 */
  2465  
  2466  // CAPI3REF: Memory Allocation Routines
  2467  //
  2468  // An instance of this object defines the interface between SQLite
  2469  // and low-level memory allocation routines.
  2470  //
  2471  // This object is used in only one place in the SQLite interface.
  2472  // A pointer to an instance of this object is the argument to
  2473  // [sqlite3_config()] when the configuration option is
  2474  // [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC].
  2475  // By creating an instance of this object
  2476  // and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC])
  2477  // during configuration, an application can specify an alternative
  2478  // memory allocation subsystem for SQLite to use for all of its
  2479  // dynamic memory needs.
  2480  //
  2481  // Note that SQLite comes with several [built-in memory allocators]
  2482  // that are perfectly adequate for the overwhelming majority of applications
  2483  // and that this object is only useful to a tiny minority of applications
  2484  // with specialized memory allocation requirements.  This object is
  2485  // also used during testing of SQLite in order to specify an alternative
  2486  // memory allocator that simulates memory out-of-memory conditions in
  2487  // order to verify that SQLite recovers gracefully from such
  2488  // conditions.
  2489  //
  2490  // The xMalloc, xRealloc, and xFree methods must work like the
  2491  // malloc(), realloc() and free() functions from the standard C library.
  2492  // ^SQLite guarantees that the second argument to
  2493  // xRealloc is always a value returned by a prior call to xRoundup.
  2494  //
  2495  // xSize should return the allocated size of a memory allocation
  2496  // previously obtained from xMalloc or xRealloc.  The allocated size
  2497  // is always at least as big as the requested size but may be larger.
  2498  //
  2499  // The xRoundup method returns what would be the allocated size of
  2500  // a memory allocation given a particular requested size.  Most memory
  2501  // allocators round up memory allocations at least to the next multiple
  2502  // of 8.  Some allocators round up to a larger multiple or to a power of 2.
  2503  // Every memory allocation request coming in through [sqlite3_malloc()]
  2504  // or [sqlite3_realloc()] first calls xRoundup.  If xRoundup returns 0,
  2505  // that causes the corresponding memory allocation to fail.
  2506  //
  2507  // The xInit method initializes the memory allocator.  For example,
  2508  // it might allocate any required mutexes or initialize internal data
  2509  // structures.  The xShutdown method is invoked (indirectly) by
  2510  // [sqlite3_shutdown()] and should deallocate any resources acquired
  2511  // by xInit.  The pAppData pointer is used as the only parameter to
  2512  // xInit and xShutdown.
  2513  //
  2514  // SQLite holds the [SQLITE_MUTEX_STATIC_MAIN] mutex when it invokes
  2515  // the xInit method, so the xInit method need not be threadsafe.  The
  2516  // xShutdown method is only called from [sqlite3_shutdown()] so it does
  2517  // not need to be threadsafe either.  For all other methods, SQLite
  2518  // holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the
  2519  // [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which
  2520  // it is by default) and so the methods are automatically serialized.
  2521  // However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other
  2522  // methods must be threadsafe or else make their own arrangements for
  2523  // serialization.
  2524  //
  2525  // SQLite will never invoke xInit() more than once without an intervening
  2526  // call to xShutdown().
  2527  type sqlite3_mem_methods1 = struct {
  2528  	xMalloc   uintptr
  2529  	xFree     uintptr
  2530  	xRealloc  uintptr
  2531  	xSize     uintptr
  2532  	xRoundup  uintptr
  2533  	xInit     uintptr
  2534  	xShutdown uintptr
  2535  	pAppData  uintptr
  2536  } /* sqlite3.h:1685:9 */
  2537  
  2538  // CAPI3REF: Memory Allocation Routines
  2539  //
  2540  // An instance of this object defines the interface between SQLite
  2541  // and low-level memory allocation routines.
  2542  //
  2543  // This object is used in only one place in the SQLite interface.
  2544  // A pointer to an instance of this object is the argument to
  2545  // [sqlite3_config()] when the configuration option is
  2546  // [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC].
  2547  // By creating an instance of this object
  2548  // and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC])
  2549  // during configuration, an application can specify an alternative
  2550  // memory allocation subsystem for SQLite to use for all of its
  2551  // dynamic memory needs.
  2552  //
  2553  // Note that SQLite comes with several [built-in memory allocators]
  2554  // that are perfectly adequate for the overwhelming majority of applications
  2555  // and that this object is only useful to a tiny minority of applications
  2556  // with specialized memory allocation requirements.  This object is
  2557  // also used during testing of SQLite in order to specify an alternative
  2558  // memory allocator that simulates memory out-of-memory conditions in
  2559  // order to verify that SQLite recovers gracefully from such
  2560  // conditions.
  2561  //
  2562  // The xMalloc, xRealloc, and xFree methods must work like the
  2563  // malloc(), realloc() and free() functions from the standard C library.
  2564  // ^SQLite guarantees that the second argument to
  2565  // xRealloc is always a value returned by a prior call to xRoundup.
  2566  //
  2567  // xSize should return the allocated size of a memory allocation
  2568  // previously obtained from xMalloc or xRealloc.  The allocated size
  2569  // is always at least as big as the requested size but may be larger.
  2570  //
  2571  // The xRoundup method returns what would be the allocated size of
  2572  // a memory allocation given a particular requested size.  Most memory
  2573  // allocators round up memory allocations at least to the next multiple
  2574  // of 8.  Some allocators round up to a larger multiple or to a power of 2.
  2575  // Every memory allocation request coming in through [sqlite3_malloc()]
  2576  // or [sqlite3_realloc()] first calls xRoundup.  If xRoundup returns 0,
  2577  // that causes the corresponding memory allocation to fail.
  2578  //
  2579  // The xInit method initializes the memory allocator.  For example,
  2580  // it might allocate any required mutexes or initialize internal data
  2581  // structures.  The xShutdown method is invoked (indirectly) by
  2582  // [sqlite3_shutdown()] and should deallocate any resources acquired
  2583  // by xInit.  The pAppData pointer is used as the only parameter to
  2584  // xInit and xShutdown.
  2585  //
  2586  // SQLite holds the [SQLITE_MUTEX_STATIC_MAIN] mutex when it invokes
  2587  // the xInit method, so the xInit method need not be threadsafe.  The
  2588  // xShutdown method is only called from [sqlite3_shutdown()] so it does
  2589  // not need to be threadsafe either.  For all other methods, SQLite
  2590  // holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the
  2591  // [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which
  2592  // it is by default) and so the methods are automatically serialized.
  2593  // However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other
  2594  // methods must be threadsafe or else make their own arrangements for
  2595  // serialization.
  2596  //
  2597  // SQLite will never invoke xInit() more than once without an intervening
  2598  // call to xShutdown().
  2599  type sqlite3_mem_methods = sqlite3_mem_methods1 /* sqlite3.h:1685:36 */
  2600  
  2601  // CAPI3REF: Constants Defining Special Destructor Behavior
  2602  //
  2603  // These are special values for the destructor that is passed in as the
  2604  // final argument to routines like [sqlite3_result_blob()].  ^If the destructor
  2605  // argument is SQLITE_STATIC, it means that the content pointer is constant
  2606  // and will never change.  It does not need to be destroyed.  ^The
  2607  // SQLITE_TRANSIENT value means that the content will likely change in
  2608  // the near future and that SQLite should make its own private copy of
  2609  // the content before returning.
  2610  //
  2611  // The typedef is necessary to work around problems in certain
  2612  // C++ compilers.
  2613  type sqlite3_destructor_type = uintptr /* sqlite3.h:5665:14 */
  2614  
  2615  // The interface to the virtual-table mechanism is currently considered
  2616  // to be experimental.  The interface might change in incompatible ways.
  2617  // If this is a problem for you, do not use the interface at this time.
  2618  //
  2619  // When the virtual-table mechanism stabilizes, we will declare the
  2620  // interface fixed, support it indefinitely, and remove this comment.
  2621  
  2622  // Structures used by the virtual table interface
  2623  type sqlite3_vtab1 = struct {
  2624  	pModule uintptr
  2625  	nRef    int32
  2626  	_       [4]byte
  2627  	zErrMsg uintptr
  2628  } /* sqlite3.h:6784:9 */
  2629  
  2630  // The interface to the virtual-table mechanism is currently considered
  2631  // to be experimental.  The interface might change in incompatible ways.
  2632  // If this is a problem for you, do not use the interface at this time.
  2633  //
  2634  // When the virtual-table mechanism stabilizes, we will declare the
  2635  // interface fixed, support it indefinitely, and remove this comment.
  2636  
  2637  // Structures used by the virtual table interface
  2638  type sqlite3_vtab = sqlite3_vtab1 /* sqlite3.h:6784:29 */
  2639  type sqlite3_index_info1 = struct {
  2640  	nConstraint      int32
  2641  	_                [4]byte
  2642  	aConstraint      uintptr
  2643  	nOrderBy         int32
  2644  	_                [4]byte
  2645  	aOrderBy         uintptr
  2646  	aConstraintUsage uintptr
  2647  	idxNum           int32
  2648  	_                [4]byte
  2649  	idxStr           uintptr
  2650  	needToFreeIdxStr int32
  2651  	orderByConsumed  int32
  2652  	estimatedCost    float64
  2653  	estimatedRows    sqlite3_int64
  2654  	idxFlags         int32
  2655  	_                [4]byte
  2656  	colUsed          sqlite3_uint64
  2657  } /* sqlite3.h:6785:9 */
  2658  
  2659  type sqlite3_index_info = sqlite3_index_info1       /* sqlite3.h:6785:35 */
  2660  type sqlite3_vtab_cursor1 = struct{ pVtab uintptr } /* sqlite3.h:6786:9 */
  2661  
  2662  type sqlite3_vtab_cursor = sqlite3_vtab_cursor1 /* sqlite3.h:6786:36 */
  2663  type sqlite3_module1 = struct {
  2664  	iVersion      int32
  2665  	_             [4]byte
  2666  	xCreate       uintptr
  2667  	xConnect      uintptr
  2668  	xBestIndex    uintptr
  2669  	xDisconnect   uintptr
  2670  	xDestroy      uintptr
  2671  	xOpen         uintptr
  2672  	xClose        uintptr
  2673  	xFilter       uintptr
  2674  	xNext         uintptr
  2675  	xEof          uintptr
  2676  	xColumn       uintptr
  2677  	xRowid        uintptr
  2678  	xUpdate       uintptr
  2679  	xBegin        uintptr
  2680  	xSync         uintptr
  2681  	xCommit       uintptr
  2682  	xRollback     uintptr
  2683  	xFindFunction uintptr
  2684  	xRename       uintptr
  2685  	xSavepoint    uintptr
  2686  	xRelease      uintptr
  2687  	xRollbackTo   uintptr
  2688  	xShadowName   uintptr
  2689  } /* sqlite3.h:6784:9 */
  2690  
  2691  type sqlite3_module = sqlite3_module1 /* sqlite3.h:6787:31 */
  2692  
  2693  // CAPI3REF: Virtual Table Indexing Information
  2694  // KEYWORDS: sqlite3_index_info
  2695  //
  2696  // The sqlite3_index_info structure and its substructures is used as part
  2697  // of the [virtual table] interface to
  2698  // pass information into and receive the reply from the [xBestIndex]
  2699  // method of a [virtual table module].  The fields under **Inputs** are the
  2700  // inputs to xBestIndex and are read-only.  xBestIndex inserts its
  2701  // results into the **Outputs** fields.
  2702  //
  2703  // ^(The aConstraint[] array records WHERE clause constraints of the form:
  2704  //
  2705  // <blockquote>column OP expr</blockquote>
  2706  //
  2707  // where OP is =, &lt;, &lt;=, &gt;, or &gt;=.)^  ^(The particular operator is
  2708  // stored in aConstraint[].op using one of the
  2709  // [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^
  2710  // ^(The index of the column is stored in
  2711  // aConstraint[].iColumn.)^  ^(aConstraint[].usable is TRUE if the
  2712  // expr on the right-hand side can be evaluated (and thus the constraint
  2713  // is usable) and false if it cannot.)^
  2714  //
  2715  // ^The optimizer automatically inverts terms of the form "expr OP column"
  2716  // and makes other simplifications to the WHERE clause in an attempt to
  2717  // get as many WHERE clause terms into the form shown above as possible.
  2718  // ^The aConstraint[] array only reports WHERE clause terms that are
  2719  // relevant to the particular virtual table being queried.
  2720  //
  2721  // ^Information about the ORDER BY clause is stored in aOrderBy[].
  2722  // ^Each term of aOrderBy records a column of the ORDER BY clause.
  2723  //
  2724  // The colUsed field indicates which columns of the virtual table may be
  2725  // required by the current scan. Virtual table columns are numbered from
  2726  // zero in the order in which they appear within the CREATE TABLE statement
  2727  // passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62),
  2728  // the corresponding bit is set within the colUsed mask if the column may be
  2729  // required by SQLite. If the table has at least 64 columns and any column
  2730  // to the right of the first 63 is required, then bit 63 of colUsed is also
  2731  // set. In other words, column iCol may be required if the expression
  2732  // (colUsed & ((sqlite3_uint64)1 << (iCol>=63 ? 63 : iCol))) evaluates to
  2733  // non-zero.
  2734  //
  2735  // The [xBestIndex] method must fill aConstraintUsage[] with information
  2736  // about what parameters to pass to xFilter.  ^If argvIndex>0 then
  2737  // the right-hand side of the corresponding aConstraint[] is evaluated
  2738  // and becomes the argvIndex-th entry in argv.  ^(If aConstraintUsage[].omit
  2739  // is true, then the constraint is assumed to be fully handled by the
  2740  // virtual table and might not be checked again by the byte code.)^ ^(The
  2741  // aConstraintUsage[].omit flag is an optimization hint. When the omit flag
  2742  // is left in its default setting of false, the constraint will always be
  2743  // checked separately in byte code.  If the omit flag is change to true, then
  2744  // the constraint may or may not be checked in byte code.  In other words,
  2745  // when the omit flag is true there is no guarantee that the constraint will
  2746  // not be checked again using byte code.)^
  2747  //
  2748  // ^The idxNum and idxPtr values are recorded and passed into the
  2749  // [xFilter] method.
  2750  // ^[sqlite3_free()] is used to free idxPtr if and only if
  2751  // needToFreeIdxPtr is true.
  2752  //
  2753  // ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in
  2754  // the correct order to satisfy the ORDER BY clause so that no separate
  2755  // sorting step is required.
  2756  //
  2757  // ^The estimatedCost value is an estimate of the cost of a particular
  2758  // strategy. A cost of N indicates that the cost of the strategy is similar
  2759  // to a linear scan of an SQLite table with N rows. A cost of log(N)
  2760  // indicates that the expense of the operation is similar to that of a
  2761  // binary search on a unique indexed field of an SQLite table with N rows.
  2762  //
  2763  // ^The estimatedRows value is an estimate of the number of rows that
  2764  // will be returned by the strategy.
  2765  //
  2766  // The xBestIndex method may optionally populate the idxFlags field with a
  2767  // mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag -
  2768  // SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite
  2769  // assumes that the strategy may visit at most one row.
  2770  //
  2771  // Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then
  2772  // SQLite also assumes that if a call to the xUpdate() method is made as
  2773  // part of the same statement to delete or update a virtual table row and the
  2774  // implementation returns SQLITE_CONSTRAINT, then there is no need to rollback
  2775  // any database changes. In other words, if the xUpdate() returns
  2776  // SQLITE_CONSTRAINT, the database contents must be exactly as they were
  2777  // before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not
  2778  // set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by
  2779  // the xUpdate method are automatically rolled back by SQLite.
  2780  //
  2781  // IMPORTANT: The estimatedRows field was added to the sqlite3_index_info
  2782  // structure for SQLite [version 3.8.2] ([dateof:3.8.2]).
  2783  // If a virtual table extension is
  2784  // used with an SQLite version earlier than 3.8.2, the results of attempting
  2785  // to read or write the estimatedRows field are undefined (but are likely
  2786  // to include crashing the application). The estimatedRows field should
  2787  // therefore only be used if [sqlite3_libversion_number()] returns a
  2788  // value greater than or equal to 3008002. Similarly, the idxFlags field
  2789  // was added for [version 3.9.0] ([dateof:3.9.0]).
  2790  // It may therefore only be used if
  2791  // sqlite3_libversion_number() returns a value greater than or equal to
  2792  // 3009000.
  2793  type sqlite3_index_constraint = struct {
  2794  	iColumn     int32
  2795  	op          uint8
  2796  	usable      uint8
  2797  	_           [2]byte
  2798  	iTermOffset int32
  2799  } /* sqlite3.h:6785:9 */
  2800  
  2801  // CAPI3REF: Virtual Table Indexing Information
  2802  // KEYWORDS: sqlite3_index_info
  2803  //
  2804  // The sqlite3_index_info structure and its substructures is used as part
  2805  // of the [virtual table] interface to
  2806  // pass information into and receive the reply from the [xBestIndex]
  2807  // method of a [virtual table module].  The fields under **Inputs** are the
  2808  // inputs to xBestIndex and are read-only.  xBestIndex inserts its
  2809  // results into the **Outputs** fields.
  2810  //
  2811  // ^(The aConstraint[] array records WHERE clause constraints of the form:
  2812  //
  2813  // <blockquote>column OP expr</blockquote>
  2814  //
  2815  // where OP is =, &lt;, &lt;=, &gt;, or &gt;=.)^  ^(The particular operator is
  2816  // stored in aConstraint[].op using one of the
  2817  // [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^
  2818  // ^(The index of the column is stored in
  2819  // aConstraint[].iColumn.)^  ^(aConstraint[].usable is TRUE if the
  2820  // expr on the right-hand side can be evaluated (and thus the constraint
  2821  // is usable) and false if it cannot.)^
  2822  //
  2823  // ^The optimizer automatically inverts terms of the form "expr OP column"
  2824  // and makes other simplifications to the WHERE clause in an attempt to
  2825  // get as many WHERE clause terms into the form shown above as possible.
  2826  // ^The aConstraint[] array only reports WHERE clause terms that are
  2827  // relevant to the particular virtual table being queried.
  2828  //
  2829  // ^Information about the ORDER BY clause is stored in aOrderBy[].
  2830  // ^Each term of aOrderBy records a column of the ORDER BY clause.
  2831  //
  2832  // The colUsed field indicates which columns of the virtual table may be
  2833  // required by the current scan. Virtual table columns are numbered from
  2834  // zero in the order in which they appear within the CREATE TABLE statement
  2835  // passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62),
  2836  // the corresponding bit is set within the colUsed mask if the column may be
  2837  // required by SQLite. If the table has at least 64 columns and any column
  2838  // to the right of the first 63 is required, then bit 63 of colUsed is also
  2839  // set. In other words, column iCol may be required if the expression
  2840  // (colUsed & ((sqlite3_uint64)1 << (iCol>=63 ? 63 : iCol))) evaluates to
  2841  // non-zero.
  2842  //
  2843  // The [xBestIndex] method must fill aConstraintUsage[] with information
  2844  // about what parameters to pass to xFilter.  ^If argvIndex>0 then
  2845  // the right-hand side of the corresponding aConstraint[] is evaluated
  2846  // and becomes the argvIndex-th entry in argv.  ^(If aConstraintUsage[].omit
  2847  // is true, then the constraint is assumed to be fully handled by the
  2848  // virtual table and might not be checked again by the byte code.)^ ^(The
  2849  // aConstraintUsage[].omit flag is an optimization hint. When the omit flag
  2850  // is left in its default setting of false, the constraint will always be
  2851  // checked separately in byte code.  If the omit flag is change to true, then
  2852  // the constraint may or may not be checked in byte code.  In other words,
  2853  // when the omit flag is true there is no guarantee that the constraint will
  2854  // not be checked again using byte code.)^
  2855  //
  2856  // ^The idxNum and idxPtr values are recorded and passed into the
  2857  // [xFilter] method.
  2858  // ^[sqlite3_free()] is used to free idxPtr if and only if
  2859  // needToFreeIdxPtr is true.
  2860  //
  2861  // ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in
  2862  // the correct order to satisfy the ORDER BY clause so that no separate
  2863  // sorting step is required.
  2864  //
  2865  // ^The estimatedCost value is an estimate of the cost of a particular
  2866  // strategy. A cost of N indicates that the cost of the strategy is similar
  2867  // to a linear scan of an SQLite table with N rows. A cost of log(N)
  2868  // indicates that the expense of the operation is similar to that of a
  2869  // binary search on a unique indexed field of an SQLite table with N rows.
  2870  //
  2871  // ^The estimatedRows value is an estimate of the number of rows that
  2872  // will be returned by the strategy.
  2873  //
  2874  // The xBestIndex method may optionally populate the idxFlags field with a
  2875  // mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag -
  2876  // SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite
  2877  // assumes that the strategy may visit at most one row.
  2878  //
  2879  // Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then
  2880  // SQLite also assumes that if a call to the xUpdate() method is made as
  2881  // part of the same statement to delete or update a virtual table row and the
  2882  // implementation returns SQLITE_CONSTRAINT, then there is no need to rollback
  2883  // any database changes. In other words, if the xUpdate() returns
  2884  // SQLITE_CONSTRAINT, the database contents must be exactly as they were
  2885  // before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not
  2886  // set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by
  2887  // the xUpdate method are automatically rolled back by SQLite.
  2888  //
  2889  // IMPORTANT: The estimatedRows field was added to the sqlite3_index_info
  2890  // structure for SQLite [version 3.8.2] ([dateof:3.8.2]).
  2891  // If a virtual table extension is
  2892  // used with an SQLite version earlier than 3.8.2, the results of attempting
  2893  // to read or write the estimatedRows field are undefined (but are likely
  2894  // to include crashing the application). The estimatedRows field should
  2895  // therefore only be used if [sqlite3_libversion_number()] returns a
  2896  // value greater than or equal to 3008002. Similarly, the idxFlags field
  2897  // was added for [version 3.9.0] ([dateof:3.9.0]).
  2898  // It may therefore only be used if
  2899  // sqlite3_libversion_number() returns a value greater than or equal to
  2900  // 3009000.
  2901  type sqlite3_index_orderby = struct {
  2902  	iColumn int32
  2903  	desc    uint8
  2904  	_       [3]byte
  2905  } /* sqlite3.h:6785:9 */
  2906  
  2907  // CAPI3REF: Virtual Table Indexing Information
  2908  // KEYWORDS: sqlite3_index_info
  2909  //
  2910  // The sqlite3_index_info structure and its substructures is used as part
  2911  // of the [virtual table] interface to
  2912  // pass information into and receive the reply from the [xBestIndex]
  2913  // method of a [virtual table module].  The fields under **Inputs** are the
  2914  // inputs to xBestIndex and are read-only.  xBestIndex inserts its
  2915  // results into the **Outputs** fields.
  2916  //
  2917  // ^(The aConstraint[] array records WHERE clause constraints of the form:
  2918  //
  2919  // <blockquote>column OP expr</blockquote>
  2920  //
  2921  // where OP is =, &lt;, &lt;=, &gt;, or &gt;=.)^  ^(The particular operator is
  2922  // stored in aConstraint[].op using one of the
  2923  // [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^
  2924  // ^(The index of the column is stored in
  2925  // aConstraint[].iColumn.)^  ^(aConstraint[].usable is TRUE if the
  2926  // expr on the right-hand side can be evaluated (and thus the constraint
  2927  // is usable) and false if it cannot.)^
  2928  //
  2929  // ^The optimizer automatically inverts terms of the form "expr OP column"
  2930  // and makes other simplifications to the WHERE clause in an attempt to
  2931  // get as many WHERE clause terms into the form shown above as possible.
  2932  // ^The aConstraint[] array only reports WHERE clause terms that are
  2933  // relevant to the particular virtual table being queried.
  2934  //
  2935  // ^Information about the ORDER BY clause is stored in aOrderBy[].
  2936  // ^Each term of aOrderBy records a column of the ORDER BY clause.
  2937  //
  2938  // The colUsed field indicates which columns of the virtual table may be
  2939  // required by the current scan. Virtual table columns are numbered from
  2940  // zero in the order in which they appear within the CREATE TABLE statement
  2941  // passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62),
  2942  // the corresponding bit is set within the colUsed mask if the column may be
  2943  // required by SQLite. If the table has at least 64 columns and any column
  2944  // to the right of the first 63 is required, then bit 63 of colUsed is also
  2945  // set. In other words, column iCol may be required if the expression
  2946  // (colUsed & ((sqlite3_uint64)1 << (iCol>=63 ? 63 : iCol))) evaluates to
  2947  // non-zero.
  2948  //
  2949  // The [xBestIndex] method must fill aConstraintUsage[] with information
  2950  // about what parameters to pass to xFilter.  ^If argvIndex>0 then
  2951  // the right-hand side of the corresponding aConstraint[] is evaluated
  2952  // and becomes the argvIndex-th entry in argv.  ^(If aConstraintUsage[].omit
  2953  // is true, then the constraint is assumed to be fully handled by the
  2954  // virtual table and might not be checked again by the byte code.)^ ^(The
  2955  // aConstraintUsage[].omit flag is an optimization hint. When the omit flag
  2956  // is left in its default setting of false, the constraint will always be
  2957  // checked separately in byte code.  If the omit flag is change to true, then
  2958  // the constraint may or may not be checked in byte code.  In other words,
  2959  // when the omit flag is true there is no guarantee that the constraint will
  2960  // not be checked again using byte code.)^
  2961  //
  2962  // ^The idxNum and idxPtr values are recorded and passed into the
  2963  // [xFilter] method.
  2964  // ^[sqlite3_free()] is used to free idxPtr if and only if
  2965  // needToFreeIdxPtr is true.
  2966  //
  2967  // ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in
  2968  // the correct order to satisfy the ORDER BY clause so that no separate
  2969  // sorting step is required.
  2970  //
  2971  // ^The estimatedCost value is an estimate of the cost of a particular
  2972  // strategy. A cost of N indicates that the cost of the strategy is similar
  2973  // to a linear scan of an SQLite table with N rows. A cost of log(N)
  2974  // indicates that the expense of the operation is similar to that of a
  2975  // binary search on a unique indexed field of an SQLite table with N rows.
  2976  //
  2977  // ^The estimatedRows value is an estimate of the number of rows that
  2978  // will be returned by the strategy.
  2979  //
  2980  // The xBestIndex method may optionally populate the idxFlags field with a
  2981  // mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag -
  2982  // SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite
  2983  // assumes that the strategy may visit at most one row.
  2984  //
  2985  // Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then
  2986  // SQLite also assumes that if a call to the xUpdate() method is made as
  2987  // part of the same statement to delete or update a virtual table row and the
  2988  // implementation returns SQLITE_CONSTRAINT, then there is no need to rollback
  2989  // any database changes. In other words, if the xUpdate() returns
  2990  // SQLITE_CONSTRAINT, the database contents must be exactly as they were
  2991  // before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not
  2992  // set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by
  2993  // the xUpdate method are automatically rolled back by SQLite.
  2994  //
  2995  // IMPORTANT: The estimatedRows field was added to the sqlite3_index_info
  2996  // structure for SQLite [version 3.8.2] ([dateof:3.8.2]).
  2997  // If a virtual table extension is
  2998  // used with an SQLite version earlier than 3.8.2, the results of attempting
  2999  // to read or write the estimatedRows field are undefined (but are likely
  3000  // to include crashing the application). The estimatedRows field should
  3001  // therefore only be used if [sqlite3_libversion_number()] returns a
  3002  // value greater than or equal to 3008002. Similarly, the idxFlags field
  3003  // was added for [version 3.9.0] ([dateof:3.9.0]).
  3004  // It may therefore only be used if
  3005  // sqlite3_libversion_number() returns a value greater than or equal to
  3006  // 3009000.
  3007  type sqlite3_index_constraint_usage = struct {
  3008  	argvIndex int32
  3009  	omit      uint8
  3010  	_         [3]byte
  3011  } /* sqlite3.h:6785:9 */
  3012  
  3013  // CAPI3REF: Mutex Methods Object
  3014  //
  3015  // An instance of this structure defines the low-level routines
  3016  // used to allocate and use mutexes.
  3017  //
  3018  // Usually, the default mutex implementations provided by SQLite are
  3019  // sufficient, however the application has the option of substituting a custom
  3020  // implementation for specialized deployments or systems for which SQLite
  3021  // does not provide a suitable implementation. In this case, the application
  3022  // creates and populates an instance of this structure to pass
  3023  // to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option.
  3024  // Additionally, an instance of this structure can be used as an
  3025  // output variable when querying the system for the current mutex
  3026  // implementation, using the [SQLITE_CONFIG_GETMUTEX] option.
  3027  //
  3028  // ^The xMutexInit method defined by this structure is invoked as
  3029  // part of system initialization by the sqlite3_initialize() function.
  3030  // ^The xMutexInit routine is called by SQLite exactly once for each
  3031  // effective call to [sqlite3_initialize()].
  3032  //
  3033  // ^The xMutexEnd method defined by this structure is invoked as
  3034  // part of system shutdown by the sqlite3_shutdown() function. The
  3035  // implementation of this method is expected to release all outstanding
  3036  // resources obtained by the mutex methods implementation, especially
  3037  // those obtained by the xMutexInit method.  ^The xMutexEnd()
  3038  // interface is invoked exactly once for each call to [sqlite3_shutdown()].
  3039  //
  3040  // ^(The remaining seven methods defined by this structure (xMutexAlloc,
  3041  // xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and
  3042  // xMutexNotheld) implement the following interfaces (respectively):
  3043  //
  3044  // <ul>
  3045  //   <li>  [sqlite3_mutex_alloc()] </li>
  3046  //   <li>  [sqlite3_mutex_free()] </li>
  3047  //   <li>  [sqlite3_mutex_enter()] </li>
  3048  //   <li>  [sqlite3_mutex_try()] </li>
  3049  //   <li>  [sqlite3_mutex_leave()] </li>
  3050  //   <li>  [sqlite3_mutex_held()] </li>
  3051  //   <li>  [sqlite3_mutex_notheld()] </li>
  3052  // </ul>)^
  3053  //
  3054  // The only difference is that the public sqlite3_XXX functions enumerated
  3055  // above silently ignore any invocations that pass a NULL pointer instead
  3056  // of a valid mutex handle. The implementations of the methods defined
  3057  // by this structure are not required to handle this case. The results
  3058  // of passing a NULL pointer instead of a valid mutex handle are undefined
  3059  // (i.e. it is acceptable to provide an implementation that segfaults if
  3060  // it is passed a NULL pointer).
  3061  //
  3062  // The xMutexInit() method must be threadsafe.  It must be harmless to
  3063  // invoke xMutexInit() multiple times within the same process and without
  3064  // intervening calls to xMutexEnd().  Second and subsequent calls to
  3065  // xMutexInit() must be no-ops.
  3066  //
  3067  // xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()]
  3068  // and its associates).  Similarly, xMutexAlloc() must not use SQLite memory
  3069  // allocation for a static mutex.  ^However xMutexAlloc() may use SQLite
  3070  // memory allocation for a fast or recursive mutex.
  3071  //
  3072  // ^SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is
  3073  // called, but only if the prior call to xMutexInit returned SQLITE_OK.
  3074  // If xMutexInit fails in any way, it is expected to clean up after itself
  3075  // prior to returning.
  3076  type sqlite3_mutex_methods1 = struct {
  3077  	xMutexInit    uintptr
  3078  	xMutexEnd     uintptr
  3079  	xMutexAlloc   uintptr
  3080  	xMutexFree    uintptr
  3081  	xMutexEnter   uintptr
  3082  	xMutexTry     uintptr
  3083  	xMutexLeave   uintptr
  3084  	xMutexHeld    uintptr
  3085  	xMutexNotheld uintptr
  3086  } /* sqlite3.h:7619:9 */
  3087  
  3088  // CAPI3REF: Mutex Methods Object
  3089  //
  3090  // An instance of this structure defines the low-level routines
  3091  // used to allocate and use mutexes.
  3092  //
  3093  // Usually, the default mutex implementations provided by SQLite are
  3094  // sufficient, however the application has the option of substituting a custom
  3095  // implementation for specialized deployments or systems for which SQLite
  3096  // does not provide a suitable implementation. In this case, the application
  3097  // creates and populates an instance of this structure to pass
  3098  // to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option.
  3099  // Additionally, an instance of this structure can be used as an
  3100  // output variable when querying the system for the current mutex
  3101  // implementation, using the [SQLITE_CONFIG_GETMUTEX] option.
  3102  //
  3103  // ^The xMutexInit method defined by this structure is invoked as
  3104  // part of system initialization by the sqlite3_initialize() function.
  3105  // ^The xMutexInit routine is called by SQLite exactly once for each
  3106  // effective call to [sqlite3_initialize()].
  3107  //
  3108  // ^The xMutexEnd method defined by this structure is invoked as
  3109  // part of system shutdown by the sqlite3_shutdown() function. The
  3110  // implementation of this method is expected to release all outstanding
  3111  // resources obtained by the mutex methods implementation, especially
  3112  // those obtained by the xMutexInit method.  ^The xMutexEnd()
  3113  // interface is invoked exactly once for each call to [sqlite3_shutdown()].
  3114  //
  3115  // ^(The remaining seven methods defined by this structure (xMutexAlloc,
  3116  // xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and
  3117  // xMutexNotheld) implement the following interfaces (respectively):
  3118  //
  3119  // <ul>
  3120  //   <li>  [sqlite3_mutex_alloc()] </li>
  3121  //   <li>  [sqlite3_mutex_free()] </li>
  3122  //   <li>  [sqlite3_mutex_enter()] </li>
  3123  //   <li>  [sqlite3_mutex_try()] </li>
  3124  //   <li>  [sqlite3_mutex_leave()] </li>
  3125  //   <li>  [sqlite3_mutex_held()] </li>
  3126  //   <li>  [sqlite3_mutex_notheld()] </li>
  3127  // </ul>)^
  3128  //
  3129  // The only difference is that the public sqlite3_XXX functions enumerated
  3130  // above silently ignore any invocations that pass a NULL pointer instead
  3131  // of a valid mutex handle. The implementations of the methods defined
  3132  // by this structure are not required to handle this case. The results
  3133  // of passing a NULL pointer instead of a valid mutex handle are undefined
  3134  // (i.e. it is acceptable to provide an implementation that segfaults if
  3135  // it is passed a NULL pointer).
  3136  //
  3137  // The xMutexInit() method must be threadsafe.  It must be harmless to
  3138  // invoke xMutexInit() multiple times within the same process and without
  3139  // intervening calls to xMutexEnd().  Second and subsequent calls to
  3140  // xMutexInit() must be no-ops.
  3141  //
  3142  // xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()]
  3143  // and its associates).  Similarly, xMutexAlloc() must not use SQLite memory
  3144  // allocation for a static mutex.  ^However xMutexAlloc() may use SQLite
  3145  // memory allocation for a fast or recursive mutex.
  3146  //
  3147  // ^SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is
  3148  // called, but only if the prior call to xMutexInit returned SQLITE_OK.
  3149  // If xMutexInit fails in any way, it is expected to clean up after itself
  3150  // prior to returning.
  3151  type sqlite3_mutex_methods = sqlite3_mutex_methods1 /* sqlite3.h:7619:38 */
  3152  
  3153  // CAPI3REF: Custom Page Cache Object
  3154  //
  3155  // The sqlite3_pcache_page object represents a single page in the
  3156  // page cache.  The page cache will allocate instances of this
  3157  // object.  Various methods of the page cache use pointers to instances
  3158  // of this object as parameters or as their return value.
  3159  //
  3160  // See [sqlite3_pcache_methods2] for additional information.
  3161  type sqlite3_pcache_page1 = struct {
  3162  	pBuf   uintptr
  3163  	pExtra uintptr
  3164  } /* sqlite3.h:8375:9 */
  3165  
  3166  // CAPI3REF: Custom Page Cache Object
  3167  //
  3168  // The sqlite3_pcache_page object represents a single page in the
  3169  // page cache.  The page cache will allocate instances of this
  3170  // object.  Various methods of the page cache use pointers to instances
  3171  // of this object as parameters or as their return value.
  3172  //
  3173  // See [sqlite3_pcache_methods2] for additional information.
  3174  type sqlite3_pcache_page = sqlite3_pcache_page1 /* sqlite3.h:8375:36 */
  3175  
  3176  // CAPI3REF: Application Defined Page Cache.
  3177  // KEYWORDS: {page cache}
  3178  //
  3179  // ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE2], ...) interface can
  3180  // register an alternative page cache implementation by passing in an
  3181  // instance of the sqlite3_pcache_methods2 structure.)^
  3182  // In many applications, most of the heap memory allocated by
  3183  // SQLite is used for the page cache.
  3184  // By implementing a
  3185  // custom page cache using this API, an application can better control
  3186  // the amount of memory consumed by SQLite, the way in which
  3187  // that memory is allocated and released, and the policies used to
  3188  // determine exactly which parts of a database file are cached and for
  3189  // how long.
  3190  //
  3191  // The alternative page cache mechanism is an
  3192  // extreme measure that is only needed by the most demanding applications.
  3193  // The built-in page cache is recommended for most uses.
  3194  //
  3195  // ^(The contents of the sqlite3_pcache_methods2 structure are copied to an
  3196  // internal buffer by SQLite within the call to [sqlite3_config].  Hence
  3197  // the application may discard the parameter after the call to
  3198  // [sqlite3_config()] returns.)^
  3199  //
  3200  // [[the xInit() page cache method]]
  3201  // ^(The xInit() method is called once for each effective
  3202  // call to [sqlite3_initialize()])^
  3203  // (usually only once during the lifetime of the process). ^(The xInit()
  3204  // method is passed a copy of the sqlite3_pcache_methods2.pArg value.)^
  3205  // The intent of the xInit() method is to set up global data structures
  3206  // required by the custom page cache implementation.
  3207  // ^(If the xInit() method is NULL, then the
  3208  // built-in default page cache is used instead of the application defined
  3209  // page cache.)^
  3210  //
  3211  // [[the xShutdown() page cache method]]
  3212  // ^The xShutdown() method is called by [sqlite3_shutdown()].
  3213  // It can be used to clean up
  3214  // any outstanding resources before process shutdown, if required.
  3215  // ^The xShutdown() method may be NULL.
  3216  //
  3217  // ^SQLite automatically serializes calls to the xInit method,
  3218  // so the xInit method need not be threadsafe.  ^The
  3219  // xShutdown method is only called from [sqlite3_shutdown()] so it does
  3220  // not need to be threadsafe either.  All other methods must be threadsafe
  3221  // in multithreaded applications.
  3222  //
  3223  // ^SQLite will never invoke xInit() more than once without an intervening
  3224  // call to xShutdown().
  3225  //
  3226  // [[the xCreate() page cache methods]]
  3227  // ^SQLite invokes the xCreate() method to construct a new cache instance.
  3228  // SQLite will typically create one cache instance for each open database file,
  3229  // though this is not guaranteed. ^The
  3230  // first parameter, szPage, is the size in bytes of the pages that must
  3231  // be allocated by the cache.  ^szPage will always a power of two.  ^The
  3232  // second parameter szExtra is a number of bytes of extra storage
  3233  // associated with each page cache entry.  ^The szExtra parameter will
  3234  // a number less than 250.  SQLite will use the
  3235  // extra szExtra bytes on each page to store metadata about the underlying
  3236  // database page on disk.  The value passed into szExtra depends
  3237  // on the SQLite version, the target platform, and how SQLite was compiled.
  3238  // ^The third argument to xCreate(), bPurgeable, is true if the cache being
  3239  // created will be used to cache database pages of a file stored on disk, or
  3240  // false if it is used for an in-memory database. The cache implementation
  3241  // does not have to do anything special based with the value of bPurgeable;
  3242  // it is purely advisory.  ^On a cache where bPurgeable is false, SQLite will
  3243  // never invoke xUnpin() except to deliberately delete a page.
  3244  // ^In other words, calls to xUnpin() on a cache with bPurgeable set to
  3245  // false will always have the "discard" flag set to true.
  3246  // ^Hence, a cache created with bPurgeable false will
  3247  // never contain any unpinned pages.
  3248  //
  3249  // [[the xCachesize() page cache method]]
  3250  // ^(The xCachesize() method may be called at any time by SQLite to set the
  3251  // suggested maximum cache-size (number of pages stored by) the cache
  3252  // instance passed as the first argument. This is the value configured using
  3253  // the SQLite "[PRAGMA cache_size]" command.)^  As with the bPurgeable
  3254  // parameter, the implementation is not required to do anything with this
  3255  // value; it is advisory only.
  3256  //
  3257  // [[the xPagecount() page cache methods]]
  3258  // The xPagecount() method must return the number of pages currently
  3259  // stored in the cache, both pinned and unpinned.
  3260  //
  3261  // [[the xFetch() page cache methods]]
  3262  // The xFetch() method locates a page in the cache and returns a pointer to
  3263  // an sqlite3_pcache_page object associated with that page, or a NULL pointer.
  3264  // The pBuf element of the returned sqlite3_pcache_page object will be a
  3265  // pointer to a buffer of szPage bytes used to store the content of a
  3266  // single database page.  The pExtra element of sqlite3_pcache_page will be
  3267  // a pointer to the szExtra bytes of extra storage that SQLite has requested
  3268  // for each entry in the page cache.
  3269  //
  3270  // The page to be fetched is determined by the key. ^The minimum key value
  3271  // is 1.  After it has been retrieved using xFetch, the page is considered
  3272  // to be "pinned".
  3273  //
  3274  // If the requested page is already in the page cache, then the page cache
  3275  // implementation must return a pointer to the page buffer with its content
  3276  // intact.  If the requested page is not already in the cache, then the
  3277  // cache implementation should use the value of the createFlag
  3278  // parameter to help it determined what action to take:
  3279  //
  3280  // <table border=1 width=85% align=center>
  3281  // <tr><th> createFlag <th> Behavior when page is not already in cache
  3282  // <tr><td> 0 <td> Do not allocate a new page.  Return NULL.
  3283  // <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so.
  3284  //                 Otherwise return NULL.
  3285  // <tr><td> 2 <td> Make every effort to allocate a new page.  Only return
  3286  //                 NULL if allocating a new page is effectively impossible.
  3287  // </table>
  3288  //
  3289  // ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1.  SQLite
  3290  // will only use a createFlag of 2 after a prior call with a createFlag of 1
  3291  // failed.)^  In between the xFetch() calls, SQLite may
  3292  // attempt to unpin one or more cache pages by spilling the content of
  3293  // pinned pages to disk and synching the operating system disk cache.
  3294  //
  3295  // [[the xUnpin() page cache method]]
  3296  // ^xUnpin() is called by SQLite with a pointer to a currently pinned page
  3297  // as its second argument.  If the third parameter, discard, is non-zero,
  3298  // then the page must be evicted from the cache.
  3299  // ^If the discard parameter is
  3300  // zero, then the page may be discarded or retained at the discretion of
  3301  // page cache implementation. ^The page cache implementation
  3302  // may choose to evict unpinned pages at any time.
  3303  //
  3304  // The cache must not perform any reference counting. A single
  3305  // call to xUnpin() unpins the page regardless of the number of prior calls
  3306  // to xFetch().
  3307  //
  3308  // [[the xRekey() page cache methods]]
  3309  // The xRekey() method is used to change the key value associated with the
  3310  // page passed as the second argument. If the cache
  3311  // previously contains an entry associated with newKey, it must be
  3312  // discarded. ^Any prior cache entry associated with newKey is guaranteed not
  3313  // to be pinned.
  3314  //
  3315  // When SQLite calls the xTruncate() method, the cache must discard all
  3316  // existing cache entries with page numbers (keys) greater than or equal
  3317  // to the value of the iLimit parameter passed to xTruncate(). If any
  3318  // of these pages are pinned, they are implicitly unpinned, meaning that
  3319  // they can be safely discarded.
  3320  //
  3321  // [[the xDestroy() page cache method]]
  3322  // ^The xDestroy() method is used to delete a cache allocated by xCreate().
  3323  // All resources associated with the specified cache should be freed. ^After
  3324  // calling the xDestroy() method, SQLite considers the [sqlite3_pcache*]
  3325  // handle invalid, and will not use it with any other sqlite3_pcache_methods2
  3326  // functions.
  3327  //
  3328  // [[the xShrink() page cache method]]
  3329  // ^SQLite invokes the xShrink() method when it wants the page cache to
  3330  // free up as much of heap memory as possible.  The page cache implementation
  3331  // is not obligated to free any memory, but well-behaved implementations should
  3332  // do their best.
  3333  type sqlite3_pcache_methods21 = struct {
  3334  	iVersion   int32
  3335  	_          [4]byte
  3336  	pArg       uintptr
  3337  	xInit      uintptr
  3338  	xShutdown  uintptr
  3339  	xCreate    uintptr
  3340  	xCachesize uintptr
  3341  	xPagecount uintptr
  3342  	xFetch     uintptr
  3343  	xUnpin     uintptr
  3344  	xRekey     uintptr
  3345  	xTruncate  uintptr
  3346  	xDestroy   uintptr
  3347  	xShrink    uintptr
  3348  } /* sqlite3.h:8540:9 */
  3349  
  3350  // CAPI3REF: Application Defined Page Cache.
  3351  // KEYWORDS: {page cache}
  3352  //
  3353  // ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE2], ...) interface can
  3354  // register an alternative page cache implementation by passing in an
  3355  // instance of the sqlite3_pcache_methods2 structure.)^
  3356  // In many applications, most of the heap memory allocated by
  3357  // SQLite is used for the page cache.
  3358  // By implementing a
  3359  // custom page cache using this API, an application can better control
  3360  // the amount of memory consumed by SQLite, the way in which
  3361  // that memory is allocated and released, and the policies used to
  3362  // determine exactly which parts of a database file are cached and for
  3363  // how long.
  3364  //
  3365  // The alternative page cache mechanism is an
  3366  // extreme measure that is only needed by the most demanding applications.
  3367  // The built-in page cache is recommended for most uses.
  3368  //
  3369  // ^(The contents of the sqlite3_pcache_methods2 structure are copied to an
  3370  // internal buffer by SQLite within the call to [sqlite3_config].  Hence
  3371  // the application may discard the parameter after the call to
  3372  // [sqlite3_config()] returns.)^
  3373  //
  3374  // [[the xInit() page cache method]]
  3375  // ^(The xInit() method is called once for each effective
  3376  // call to [sqlite3_initialize()])^
  3377  // (usually only once during the lifetime of the process). ^(The xInit()
  3378  // method is passed a copy of the sqlite3_pcache_methods2.pArg value.)^
  3379  // The intent of the xInit() method is to set up global data structures
  3380  // required by the custom page cache implementation.
  3381  // ^(If the xInit() method is NULL, then the
  3382  // built-in default page cache is used instead of the application defined
  3383  // page cache.)^
  3384  //
  3385  // [[the xShutdown() page cache method]]
  3386  // ^The xShutdown() method is called by [sqlite3_shutdown()].
  3387  // It can be used to clean up
  3388  // any outstanding resources before process shutdown, if required.
  3389  // ^The xShutdown() method may be NULL.
  3390  //
  3391  // ^SQLite automatically serializes calls to the xInit method,
  3392  // so the xInit method need not be threadsafe.  ^The
  3393  // xShutdown method is only called from [sqlite3_shutdown()] so it does
  3394  // not need to be threadsafe either.  All other methods must be threadsafe
  3395  // in multithreaded applications.
  3396  //
  3397  // ^SQLite will never invoke xInit() more than once without an intervening
  3398  // call to xShutdown().
  3399  //
  3400  // [[the xCreate() page cache methods]]
  3401  // ^SQLite invokes the xCreate() method to construct a new cache instance.
  3402  // SQLite will typically create one cache instance for each open database file,
  3403  // though this is not guaranteed. ^The
  3404  // first parameter, szPage, is the size in bytes of the pages that must
  3405  // be allocated by the cache.  ^szPage will always a power of two.  ^The
  3406  // second parameter szExtra is a number of bytes of extra storage
  3407  // associated with each page cache entry.  ^The szExtra parameter will
  3408  // a number less than 250.  SQLite will use the
  3409  // extra szExtra bytes on each page to store metadata about the underlying
  3410  // database page on disk.  The value passed into szExtra depends
  3411  // on the SQLite version, the target platform, and how SQLite was compiled.
  3412  // ^The third argument to xCreate(), bPurgeable, is true if the cache being
  3413  // created will be used to cache database pages of a file stored on disk, or
  3414  // false if it is used for an in-memory database. The cache implementation
  3415  // does not have to do anything special based with the value of bPurgeable;
  3416  // it is purely advisory.  ^On a cache where bPurgeable is false, SQLite will
  3417  // never invoke xUnpin() except to deliberately delete a page.
  3418  // ^In other words, calls to xUnpin() on a cache with bPurgeable set to
  3419  // false will always have the "discard" flag set to true.
  3420  // ^Hence, a cache created with bPurgeable false will
  3421  // never contain any unpinned pages.
  3422  //
  3423  // [[the xCachesize() page cache method]]
  3424  // ^(The xCachesize() method may be called at any time by SQLite to set the
  3425  // suggested maximum cache-size (number of pages stored by) the cache
  3426  // instance passed as the first argument. This is the value configured using
  3427  // the SQLite "[PRAGMA cache_size]" command.)^  As with the bPurgeable
  3428  // parameter, the implementation is not required to do anything with this
  3429  // value; it is advisory only.
  3430  //
  3431  // [[the xPagecount() page cache methods]]
  3432  // The xPagecount() method must return the number of pages currently
  3433  // stored in the cache, both pinned and unpinned.
  3434  //
  3435  // [[the xFetch() page cache methods]]
  3436  // The xFetch() method locates a page in the cache and returns a pointer to
  3437  // an sqlite3_pcache_page object associated with that page, or a NULL pointer.
  3438  // The pBuf element of the returned sqlite3_pcache_page object will be a
  3439  // pointer to a buffer of szPage bytes used to store the content of a
  3440  // single database page.  The pExtra element of sqlite3_pcache_page will be
  3441  // a pointer to the szExtra bytes of extra storage that SQLite has requested
  3442  // for each entry in the page cache.
  3443  //
  3444  // The page to be fetched is determined by the key. ^The minimum key value
  3445  // is 1.  After it has been retrieved using xFetch, the page is considered
  3446  // to be "pinned".
  3447  //
  3448  // If the requested page is already in the page cache, then the page cache
  3449  // implementation must return a pointer to the page buffer with its content
  3450  // intact.  If the requested page is not already in the cache, then the
  3451  // cache implementation should use the value of the createFlag
  3452  // parameter to help it determined what action to take:
  3453  //
  3454  // <table border=1 width=85% align=center>
  3455  // <tr><th> createFlag <th> Behavior when page is not already in cache
  3456  // <tr><td> 0 <td> Do not allocate a new page.  Return NULL.
  3457  // <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so.
  3458  //                 Otherwise return NULL.
  3459  // <tr><td> 2 <td> Make every effort to allocate a new page.  Only return
  3460  //                 NULL if allocating a new page is effectively impossible.
  3461  // </table>
  3462  //
  3463  // ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1.  SQLite
  3464  // will only use a createFlag of 2 after a prior call with a createFlag of 1
  3465  // failed.)^  In between the xFetch() calls, SQLite may
  3466  // attempt to unpin one or more cache pages by spilling the content of
  3467  // pinned pages to disk and synching the operating system disk cache.
  3468  //
  3469  // [[the xUnpin() page cache method]]
  3470  // ^xUnpin() is called by SQLite with a pointer to a currently pinned page
  3471  // as its second argument.  If the third parameter, discard, is non-zero,
  3472  // then the page must be evicted from the cache.
  3473  // ^If the discard parameter is
  3474  // zero, then the page may be discarded or retained at the discretion of
  3475  // page cache implementation. ^The page cache implementation
  3476  // may choose to evict unpinned pages at any time.
  3477  //
  3478  // The cache must not perform any reference counting. A single
  3479  // call to xUnpin() unpins the page regardless of the number of prior calls
  3480  // to xFetch().
  3481  //
  3482  // [[the xRekey() page cache methods]]
  3483  // The xRekey() method is used to change the key value associated with the
  3484  // page passed as the second argument. If the cache
  3485  // previously contains an entry associated with newKey, it must be
  3486  // discarded. ^Any prior cache entry associated with newKey is guaranteed not
  3487  // to be pinned.
  3488  //
  3489  // When SQLite calls the xTruncate() method, the cache must discard all
  3490  // existing cache entries with page numbers (keys) greater than or equal
  3491  // to the value of the iLimit parameter passed to xTruncate(). If any
  3492  // of these pages are pinned, they are implicitly unpinned, meaning that
  3493  // they can be safely discarded.
  3494  //
  3495  // [[the xDestroy() page cache method]]
  3496  // ^The xDestroy() method is used to delete a cache allocated by xCreate().
  3497  // All resources associated with the specified cache should be freed. ^After
  3498  // calling the xDestroy() method, SQLite considers the [sqlite3_pcache*]
  3499  // handle invalid, and will not use it with any other sqlite3_pcache_methods2
  3500  // functions.
  3501  //
  3502  // [[the xShrink() page cache method]]
  3503  // ^SQLite invokes the xShrink() method when it wants the page cache to
  3504  // free up as much of heap memory as possible.  The page cache implementation
  3505  // is not obligated to free any memory, but well-behaved implementations should
  3506  // do their best.
  3507  type sqlite3_pcache_methods2 = sqlite3_pcache_methods21 /* sqlite3.h:8540:40 */
  3508  
  3509  // This is the obsolete pcache_methods object that has now been replaced
  3510  // by sqlite3_pcache_methods2.  This object is not used by SQLite.  It is
  3511  // retained in the header file for backwards compatibility only.
  3512  type sqlite3_pcache_methods1 = struct {
  3513  	pArg       uintptr
  3514  	xInit      uintptr
  3515  	xShutdown  uintptr
  3516  	xCreate    uintptr
  3517  	xCachesize uintptr
  3518  	xPagecount uintptr
  3519  	xFetch     uintptr
  3520  	xUnpin     uintptr
  3521  	xRekey     uintptr
  3522  	xTruncate  uintptr
  3523  	xDestroy   uintptr
  3524  } /* sqlite3.h:8563:9 */
  3525  
  3526  // This is the obsolete pcache_methods object that has now been replaced
  3527  // by sqlite3_pcache_methods2.  This object is not used by SQLite.  It is
  3528  // retained in the header file for backwards compatibility only.
  3529  type sqlite3_pcache_methods = sqlite3_pcache_methods1 /* sqlite3.h:8563:39 */
  3530  
  3531  // CAPI3REF: Database Snapshot
  3532  // KEYWORDS: {snapshot} {sqlite3_snapshot}
  3533  //
  3534  // An instance of the snapshot object records the state of a [WAL mode]
  3535  // database for some specific point in history.
  3536  //
  3537  // In [WAL mode], multiple [database connections] that are open on the
  3538  // same database file can each be reading a different historical version
  3539  // of the database file.  When a [database connection] begins a read
  3540  // transaction, that connection sees an unchanging copy of the database
  3541  // as it existed for the point in time when the transaction first started.
  3542  // Subsequent changes to the database from other connections are not seen
  3543  // by the reader until a new read transaction is started.
  3544  //
  3545  // The sqlite3_snapshot object records state information about an historical
  3546  // version of the database file so that it is possible to later open a new read
  3547  // transaction that sees that historical version of the database rather than
  3548  // the most recent version.
  3549  type sqlite3_snapshot1 = struct{ hidden [48]uint8 } /* sqlite3.h:9630:9 */
  3550  
  3551  // CAPI3REF: Database Snapshot
  3552  // KEYWORDS: {snapshot} {sqlite3_snapshot}
  3553  //
  3554  // An instance of the snapshot object records the state of a [WAL mode]
  3555  // database for some specific point in history.
  3556  //
  3557  // In [WAL mode], multiple [database connections] that are open on the
  3558  // same database file can each be reading a different historical version
  3559  // of the database file.  When a [database connection] begins a read
  3560  // transaction, that connection sees an unchanging copy of the database
  3561  // as it existed for the point in time when the transaction first started.
  3562  // Subsequent changes to the database from other connections are not seen
  3563  // by the reader until a new read transaction is started.
  3564  //
  3565  // The sqlite3_snapshot object records state information about an historical
  3566  // version of the database file so that it is possible to later open a new read
  3567  // transaction that sees that historical version of the database rather than
  3568  // the most recent version.
  3569  type sqlite3_snapshot = sqlite3_snapshot1 /* sqlite3.h:9632:3 */
  3570  
  3571  // CAPI3REF: Flags for sqlite3_deserialize()
  3572  //
  3573  // The following are allowed values for 6th argument (the F argument) to
  3574  // the [sqlite3_deserialize(D,S,P,N,M,F)] interface.
  3575  //
  3576  // The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization
  3577  // in the P argument is held in memory obtained from [sqlite3_malloc64()]
  3578  // and that SQLite should take ownership of this memory and automatically
  3579  // free it when it has finished using it.  Without this flag, the caller
  3580  // is responsible for freeing any dynamically allocated memory.
  3581  //
  3582  // The SQLITE_DESERIALIZE_RESIZEABLE flag means that SQLite is allowed to
  3583  // grow the size of the database using calls to [sqlite3_realloc64()].  This
  3584  // flag should only be used if SQLITE_DESERIALIZE_FREEONCLOSE is also used.
  3585  // Without this flag, the deserialized database cannot increase in size beyond
  3586  // the number of bytes specified by the M parameter.
  3587  //
  3588  // The SQLITE_DESERIALIZE_READONLY flag means that the deserialized database
  3589  // should be treated as read-only.
  3590  
  3591  // Undo the hack that converts floating point types to integer for
  3592  // builds on processors without floating point support.
  3593  
  3594  //******* Begin file sqlite3rtree.h ********
  3595  // 2010 August 30
  3596  //
  3597  // The author disclaims copyright to this source code.  In place of
  3598  // a legal notice, here is a blessing:
  3599  //
  3600  //    May you do good and not evil.
  3601  //    May you find forgiveness for yourself and forgive others.
  3602  //    May you share freely, never taking more than you give.
  3603  //
  3604  //
  3605  
  3606  type sqlite3_rtree_geometry1 = struct {
  3607  	pContext uintptr
  3608  	nParam   int32
  3609  	_        [4]byte
  3610  	aParam   uintptr
  3611  	pUser    uintptr
  3612  	xDelUser uintptr
  3613  } /* sqlite3.h:9957:9 */
  3614  
  3615  // CAPI3REF: Flags for sqlite3_deserialize()
  3616  //
  3617  // The following are allowed values for 6th argument (the F argument) to
  3618  // the [sqlite3_deserialize(D,S,P,N,M,F)] interface.
  3619  //
  3620  // The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization
  3621  // in the P argument is held in memory obtained from [sqlite3_malloc64()]
  3622  // and that SQLite should take ownership of this memory and automatically
  3623  // free it when it has finished using it.  Without this flag, the caller
  3624  // is responsible for freeing any dynamically allocated memory.
  3625  //
  3626  // The SQLITE_DESERIALIZE_RESIZEABLE flag means that SQLite is allowed to
  3627  // grow the size of the database using calls to [sqlite3_realloc64()].  This
  3628  // flag should only be used if SQLITE_DESERIALIZE_FREEONCLOSE is also used.
  3629  // Without this flag, the deserialized database cannot increase in size beyond
  3630  // the number of bytes specified by the M parameter.
  3631  //
  3632  // The SQLITE_DESERIALIZE_READONLY flag means that the deserialized database
  3633  // should be treated as read-only.
  3634  
  3635  // Undo the hack that converts floating point types to integer for
  3636  // builds on processors without floating point support.
  3637  
  3638  //******* Begin file sqlite3rtree.h ********
  3639  // 2010 August 30
  3640  //
  3641  // The author disclaims copyright to this source code.  In place of
  3642  // a legal notice, here is a blessing:
  3643  //
  3644  //    May you do good and not evil.
  3645  //    May you find forgiveness for yourself and forgive others.
  3646  //    May you share freely, never taking more than you give.
  3647  //
  3648  //
  3649  
  3650  type sqlite3_rtree_geometry = sqlite3_rtree_geometry1 /* sqlite3.h:9957:39 */
  3651  type sqlite3_rtree_query_info1 = struct {
  3652  	pContext      uintptr
  3653  	nParam        int32
  3654  	_             [4]byte
  3655  	aParam        uintptr
  3656  	pUser         uintptr
  3657  	xDelUser      uintptr
  3658  	aCoord        uintptr
  3659  	anQueue       uintptr
  3660  	nCoord        int32
  3661  	iLevel        int32
  3662  	mxLevel       int32
  3663  	_             [4]byte
  3664  	iRowid        sqlite3_int64
  3665  	rParentScore  sqlite3_rtree_dbl
  3666  	eParentWithin int32
  3667  	eWithin       int32
  3668  	rScore        sqlite3_rtree_dbl
  3669  	apSqlParam    uintptr
  3670  } /* sqlite3.h:9958:9 */
  3671  
  3672  type sqlite3_rtree_query_info = sqlite3_rtree_query_info1 /* sqlite3.h:9958:41 */
  3673  
  3674  // The double-precision datatype used by RTree depends on the
  3675  // SQLITE_RTREE_INT_ONLY compile-time option.
  3676  type sqlite3_rtree_dbl = float64 /* sqlite3.h:9966:18 */
  3677  
  3678  // CAPI3REF: Values for sqlite3session_config().
  3679  
  3680  // Make sure we can call this stuff from C++.
  3681  
  3682  //******* End of sqlite3session.h ********
  3683  //******* Begin file fts5.h ********
  3684  // 2014 May 31
  3685  //
  3686  // The author disclaims copyright to this source code.  In place of
  3687  // a legal notice, here is a blessing:
  3688  //
  3689  //    May you do good and not evil.
  3690  //    May you find forgiveness for yourself and forgive others.
  3691  //    May you share freely, never taking more than you give.
  3692  //
  3693  //
  3694  //
  3695  // Interfaces to extend FTS5. Using the interfaces defined in this file,
  3696  // FTS5 may be extended with:
  3697  //
  3698  //     * custom tokenizers, and
  3699  //     * custom auxiliary functions.
  3700  
  3701  // ************************************************************************
  3702  //
  3703  // CUSTOM AUXILIARY FUNCTIONS
  3704  //
  3705  // Virtual table implementations may overload SQL functions by implementing
  3706  // the sqlite3_module.xFindFunction() method.
  3707  
  3708  type Fts5ExtensionApi1 = struct {
  3709  	iVersion           int32
  3710  	_                  [4]byte
  3711  	xUserData          uintptr
  3712  	xColumnCount       uintptr
  3713  	xRowCount          uintptr
  3714  	xColumnTotalSize   uintptr
  3715  	xTokenize          uintptr
  3716  	xPhraseCount       uintptr
  3717  	xPhraseSize        uintptr
  3718  	xInstCount         uintptr
  3719  	xInst              uintptr
  3720  	xRowid             uintptr
  3721  	xColumnText        uintptr
  3722  	xColumnSize        uintptr
  3723  	xQueryPhrase       uintptr
  3724  	xSetAuxdata        uintptr
  3725  	xGetAuxdata        uintptr
  3726  	xPhraseFirst       uintptr
  3727  	xPhraseNext        uintptr
  3728  	xPhraseFirstColumn uintptr
  3729  	xPhraseNextColumn  uintptr
  3730  } /* sqlite3.h:11813:9 */
  3731  
  3732  // CAPI3REF: Values for sqlite3session_config().
  3733  
  3734  // Make sure we can call this stuff from C++.
  3735  
  3736  //******* End of sqlite3session.h ********
  3737  //******* Begin file fts5.h ********
  3738  // 2014 May 31
  3739  //
  3740  // The author disclaims copyright to this source code.  In place of
  3741  // a legal notice, here is a blessing:
  3742  //
  3743  //    May you do good and not evil.
  3744  //    May you find forgiveness for yourself and forgive others.
  3745  //    May you share freely, never taking more than you give.
  3746  //
  3747  //
  3748  //
  3749  // Interfaces to extend FTS5. Using the interfaces defined in this file,
  3750  // FTS5 may be extended with:
  3751  //
  3752  //     * custom tokenizers, and
  3753  //     * custom auxiliary functions.
  3754  
  3755  // ************************************************************************
  3756  //
  3757  // CUSTOM AUXILIARY FUNCTIONS
  3758  //
  3759  // Virtual table implementations may overload SQL functions by implementing
  3760  // the sqlite3_module.xFindFunction() method.
  3761  
  3762  type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.h:11813:33 */
  3763  type Fts5PhraseIter1 = struct {
  3764  	a uintptr
  3765  	b uintptr
  3766  } /* sqlite3.h:11815:9 */
  3767  
  3768  type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.h:11815:31 */
  3769  
  3770  type fts5_extension_function = uintptr /* sqlite3.h:11817:14 */
  3771  type fts5_tokenizer1 = struct {
  3772  	xCreate   uintptr
  3773  	xDelete   uintptr
  3774  	xTokenize uintptr
  3775  } /* sqlite3.h:12276:9 */
  3776  
  3777  type fts5_tokenizer = fts5_tokenizer1 /* sqlite3.h:12276:31 */
  3778  
  3779  // Flags that may be passed as the third argument to xTokenize()
  3780  
  3781  // Flags that may be passed by the tokenizer implementation back to FTS5
  3782  // as the third argument to the supplied xToken callback.
  3783  
  3784  //
  3785  // END OF CUSTOM TOKENIZERS
  3786  //
  3787  
  3788  // ************************************************************************
  3789  //
  3790  // FTS5 EXTENSION REGISTRATION API
  3791  type fts5_api1 = struct {
  3792  	iVersion         int32
  3793  	_                [4]byte
  3794  	xCreateTokenizer uintptr
  3795  	xFindTokenizer   uintptr
  3796  	xCreateFunction  uintptr
  3797  } /* sqlite3.h:12312:9 */
  3798  
  3799  // Flags that may be passed as the third argument to xTokenize()
  3800  
  3801  // Flags that may be passed by the tokenizer implementation back to FTS5
  3802  // as the third argument to the supplied xToken callback.
  3803  
  3804  //
  3805  // END OF CUSTOM TOKENIZERS
  3806  //
  3807  
  3808  // ************************************************************************
  3809  //
  3810  // FTS5 EXTENSION REGISTRATION API
  3811  type fts5_api = fts5_api1 /* sqlite3.h:12312:25 */
  3812  
  3813  // Copyright (c) 2003-2013 Apple Inc. All rights reserved.
  3814  //
  3815  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  3816  //
  3817  // This file contains Original Code and/or Modifications of Original Code
  3818  // as defined in and that are subject to the Apple Public Source License
  3819  // Version 2.0 (the 'License'). You may not use this file except in
  3820  // compliance with the License. The rights granted to you under the License
  3821  // may not be used to create, or enable the creation or redistribution of,
  3822  // unlawful or unlicensed copies of an Apple operating system, or to
  3823  // circumvent, violate, or enable the circumvention or violation of, any
  3824  // terms of an Apple operating system software license agreement.
  3825  //
  3826  // Please obtain a copy of the License at
  3827  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  3828  //
  3829  // The Original Code and all software distributed under the License are
  3830  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  3831  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  3832  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  3833  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  3834  // Please see the License for the specific language governing rights and
  3835  // limitations under the License.
  3836  //
  3837  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  3838  
  3839  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  3840  //
  3841  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  3842  //
  3843  // This file contains Original Code and/or Modifications of Original Code
  3844  // as defined in and that are subject to the Apple Public Source License
  3845  // Version 2.0 (the 'License'). You may not use this file except in
  3846  // compliance with the License. The rights granted to you under the License
  3847  // may not be used to create, or enable the creation or redistribution of,
  3848  // unlawful or unlicensed copies of an Apple operating system, or to
  3849  // circumvent, violate, or enable the circumvention or violation of, any
  3850  // terms of an Apple operating system software license agreement.
  3851  //
  3852  // Please obtain a copy of the License at
  3853  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  3854  //
  3855  // The Original Code and all software distributed under the License are
  3856  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  3857  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  3858  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  3859  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  3860  // Please see the License for the specific language governing rights and
  3861  // limitations under the License.
  3862  //
  3863  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  3864  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  3865  // Copyright (c) 1991, 1993
  3866  //	The Regents of the University of California.  All rights reserved.
  3867  //
  3868  // This code is derived from software contributed to Berkeley by
  3869  // Berkeley Software Design, Inc.
  3870  //
  3871  // Redistribution and use in source and binary forms, with or without
  3872  // modification, are permitted provided that the following conditions
  3873  // are met:
  3874  // 1. Redistributions of source code must retain the above copyright
  3875  //    notice, this list of conditions and the following disclaimer.
  3876  // 2. Redistributions in binary form must reproduce the above copyright
  3877  //    notice, this list of conditions and the following disclaimer in the
  3878  //    documentation and/or other materials provided with the distribution.
  3879  // 3. All advertising materials mentioning features or use of this software
  3880  //    must display the following acknowledgement:
  3881  //	This product includes software developed by the University of
  3882  //	California, Berkeley and its contributors.
  3883  // 4. Neither the name of the University nor the names of its contributors
  3884  //    may be used to endorse or promote products derived from this software
  3885  //    without specific prior written permission.
  3886  //
  3887  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  3888  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  3889  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  3890  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  3891  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  3892  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  3893  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  3894  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  3895  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  3896  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  3897  // SUCH DAMAGE.
  3898  //
  3899  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  3900  
  3901  // pthread opaque structures
  3902  
  3903  type __darwin_pthread_handler_rec = struct {
  3904  	__routine uintptr
  3905  	__arg     uintptr
  3906  	__next    uintptr
  3907  } /* _pthread_types.h:57:1 */
  3908  
  3909  type _opaque_pthread_attr_t = struct {
  3910  	__sig    int64
  3911  	__opaque [56]int8
  3912  } /* _pthread_types.h:63:1 */
  3913  
  3914  type _opaque_pthread_cond_t = struct {
  3915  	__sig    int64
  3916  	__opaque [40]int8
  3917  } /* _pthread_types.h:68:1 */
  3918  
  3919  type _opaque_pthread_condattr_t = struct {
  3920  	__sig    int64
  3921  	__opaque [8]int8
  3922  } /* _pthread_types.h:73:1 */
  3923  
  3924  type _opaque_pthread_mutex_t = struct {
  3925  	__sig    int64
  3926  	__opaque [56]int8
  3927  } /* _pthread_types.h:78:1 */
  3928  
  3929  type _opaque_pthread_mutexattr_t = struct {
  3930  	__sig    int64
  3931  	__opaque [8]int8
  3932  } /* _pthread_types.h:83:1 */
  3933  
  3934  type _opaque_pthread_once_t = struct {
  3935  	__sig    int64
  3936  	__opaque [8]int8
  3937  } /* _pthread_types.h:88:1 */
  3938  
  3939  type _opaque_pthread_rwlock_t = struct {
  3940  	__sig    int64
  3941  	__opaque [192]int8
  3942  } /* _pthread_types.h:93:1 */
  3943  
  3944  type _opaque_pthread_rwlockattr_t = struct {
  3945  	__sig    int64
  3946  	__opaque [16]int8
  3947  } /* _pthread_types.h:98:1 */
  3948  
  3949  type _opaque_pthread_t = struct {
  3950  	__sig           int64
  3951  	__cleanup_stack uintptr
  3952  	__opaque        [8176]int8
  3953  } /* _pthread_types.h:103:1 */
  3954  
  3955  // DO NOT REMOVE THIS COMMENT: fixincludes needs to see:
  3956  // __gnuc_va_list and include <stdarg.h>
  3957  // Copyright (c) 2012 Apple Inc. All rights reserved.
  3958  //
  3959  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  3960  //
  3961  // This file contains Original Code and/or Modifications of Original Code
  3962  // as defined in and that are subject to the Apple Public Source License
  3963  // Version 2.0 (the 'License'). You may not use this file except in
  3964  // compliance with the License. The rights granted to you under the License
  3965  // may not be used to create, or enable the creation or redistribution of,
  3966  // unlawful or unlicensed copies of an Apple operating system, or to
  3967  // circumvent, violate, or enable the circumvention or violation of, any
  3968  // terms of an Apple operating system software license agreement.
  3969  //
  3970  // Please obtain a copy of the License at
  3971  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  3972  //
  3973  // The Original Code and all software distributed under the License are
  3974  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  3975  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  3976  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  3977  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  3978  // Please see the License for the specific language governing rights and
  3979  // limitations under the License.
  3980  //
  3981  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  3982  
  3983  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  3984  //
  3985  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  3986  //
  3987  // This file contains Original Code and/or Modifications of Original Code
  3988  // as defined in and that are subject to the Apple Public Source License
  3989  // Version 2.0 (the 'License'). You may not use this file except in
  3990  // compliance with the License. The rights granted to you under the License
  3991  // may not be used to create, or enable the creation or redistribution of,
  3992  // unlawful or unlicensed copies of an Apple operating system, or to
  3993  // circumvent, violate, or enable the circumvention or violation of, any
  3994  // terms of an Apple operating system software license agreement.
  3995  //
  3996  // Please obtain a copy of the License at
  3997  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  3998  //
  3999  // The Original Code and all software distributed under the License are
  4000  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4001  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4002  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4003  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4004  // Please see the License for the specific language governing rights and
  4005  // limitations under the License.
  4006  //
  4007  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4008  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  4009  
  4010  // Copyright (c) 2000-2008 Apple Inc. All rights reserved.
  4011  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  4012  // Copyright (c) 1990, 1993
  4013  //	The Regents of the University of California.  All rights reserved.
  4014  //
  4015  // Redistribution and use in source and binary forms, with or without
  4016  // modification, are permitted provided that the following conditions
  4017  // are met:
  4018  // 1. Redistributions of source code must retain the above copyright
  4019  //    notice, this list of conditions and the following disclaimer.
  4020  // 2. Redistributions in binary form must reproduce the above copyright
  4021  //    notice, this list of conditions and the following disclaimer in the
  4022  //    documentation and/or other materials provided with the distribution.
  4023  // 3. All advertising materials mentioning features or use of this software
  4024  //    must display the following acknowledgement:
  4025  //	This product includes software developed by the University of
  4026  //	California, Berkeley and its contributors.
  4027  // 4. Neither the name of the University nor the names of its contributors
  4028  //    may be used to endorse or promote products derived from this software
  4029  //    without specific prior written permission.
  4030  //
  4031  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  4032  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  4033  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  4034  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  4035  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  4036  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  4037  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  4038  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  4039  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  4040  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  4041  // SUCH DAMAGE.
  4042  //
  4043  //	@(#)types.h	8.3 (Berkeley) 1/5/94
  4044  
  4045  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  4046  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  4047  //
  4048  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4049  //
  4050  // This file contains Original Code and/or Modifications of Original Code
  4051  // as defined in and that are subject to the Apple Public Source License
  4052  // Version 2.0 (the 'License'). You may not use this file except in
  4053  // compliance with the License. The rights granted to you under the License
  4054  // may not be used to create, or enable the creation or redistribution of,
  4055  // unlawful or unlicensed copies of an Apple operating system, or to
  4056  // circumvent, violate, or enable the circumvention or violation of, any
  4057  // terms of an Apple operating system software license agreement.
  4058  //
  4059  // Please obtain a copy of the License at
  4060  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4061  //
  4062  // The Original Code and all software distributed under the License are
  4063  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4064  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4065  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4066  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4067  // Please see the License for the specific language governing rights and
  4068  // limitations under the License.
  4069  //
  4070  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4071  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  4072  // Copyright (c) 1991, 1993
  4073  //	The Regents of the University of California.  All rights reserved.
  4074  //
  4075  // This code is derived from software contributed to Berkeley by
  4076  // Berkeley Software Design, Inc.
  4077  //
  4078  // Redistribution and use in source and binary forms, with or without
  4079  // modification, are permitted provided that the following conditions
  4080  // are met:
  4081  // 1. Redistributions of source code must retain the above copyright
  4082  //    notice, this list of conditions and the following disclaimer.
  4083  // 2. Redistributions in binary form must reproduce the above copyright
  4084  //    notice, this list of conditions and the following disclaimer in the
  4085  //    documentation and/or other materials provided with the distribution.
  4086  // 3. All advertising materials mentioning features or use of this software
  4087  //    must display the following acknowledgement:
  4088  //	This product includes software developed by the University of
  4089  //	California, Berkeley and its contributors.
  4090  // 4. Neither the name of the University nor the names of its contributors
  4091  //    may be used to endorse or promote products derived from this software
  4092  //    without specific prior written permission.
  4093  //
  4094  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  4095  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  4096  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  4097  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  4098  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  4099  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  4100  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  4101  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  4102  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  4103  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  4104  // SUCH DAMAGE.
  4105  //
  4106  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  4107  
  4108  // Basic integral types.  Omit the typedef if
  4109  // not possible for a machine/compiler combination.
  4110  // Copyright (c) 2012 Apple Inc. All rights reserved.
  4111  //
  4112  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4113  //
  4114  // This file contains Original Code and/or Modifications of Original Code
  4115  // as defined in and that are subject to the Apple Public Source License
  4116  // Version 2.0 (the 'License'). You may not use this file except in
  4117  // compliance with the License. The rights granted to you under the License
  4118  // may not be used to create, or enable the creation or redistribution of,
  4119  // unlawful or unlicensed copies of an Apple operating system, or to
  4120  // circumvent, violate, or enable the circumvention or violation of, any
  4121  // terms of an Apple operating system software license agreement.
  4122  //
  4123  // Please obtain a copy of the License at
  4124  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4125  //
  4126  // The Original Code and all software distributed under the License are
  4127  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4128  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4129  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4130  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4131  // Please see the License for the specific language governing rights and
  4132  // limitations under the License.
  4133  //
  4134  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4135  type int8_t = int8 /* _int8_t.h:30:31 */
  4136  // Copyright (c) 2012 Apple Inc. All rights reserved.
  4137  //
  4138  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4139  //
  4140  // This file contains Original Code and/or Modifications of Original Code
  4141  // as defined in and that are subject to the Apple Public Source License
  4142  // Version 2.0 (the 'License'). You may not use this file except in
  4143  // compliance with the License. The rights granted to you under the License
  4144  // may not be used to create, or enable the creation or redistribution of,
  4145  // unlawful or unlicensed copies of an Apple operating system, or to
  4146  // circumvent, violate, or enable the circumvention or violation of, any
  4147  // terms of an Apple operating system software license agreement.
  4148  //
  4149  // Please obtain a copy of the License at
  4150  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4151  //
  4152  // The Original Code and all software distributed under the License are
  4153  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4154  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4155  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4156  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4157  // Please see the License for the specific language governing rights and
  4158  // limitations under the License.
  4159  //
  4160  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4161  type int16_t = int16 /* _int16_t.h:30:33 */
  4162  // Copyright (c) 2012 Apple Inc. All rights reserved.
  4163  //
  4164  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4165  //
  4166  // This file contains Original Code and/or Modifications of Original Code
  4167  // as defined in and that are subject to the Apple Public Source License
  4168  // Version 2.0 (the 'License'). You may not use this file except in
  4169  // compliance with the License. The rights granted to you under the License
  4170  // may not be used to create, or enable the creation or redistribution of,
  4171  // unlawful or unlicensed copies of an Apple operating system, or to
  4172  // circumvent, violate, or enable the circumvention or violation of, any
  4173  // terms of an Apple operating system software license agreement.
  4174  //
  4175  // Please obtain a copy of the License at
  4176  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4177  //
  4178  // The Original Code and all software distributed under the License are
  4179  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4180  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4181  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4182  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4183  // Please see the License for the specific language governing rights and
  4184  // limitations under the License.
  4185  //
  4186  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4187  type int32_t = int32 /* _int32_t.h:30:33 */
  4188  // Copyright (c) 2012 Apple Inc. All rights reserved.
  4189  //
  4190  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4191  //
  4192  // This file contains Original Code and/or Modifications of Original Code
  4193  // as defined in and that are subject to the Apple Public Source License
  4194  // Version 2.0 (the 'License'). You may not use this file except in
  4195  // compliance with the License. The rights granted to you under the License
  4196  // may not be used to create, or enable the creation or redistribution of,
  4197  // unlawful or unlicensed copies of an Apple operating system, or to
  4198  // circumvent, violate, or enable the circumvention or violation of, any
  4199  // terms of an Apple operating system software license agreement.
  4200  //
  4201  // Please obtain a copy of the License at
  4202  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4203  //
  4204  // The Original Code and all software distributed under the License are
  4205  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4206  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4207  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4208  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4209  // Please see the License for the specific language governing rights and
  4210  // limitations under the License.
  4211  //
  4212  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4213  type int64_t = int64 /* _int64_t.h:30:33 */
  4214  
  4215  // Copyright (c) 2016 Apple Inc. All rights reserved.
  4216  //
  4217  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4218  //
  4219  // This file contains Original Code and/or Modifications of Original Code
  4220  // as defined in and that are subject to the Apple Public Source License
  4221  // Version 2.0 (the 'License'). You may not use this file except in
  4222  // compliance with the License. The rights granted to you under the License
  4223  // may not be used to create, or enable the creation or redistribution of,
  4224  // unlawful or unlicensed copies of an Apple operating system, or to
  4225  // circumvent, violate, or enable the circumvention or violation of, any
  4226  // terms of an Apple operating system software license agreement.
  4227  //
  4228  // Please obtain a copy of the License at
  4229  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4230  //
  4231  // The Original Code and all software distributed under the License are
  4232  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4233  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4234  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4235  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4236  // Please see the License for the specific language governing rights and
  4237  // limitations under the License.
  4238  //
  4239  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4240  type u_int8_t = uint8 /* _u_int8_t.h:30:33 */
  4241  // Copyright (c) 2012 Apple Inc. All rights reserved.
  4242  //
  4243  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4244  //
  4245  // This file contains Original Code and/or Modifications of Original Code
  4246  // as defined in and that are subject to the Apple Public Source License
  4247  // Version 2.0 (the 'License'). You may not use this file except in
  4248  // compliance with the License. The rights granted to you under the License
  4249  // may not be used to create, or enable the creation or redistribution of,
  4250  // unlawful or unlicensed copies of an Apple operating system, or to
  4251  // circumvent, violate, or enable the circumvention or violation of, any
  4252  // terms of an Apple operating system software license agreement.
  4253  //
  4254  // Please obtain a copy of the License at
  4255  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4256  //
  4257  // The Original Code and all software distributed under the License are
  4258  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4259  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4260  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4261  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4262  // Please see the License for the specific language governing rights and
  4263  // limitations under the License.
  4264  //
  4265  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4266  type u_int16_t = uint16 /* _u_int16_t.h:30:41 */
  4267  // Copyright (c) 2012 Apple Inc. All rights reserved.
  4268  //
  4269  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4270  //
  4271  // This file contains Original Code and/or Modifications of Original Code
  4272  // as defined in and that are subject to the Apple Public Source License
  4273  // Version 2.0 (the 'License'). You may not use this file except in
  4274  // compliance with the License. The rights granted to you under the License
  4275  // may not be used to create, or enable the creation or redistribution of,
  4276  // unlawful or unlicensed copies of an Apple operating system, or to
  4277  // circumvent, violate, or enable the circumvention or violation of, any
  4278  // terms of an Apple operating system software license agreement.
  4279  //
  4280  // Please obtain a copy of the License at
  4281  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4282  //
  4283  // The Original Code and all software distributed under the License are
  4284  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4285  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4286  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4287  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4288  // Please see the License for the specific language governing rights and
  4289  // limitations under the License.
  4290  //
  4291  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4292  type u_int32_t = uint32 /* _u_int32_t.h:30:33 */
  4293  // Copyright (c) 2012 Apple Inc. All rights reserved.
  4294  //
  4295  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4296  //
  4297  // This file contains Original Code and/or Modifications of Original Code
  4298  // as defined in and that are subject to the Apple Public Source License
  4299  // Version 2.0 (the 'License'). You may not use this file except in
  4300  // compliance with the License. The rights granted to you under the License
  4301  // may not be used to create, or enable the creation or redistribution of,
  4302  // unlawful or unlicensed copies of an Apple operating system, or to
  4303  // circumvent, violate, or enable the circumvention or violation of, any
  4304  // terms of an Apple operating system software license agreement.
  4305  //
  4306  // Please obtain a copy of the License at
  4307  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4308  //
  4309  // The Original Code and all software distributed under the License are
  4310  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4311  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4312  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4313  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4314  // Please see the License for the specific language governing rights and
  4315  // limitations under the License.
  4316  //
  4317  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4318  type u_int64_t = uint64 /* _u_int64_t.h:30:33 */
  4319  
  4320  type register_t = int64_t /* types.h:63:33 */
  4321  
  4322  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  4323  //
  4324  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4325  //
  4326  // This file contains Original Code and/or Modifications of Original Code
  4327  // as defined in and that are subject to the Apple Public Source License
  4328  // Version 2.0 (the 'License'). You may not use this file except in
  4329  // compliance with the License. The rights granted to you under the License
  4330  // may not be used to create, or enable the creation or redistribution of,
  4331  // unlawful or unlicensed copies of an Apple operating system, or to
  4332  // circumvent, violate, or enable the circumvention or violation of, any
  4333  // terms of an Apple operating system software license agreement.
  4334  //
  4335  // Please obtain a copy of the License at
  4336  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4337  //
  4338  // The Original Code and all software distributed under the License are
  4339  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4340  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4341  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4342  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4343  // Please see the License for the specific language governing rights and
  4344  // limitations under the License.
  4345  //
  4346  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4347  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  4348  //
  4349  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4350  //
  4351  // This file contains Original Code and/or Modifications of Original Code
  4352  // as defined in and that are subject to the Apple Public Source License
  4353  // Version 2.0 (the 'License'). You may not use this file except in
  4354  // compliance with the License. The rights granted to you under the License
  4355  // may not be used to create, or enable the creation or redistribution of,
  4356  // unlawful or unlicensed copies of an Apple operating system, or to
  4357  // circumvent, violate, or enable the circumvention or violation of, any
  4358  // terms of an Apple operating system software license agreement.
  4359  //
  4360  // Please obtain a copy of the License at
  4361  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4362  //
  4363  // The Original Code and all software distributed under the License are
  4364  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4365  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4366  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4367  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4368  // Please see the License for the specific language governing rights and
  4369  // limitations under the License.
  4370  //
  4371  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4372  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  4373  
  4374  type intptr_t = int64 /* _intptr_t.h:32:33 */
  4375  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  4376  //
  4377  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4378  //
  4379  // This file contains Original Code and/or Modifications of Original Code
  4380  // as defined in and that are subject to the Apple Public Source License
  4381  // Version 2.0 (the 'License'). You may not use this file except in
  4382  // compliance with the License. The rights granted to you under the License
  4383  // may not be used to create, or enable the creation or redistribution of,
  4384  // unlawful or unlicensed copies of an Apple operating system, or to
  4385  // circumvent, violate, or enable the circumvention or violation of, any
  4386  // terms of an Apple operating system software license agreement.
  4387  //
  4388  // Please obtain a copy of the License at
  4389  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4390  //
  4391  // The Original Code and all software distributed under the License are
  4392  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4393  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4394  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4395  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4396  // Please see the License for the specific language governing rights and
  4397  // limitations under the License.
  4398  //
  4399  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4400  type uintptr_t = uint64 /* _uintptr_t.h:30:33 */
  4401  
  4402  // These types are used for reserving the largest possible size.
  4403  type user_addr_t = u_int64_t  /* types.h:74:33 */
  4404  type user_size_t = u_int64_t  /* types.h:75:33 */
  4405  type user_ssize_t = int64_t   /* types.h:76:33 */
  4406  type user_long_t = int64_t    /* types.h:77:33 */
  4407  type user_ulong_t = u_int64_t /* types.h:78:33 */
  4408  type user_time_t = int64_t    /* types.h:79:33 */
  4409  type user_off_t = int64_t     /* types.h:80:33 */
  4410  
  4411  // This defines the size of syscall arguments after copying into the kernel:
  4412  type syscall_arg_t = u_int64_t /* types.h:101:33 */
  4413  
  4414  type fpos_t = int64 /* _stdio.h:81:25 */
  4415  
  4416  // NB: to fit things in six character monocase externals, the stdio
  4417  // code uses the prefix `__s' for stdio objects, typically followed
  4418  // by a three-character attempt at a mnemonic.
  4419  
  4420  // stdio buffers
  4421  type __sbuf = struct {
  4422  	_base uintptr
  4423  	_size int32
  4424  	_     [4]byte
  4425  } /* _stdio.h:92:1 */
  4426  
  4427  // stdio state variables.
  4428  //
  4429  // The following always hold:
  4430  //
  4431  //	if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
  4432  //		_lbfsize is -_bf._size, else _lbfsize is 0
  4433  //	if _flags&__SRD, _w is 0
  4434  //	if _flags&__SWR, _r is 0
  4435  //
  4436  // This ensures that the getc and putc macros (or inline functions) never
  4437  // try to write or read from a file that is in `read' or `write' mode.
  4438  // (Moreover, they can, and do, automatically switch from read mode to
  4439  // write mode, and back, on "r+" and "w+" files.)
  4440  //
  4441  // _lbfsize is used only to make the inline line-buffered output stream
  4442  // code as compact as possible.
  4443  //
  4444  // _ub, _up, and _ur are used when ungetc() pushes back more characters
  4445  // than fit in the current _bf, or when ungetc() pushes back a character
  4446  // that does not match the previous one in _bf.  When this happens,
  4447  // _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
  4448  // _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
  4449  //
  4450  // NB: see WARNING above before changing the layout of this structure!
  4451  type __sFILE = struct {
  4452  	_p     uintptr
  4453  	_r     int32
  4454  	_w     int32
  4455  	_flags int16
  4456  	_file  int16
  4457  	_      [4]byte
  4458  	_bf    struct {
  4459  		_base uintptr
  4460  		_size int32
  4461  		_     [4]byte
  4462  	}
  4463  	_lbfsize int32
  4464  	_        [4]byte
  4465  	_cookie  uintptr
  4466  	_close   uintptr
  4467  	_read    uintptr
  4468  	_seek    uintptr
  4469  	_write   uintptr
  4470  	_ub      struct {
  4471  		_base uintptr
  4472  		_size int32
  4473  		_     [4]byte
  4474  	}
  4475  	_extra uintptr
  4476  	_ur    int32
  4477  	_ubuf  [3]uint8
  4478  	_nbuf  [1]uint8
  4479  	_lb    struct {
  4480  		_base uintptr
  4481  		_size int32
  4482  		_     [4]byte
  4483  	}
  4484  	_blksize int32
  4485  	_        [4]byte
  4486  	_offset  fpos_t
  4487  } /* _stdio.h:126:9 */
  4488  
  4489  // stdio state variables.
  4490  //
  4491  // The following always hold:
  4492  //
  4493  //	if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
  4494  //		_lbfsize is -_bf._size, else _lbfsize is 0
  4495  //	if _flags&__SRD, _w is 0
  4496  //	if _flags&__SWR, _r is 0
  4497  //
  4498  // This ensures that the getc and putc macros (or inline functions) never
  4499  // try to write or read from a file that is in `read' or `write' mode.
  4500  // (Moreover, they can, and do, automatically switch from read mode to
  4501  // write mode, and back, on "r+" and "w+" files.)
  4502  //
  4503  // _lbfsize is used only to make the inline line-buffered output stream
  4504  // code as compact as possible.
  4505  //
  4506  // _ub, _up, and _ur are used when ungetc() pushes back more characters
  4507  // than fit in the current _bf, or when ungetc() pushes back a character
  4508  // that does not match the previous one in _bf.  When this happens,
  4509  // _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
  4510  // _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
  4511  //
  4512  // NB: see WARNING above before changing the layout of this structure!
  4513  type FILE = __sFILE /* _stdio.h:157:3 */
  4514  
  4515  // Additional functionality provided by:
  4516  // POSIX.1-2001
  4517  // ISO C99
  4518  
  4519  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  4520  //
  4521  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4522  //
  4523  // This file contains Original Code and/or Modifications of Original Code
  4524  // as defined in and that are subject to the Apple Public Source License
  4525  // Version 2.0 (the 'License'). You may not use this file except in
  4526  // compliance with the License. The rights granted to you under the License
  4527  // may not be used to create, or enable the creation or redistribution of,
  4528  // unlawful or unlicensed copies of an Apple operating system, or to
  4529  // circumvent, violate, or enable the circumvention or violation of, any
  4530  // terms of an Apple operating system software license agreement.
  4531  //
  4532  // Please obtain a copy of the License at
  4533  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4534  //
  4535  // The Original Code and all software distributed under the License are
  4536  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4537  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4538  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4539  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4540  // Please see the License for the specific language governing rights and
  4541  // limitations under the License.
  4542  //
  4543  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4544  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  4545  //
  4546  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4547  //
  4548  // This file contains Original Code and/or Modifications of Original Code
  4549  // as defined in and that are subject to the Apple Public Source License
  4550  // Version 2.0 (the 'License'). You may not use this file except in
  4551  // compliance with the License. The rights granted to you under the License
  4552  // may not be used to create, or enable the creation or redistribution of,
  4553  // unlawful or unlicensed copies of an Apple operating system, or to
  4554  // circumvent, violate, or enable the circumvention or violation of, any
  4555  // terms of an Apple operating system software license agreement.
  4556  //
  4557  // Please obtain a copy of the License at
  4558  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4559  //
  4560  // The Original Code and all software distributed under the License are
  4561  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4562  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4563  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4564  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4565  // Please see the License for the specific language governing rights and
  4566  // limitations under the License.
  4567  //
  4568  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4569  
  4570  type off_t = int64 /* _off_t.h:31:33 */
  4571  
  4572  // Additional functionality provided by:
  4573  // POSIX.1-2008
  4574  
  4575  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  4576  //
  4577  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4578  //
  4579  // This file contains Original Code and/or Modifications of Original Code
  4580  // as defined in and that are subject to the Apple Public Source License
  4581  // Version 2.0 (the 'License'). You may not use this file except in
  4582  // compliance with the License. The rights granted to you under the License
  4583  // may not be used to create, or enable the creation or redistribution of,
  4584  // unlawful or unlicensed copies of an Apple operating system, or to
  4585  // circumvent, violate, or enable the circumvention or violation of, any
  4586  // terms of an Apple operating system software license agreement.
  4587  //
  4588  // Please obtain a copy of the License at
  4589  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4590  //
  4591  // The Original Code and all software distributed under the License are
  4592  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4593  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4594  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4595  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4596  // Please see the License for the specific language governing rights and
  4597  // limitations under the License.
  4598  //
  4599  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4600  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  4601  //
  4602  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4603  //
  4604  // This file contains Original Code and/or Modifications of Original Code
  4605  // as defined in and that are subject to the Apple Public Source License
  4606  // Version 2.0 (the 'License'). You may not use this file except in
  4607  // compliance with the License. The rights granted to you under the License
  4608  // may not be used to create, or enable the creation or redistribution of,
  4609  // unlawful or unlicensed copies of an Apple operating system, or to
  4610  // circumvent, violate, or enable the circumvention or violation of, any
  4611  // terms of an Apple operating system software license agreement.
  4612  //
  4613  // Please obtain a copy of the License at
  4614  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4615  //
  4616  // The Original Code and all software distributed under the License are
  4617  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4618  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4619  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4620  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4621  // Please see the License for the specific language governing rights and
  4622  // limitations under the License.
  4623  //
  4624  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4625  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  4626  type ssize_t = int64 /* _ssize_t.h:31:33 */
  4627  
  4628  // Copyright (c) 2000, 2002-2006, 2008-2010, 2012 Apple Inc. All rights reserved.
  4629  //
  4630  // @APPLE_LICENSE_HEADER_START@
  4631  //
  4632  // This file contains Original Code and/or Modifications of Original Code
  4633  // as defined in and that are subject to the Apple Public Source License
  4634  // Version 2.0 (the 'License'). You may not use this file except in
  4635  // compliance with the License. Please obtain a copy of the License at
  4636  // http://www.opensource.apple.com/apsl/ and read it before using this
  4637  // file.
  4638  //
  4639  // The Original Code and all software distributed under the License are
  4640  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4641  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4642  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4643  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4644  // Please see the License for the specific language governing rights and
  4645  // limitations under the License.
  4646  //
  4647  // @APPLE_LICENSE_HEADER_END@
  4648  // -
  4649  // Copyright (c) 1998-1999 Apple Computer, Inc. All Rights Reserved
  4650  // Copyright (c) 1991, 1993, 1994
  4651  //	The Regents of the University of California.  All rights reserved.
  4652  //
  4653  // Redistribution and use in source and binary forms, with or without
  4654  // modification, are permitted provided that the following conditions
  4655  // are met:
  4656  // 1. Redistributions of source code must retain the above copyright
  4657  //    notice, this list of conditions and the following disclaimer.
  4658  // 2. Redistributions in binary form must reproduce the above copyright
  4659  //    notice, this list of conditions and the following disclaimer in the
  4660  //    documentation and/or other materials provided with the distribution.
  4661  // 3. All advertising materials mentioning features or use of this software
  4662  //    must display the following acknowledgement:
  4663  //	This product includes software developed by the University of
  4664  //	California, Berkeley and its contributors.
  4665  // 4. Neither the name of the University nor the names of its contributors
  4666  //    may be used to endorse or promote products derived from this software
  4667  //    without specific prior written permission.
  4668  //
  4669  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  4670  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  4671  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  4672  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  4673  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  4674  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  4675  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  4676  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  4677  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  4678  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  4679  // SUCH DAMAGE.
  4680  //
  4681  //	@(#)unistd.h	8.12 (Berkeley) 4/27/95
  4682  //
  4683  //  Copyright (c)  1998 Apple Compter, Inc.
  4684  //  All Rights Reserved
  4685  
  4686  // History:
  4687  //         7/14/99 EKN at Apple fixed getdirentriesattr from getdirentryattr
  4688  //         3/26/98 CHW at Apple added real interface to searchfs call
  4689  //   	3/5/98  CHW at Apple added hfs semantic system calls headers
  4690  
  4691  // Copyright (c) 2004, 2008, 2009 Apple Inc. All rights reserved.
  4692  //
  4693  // @APPLE_LICENSE_HEADER_START@
  4694  //
  4695  // This file contains Original Code and/or Modifications of Original Code
  4696  // as defined in and that are subject to the Apple Public Source License
  4697  // Version 2.0 (the 'License'). You may not use this file except in
  4698  // compliance with the License. Please obtain a copy of the License at
  4699  // http://www.opensource.apple.com/apsl/ and read it before using this
  4700  // file.
  4701  //
  4702  // The Original Code and all software distributed under the License are
  4703  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4704  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4705  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4706  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4707  // Please see the License for the specific language governing rights and
  4708  // limitations under the License.
  4709  //
  4710  // @APPLE_LICENSE_HEADER_END@
  4711  
  4712  // Copyright (c) 2000-2013 Apple Inc. All rights reserved.
  4713  //
  4714  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4715  //
  4716  // This file contains Original Code and/or Modifications of Original Code
  4717  // as defined in and that are subject to the Apple Public Source License
  4718  // Version 2.0 (the 'License'). You may not use this file except in
  4719  // compliance with the License. The rights granted to you under the License
  4720  // may not be used to create, or enable the creation or redistribution of,
  4721  // unlawful or unlicensed copies of an Apple operating system, or to
  4722  // circumvent, violate, or enable the circumvention or violation of, any
  4723  // terms of an Apple operating system software license agreement.
  4724  //
  4725  // Please obtain a copy of the License at
  4726  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4727  //
  4728  // The Original Code and all software distributed under the License are
  4729  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4730  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4731  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4732  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4733  // Please see the License for the specific language governing rights and
  4734  // limitations under the License.
  4735  //
  4736  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4737  // Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
  4738  // Copyright (c) 1989, 1993
  4739  //	The Regents of the University of California.  All rights reserved.
  4740  //
  4741  // Redistribution and use in source and binary forms, with or without
  4742  // modification, are permitted provided that the following conditions
  4743  // are met:
  4744  // 1. Redistributions of source code must retain the above copyright
  4745  //    notice, this list of conditions and the following disclaimer.
  4746  // 2. Redistributions in binary form must reproduce the above copyright
  4747  //    notice, this list of conditions and the following disclaimer in the
  4748  //    documentation and/or other materials provided with the distribution.
  4749  // 3. All advertising materials mentioning features or use of this software
  4750  //    must display the following acknowledgement:
  4751  //	This product includes software developed by the University of
  4752  //	California, Berkeley and its contributors.
  4753  // 4. Neither the name of the University nor the names of its contributors
  4754  //    may be used to endorse or promote products derived from this software
  4755  //    without specific prior written permission.
  4756  //
  4757  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  4758  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  4759  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  4760  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  4761  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  4762  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  4763  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  4764  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  4765  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  4766  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  4767  // SUCH DAMAGE.
  4768  //
  4769  //	@(#)unistd.h	8.2 (Berkeley) 1/7/94
  4770  
  4771  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  4772  //
  4773  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4774  //
  4775  // This file contains Original Code and/or Modifications of Original Code
  4776  // as defined in and that are subject to the Apple Public Source License
  4777  // Version 2.0 (the 'License'). You may not use this file except in
  4778  // compliance with the License. The rights granted to you under the License
  4779  // may not be used to create, or enable the creation or redistribution of,
  4780  // unlawful or unlicensed copies of an Apple operating system, or to
  4781  // circumvent, violate, or enable the circumvention or violation of, any
  4782  // terms of an Apple operating system software license agreement.
  4783  //
  4784  // Please obtain a copy of the License at
  4785  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4786  //
  4787  // The Original Code and all software distributed under the License are
  4788  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4789  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4790  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4791  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4792  // Please see the License for the specific language governing rights and
  4793  // limitations under the License.
  4794  //
  4795  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4796  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  4797  // Copyright (c) 1991, 1993
  4798  //	The Regents of the University of California.  All rights reserved.
  4799  //
  4800  // This code is derived from software contributed to Berkeley by
  4801  // Berkeley Software Design, Inc.
  4802  //
  4803  // Redistribution and use in source and binary forms, with or without
  4804  // modification, are permitted provided that the following conditions
  4805  // are met:
  4806  // 1. Redistributions of source code must retain the above copyright
  4807  //    notice, this list of conditions and the following disclaimer.
  4808  // 2. Redistributions in binary form must reproduce the above copyright
  4809  //    notice, this list of conditions and the following disclaimer in the
  4810  //    documentation and/or other materials provided with the distribution.
  4811  // 3. All advertising materials mentioning features or use of this software
  4812  //    must display the following acknowledgement:
  4813  //	This product includes software developed by the University of
  4814  //	California, Berkeley and its contributors.
  4815  // 4. Neither the name of the University nor the names of its contributors
  4816  //    may be used to endorse or promote products derived from this software
  4817  //    without specific prior written permission.
  4818  //
  4819  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  4820  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  4821  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  4822  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  4823  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  4824  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  4825  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  4826  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  4827  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  4828  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  4829  // SUCH DAMAGE.
  4830  //
  4831  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  4832  
  4833  // Although we have saved user/group IDs, we do not use them in setuid
  4834  // as described in POSIX 1003.1, because the feature does not work for
  4835  // root.  We use the saved IDs in seteuid/setegid, which are not currently
  4836  // part of the POSIX 1003.1 specification.
  4837  
  4838  // execution-time symbolic constants
  4839  // may disable terminal special characters
  4840  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  4841  //
  4842  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4843  //
  4844  // This file contains Original Code and/or Modifications of Original Code
  4845  // as defined in and that are subject to the Apple Public Source License
  4846  // Version 2.0 (the 'License'). You may not use this file except in
  4847  // compliance with the License. The rights granted to you under the License
  4848  // may not be used to create, or enable the creation or redistribution of,
  4849  // unlawful or unlicensed copies of an Apple operating system, or to
  4850  // circumvent, violate, or enable the circumvention or violation of, any
  4851  // terms of an Apple operating system software license agreement.
  4852  //
  4853  // Please obtain a copy of the License at
  4854  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4855  //
  4856  // The Original Code and all software distributed under the License are
  4857  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4858  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4859  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4860  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4861  // Please see the License for the specific language governing rights and
  4862  // limitations under the License.
  4863  //
  4864  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4865  
  4866  // access function
  4867  
  4868  // Extended access functions.
  4869  // Note that we depend on these matching the definitions in sys/kauth.h,
  4870  // but with the bits shifted left by 8.
  4871  
  4872  // whence values for lseek(2)
  4873  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  4874  //
  4875  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4876  //
  4877  // This file contains Original Code and/or Modifications of Original Code
  4878  // as defined in and that are subject to the Apple Public Source License
  4879  // Version 2.0 (the 'License'). You may not use this file except in
  4880  // compliance with the License. The rights granted to you under the License
  4881  // may not be used to create, or enable the creation or redistribution of,
  4882  // unlawful or unlicensed copies of an Apple operating system, or to
  4883  // circumvent, violate, or enable the circumvention or violation of, any
  4884  // terms of an Apple operating system software license agreement.
  4885  //
  4886  // Please obtain a copy of the License at
  4887  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4888  //
  4889  // The Original Code and all software distributed under the License are
  4890  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4891  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4892  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4893  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4894  // Please see the License for the specific language governing rights and
  4895  // limitations under the License.
  4896  //
  4897  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4898  
  4899  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  4900  //
  4901  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4902  //
  4903  // This file contains Original Code and/or Modifications of Original Code
  4904  // as defined in and that are subject to the Apple Public Source License
  4905  // Version 2.0 (the 'License'). You may not use this file except in
  4906  // compliance with the License. The rights granted to you under the License
  4907  // may not be used to create, or enable the creation or redistribution of,
  4908  // unlawful or unlicensed copies of an Apple operating system, or to
  4909  // circumvent, violate, or enable the circumvention or violation of, any
  4910  // terms of an Apple operating system software license agreement.
  4911  //
  4912  // Please obtain a copy of the License at
  4913  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4914  //
  4915  // The Original Code and all software distributed under the License are
  4916  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4917  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4918  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4919  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4920  // Please see the License for the specific language governing rights and
  4921  // limitations under the License.
  4922  //
  4923  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  4924  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  4925  // Copyright (c) 1991, 1993
  4926  //	The Regents of the University of California.  All rights reserved.
  4927  //
  4928  // This code is derived from software contributed to Berkeley by
  4929  // Berkeley Software Design, Inc.
  4930  //
  4931  // Redistribution and use in source and binary forms, with or without
  4932  // modification, are permitted provided that the following conditions
  4933  // are met:
  4934  // 1. Redistributions of source code must retain the above copyright
  4935  //    notice, this list of conditions and the following disclaimer.
  4936  // 2. Redistributions in binary form must reproduce the above copyright
  4937  //    notice, this list of conditions and the following disclaimer in the
  4938  //    documentation and/or other materials provided with the distribution.
  4939  // 3. All advertising materials mentioning features or use of this software
  4940  //    must display the following acknowledgement:
  4941  //	This product includes software developed by the University of
  4942  //	California, Berkeley and its contributors.
  4943  // 4. Neither the name of the University nor the names of its contributors
  4944  //    may be used to endorse or promote products derived from this software
  4945  //    without specific prior written permission.
  4946  //
  4947  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  4948  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  4949  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  4950  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  4951  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  4952  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  4953  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  4954  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  4955  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  4956  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  4957  // SUCH DAMAGE.
  4958  //
  4959  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  4960  
  4961  // whence values for lseek(2)
  4962  
  4963  // whence values for lseek(2); renamed by POSIX 1003.1
  4964  
  4965  type accessx_descriptor = struct {
  4966  	ad_name_offset uint32
  4967  	ad_flags       int32
  4968  	ad_pad         [2]int32
  4969  } /* unistd.h:132:1 */
  4970  
  4971  // configurable pathname variables
  4972  
  4973  // configurable system strings
  4974  
  4975  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  4976  //
  4977  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  4978  //
  4979  // This file contains Original Code and/or Modifications of Original Code
  4980  // as defined in and that are subject to the Apple Public Source License
  4981  // Version 2.0 (the 'License'). You may not use this file except in
  4982  // compliance with the License. The rights granted to you under the License
  4983  // may not be used to create, or enable the creation or redistribution of,
  4984  // unlawful or unlicensed copies of an Apple operating system, or to
  4985  // circumvent, violate, or enable the circumvention or violation of, any
  4986  // terms of an Apple operating system software license agreement.
  4987  //
  4988  // Please obtain a copy of the License at
  4989  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  4990  //
  4991  // The Original Code and all software distributed under the License are
  4992  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  4993  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  4994  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  4995  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  4996  // Please see the License for the specific language governing rights and
  4997  // limitations under the License.
  4998  //
  4999  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5000  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  5001  //
  5002  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5003  //
  5004  // This file contains Original Code and/or Modifications of Original Code
  5005  // as defined in and that are subject to the Apple Public Source License
  5006  // Version 2.0 (the 'License'). You may not use this file except in
  5007  // compliance with the License. The rights granted to you under the License
  5008  // may not be used to create, or enable the creation or redistribution of,
  5009  // unlawful or unlicensed copies of an Apple operating system, or to
  5010  // circumvent, violate, or enable the circumvention or violation of, any
  5011  // terms of an Apple operating system software license agreement.
  5012  //
  5013  // Please obtain a copy of the License at
  5014  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5015  //
  5016  // The Original Code and all software distributed under the License are
  5017  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5018  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5019  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5020  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5021  // Please see the License for the specific language governing rights and
  5022  // limitations under the License.
  5023  //
  5024  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5025  // Copyright (c) 2012 Apple Inc. All rights reserved.
  5026  //
  5027  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5028  //
  5029  // This file contains Original Code and/or Modifications of Original Code
  5030  // as defined in and that are subject to the Apple Public Source License
  5031  // Version 2.0 (the 'License'). You may not use this file except in
  5032  // compliance with the License. The rights granted to you under the License
  5033  // may not be used to create, or enable the creation or redistribution of,
  5034  // unlawful or unlicensed copies of an Apple operating system, or to
  5035  // circumvent, violate, or enable the circumvention or violation of, any
  5036  // terms of an Apple operating system software license agreement.
  5037  //
  5038  // Please obtain a copy of the License at
  5039  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5040  //
  5041  // The Original Code and all software distributed under the License are
  5042  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5043  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5044  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5045  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5046  // Please see the License for the specific language governing rights and
  5047  // limitations under the License.
  5048  //
  5049  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5050  
  5051  type uint64_t = uint64 /* _uint64_t.h:31:28 */
  5052  // Copyright (c) 2012 Apple Inc. All rights reserved.
  5053  //
  5054  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5055  //
  5056  // This file contains Original Code and/or Modifications of Original Code
  5057  // as defined in and that are subject to the Apple Public Source License
  5058  // Version 2.0 (the 'License'). You may not use this file except in
  5059  // compliance with the License. The rights granted to you under the License
  5060  // may not be used to create, or enable the creation or redistribution of,
  5061  // unlawful or unlicensed copies of an Apple operating system, or to
  5062  // circumvent, violate, or enable the circumvention or violation of, any
  5063  // terms of an Apple operating system software license agreement.
  5064  //
  5065  // Please obtain a copy of the License at
  5066  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5067  //
  5068  // The Original Code and all software distributed under the License are
  5069  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5070  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5071  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5072  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5073  // Please see the License for the specific language governing rights and
  5074  // limitations under the License.
  5075  //
  5076  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5077  
  5078  type uint32_t = uint32 /* _uint32_t.h:31:22 */
  5079  
  5080  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  5081  //
  5082  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5083  //
  5084  // This file contains Original Code and/or Modifications of Original Code
  5085  // as defined in and that are subject to the Apple Public Source License
  5086  // Version 2.0 (the 'License'). You may not use this file except in
  5087  // compliance with the License. The rights granted to you under the License
  5088  // may not be used to create, or enable the creation or redistribution of,
  5089  // unlawful or unlicensed copies of an Apple operating system, or to
  5090  // circumvent, violate, or enable the circumvention or violation of, any
  5091  // terms of an Apple operating system software license agreement.
  5092  //
  5093  // Please obtain a copy of the License at
  5094  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5095  //
  5096  // The Original Code and all software distributed under the License are
  5097  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5098  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5099  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5100  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5101  // Please see the License for the specific language governing rights and
  5102  // limitations under the License.
  5103  //
  5104  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5105  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  5106  //
  5107  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5108  //
  5109  // This file contains Original Code and/or Modifications of Original Code
  5110  // as defined in and that are subject to the Apple Public Source License
  5111  // Version 2.0 (the 'License'). You may not use this file except in
  5112  // compliance with the License. The rights granted to you under the License
  5113  // may not be used to create, or enable the creation or redistribution of,
  5114  // unlawful or unlicensed copies of an Apple operating system, or to
  5115  // circumvent, violate, or enable the circumvention or violation of, any
  5116  // terms of an Apple operating system software license agreement.
  5117  //
  5118  // Please obtain a copy of the License at
  5119  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5120  //
  5121  // The Original Code and all software distributed under the License are
  5122  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5123  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5124  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5125  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5126  // Please see the License for the specific language governing rights and
  5127  // limitations under the License.
  5128  //
  5129  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5130  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  5131  //
  5132  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5133  //
  5134  // This file contains Original Code and/or Modifications of Original Code
  5135  // as defined in and that are subject to the Apple Public Source License
  5136  // Version 2.0 (the 'License'). You may not use this file except in
  5137  // compliance with the License. The rights granted to you under the License
  5138  // may not be used to create, or enable the creation or redistribution of,
  5139  // unlawful or unlicensed copies of an Apple operating system, or to
  5140  // circumvent, violate, or enable the circumvention or violation of, any
  5141  // terms of an Apple operating system software license agreement.
  5142  //
  5143  // Please obtain a copy of the License at
  5144  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5145  //
  5146  // The Original Code and all software distributed under the License are
  5147  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5148  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5149  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5150  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5151  // Please see the License for the specific language governing rights and
  5152  // limitations under the License.
  5153  //
  5154  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5155  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  5156  //
  5157  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5158  //
  5159  // This file contains Original Code and/or Modifications of Original Code
  5160  // as defined in and that are subject to the Apple Public Source License
  5161  // Version 2.0 (the 'License'). You may not use this file except in
  5162  // compliance with the License. The rights granted to you under the License
  5163  // may not be used to create, or enable the creation or redistribution of,
  5164  // unlawful or unlicensed copies of an Apple operating system, or to
  5165  // circumvent, violate, or enable the circumvention or violation of, any
  5166  // terms of an Apple operating system software license agreement.
  5167  //
  5168  // Please obtain a copy of the License at
  5169  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5170  //
  5171  // The Original Code and all software distributed under the License are
  5172  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5173  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5174  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5175  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5176  // Please see the License for the specific language governing rights and
  5177  // limitations under the License.
  5178  //
  5179  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5180  
  5181  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  5182  //
  5183  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5184  //
  5185  // This file contains Original Code and/or Modifications of Original Code
  5186  // as defined in and that are subject to the Apple Public Source License
  5187  // Version 2.0 (the 'License'). You may not use this file except in
  5188  // compliance with the License. The rights granted to you under the License
  5189  // may not be used to create, or enable the creation or redistribution of,
  5190  // unlawful or unlicensed copies of an Apple operating system, or to
  5191  // circumvent, violate, or enable the circumvention or violation of, any
  5192  // terms of an Apple operating system software license agreement.
  5193  //
  5194  // Please obtain a copy of the License at
  5195  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5196  //
  5197  // The Original Code and all software distributed under the License are
  5198  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5199  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5200  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5201  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5202  // Please see the License for the specific language governing rights and
  5203  // limitations under the License.
  5204  //
  5205  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5206  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  5207  //
  5208  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5209  //
  5210  // This file contains Original Code and/or Modifications of Original Code
  5211  // as defined in and that are subject to the Apple Public Source License
  5212  // Version 2.0 (the 'License'). You may not use this file except in
  5213  // compliance with the License. The rights granted to you under the License
  5214  // may not be used to create, or enable the creation or redistribution of,
  5215  // unlawful or unlicensed copies of an Apple operating system, or to
  5216  // circumvent, violate, or enable the circumvention or violation of, any
  5217  // terms of an Apple operating system software license agreement.
  5218  //
  5219  // Please obtain a copy of the License at
  5220  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5221  //
  5222  // The Original Code and all software distributed under the License are
  5223  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5224  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5225  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5226  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5227  // Please see the License for the specific language governing rights and
  5228  // limitations under the License.
  5229  //
  5230  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5231  
  5232  type uid_t = uint32 /* _uid_t.h:31:31 */
  5233  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  5234  //
  5235  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5236  //
  5237  // This file contains Original Code and/or Modifications of Original Code
  5238  // as defined in and that are subject to the Apple Public Source License
  5239  // Version 2.0 (the 'License'). You may not use this file except in
  5240  // compliance with the License. The rights granted to you under the License
  5241  // may not be used to create, or enable the creation or redistribution of,
  5242  // unlawful or unlicensed copies of an Apple operating system, or to
  5243  // circumvent, violate, or enable the circumvention or violation of, any
  5244  // terms of an Apple operating system software license agreement.
  5245  //
  5246  // Please obtain a copy of the License at
  5247  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5248  //
  5249  // The Original Code and all software distributed under the License are
  5250  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5251  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5252  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5253  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5254  // Please see the License for the specific language governing rights and
  5255  // limitations under the License.
  5256  //
  5257  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5258  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  5259  //
  5260  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5261  //
  5262  // This file contains Original Code and/or Modifications of Original Code
  5263  // as defined in and that are subject to the Apple Public Source License
  5264  // Version 2.0 (the 'License'). You may not use this file except in
  5265  // compliance with the License. The rights granted to you under the License
  5266  // may not be used to create, or enable the creation or redistribution of,
  5267  // unlawful or unlicensed copies of an Apple operating system, or to
  5268  // circumvent, violate, or enable the circumvention or violation of, any
  5269  // terms of an Apple operating system software license agreement.
  5270  //
  5271  // Please obtain a copy of the License at
  5272  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5273  //
  5274  // The Original Code and all software distributed under the License are
  5275  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5276  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5277  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5278  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5279  // Please see the License for the specific language governing rights and
  5280  // limitations under the License.
  5281  //
  5282  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5283  
  5284  type gid_t = uint32 /* _gid_t.h:31:25 */
  5285  
  5286  // Copyright (c) 2007-2016 by Apple Inc.. All rights reserved.
  5287  //
  5288  // @APPLE_LICENSE_HEADER_START@
  5289  //
  5290  // This file contains Original Code and/or Modifications of Original Code
  5291  // as defined in and that are subject to the Apple Public Source License
  5292  // Version 2.0 (the 'License'). You may not use this file except in
  5293  // compliance with the License. Please obtain a copy of the License at
  5294  // http://www.opensource.apple.com/apsl/ and read it before using this
  5295  // file.
  5296  //
  5297  // The Original Code and all software distributed under the License are
  5298  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5299  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5300  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5301  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5302  // Please see the License for the specific language governing rights and
  5303  // limitations under the License.
  5304  //
  5305  // @APPLE_LICENSE_HEADER_END@
  5306  
  5307  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  5308  //
  5309  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5310  //
  5311  // This file contains Original Code and/or Modifications of Original Code
  5312  // as defined in and that are subject to the Apple Public Source License
  5313  // Version 2.0 (the 'License'). You may not use this file except in
  5314  // compliance with the License. The rights granted to you under the License
  5315  // may not be used to create, or enable the creation or redistribution of,
  5316  // unlawful or unlicensed copies of an Apple operating system, or to
  5317  // circumvent, violate, or enable the circumvention or violation of, any
  5318  // terms of an Apple operating system software license agreement.
  5319  //
  5320  // Please obtain a copy of the License at
  5321  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5322  //
  5323  // The Original Code and all software distributed under the License are
  5324  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5325  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5326  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5327  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5328  // Please see the License for the specific language governing rights and
  5329  // limitations under the License.
  5330  //
  5331  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5332  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  5333  //
  5334  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5335  //
  5336  // This file contains Original Code and/or Modifications of Original Code
  5337  // as defined in and that are subject to the Apple Public Source License
  5338  // Version 2.0 (the 'License'). You may not use this file except in
  5339  // compliance with the License. The rights granted to you under the License
  5340  // may not be used to create, or enable the creation or redistribution of,
  5341  // unlawful or unlicensed copies of an Apple operating system, or to
  5342  // circumvent, violate, or enable the circumvention or violation of, any
  5343  // terms of an Apple operating system software license agreement.
  5344  //
  5345  // Please obtain a copy of the License at
  5346  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5347  //
  5348  // The Original Code and all software distributed under the License are
  5349  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5350  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5351  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5352  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5353  // Please see the License for the specific language governing rights and
  5354  // limitations under the License.
  5355  //
  5356  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5357  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  5358  //
  5359  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5360  //
  5361  // This file contains Original Code and/or Modifications of Original Code
  5362  // as defined in and that are subject to the Apple Public Source License
  5363  // Version 2.0 (the 'License'). You may not use this file except in
  5364  // compliance with the License. The rights granted to you under the License
  5365  // may not be used to create, or enable the creation or redistribution of,
  5366  // unlawful or unlicensed copies of an Apple operating system, or to
  5367  // circumvent, violate, or enable the circumvention or violation of, any
  5368  // terms of an Apple operating system software license agreement.
  5369  //
  5370  // Please obtain a copy of the License at
  5371  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5372  //
  5373  // The Original Code and all software distributed under the License are
  5374  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5375  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5376  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5377  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5378  // Please see the License for the specific language governing rights and
  5379  // limitations under the License.
  5380  //
  5381  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5382  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  5383  //
  5384  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5385  //
  5386  // This file contains Original Code and/or Modifications of Original Code
  5387  // as defined in and that are subject to the Apple Public Source License
  5388  // Version 2.0 (the 'License'). You may not use this file except in
  5389  // compliance with the License. The rights granted to you under the License
  5390  // may not be used to create, or enable the creation or redistribution of,
  5391  // unlawful or unlicensed copies of an Apple operating system, or to
  5392  // circumvent, violate, or enable the circumvention or violation of, any
  5393  // terms of an Apple operating system software license agreement.
  5394  //
  5395  // Please obtain a copy of the License at
  5396  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5397  //
  5398  // The Original Code and all software distributed under the License are
  5399  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5400  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5401  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5402  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5403  // Please see the License for the specific language governing rights and
  5404  // limitations under the License.
  5405  //
  5406  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5407  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  5408  //
  5409  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5410  //
  5411  // This file contains Original Code and/or Modifications of Original Code
  5412  // as defined in and that are subject to the Apple Public Source License
  5413  // Version 2.0 (the 'License'). You may not use this file except in
  5414  // compliance with the License. The rights granted to you under the License
  5415  // may not be used to create, or enable the creation or redistribution of,
  5416  // unlawful or unlicensed copies of an Apple operating system, or to
  5417  // circumvent, violate, or enable the circumvention or violation of, any
  5418  // terms of an Apple operating system software license agreement.
  5419  //
  5420  // Please obtain a copy of the License at
  5421  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5422  //
  5423  // The Original Code and all software distributed under the License are
  5424  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5425  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5426  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5427  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5428  // Please see the License for the specific language governing rights and
  5429  // limitations under the License.
  5430  //
  5431  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5432  
  5433  type pid_t = int32 /* _pid_t.h:31:31 */
  5434  // DO NOT REMOVE THIS COMMENT: fixincludes needs to see:
  5435  // _GCC_SIZE_T
  5436  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  5437  //
  5438  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5439  //
  5440  // This file contains Original Code and/or Modifications of Original Code
  5441  // as defined in and that are subject to the Apple Public Source License
  5442  // Version 2.0 (the 'License'). You may not use this file except in
  5443  // compliance with the License. The rights granted to you under the License
  5444  // may not be used to create, or enable the creation or redistribution of,
  5445  // unlawful or unlicensed copies of an Apple operating system, or to
  5446  // circumvent, violate, or enable the circumvention or violation of, any
  5447  // terms of an Apple operating system software license agreement.
  5448  //
  5449  // Please obtain a copy of the License at
  5450  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5451  //
  5452  // The Original Code and all software distributed under the License are
  5453  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5454  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5455  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5456  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5457  // Please see the License for the specific language governing rights and
  5458  // limitations under the License.
  5459  //
  5460  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5461  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  5462  //
  5463  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5464  //
  5465  // This file contains Original Code and/or Modifications of Original Code
  5466  // as defined in and that are subject to the Apple Public Source License
  5467  // Version 2.0 (the 'License'). You may not use this file except in
  5468  // compliance with the License. The rights granted to you under the License
  5469  // may not be used to create, or enable the creation or redistribution of,
  5470  // unlawful or unlicensed copies of an Apple operating system, or to
  5471  // circumvent, violate, or enable the circumvention or violation of, any
  5472  // terms of an Apple operating system software license agreement.
  5473  //
  5474  // Please obtain a copy of the License at
  5475  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5476  //
  5477  // The Original Code and all software distributed under the License are
  5478  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5479  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5480  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5481  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5482  // Please see the License for the specific language governing rights and
  5483  // limitations under the License.
  5484  //
  5485  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5486  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  5487  //
  5488  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5489  //
  5490  // This file contains Original Code and/or Modifications of Original Code
  5491  // as defined in and that are subject to the Apple Public Source License
  5492  // Version 2.0 (the 'License'). You may not use this file except in
  5493  // compliance with the License. The rights granted to you under the License
  5494  // may not be used to create, or enable the creation or redistribution of,
  5495  // unlawful or unlicensed copies of an Apple operating system, or to
  5496  // circumvent, violate, or enable the circumvention or violation of, any
  5497  // terms of an Apple operating system software license agreement.
  5498  //
  5499  // Please obtain a copy of the License at
  5500  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5501  //
  5502  // The Original Code and all software distributed under the License are
  5503  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5504  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5505  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5506  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5507  // Please see the License for the specific language governing rights and
  5508  // limitations under the License.
  5509  //
  5510  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5511  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  5512  //
  5513  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5514  //
  5515  // This file contains Original Code and/or Modifications of Original Code
  5516  // as defined in and that are subject to the Apple Public Source License
  5517  // Version 2.0 (the 'License'). You may not use this file except in
  5518  // compliance with the License. The rights granted to you under the License
  5519  // may not be used to create, or enable the creation or redistribution of,
  5520  // unlawful or unlicensed copies of an Apple operating system, or to
  5521  // circumvent, violate, or enable the circumvention or violation of, any
  5522  // terms of an Apple operating system software license agreement.
  5523  //
  5524  // Please obtain a copy of the License at
  5525  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5526  //
  5527  // The Original Code and all software distributed under the License are
  5528  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5529  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5530  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5531  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5532  // Please see the License for the specific language governing rights and
  5533  // limitations under the License.
  5534  //
  5535  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5536  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  5537  //
  5538  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5539  //
  5540  // This file contains Original Code and/or Modifications of Original Code
  5541  // as defined in and that are subject to the Apple Public Source License
  5542  // Version 2.0 (the 'License'). You may not use this file except in
  5543  // compliance with the License. The rights granted to you under the License
  5544  // may not be used to create, or enable the creation or redistribution of,
  5545  // unlawful or unlicensed copies of an Apple operating system, or to
  5546  // circumvent, violate, or enable the circumvention or violation of, any
  5547  // terms of an Apple operating system software license agreement.
  5548  //
  5549  // Please obtain a copy of the License at
  5550  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5551  //
  5552  // The Original Code and all software distributed under the License are
  5553  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5554  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5555  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5556  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5557  // Please see the License for the specific language governing rights and
  5558  // limitations under the License.
  5559  //
  5560  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5561  
  5562  type useconds_t = uint32 /* _useconds_t.h:31:33 */
  5563  
  5564  // Darwin extensions
  5565  
  5566  // Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
  5567  //
  5568  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5569  //
  5570  // This file contains Original Code and/or Modifications of Original Code
  5571  // as defined in and that are subject to the Apple Public Source License
  5572  // Version 2.0 (the 'License'). You may not use this file except in
  5573  // compliance with the License. The rights granted to you under the License
  5574  // may not be used to create, or enable the creation or redistribution of,
  5575  // unlawful or unlicensed copies of an Apple operating system, or to
  5576  // circumvent, violate, or enable the circumvention or violation of, any
  5577  // terms of an Apple operating system software license agreement.
  5578  //
  5579  // Please obtain a copy of the License at
  5580  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5581  //
  5582  // The Original Code and all software distributed under the License are
  5583  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5584  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5585  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5586  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5587  // Please see the License for the specific language governing rights and
  5588  // limitations under the License.
  5589  //
  5590  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5591  // Copyright (c) 1992, 1993
  5592  //	The Regents of the University of California.  All rights reserved.
  5593  //
  5594  // Redistribution and use in source and binary forms, with or without
  5595  // modification, are permitted provided that the following conditions
  5596  // are met:
  5597  // 1. Redistributions of source code must retain the above copyright
  5598  //    notice, this list of conditions and the following disclaimer.
  5599  // 2. Redistributions in binary form must reproduce the above copyright
  5600  //    notice, this list of conditions and the following disclaimer in the
  5601  //    documentation and/or other materials provided with the distribution.
  5602  // 3. All advertising materials mentioning features or use of this software
  5603  //    must display the following acknowledgement:
  5604  //	This product includes software developed by the University of
  5605  //	California, Berkeley and its contributors.
  5606  // 4. Neither the name of the University nor the names of its contributors
  5607  //    may be used to endorse or promote products derived from this software
  5608  //    without specific prior written permission.
  5609  //
  5610  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  5611  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  5612  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  5613  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  5614  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  5615  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  5616  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  5617  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  5618  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  5619  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  5620  // SUCH DAMAGE.
  5621  //
  5622  //	@(#)select.h	8.2 (Berkeley) 1/4/94
  5623  
  5624  // Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
  5625  //
  5626  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5627  //
  5628  // This file contains Original Code and/or Modifications of Original Code
  5629  // as defined in and that are subject to the Apple Public Source License
  5630  // Version 2.0 (the 'License'). You may not use this file except in
  5631  // compliance with the License. The rights granted to you under the License
  5632  // may not be used to create, or enable the creation or redistribution of,
  5633  // unlawful or unlicensed copies of an Apple operating system, or to
  5634  // circumvent, violate, or enable the circumvention or violation of, any
  5635  // terms of an Apple operating system software license agreement.
  5636  //
  5637  // Please obtain a copy of the License at
  5638  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5639  //
  5640  // The Original Code and all software distributed under the License are
  5641  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5642  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5643  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5644  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5645  // Please see the License for the specific language governing rights and
  5646  // limitations under the License.
  5647  //
  5648  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5649  
  5650  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  5651  //
  5652  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5653  //
  5654  // This file contains Original Code and/or Modifications of Original Code
  5655  // as defined in and that are subject to the Apple Public Source License
  5656  // Version 2.0 (the 'License'). You may not use this file except in
  5657  // compliance with the License. The rights granted to you under the License
  5658  // may not be used to create, or enable the creation or redistribution of,
  5659  // unlawful or unlicensed copies of an Apple operating system, or to
  5660  // circumvent, violate, or enable the circumvention or violation of, any
  5661  // terms of an Apple operating system software license agreement.
  5662  //
  5663  // Please obtain a copy of the License at
  5664  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5665  //
  5666  // The Original Code and all software distributed under the License are
  5667  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5668  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5669  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5670  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5671  // Please see the License for the specific language governing rights and
  5672  // limitations under the License.
  5673  //
  5674  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5675  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  5676  // Copyright (c) 1991, 1993
  5677  //	The Regents of the University of California.  All rights reserved.
  5678  //
  5679  // This code is derived from software contributed to Berkeley by
  5680  // Berkeley Software Design, Inc.
  5681  //
  5682  // Redistribution and use in source and binary forms, with or without
  5683  // modification, are permitted provided that the following conditions
  5684  // are met:
  5685  // 1. Redistributions of source code must retain the above copyright
  5686  //    notice, this list of conditions and the following disclaimer.
  5687  // 2. Redistributions in binary form must reproduce the above copyright
  5688  //    notice, this list of conditions and the following disclaimer in the
  5689  //    documentation and/or other materials provided with the distribution.
  5690  // 3. All advertising materials mentioning features or use of this software
  5691  //    must display the following acknowledgement:
  5692  //	This product includes software developed by the University of
  5693  //	California, Berkeley and its contributors.
  5694  // 4. Neither the name of the University nor the names of its contributors
  5695  //    may be used to endorse or promote products derived from this software
  5696  //    without specific prior written permission.
  5697  //
  5698  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  5699  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  5700  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  5701  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  5702  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  5703  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  5704  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  5705  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  5706  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  5707  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  5708  // SUCH DAMAGE.
  5709  //
  5710  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  5711  
  5712  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  5713  //
  5714  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5715  //
  5716  // This file contains Original Code and/or Modifications of Original Code
  5717  // as defined in and that are subject to the Apple Public Source License
  5718  // Version 2.0 (the 'License'). You may not use this file except in
  5719  // compliance with the License. The rights granted to you under the License
  5720  // may not be used to create, or enable the creation or redistribution of,
  5721  // unlawful or unlicensed copies of an Apple operating system, or to
  5722  // circumvent, violate, or enable the circumvention or violation of, any
  5723  // terms of an Apple operating system software license agreement.
  5724  //
  5725  // Please obtain a copy of the License at
  5726  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5727  //
  5728  // The Original Code and all software distributed under the License are
  5729  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5730  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5731  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5732  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5733  // Please see the License for the specific language governing rights and
  5734  // limitations under the License.
  5735  //
  5736  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5737  
  5738  // [XSI] The <sys/select.h> header shall define the fd_set type as a structure.
  5739  // The timespec structure shall be defined as described in <time.h>
  5740  // The <sys/select.h> header shall define the timeval structure.
  5741  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  5742  //
  5743  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5744  //
  5745  // This file contains Original Code and/or Modifications of Original Code
  5746  // as defined in and that are subject to the Apple Public Source License
  5747  // Version 2.0 (the 'License'). You may not use this file except in
  5748  // compliance with the License. The rights granted to you under the License
  5749  // may not be used to create, or enable the creation or redistribution of,
  5750  // unlawful or unlicensed copies of an Apple operating system, or to
  5751  // circumvent, violate, or enable the circumvention or violation of, any
  5752  // terms of an Apple operating system software license agreement.
  5753  //
  5754  // Please obtain a copy of the License at
  5755  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5756  //
  5757  // The Original Code and all software distributed under the License are
  5758  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5759  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5760  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5761  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5762  // Please see the License for the specific language governing rights and
  5763  // limitations under the License.
  5764  //
  5765  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5766  
  5767  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  5768  //
  5769  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5770  //
  5771  // This file contains Original Code and/or Modifications of Original Code
  5772  // as defined in and that are subject to the Apple Public Source License
  5773  // Version 2.0 (the 'License'). You may not use this file except in
  5774  // compliance with the License. The rights granted to you under the License
  5775  // may not be used to create, or enable the creation or redistribution of,
  5776  // unlawful or unlicensed copies of an Apple operating system, or to
  5777  // circumvent, violate, or enable the circumvention or violation of, any
  5778  // terms of an Apple operating system software license agreement.
  5779  //
  5780  // Please obtain a copy of the License at
  5781  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5782  //
  5783  // The Original Code and all software distributed under the License are
  5784  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5785  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5786  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5787  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5788  // Please see the License for the specific language governing rights and
  5789  // limitations under the License.
  5790  //
  5791  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5792  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  5793  // Copyright (c) 2007-2016 by Apple Inc.. All rights reserved.
  5794  //
  5795  // @APPLE_LICENSE_HEADER_START@
  5796  //
  5797  // This file contains Original Code and/or Modifications of Original Code
  5798  // as defined in and that are subject to the Apple Public Source License
  5799  // Version 2.0 (the 'License'). You may not use this file except in
  5800  // compliance with the License. Please obtain a copy of the License at
  5801  // http://www.opensource.apple.com/apsl/ and read it before using this
  5802  // file.
  5803  //
  5804  // The Original Code and all software distributed under the License are
  5805  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5806  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5807  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5808  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5809  // Please see the License for the specific language governing rights and
  5810  // limitations under the License.
  5811  //
  5812  // @APPLE_LICENSE_HEADER_END@
  5813  
  5814  // Select uses bit masks of file descriptors in longs.  These macros
  5815  // manipulate such bit fields (the filesystem macros use chars).  The
  5816  // extra protection here is to permit application redefinition above
  5817  // the default size.
  5818  
  5819  type fd_set1 = struct{ fds_bits [32]int32 } /* _fd_def.h:50:9 */
  5820  
  5821  // Darwin extensions
  5822  
  5823  // Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
  5824  //
  5825  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5826  //
  5827  // This file contains Original Code and/or Modifications of Original Code
  5828  // as defined in and that are subject to the Apple Public Source License
  5829  // Version 2.0 (the 'License'). You may not use this file except in
  5830  // compliance with the License. The rights granted to you under the License
  5831  // may not be used to create, or enable the creation or redistribution of,
  5832  // unlawful or unlicensed copies of an Apple operating system, or to
  5833  // circumvent, violate, or enable the circumvention or violation of, any
  5834  // terms of an Apple operating system software license agreement.
  5835  //
  5836  // Please obtain a copy of the License at
  5837  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5838  //
  5839  // The Original Code and all software distributed under the License are
  5840  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5841  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5842  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5843  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5844  // Please see the License for the specific language governing rights and
  5845  // limitations under the License.
  5846  //
  5847  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5848  // Copyright (c) 1992, 1993
  5849  //	The Regents of the University of California.  All rights reserved.
  5850  //
  5851  // Redistribution and use in source and binary forms, with or without
  5852  // modification, are permitted provided that the following conditions
  5853  // are met:
  5854  // 1. Redistributions of source code must retain the above copyright
  5855  //    notice, this list of conditions and the following disclaimer.
  5856  // 2. Redistributions in binary form must reproduce the above copyright
  5857  //    notice, this list of conditions and the following disclaimer in the
  5858  //    documentation and/or other materials provided with the distribution.
  5859  // 3. All advertising materials mentioning features or use of this software
  5860  //    must display the following acknowledgement:
  5861  //	This product includes software developed by the University of
  5862  //	California, Berkeley and its contributors.
  5863  // 4. Neither the name of the University nor the names of its contributors
  5864  //    may be used to endorse or promote products derived from this software
  5865  //    without specific prior written permission.
  5866  //
  5867  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  5868  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  5869  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  5870  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  5871  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  5872  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  5873  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  5874  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  5875  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  5876  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  5877  // SUCH DAMAGE.
  5878  //
  5879  //	@(#)select.h	8.2 (Berkeley) 1/4/94
  5880  
  5881  // Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
  5882  //
  5883  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5884  //
  5885  // This file contains Original Code and/or Modifications of Original Code
  5886  // as defined in and that are subject to the Apple Public Source License
  5887  // Version 2.0 (the 'License'). You may not use this file except in
  5888  // compliance with the License. The rights granted to you under the License
  5889  // may not be used to create, or enable the creation or redistribution of,
  5890  // unlawful or unlicensed copies of an Apple operating system, or to
  5891  // circumvent, violate, or enable the circumvention or violation of, any
  5892  // terms of an Apple operating system software license agreement.
  5893  //
  5894  // Please obtain a copy of the License at
  5895  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5896  //
  5897  // The Original Code and all software distributed under the License are
  5898  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5899  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5900  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5901  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5902  // Please see the License for the specific language governing rights and
  5903  // limitations under the License.
  5904  //
  5905  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5906  
  5907  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  5908  //
  5909  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5910  //
  5911  // This file contains Original Code and/or Modifications of Original Code
  5912  // as defined in and that are subject to the Apple Public Source License
  5913  // Version 2.0 (the 'License'). You may not use this file except in
  5914  // compliance with the License. The rights granted to you under the License
  5915  // may not be used to create, or enable the creation or redistribution of,
  5916  // unlawful or unlicensed copies of an Apple operating system, or to
  5917  // circumvent, violate, or enable the circumvention or violation of, any
  5918  // terms of an Apple operating system software license agreement.
  5919  //
  5920  // Please obtain a copy of the License at
  5921  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5922  //
  5923  // The Original Code and all software distributed under the License are
  5924  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5925  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5926  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5927  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5928  // Please see the License for the specific language governing rights and
  5929  // limitations under the License.
  5930  //
  5931  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5932  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  5933  // Copyright (c) 1991, 1993
  5934  //	The Regents of the University of California.  All rights reserved.
  5935  //
  5936  // This code is derived from software contributed to Berkeley by
  5937  // Berkeley Software Design, Inc.
  5938  //
  5939  // Redistribution and use in source and binary forms, with or without
  5940  // modification, are permitted provided that the following conditions
  5941  // are met:
  5942  // 1. Redistributions of source code must retain the above copyright
  5943  //    notice, this list of conditions and the following disclaimer.
  5944  // 2. Redistributions in binary form must reproduce the above copyright
  5945  //    notice, this list of conditions and the following disclaimer in the
  5946  //    documentation and/or other materials provided with the distribution.
  5947  // 3. All advertising materials mentioning features or use of this software
  5948  //    must display the following acknowledgement:
  5949  //	This product includes software developed by the University of
  5950  //	California, Berkeley and its contributors.
  5951  // 4. Neither the name of the University nor the names of its contributors
  5952  //    may be used to endorse or promote products derived from this software
  5953  //    without specific prior written permission.
  5954  //
  5955  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  5956  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  5957  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  5958  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  5959  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  5960  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  5961  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  5962  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  5963  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  5964  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  5965  // SUCH DAMAGE.
  5966  //
  5967  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  5968  
  5969  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  5970  //
  5971  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  5972  //
  5973  // This file contains Original Code and/or Modifications of Original Code
  5974  // as defined in and that are subject to the Apple Public Source License
  5975  // Version 2.0 (the 'License'). You may not use this file except in
  5976  // compliance with the License. The rights granted to you under the License
  5977  // may not be used to create, or enable the creation or redistribution of,
  5978  // unlawful or unlicensed copies of an Apple operating system, or to
  5979  // circumvent, violate, or enable the circumvention or violation of, any
  5980  // terms of an Apple operating system software license agreement.
  5981  //
  5982  // Please obtain a copy of the License at
  5983  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  5984  //
  5985  // The Original Code and all software distributed under the License are
  5986  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  5987  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  5988  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  5989  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  5990  // Please see the License for the specific language governing rights and
  5991  // limitations under the License.
  5992  //
  5993  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  5994  
  5995  // [XSI] The <sys/select.h> header shall define the fd_set type as a structure.
  5996  // The timespec structure shall be defined as described in <time.h>
  5997  // The <sys/select.h> header shall define the timeval structure.
  5998  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  5999  //
  6000  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6001  //
  6002  // This file contains Original Code and/or Modifications of Original Code
  6003  // as defined in and that are subject to the Apple Public Source License
  6004  // Version 2.0 (the 'License'). You may not use this file except in
  6005  // compliance with the License. The rights granted to you under the License
  6006  // may not be used to create, or enable the creation or redistribution of,
  6007  // unlawful or unlicensed copies of an Apple operating system, or to
  6008  // circumvent, violate, or enable the circumvention or violation of, any
  6009  // terms of an Apple operating system software license agreement.
  6010  //
  6011  // Please obtain a copy of the License at
  6012  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6013  //
  6014  // The Original Code and all software distributed under the License are
  6015  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6016  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6017  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6018  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6019  // Please see the License for the specific language governing rights and
  6020  // limitations under the License.
  6021  //
  6022  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6023  
  6024  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  6025  //
  6026  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6027  //
  6028  // This file contains Original Code and/or Modifications of Original Code
  6029  // as defined in and that are subject to the Apple Public Source License
  6030  // Version 2.0 (the 'License'). You may not use this file except in
  6031  // compliance with the License. The rights granted to you under the License
  6032  // may not be used to create, or enable the creation or redistribution of,
  6033  // unlawful or unlicensed copies of an Apple operating system, or to
  6034  // circumvent, violate, or enable the circumvention or violation of, any
  6035  // terms of an Apple operating system software license agreement.
  6036  //
  6037  // Please obtain a copy of the License at
  6038  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6039  //
  6040  // The Original Code and all software distributed under the License are
  6041  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6042  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6043  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6044  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6045  // Please see the License for the specific language governing rights and
  6046  // limitations under the License.
  6047  //
  6048  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6049  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  6050  // Copyright (c) 2007-2016 by Apple Inc.. All rights reserved.
  6051  //
  6052  // @APPLE_LICENSE_HEADER_START@
  6053  //
  6054  // This file contains Original Code and/or Modifications of Original Code
  6055  // as defined in and that are subject to the Apple Public Source License
  6056  // Version 2.0 (the 'License'). You may not use this file except in
  6057  // compliance with the License. Please obtain a copy of the License at
  6058  // http://www.opensource.apple.com/apsl/ and read it before using this
  6059  // file.
  6060  //
  6061  // The Original Code and all software distributed under the License are
  6062  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6063  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6064  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6065  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6066  // Please see the License for the specific language governing rights and
  6067  // limitations under the License.
  6068  //
  6069  // @APPLE_LICENSE_HEADER_END@
  6070  
  6071  // Select uses bit masks of file descriptors in longs.  These macros
  6072  // manipulate such bit fields (the filesystem macros use chars).  The
  6073  // extra protection here is to permit application redefinition above
  6074  // the default size.
  6075  
  6076  type fd_set = fd_set1 /* _fd_def.h:52:3 */
  6077  
  6078  // Use the built-in bzero function instead of the library version so that
  6079  // we do not pollute the namespace or introduce prototype warnings.
  6080  
  6081  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  6082  //
  6083  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6084  //
  6085  // This file contains Original Code and/or Modifications of Original Code
  6086  // as defined in and that are subject to the Apple Public Source License
  6087  // Version 2.0 (the 'License'). You may not use this file except in
  6088  // compliance with the License. The rights granted to you under the License
  6089  // may not be used to create, or enable the creation or redistribution of,
  6090  // unlawful or unlicensed copies of an Apple operating system, or to
  6091  // circumvent, violate, or enable the circumvention or violation of, any
  6092  // terms of an Apple operating system software license agreement.
  6093  //
  6094  // Please obtain a copy of the License at
  6095  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6096  //
  6097  // The Original Code and all software distributed under the License are
  6098  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6099  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6100  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6101  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6102  // Please see the License for the specific language governing rights and
  6103  // limitations under the License.
  6104  //
  6105  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6106  
  6107  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  6108  //
  6109  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6110  //
  6111  // This file contains Original Code and/or Modifications of Original Code
  6112  // as defined in and that are subject to the Apple Public Source License
  6113  // Version 2.0 (the 'License'). You may not use this file except in
  6114  // compliance with the License. The rights granted to you under the License
  6115  // may not be used to create, or enable the creation or redistribution of,
  6116  // unlawful or unlicensed copies of an Apple operating system, or to
  6117  // circumvent, violate, or enable the circumvention or violation of, any
  6118  // terms of an Apple operating system software license agreement.
  6119  //
  6120  // Please obtain a copy of the License at
  6121  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6122  //
  6123  // The Original Code and all software distributed under the License are
  6124  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6125  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6126  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6127  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6128  // Please see the License for the specific language governing rights and
  6129  // limitations under the License.
  6130  //
  6131  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6132  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  6133  
  6134  type timespec = struct {
  6135  	tv_sec  int64
  6136  	tv_nsec int64
  6137  } /* _timespec.h:33:1 */
  6138  
  6139  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  6140  //
  6141  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6142  //
  6143  // This file contains Original Code and/or Modifications of Original Code
  6144  // as defined in and that are subject to the Apple Public Source License
  6145  // Version 2.0 (the 'License'). You may not use this file except in
  6146  // compliance with the License. The rights granted to you under the License
  6147  // may not be used to create, or enable the creation or redistribution of,
  6148  // unlawful or unlicensed copies of an Apple operating system, or to
  6149  // circumvent, violate, or enable the circumvention or violation of, any
  6150  // terms of an Apple operating system software license agreement.
  6151  //
  6152  // Please obtain a copy of the License at
  6153  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6154  //
  6155  // The Original Code and all software distributed under the License are
  6156  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6157  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6158  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6159  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6160  // Please see the License for the specific language governing rights and
  6161  // limitations under the License.
  6162  //
  6163  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6164  
  6165  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  6166  //
  6167  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6168  //
  6169  // This file contains Original Code and/or Modifications of Original Code
  6170  // as defined in and that are subject to the Apple Public Source License
  6171  // Version 2.0 (the 'License'). You may not use this file except in
  6172  // compliance with the License. The rights granted to you under the License
  6173  // may not be used to create, or enable the creation or redistribution of,
  6174  // unlawful or unlicensed copies of an Apple operating system, or to
  6175  // circumvent, violate, or enable the circumvention or violation of, any
  6176  // terms of an Apple operating system software license agreement.
  6177  //
  6178  // Please obtain a copy of the License at
  6179  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6180  //
  6181  // The Original Code and all software distributed under the License are
  6182  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6183  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6184  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6185  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6186  // Please see the License for the specific language governing rights and
  6187  // limitations under the License.
  6188  //
  6189  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6190  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  6191  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  6192  //
  6193  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6194  //
  6195  // This file contains Original Code and/or Modifications of Original Code
  6196  // as defined in and that are subject to the Apple Public Source License
  6197  // Version 2.0 (the 'License'). You may not use this file except in
  6198  // compliance with the License. The rights granted to you under the License
  6199  // may not be used to create, or enable the creation or redistribution of,
  6200  // unlawful or unlicensed copies of an Apple operating system, or to
  6201  // circumvent, violate, or enable the circumvention or violation of, any
  6202  // terms of an Apple operating system software license agreement.
  6203  //
  6204  // Please obtain a copy of the License at
  6205  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6206  //
  6207  // The Original Code and all software distributed under the License are
  6208  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6209  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6210  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6211  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6212  // Please see the License for the specific language governing rights and
  6213  // limitations under the License.
  6214  //
  6215  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6216  
  6217  type timeval = struct {
  6218  	tv_sec  int64
  6219  	tv_usec int32
  6220  	_       [4]byte
  6221  } /* _timeval.h:34:1 */
  6222  
  6223  // The time_t and suseconds_t types shall be defined as described in
  6224  // <sys/types.h>
  6225  // The sigset_t type shall be defined as described in <signal.h>
  6226  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  6227  //
  6228  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6229  //
  6230  // This file contains Original Code and/or Modifications of Original Code
  6231  // as defined in and that are subject to the Apple Public Source License
  6232  // Version 2.0 (the 'License'). You may not use this file except in
  6233  // compliance with the License. The rights granted to you under the License
  6234  // may not be used to create, or enable the creation or redistribution of,
  6235  // unlawful or unlicensed copies of an Apple operating system, or to
  6236  // circumvent, violate, or enable the circumvention or violation of, any
  6237  // terms of an Apple operating system software license agreement.
  6238  //
  6239  // Please obtain a copy of the License at
  6240  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6241  //
  6242  // The Original Code and all software distributed under the License are
  6243  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6244  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6245  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6246  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6247  // Please see the License for the specific language governing rights and
  6248  // limitations under the License.
  6249  //
  6250  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6251  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  6252  //
  6253  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6254  //
  6255  // This file contains Original Code and/or Modifications of Original Code
  6256  // as defined in and that are subject to the Apple Public Source License
  6257  // Version 2.0 (the 'License'). You may not use this file except in
  6258  // compliance with the License. The rights granted to you under the License
  6259  // may not be used to create, or enable the creation or redistribution of,
  6260  // unlawful or unlicensed copies of an Apple operating system, or to
  6261  // circumvent, violate, or enable the circumvention or violation of, any
  6262  // terms of an Apple operating system software license agreement.
  6263  //
  6264  // Please obtain a copy of the License at
  6265  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6266  //
  6267  // The Original Code and all software distributed under the License are
  6268  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6269  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6270  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6271  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6272  // Please see the License for the specific language governing rights and
  6273  // limitations under the License.
  6274  //
  6275  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6276  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  6277  type time_t = int64 /* _time_t.h:31:33 */
  6278  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  6279  //
  6280  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6281  //
  6282  // This file contains Original Code and/or Modifications of Original Code
  6283  // as defined in and that are subject to the Apple Public Source License
  6284  // Version 2.0 (the 'License'). You may not use this file except in
  6285  // compliance with the License. The rights granted to you under the License
  6286  // may not be used to create, or enable the creation or redistribution of,
  6287  // unlawful or unlicensed copies of an Apple operating system, or to
  6288  // circumvent, violate, or enable the circumvention or violation of, any
  6289  // terms of an Apple operating system software license agreement.
  6290  //
  6291  // Please obtain a copy of the License at
  6292  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6293  //
  6294  // The Original Code and all software distributed under the License are
  6295  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6296  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6297  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6298  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6299  // Please see the License for the specific language governing rights and
  6300  // limitations under the License.
  6301  //
  6302  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6303  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  6304  //
  6305  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6306  //
  6307  // This file contains Original Code and/or Modifications of Original Code
  6308  // as defined in and that are subject to the Apple Public Source License
  6309  // Version 2.0 (the 'License'). You may not use this file except in
  6310  // compliance with the License. The rights granted to you under the License
  6311  // may not be used to create, or enable the creation or redistribution of,
  6312  // unlawful or unlicensed copies of an Apple operating system, or to
  6313  // circumvent, violate, or enable the circumvention or violation of, any
  6314  // terms of an Apple operating system software license agreement.
  6315  //
  6316  // Please obtain a copy of the License at
  6317  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6318  //
  6319  // The Original Code and all software distributed under the License are
  6320  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6321  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6322  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6323  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6324  // Please see the License for the specific language governing rights and
  6325  // limitations under the License.
  6326  //
  6327  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6328  
  6329  type suseconds_t = int32 /* _suseconds_t.h:31:33 */
  6330  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  6331  //
  6332  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6333  //
  6334  // This file contains Original Code and/or Modifications of Original Code
  6335  // as defined in and that are subject to the Apple Public Source License
  6336  // Version 2.0 (the 'License'). You may not use this file except in
  6337  // compliance with the License. The rights granted to you under the License
  6338  // may not be used to create, or enable the creation or redistribution of,
  6339  // unlawful or unlicensed copies of an Apple operating system, or to
  6340  // circumvent, violate, or enable the circumvention or violation of, any
  6341  // terms of an Apple operating system software license agreement.
  6342  //
  6343  // Please obtain a copy of the License at
  6344  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6345  //
  6346  // The Original Code and all software distributed under the License are
  6347  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6348  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6349  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6350  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6351  // Please see the License for the specific language governing rights and
  6352  // limitations under the License.
  6353  //
  6354  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6355  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  6356  //
  6357  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6358  //
  6359  // This file contains Original Code and/or Modifications of Original Code
  6360  // as defined in and that are subject to the Apple Public Source License
  6361  // Version 2.0 (the 'License'). You may not use this file except in
  6362  // compliance with the License. The rights granted to you under the License
  6363  // may not be used to create, or enable the creation or redistribution of,
  6364  // unlawful or unlicensed copies of an Apple operating system, or to
  6365  // circumvent, violate, or enable the circumvention or violation of, any
  6366  // terms of an Apple operating system software license agreement.
  6367  //
  6368  // Please obtain a copy of the License at
  6369  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6370  //
  6371  // The Original Code and all software distributed under the License are
  6372  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6373  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6374  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6375  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6376  // Please see the License for the specific language governing rights and
  6377  // limitations under the License.
  6378  //
  6379  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6380  
  6381  type sigset_t = uint32 /* _sigset_t.h:31:41 */
  6382  
  6383  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  6384  //
  6385  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6386  //
  6387  // This file contains Original Code and/or Modifications of Original Code
  6388  // as defined in and that are subject to the Apple Public Source License
  6389  // Version 2.0 (the 'License'). You may not use this file except in
  6390  // compliance with the License. The rights granted to you under the License
  6391  // may not be used to create, or enable the creation or redistribution of,
  6392  // unlawful or unlicensed copies of an Apple operating system, or to
  6393  // circumvent, violate, or enable the circumvention or violation of, any
  6394  // terms of an Apple operating system software license agreement.
  6395  //
  6396  // Please obtain a copy of the License at
  6397  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6398  //
  6399  // The Original Code and all software distributed under the License are
  6400  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6401  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6402  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6403  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6404  // Please see the License for the specific language governing rights and
  6405  // limitations under the License.
  6406  //
  6407  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6408  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  6409  //
  6410  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6411  //
  6412  // This file contains Original Code and/or Modifications of Original Code
  6413  // as defined in and that are subject to the Apple Public Source License
  6414  // Version 2.0 (the 'License'). You may not use this file except in
  6415  // compliance with the License. The rights granted to you under the License
  6416  // may not be used to create, or enable the creation or redistribution of,
  6417  // unlawful or unlicensed copies of an Apple operating system, or to
  6418  // circumvent, violate, or enable the circumvention or violation of, any
  6419  // terms of an Apple operating system software license agreement.
  6420  //
  6421  // Please obtain a copy of the License at
  6422  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6423  //
  6424  // The Original Code and all software distributed under the License are
  6425  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6426  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6427  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6428  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6429  // Please see the License for the specific language governing rights and
  6430  // limitations under the License.
  6431  //
  6432  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6433  
  6434  type dev_t = int32 /* _dev_t.h:31:31 */ // device number
  6435  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  6436  //
  6437  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6438  //
  6439  // This file contains Original Code and/or Modifications of Original Code
  6440  // as defined in and that are subject to the Apple Public Source License
  6441  // Version 2.0 (the 'License'). You may not use this file except in
  6442  // compliance with the License. The rights granted to you under the License
  6443  // may not be used to create, or enable the creation or redistribution of,
  6444  // unlawful or unlicensed copies of an Apple operating system, or to
  6445  // circumvent, violate, or enable the circumvention or violation of, any
  6446  // terms of an Apple operating system software license agreement.
  6447  //
  6448  // Please obtain a copy of the License at
  6449  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6450  //
  6451  // The Original Code and all software distributed under the License are
  6452  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6453  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6454  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6455  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6456  // Please see the License for the specific language governing rights and
  6457  // limitations under the License.
  6458  //
  6459  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6460  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  6461  //
  6462  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6463  //
  6464  // This file contains Original Code and/or Modifications of Original Code
  6465  // as defined in and that are subject to the Apple Public Source License
  6466  // Version 2.0 (the 'License'). You may not use this file except in
  6467  // compliance with the License. The rights granted to you under the License
  6468  // may not be used to create, or enable the creation or redistribution of,
  6469  // unlawful or unlicensed copies of an Apple operating system, or to
  6470  // circumvent, violate, or enable the circumvention or violation of, any
  6471  // terms of an Apple operating system software license agreement.
  6472  //
  6473  // Please obtain a copy of the License at
  6474  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6475  //
  6476  // The Original Code and all software distributed under the License are
  6477  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6478  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6479  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6480  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6481  // Please see the License for the specific language governing rights and
  6482  // limitations under the License.
  6483  //
  6484  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6485  
  6486  type mode_t = uint16 /* _mode_t.h:31:33 */
  6487  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  6488  //
  6489  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6490  //
  6491  // This file contains Original Code and/or Modifications of Original Code
  6492  // as defined in and that are subject to the Apple Public Source License
  6493  // Version 2.0 (the 'License'). You may not use this file except in
  6494  // compliance with the License. The rights granted to you under the License
  6495  // may not be used to create, or enable the creation or redistribution of,
  6496  // unlawful or unlicensed copies of an Apple operating system, or to
  6497  // circumvent, violate, or enable the circumvention or violation of, any
  6498  // terms of an Apple operating system software license agreement.
  6499  //
  6500  // Please obtain a copy of the License at
  6501  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6502  //
  6503  // The Original Code and all software distributed under the License are
  6504  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6505  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6506  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6507  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6508  // Please see the License for the specific language governing rights and
  6509  // limitations under the License.
  6510  //
  6511  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6512  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  6513  //
  6514  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6515  //
  6516  // This file contains Original Code and/or Modifications of Original Code
  6517  // as defined in and that are subject to the Apple Public Source License
  6518  // Version 2.0 (the 'License'). You may not use this file except in
  6519  // compliance with the License. The rights granted to you under the License
  6520  // may not be used to create, or enable the creation or redistribution of,
  6521  // unlawful or unlicensed copies of an Apple operating system, or to
  6522  // circumvent, violate, or enable the circumvention or violation of, any
  6523  // terms of an Apple operating system software license agreement.
  6524  //
  6525  // Please obtain a copy of the License at
  6526  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6527  //
  6528  // The Original Code and all software distributed under the License are
  6529  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6530  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6531  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6532  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6533  // Please see the License for the specific language governing rights and
  6534  // limitations under the License.
  6535  //
  6536  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6537  
  6538  type uuid_t = [16]uint8 /* _uuid_t.h:31:25 */
  6539  
  6540  // Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  6541  //
  6542  // @APPLE_LICENSE_HEADER_START@
  6543  //
  6544  // This file contains Original Code and/or Modifications of Original Code
  6545  // as defined in and that are subject to the Apple Public Source License
  6546  // Version 2.0 (the 'License'). You may not use this file except in
  6547  // compliance with the License. Please obtain a copy of the License at
  6548  // http://www.opensource.apple.com/apsl/ and read it before using this
  6549  // file.
  6550  //
  6551  // The Original Code and all software distributed under the License are
  6552  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6553  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6554  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6555  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6556  // Please see the License for the specific language governing rights and
  6557  // limitations under the License.
  6558  //
  6559  // @APPLE_LICENSE_HEADER_END@
  6560  // Copyright (c) 2000-2012 Apple, Inc. All rights reserved.
  6561  //
  6562  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6563  //
  6564  // This file contains Original Code and/or Modifications of Original Code
  6565  // as defined in and that are subject to the Apple Public Source License
  6566  // Version 2.0 (the 'License'). You may not use this file except in
  6567  // compliance with the License. The rights granted to you under the License
  6568  // may not be used to create, or enable the creation or redistribution of,
  6569  // unlawful or unlicensed copies of an Apple operating system, or to
  6570  // circumvent, violate, or enable the circumvention or violation of, any
  6571  // terms of an Apple operating system software license agreement.
  6572  //
  6573  // Please obtain a copy of the License at
  6574  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6575  //
  6576  // The Original Code and all software distributed under the License are
  6577  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6578  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6579  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6580  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6581  // Please see the License for the specific language governing rights and
  6582  // limitations under the License.
  6583  //
  6584  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6585  // Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
  6586  // Copyright (c) 1982, 1986, 1989, 1993
  6587  //	The Regents of the University of California.  All rights reserved.
  6588  // (c) UNIX System Laboratories, Inc.
  6589  // All or some portions of this file are derived from material licensed
  6590  // to the University of California by American Telephone and Telegraph
  6591  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  6592  // the permission of UNIX System Laboratories, Inc.
  6593  //
  6594  // Redistribution and use in source and binary forms, with or without
  6595  // modification, are permitted provided that the following conditions
  6596  // are met:
  6597  // 1. Redistributions of source code must retain the above copyright
  6598  //    notice, this list of conditions and the following disclaimer.
  6599  // 2. Redistributions in binary form must reproduce the above copyright
  6600  //    notice, this list of conditions and the following disclaimer in the
  6601  //    documentation and/or other materials provided with the distribution.
  6602  // 3. All advertising materials mentioning features or use of this software
  6603  //    must display the following acknowledgement:
  6604  //	This product includes software developed by the University of
  6605  //	California, Berkeley and its contributors.
  6606  // 4. Neither the name of the University nor the names of its contributors
  6607  //    may be used to endorse or promote products derived from this software
  6608  //    without specific prior written permission.
  6609  //
  6610  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  6611  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  6612  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  6613  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  6614  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  6615  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  6616  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  6617  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  6618  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  6619  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  6620  // SUCH DAMAGE.
  6621  //
  6622  //	@(#)errno.h	8.5 (Berkeley) 1/21/94
  6623  
  6624  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  6625  //
  6626  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6627  //
  6628  // This file contains Original Code and/or Modifications of Original Code
  6629  // as defined in and that are subject to the Apple Public Source License
  6630  // Version 2.0 (the 'License'). You may not use this file except in
  6631  // compliance with the License. The rights granted to you under the License
  6632  // may not be used to create, or enable the creation or redistribution of,
  6633  // unlawful or unlicensed copies of an Apple operating system, or to
  6634  // circumvent, violate, or enable the circumvention or violation of, any
  6635  // terms of an Apple operating system software license agreement.
  6636  //
  6637  // Please obtain a copy of the License at
  6638  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6639  //
  6640  // The Original Code and all software distributed under the License are
  6641  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6642  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6643  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6644  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6645  // Please see the License for the specific language governing rights and
  6646  // limitations under the License.
  6647  //
  6648  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6649  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  6650  // Copyright (c) 1991, 1993
  6651  //	The Regents of the University of California.  All rights reserved.
  6652  //
  6653  // This code is derived from software contributed to Berkeley by
  6654  // Berkeley Software Design, Inc.
  6655  //
  6656  // Redistribution and use in source and binary forms, with or without
  6657  // modification, are permitted provided that the following conditions
  6658  // are met:
  6659  // 1. Redistributions of source code must retain the above copyright
  6660  //    notice, this list of conditions and the following disclaimer.
  6661  // 2. Redistributions in binary form must reproduce the above copyright
  6662  //    notice, this list of conditions and the following disclaimer in the
  6663  //    documentation and/or other materials provided with the distribution.
  6664  // 3. All advertising materials mentioning features or use of this software
  6665  //    must display the following acknowledgement:
  6666  //	This product includes software developed by the University of
  6667  //	California, Berkeley and its contributors.
  6668  // 4. Neither the name of the University nor the names of its contributors
  6669  //    may be used to endorse or promote products derived from this software
  6670  //    without specific prior written permission.
  6671  //
  6672  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  6673  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  6674  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  6675  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  6676  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  6677  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  6678  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  6679  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  6680  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  6681  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  6682  // SUCH DAMAGE.
  6683  //
  6684  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  6685  
  6686  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  6687  //
  6688  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6689  //
  6690  // This file contains Original Code and/or Modifications of Original Code
  6691  // as defined in and that are subject to the Apple Public Source License
  6692  // Version 2.0 (the 'License'). You may not use this file except in
  6693  // compliance with the License. The rights granted to you under the License
  6694  // may not be used to create, or enable the creation or redistribution of,
  6695  // unlawful or unlicensed copies of an Apple operating system, or to
  6696  // circumvent, violate, or enable the circumvention or violation of, any
  6697  // terms of an Apple operating system software license agreement.
  6698  //
  6699  // Please obtain a copy of the License at
  6700  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6701  //
  6702  // The Original Code and all software distributed under the License are
  6703  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6704  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6705  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6706  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6707  // Please see the License for the specific language governing rights and
  6708  // limitations under the License.
  6709  //
  6710  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6711  type errno_t = int32 /* _errno_t.h:30:32 */
  6712  
  6713  // Error codes
  6714  
  6715  // 11 was EAGAIN
  6716  
  6717  // math software
  6718  
  6719  // non-blocking and interrupt i/o
  6720  
  6721  // ipc/network software -- argument errors
  6722  
  6723  // ipc/network software -- operational errors
  6724  
  6725  // should be rearranged
  6726  
  6727  // quotas & mush
  6728  
  6729  // Network File System
  6730  
  6731  // Intelligent device errors
  6732  
  6733  // Program loading errors
  6734  
  6735  // This value is only discrete when compiling __DARWIN_UNIX03, or KERNEL
  6736  
  6737  // Copyright (c) 2000, 2002 - 2008 Apple Inc. All rights reserved.
  6738  //
  6739  // @APPLE_LICENSE_HEADER_START@
  6740  //
  6741  // This file contains Original Code and/or Modifications of Original Code
  6742  // as defined in and that are subject to the Apple Public Source License
  6743  // Version 2.0 (the 'License'). You may not use this file except in
  6744  // compliance with the License. Please obtain a copy of the License at
  6745  // http://www.opensource.apple.com/apsl/ and read it before using this
  6746  // file.
  6747  //
  6748  // The Original Code and all software distributed under the License are
  6749  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6750  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6751  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6752  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6753  // Please see the License for the specific language governing rights and
  6754  // limitations under the License.
  6755  //
  6756  // @APPLE_LICENSE_HEADER_END@
  6757  // -
  6758  // Copyright (c) 1990, 1993
  6759  //	The Regents of the University of California.  All rights reserved.
  6760  //
  6761  // Redistribution and use in source and binary forms, with or without
  6762  // modification, are permitted provided that the following conditions
  6763  // are met:
  6764  // 1. Redistributions of source code must retain the above copyright
  6765  //    notice, this list of conditions and the following disclaimer.
  6766  // 2. Redistributions in binary form must reproduce the above copyright
  6767  //    notice, this list of conditions and the following disclaimer in the
  6768  //    documentation and/or other materials provided with the distribution.
  6769  // 3. All advertising materials mentioning features or use of this software
  6770  //    must display the following acknowledgement:
  6771  //	This product includes software developed by the University of
  6772  //	California, Berkeley and its contributors.
  6773  // 4. Neither the name of the University nor the names of its contributors
  6774  //    may be used to endorse or promote products derived from this software
  6775  //    without specific prior written permission.
  6776  //
  6777  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  6778  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  6779  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  6780  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  6781  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  6782  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  6783  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  6784  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  6785  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  6786  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  6787  // SUCH DAMAGE.
  6788  //
  6789  //	@(#)stdlib.h	8.5 (Berkeley) 5/19/95
  6790  
  6791  // Copyright (c) 2007-2016 by Apple Inc.. All rights reserved.
  6792  //
  6793  // @APPLE_LICENSE_HEADER_START@
  6794  //
  6795  // This file contains Original Code and/or Modifications of Original Code
  6796  // as defined in and that are subject to the Apple Public Source License
  6797  // Version 2.0 (the 'License'). You may not use this file except in
  6798  // compliance with the License. Please obtain a copy of the License at
  6799  // http://www.opensource.apple.com/apsl/ and read it before using this
  6800  // file.
  6801  //
  6802  // The Original Code and all software distributed under the License are
  6803  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6804  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6805  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6806  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6807  // Please see the License for the specific language governing rights and
  6808  // limitations under the License.
  6809  //
  6810  // @APPLE_LICENSE_HEADER_END@
  6811  
  6812  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  6813  //
  6814  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6815  //
  6816  // This file contains Original Code and/or Modifications of Original Code
  6817  // as defined in and that are subject to the Apple Public Source License
  6818  // Version 2.0 (the 'License'). You may not use this file except in
  6819  // compliance with the License. The rights granted to you under the License
  6820  // may not be used to create, or enable the creation or redistribution of,
  6821  // unlawful or unlicensed copies of an Apple operating system, or to
  6822  // circumvent, violate, or enable the circumvention or violation of, any
  6823  // terms of an Apple operating system software license agreement.
  6824  //
  6825  // Please obtain a copy of the License at
  6826  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6827  //
  6828  // The Original Code and all software distributed under the License are
  6829  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6830  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6831  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6832  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6833  // Please see the License for the specific language governing rights and
  6834  // limitations under the License.
  6835  //
  6836  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6837  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  6838  // Copyright (c) 1991, 1993
  6839  //	The Regents of the University of California.  All rights reserved.
  6840  //
  6841  // This code is derived from software contributed to Berkeley by
  6842  // Berkeley Software Design, Inc.
  6843  //
  6844  // Redistribution and use in source and binary forms, with or without
  6845  // modification, are permitted provided that the following conditions
  6846  // are met:
  6847  // 1. Redistributions of source code must retain the above copyright
  6848  //    notice, this list of conditions and the following disclaimer.
  6849  // 2. Redistributions in binary form must reproduce the above copyright
  6850  //    notice, this list of conditions and the following disclaimer in the
  6851  //    documentation and/or other materials provided with the distribution.
  6852  // 3. All advertising materials mentioning features or use of this software
  6853  //    must display the following acknowledgement:
  6854  //	This product includes software developed by the University of
  6855  //	California, Berkeley and its contributors.
  6856  // 4. Neither the name of the University nor the names of its contributors
  6857  //    may be used to endorse or promote products derived from this software
  6858  //    without specific prior written permission.
  6859  //
  6860  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  6861  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  6862  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  6863  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  6864  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  6865  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  6866  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  6867  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  6868  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  6869  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  6870  // SUCH DAMAGE.
  6871  //
  6872  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  6873  
  6874  // Copyright (c) 2004, 2008, 2009 Apple Inc. All rights reserved.
  6875  //
  6876  // @APPLE_LICENSE_HEADER_START@
  6877  //
  6878  // This file contains Original Code and/or Modifications of Original Code
  6879  // as defined in and that are subject to the Apple Public Source License
  6880  // Version 2.0 (the 'License'). You may not use this file except in
  6881  // compliance with the License. Please obtain a copy of the License at
  6882  // http://www.opensource.apple.com/apsl/ and read it before using this
  6883  // file.
  6884  //
  6885  // The Original Code and all software distributed under the License are
  6886  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6887  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6888  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6889  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6890  // Please see the License for the specific language governing rights and
  6891  // limitations under the License.
  6892  //
  6893  // @APPLE_LICENSE_HEADER_END@
  6894  
  6895  // Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  6896  //
  6897  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6898  //
  6899  // This file contains Original Code and/or Modifications of Original Code
  6900  // as defined in and that are subject to the Apple Public Source License
  6901  // Version 2.0 (the 'License'). You may not use this file except in
  6902  // compliance with the License. The rights granted to you under the License
  6903  // may not be used to create, or enable the creation or redistribution of,
  6904  // unlawful or unlicensed copies of an Apple operating system, or to
  6905  // circumvent, violate, or enable the circumvention or violation of, any
  6906  // terms of an Apple operating system software license agreement.
  6907  //
  6908  // Please obtain a copy of the License at
  6909  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6910  //
  6911  // The Original Code and all software distributed under the License are
  6912  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6913  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6914  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6915  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6916  // Please see the License for the specific language governing rights and
  6917  // limitations under the License.
  6918  //
  6919  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6920  // Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
  6921  // Copyright (c) 1982, 1986, 1989, 1993, 1994
  6922  //	The Regents of the University of California.  All rights reserved.
  6923  //
  6924  // Redistribution and use in source and binary forms, with or without
  6925  // modification, are permitted provided that the following conditions
  6926  // are met:
  6927  // 1. Redistributions of source code must retain the above copyright
  6928  //    notice, this list of conditions and the following disclaimer.
  6929  // 2. Redistributions in binary form must reproduce the above copyright
  6930  //    notice, this list of conditions and the following disclaimer in the
  6931  //    documentation and/or other materials provided with the distribution.
  6932  // 3. All advertising materials mentioning features or use of this software
  6933  //    must display the following acknowledgement:
  6934  //	This product includes software developed by the University of
  6935  //	California, Berkeley and its contributors.
  6936  // 4. Neither the name of the University nor the names of its contributors
  6937  //    may be used to endorse or promote products derived from this software
  6938  //    without specific prior written permission.
  6939  //
  6940  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  6941  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  6942  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  6943  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  6944  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  6945  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  6946  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  6947  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  6948  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  6949  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  6950  // SUCH DAMAGE.
  6951  //
  6952  //	@(#)wait.h	8.2 (Berkeley) 7/10/94
  6953  
  6954  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  6955  //
  6956  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  6957  //
  6958  // This file contains Original Code and/or Modifications of Original Code
  6959  // as defined in and that are subject to the Apple Public Source License
  6960  // Version 2.0 (the 'License'). You may not use this file except in
  6961  // compliance with the License. The rights granted to you under the License
  6962  // may not be used to create, or enable the creation or redistribution of,
  6963  // unlawful or unlicensed copies of an Apple operating system, or to
  6964  // circumvent, violate, or enable the circumvention or violation of, any
  6965  // terms of an Apple operating system software license agreement.
  6966  //
  6967  // Please obtain a copy of the License at
  6968  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  6969  //
  6970  // The Original Code and all software distributed under the License are
  6971  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  6972  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  6973  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  6974  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  6975  // Please see the License for the specific language governing rights and
  6976  // limitations under the License.
  6977  //
  6978  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  6979  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  6980  // Copyright (c) 1991, 1993
  6981  //	The Regents of the University of California.  All rights reserved.
  6982  //
  6983  // This code is derived from software contributed to Berkeley by
  6984  // Berkeley Software Design, Inc.
  6985  //
  6986  // Redistribution and use in source and binary forms, with or without
  6987  // modification, are permitted provided that the following conditions
  6988  // are met:
  6989  // 1. Redistributions of source code must retain the above copyright
  6990  //    notice, this list of conditions and the following disclaimer.
  6991  // 2. Redistributions in binary form must reproduce the above copyright
  6992  //    notice, this list of conditions and the following disclaimer in the
  6993  //    documentation and/or other materials provided with the distribution.
  6994  // 3. All advertising materials mentioning features or use of this software
  6995  //    must display the following acknowledgement:
  6996  //	This product includes software developed by the University of
  6997  //	California, Berkeley and its contributors.
  6998  // 4. Neither the name of the University nor the names of its contributors
  6999  //    may be used to endorse or promote products derived from this software
  7000  //    without specific prior written permission.
  7001  //
  7002  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  7003  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  7004  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  7005  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  7006  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  7007  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  7008  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  7009  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  7010  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  7011  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  7012  // SUCH DAMAGE.
  7013  //
  7014  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  7015  
  7016  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  7017  //
  7018  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7019  //
  7020  // This file contains Original Code and/or Modifications of Original Code
  7021  // as defined in and that are subject to the Apple Public Source License
  7022  // Version 2.0 (the 'License'). You may not use this file except in
  7023  // compliance with the License. The rights granted to you under the License
  7024  // may not be used to create, or enable the creation or redistribution of,
  7025  // unlawful or unlicensed copies of an Apple operating system, or to
  7026  // circumvent, violate, or enable the circumvention or violation of, any
  7027  // terms of an Apple operating system software license agreement.
  7028  //
  7029  // Please obtain a copy of the License at
  7030  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7031  //
  7032  // The Original Code and all software distributed under the License are
  7033  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7034  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7035  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7036  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7037  // Please see the License for the specific language governing rights and
  7038  // limitations under the License.
  7039  //
  7040  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7041  
  7042  // This file holds definitions relevent to the wait4 system call
  7043  // and the alternate interfaces that use it (wait, wait3, waitpid).
  7044  
  7045  // [XSI] The type idtype_t shall be defined as an enumeration type whose
  7046  // possible values shall include at least P_ALL, P_PID, and P_PGID.
  7047  type idtype_t = uint32 /* wait.h:83:3 */
  7048  
  7049  // [XSI] The id_t and pid_t types shall be defined as described
  7050  // in <sys/types.h>
  7051  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  7052  //
  7053  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7054  //
  7055  // This file contains Original Code and/or Modifications of Original Code
  7056  // as defined in and that are subject to the Apple Public Source License
  7057  // Version 2.0 (the 'License'). You may not use this file except in
  7058  // compliance with the License. The rights granted to you under the License
  7059  // may not be used to create, or enable the creation or redistribution of,
  7060  // unlawful or unlicensed copies of an Apple operating system, or to
  7061  // circumvent, violate, or enable the circumvention or violation of, any
  7062  // terms of an Apple operating system software license agreement.
  7063  //
  7064  // Please obtain a copy of the License at
  7065  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7066  //
  7067  // The Original Code and all software distributed under the License are
  7068  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7069  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7070  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7071  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7072  // Please see the License for the specific language governing rights and
  7073  // limitations under the License.
  7074  //
  7075  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7076  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  7077  //
  7078  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7079  //
  7080  // This file contains Original Code and/or Modifications of Original Code
  7081  // as defined in and that are subject to the Apple Public Source License
  7082  // Version 2.0 (the 'License'). You may not use this file except in
  7083  // compliance with the License. The rights granted to you under the License
  7084  // may not be used to create, or enable the creation or redistribution of,
  7085  // unlawful or unlicensed copies of an Apple operating system, or to
  7086  // circumvent, violate, or enable the circumvention or violation of, any
  7087  // terms of an Apple operating system software license agreement.
  7088  //
  7089  // Please obtain a copy of the License at
  7090  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7091  //
  7092  // The Original Code and all software distributed under the License are
  7093  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7094  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7095  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7096  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7097  // Please see the License for the specific language governing rights and
  7098  // limitations under the License.
  7099  //
  7100  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7101  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  7102  //
  7103  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7104  //
  7105  // This file contains Original Code and/or Modifications of Original Code
  7106  // as defined in and that are subject to the Apple Public Source License
  7107  // Version 2.0 (the 'License'). You may not use this file except in
  7108  // compliance with the License. The rights granted to you under the License
  7109  // may not be used to create, or enable the creation or redistribution of,
  7110  // unlawful or unlicensed copies of an Apple operating system, or to
  7111  // circumvent, violate, or enable the circumvention or violation of, any
  7112  // terms of an Apple operating system software license agreement.
  7113  //
  7114  // Please obtain a copy of the License at
  7115  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7116  //
  7117  // The Original Code and all software distributed under the License are
  7118  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7119  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7120  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7121  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7122  // Please see the License for the specific language governing rights and
  7123  // limitations under the License.
  7124  //
  7125  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7126  
  7127  type id_t = uint32 /* _id_t.h:31:25 */ // can hold pid_t, gid_t, or uid_t
  7128  
  7129  // [XSI] The siginfo_t type shall be defined as described in <signal.h>
  7130  // [XSI] The rusage structure shall be defined as described in <sys/resource.h>
  7131  // [XSI] Inclusion of the <sys/wait.h> header may also make visible all
  7132  // symbols from <signal.h> and <sys/resource.h>
  7133  //
  7134  // NOTE:	This requirement is currently being satisfied by the direct
  7135  //		inclusion of <sys/signal.h> and <sys/resource.h>, below.
  7136  //
  7137  //		Software should not depend on the exposure of anything other
  7138  //		than the types siginfo_t and struct rusage as a result of
  7139  //		this inclusion.  If you depend on any types or manifest
  7140  //		values othe than siginfo_t and struct rusage from either of
  7141  //		those files, you should explicitly include them yourself, as
  7142  //		well, or in future releases your stware may not compile
  7143  //		without modification.
  7144  // Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.
  7145  //
  7146  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7147  //
  7148  // This file contains Original Code and/or Modifications of Original Code
  7149  // as defined in and that are subject to the Apple Public Source License
  7150  // Version 2.0 (the 'License'). You may not use this file except in
  7151  // compliance with the License. The rights granted to you under the License
  7152  // may not be used to create, or enable the creation or redistribution of,
  7153  // unlawful or unlicensed copies of an Apple operating system, or to
  7154  // circumvent, violate, or enable the circumvention or violation of, any
  7155  // terms of an Apple operating system software license agreement.
  7156  //
  7157  // Please obtain a copy of the License at
  7158  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7159  //
  7160  // The Original Code and all software distributed under the License are
  7161  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7162  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7163  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7164  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7165  // Please see the License for the specific language governing rights and
  7166  // limitations under the License.
  7167  //
  7168  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7169  // Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
  7170  // Copyright (c) 1982, 1986, 1989, 1991, 1993
  7171  //	The Regents of the University of California.  All rights reserved.
  7172  // (c) UNIX System Laboratories, Inc.
  7173  // All or some portions of this file are derived from material licensed
  7174  // to the University of California by American Telephone and Telegraph
  7175  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  7176  // the permission of UNIX System Laboratories, Inc.
  7177  //
  7178  // Redistribution and use in source and binary forms, with or without
  7179  // modification, are permitted provided that the following conditions
  7180  // are met:
  7181  // 1. Redistributions of source code must retain the above copyright
  7182  //    notice, this list of conditions and the following disclaimer.
  7183  // 2. Redistributions in binary form must reproduce the above copyright
  7184  //    notice, this list of conditions and the following disclaimer in the
  7185  //    documentation and/or other materials provided with the distribution.
  7186  // 3. All advertising materials mentioning features or use of this software
  7187  //    must display the following acknowledgement:
  7188  //	This product includes software developed by the University of
  7189  //	California, Berkeley and its contributors.
  7190  // 4. Neither the name of the University nor the names of its contributors
  7191  //    may be used to endorse or promote products derived from this software
  7192  //    without specific prior written permission.
  7193  //
  7194  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  7195  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  7196  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  7197  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  7198  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  7199  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  7200  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  7201  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  7202  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  7203  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  7204  // SUCH DAMAGE.
  7205  //
  7206  //	@(#)signal.h	8.2 (Berkeley) 1/21/94
  7207  
  7208  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  7209  //
  7210  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7211  //
  7212  // This file contains Original Code and/or Modifications of Original Code
  7213  // as defined in and that are subject to the Apple Public Source License
  7214  // Version 2.0 (the 'License'). You may not use this file except in
  7215  // compliance with the License. The rights granted to you under the License
  7216  // may not be used to create, or enable the creation or redistribution of,
  7217  // unlawful or unlicensed copies of an Apple operating system, or to
  7218  // circumvent, violate, or enable the circumvention or violation of, any
  7219  // terms of an Apple operating system software license agreement.
  7220  //
  7221  // Please obtain a copy of the License at
  7222  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7223  //
  7224  // The Original Code and all software distributed under the License are
  7225  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7226  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7227  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7228  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7229  // Please see the License for the specific language governing rights and
  7230  // limitations under the License.
  7231  //
  7232  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7233  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  7234  // Copyright (c) 1991, 1993
  7235  //	The Regents of the University of California.  All rights reserved.
  7236  //
  7237  // This code is derived from software contributed to Berkeley by
  7238  // Berkeley Software Design, Inc.
  7239  //
  7240  // Redistribution and use in source and binary forms, with or without
  7241  // modification, are permitted provided that the following conditions
  7242  // are met:
  7243  // 1. Redistributions of source code must retain the above copyright
  7244  //    notice, this list of conditions and the following disclaimer.
  7245  // 2. Redistributions in binary form must reproduce the above copyright
  7246  //    notice, this list of conditions and the following disclaimer in the
  7247  //    documentation and/or other materials provided with the distribution.
  7248  // 3. All advertising materials mentioning features or use of this software
  7249  //    must display the following acknowledgement:
  7250  //	This product includes software developed by the University of
  7251  //	California, Berkeley and its contributors.
  7252  // 4. Neither the name of the University nor the names of its contributors
  7253  //    may be used to endorse or promote products derived from this software
  7254  //    without specific prior written permission.
  7255  //
  7256  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  7257  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  7258  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  7259  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  7260  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  7261  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  7262  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  7263  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  7264  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  7265  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  7266  // SUCH DAMAGE.
  7267  //
  7268  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  7269  
  7270  // Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
  7271  //
  7272  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7273  //
  7274  // This file contains Original Code and/or Modifications of Original Code
  7275  // as defined in and that are subject to the Apple Public Source License
  7276  // Version 2.0 (the 'License'). You may not use this file except in
  7277  // compliance with the License. The rights granted to you under the License
  7278  // may not be used to create, or enable the creation or redistribution of,
  7279  // unlawful or unlicensed copies of an Apple operating system, or to
  7280  // circumvent, violate, or enable the circumvention or violation of, any
  7281  // terms of an Apple operating system software license agreement.
  7282  //
  7283  // Please obtain a copy of the License at
  7284  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7285  //
  7286  // The Original Code and all software distributed under the License are
  7287  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7288  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7289  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7290  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7291  // Please see the License for the specific language governing rights and
  7292  // limitations under the License.
  7293  //
  7294  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7295  
  7296  // Copyright (c) 2007-2016 by Apple Inc.. All rights reserved.
  7297  //
  7298  // @APPLE_LICENSE_HEADER_START@
  7299  //
  7300  // This file contains Original Code and/or Modifications of Original Code
  7301  // as defined in and that are subject to the Apple Public Source License
  7302  // Version 2.0 (the 'License'). You may not use this file except in
  7303  // compliance with the License. Please obtain a copy of the License at
  7304  // http://www.opensource.apple.com/apsl/ and read it before using this
  7305  // file.
  7306  //
  7307  // The Original Code and all software distributed under the License are
  7308  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7309  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7310  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7311  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7312  // Please see the License for the specific language governing rights and
  7313  // limitations under the License.
  7314  //
  7315  // @APPLE_LICENSE_HEADER_END@
  7316  
  7317  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  7318  //
  7319  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7320  //
  7321  // This file contains Original Code and/or Modifications of Original Code
  7322  // as defined in and that are subject to the Apple Public Source License
  7323  // Version 2.0 (the 'License'). You may not use this file except in
  7324  // compliance with the License. The rights granted to you under the License
  7325  // may not be used to create, or enable the creation or redistribution of,
  7326  // unlawful or unlicensed copies of an Apple operating system, or to
  7327  // circumvent, violate, or enable the circumvention or violation of, any
  7328  // terms of an Apple operating system software license agreement.
  7329  //
  7330  // Please obtain a copy of the License at
  7331  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7332  //
  7333  // The Original Code and all software distributed under the License are
  7334  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7335  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7336  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7337  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7338  // Please see the License for the specific language governing rights and
  7339  // limitations under the License.
  7340  //
  7341  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7342  
  7343  // Copyright (c) 2000-2009 Apple, Inc. All rights reserved.
  7344  // Copyright (c) 1992 NeXT Computer, Inc.
  7345  //
  7346  
  7347  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  7348  //
  7349  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7350  //
  7351  // This file contains Original Code and/or Modifications of Original Code
  7352  // as defined in and that are subject to the Apple Public Source License
  7353  // Version 2.0 (the 'License'). You may not use this file except in
  7354  // compliance with the License. The rights granted to you under the License
  7355  // may not be used to create, or enable the creation or redistribution of,
  7356  // unlawful or unlicensed copies of an Apple operating system, or to
  7357  // circumvent, violate, or enable the circumvention or violation of, any
  7358  // terms of an Apple operating system software license agreement.
  7359  //
  7360  // Please obtain a copy of the License at
  7361  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7362  //
  7363  // The Original Code and all software distributed under the License are
  7364  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7365  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7366  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7367  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7368  // Please see the License for the specific language governing rights and
  7369  // limitations under the License.
  7370  //
  7371  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7372  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  7373  // Copyright (c) 1991, 1993
  7374  //	The Regents of the University of California.  All rights reserved.
  7375  //
  7376  // This code is derived from software contributed to Berkeley by
  7377  // Berkeley Software Design, Inc.
  7378  //
  7379  // Redistribution and use in source and binary forms, with or without
  7380  // modification, are permitted provided that the following conditions
  7381  // are met:
  7382  // 1. Redistributions of source code must retain the above copyright
  7383  //    notice, this list of conditions and the following disclaimer.
  7384  // 2. Redistributions in binary form must reproduce the above copyright
  7385  //    notice, this list of conditions and the following disclaimer in the
  7386  //    documentation and/or other materials provided with the distribution.
  7387  // 3. All advertising materials mentioning features or use of this software
  7388  //    must display the following acknowledgement:
  7389  //	This product includes software developed by the University of
  7390  //	California, Berkeley and its contributors.
  7391  // 4. Neither the name of the University nor the names of its contributors
  7392  //    may be used to endorse or promote products derived from this software
  7393  //    without specific prior written permission.
  7394  //
  7395  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  7396  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  7397  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  7398  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  7399  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  7400  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  7401  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  7402  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  7403  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  7404  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  7405  // SUCH DAMAGE.
  7406  //
  7407  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  7408  
  7409  type sig_atomic_t = int32 /* signal.h:15:13 */
  7410  
  7411  // Language spec sez we must list exactly one parameter, even though we
  7412  // actually supply three.  Ugh!
  7413  // SIG_HOLD is chosen to avoid KERN_SIG_* values in <sys/signalvar.h>
  7414  
  7415  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  7416  //
  7417  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7418  //
  7419  // This file contains Original Code and/or Modifications of Original Code
  7420  // as defined in and that are subject to the Apple Public Source License
  7421  // Version 2.0 (the 'License'). You may not use this file except in
  7422  // compliance with the License. The rights granted to you under the License
  7423  // may not be used to create, or enable the creation or redistribution of,
  7424  // unlawful or unlicensed copies of an Apple operating system, or to
  7425  // circumvent, violate, or enable the circumvention or violation of, any
  7426  // terms of an Apple operating system software license agreement.
  7427  //
  7428  // Please obtain a copy of the License at
  7429  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7430  //
  7431  // The Original Code and all software distributed under the License are
  7432  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7433  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7434  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7435  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7436  // Please see the License for the specific language governing rights and
  7437  // limitations under the License.
  7438  //
  7439  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7440  
  7441  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  7442  //
  7443  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7444  //
  7445  // This file contains Original Code and/or Modifications of Original Code
  7446  // as defined in and that are subject to the Apple Public Source License
  7447  // Version 2.0 (the 'License'). You may not use this file except in
  7448  // compliance with the License. The rights granted to you under the License
  7449  // may not be used to create, or enable the creation or redistribution of,
  7450  // unlawful or unlicensed copies of an Apple operating system, or to
  7451  // circumvent, violate, or enable the circumvention or violation of, any
  7452  // terms of an Apple operating system software license agreement.
  7453  //
  7454  // Please obtain a copy of the License at
  7455  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7456  //
  7457  // The Original Code and all software distributed under the License are
  7458  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7459  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7460  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7461  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7462  // Please see the License for the specific language governing rights and
  7463  // limitations under the License.
  7464  //
  7465  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7466  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  7467  //
  7468  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7469  //
  7470  // This file contains Original Code and/or Modifications of Original Code
  7471  // as defined in and that are subject to the Apple Public Source License
  7472  // Version 2.0 (the 'License'). You may not use this file except in
  7473  // compliance with the License. The rights granted to you under the License
  7474  // may not be used to create, or enable the creation or redistribution of,
  7475  // unlawful or unlicensed copies of an Apple operating system, or to
  7476  // circumvent, violate, or enable the circumvention or violation of, any
  7477  // terms of an Apple operating system software license agreement.
  7478  //
  7479  // Please obtain a copy of the License at
  7480  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7481  //
  7482  // The Original Code and all software distributed under the License are
  7483  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7484  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7485  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7486  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7487  // Please see the License for the specific language governing rights and
  7488  // limitations under the License.
  7489  //
  7490  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7491  
  7492  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  7493  //
  7494  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7495  //
  7496  // This file contains Original Code and/or Modifications of Original Code
  7497  // as defined in and that are subject to the Apple Public Source License
  7498  // Version 2.0 (the 'License'). You may not use this file except in
  7499  // compliance with the License. The rights granted to you under the License
  7500  // may not be used to create, or enable the creation or redistribution of,
  7501  // unlawful or unlicensed copies of an Apple operating system, or to
  7502  // circumvent, violate, or enable the circumvention or violation of, any
  7503  // terms of an Apple operating system software license agreement.
  7504  //
  7505  // Please obtain a copy of the License at
  7506  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7507  //
  7508  // The Original Code and all software distributed under the License are
  7509  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7510  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7511  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7512  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7513  // Please see the License for the specific language governing rights and
  7514  // limitations under the License.
  7515  //
  7516  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7517  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  7518  // Copyright (c) 1991, 1993
  7519  //	The Regents of the University of California.  All rights reserved.
  7520  //
  7521  // This code is derived from software contributed to Berkeley by
  7522  // Berkeley Software Design, Inc.
  7523  //
  7524  // Redistribution and use in source and binary forms, with or without
  7525  // modification, are permitted provided that the following conditions
  7526  // are met:
  7527  // 1. Redistributions of source code must retain the above copyright
  7528  //    notice, this list of conditions and the following disclaimer.
  7529  // 2. Redistributions in binary form must reproduce the above copyright
  7530  //    notice, this list of conditions and the following disclaimer in the
  7531  //    documentation and/or other materials provided with the distribution.
  7532  // 3. All advertising materials mentioning features or use of this software
  7533  //    must display the following acknowledgement:
  7534  //	This product includes software developed by the University of
  7535  //	California, Berkeley and its contributors.
  7536  // 4. Neither the name of the University nor the names of its contributors
  7537  //    may be used to endorse or promote products derived from this software
  7538  //    without specific prior written permission.
  7539  //
  7540  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  7541  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  7542  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  7543  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  7544  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  7545  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  7546  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  7547  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  7548  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  7549  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  7550  // SUCH DAMAGE.
  7551  //
  7552  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  7553  
  7554  // Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
  7555  //
  7556  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7557  //
  7558  // This file contains Original Code and/or Modifications of Original Code
  7559  // as defined in and that are subject to the Apple Public Source License
  7560  // Version 2.0 (the 'License'). You may not use this file except in
  7561  // compliance with the License. The rights granted to you under the License
  7562  // may not be used to create, or enable the creation or redistribution of,
  7563  // unlawful or unlicensed copies of an Apple operating system, or to
  7564  // circumvent, violate, or enable the circumvention or violation of, any
  7565  // terms of an Apple operating system software license agreement.
  7566  //
  7567  // Please obtain a copy of the License at
  7568  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7569  //
  7570  // The Original Code and all software distributed under the License are
  7571  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7572  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7573  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7574  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7575  // Please see the License for the specific language governing rights and
  7576  // limitations under the License.
  7577  //
  7578  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7579  
  7580  // Copyright (c) 2017 Apple Inc. All rights reserved.
  7581  //
  7582  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7583  //
  7584  // This file contains Original Code and/or Modifications of Original Code
  7585  // as defined in and that are subject to the Apple Public Source License
  7586  // Version 2.0 (the 'License'). You may not use this file except in
  7587  // compliance with the License. The rights granted to you under the License
  7588  // may not be used to create, or enable the creation or redistribution of,
  7589  // unlawful or unlicensed copies of an Apple operating system, or to
  7590  // circumvent, violate, or enable the circumvention or violation of, any
  7591  // terms of an Apple operating system software license agreement.
  7592  //
  7593  // Please obtain a copy of the License at
  7594  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7595  //
  7596  // The Original Code and all software distributed under the License are
  7597  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7598  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7599  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7600  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7601  // Please see the License for the specific language governing rights and
  7602  // limitations under the License.
  7603  //
  7604  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7605  
  7606  // Copyright (c) 2004-2007 Apple Inc. All rights reserved.
  7607  //
  7608  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7609  //
  7610  // This file contains Original Code and/or Modifications of Original Code
  7611  // as defined in and that are subject to the Apple Public Source License
  7612  // Version 2.0 (the 'License'). You may not use this file except in
  7613  // compliance with the License. The rights granted to you under the License
  7614  // may not be used to create, or enable the creation or redistribution of,
  7615  // unlawful or unlicensed copies of an Apple operating system, or to
  7616  // circumvent, violate, or enable the circumvention or violation of, any
  7617  // terms of an Apple operating system software license agreement.
  7618  //
  7619  // Please obtain a copy of the License at
  7620  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7621  //
  7622  // The Original Code and all software distributed under the License are
  7623  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7624  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7625  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7626  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7627  // Please see the License for the specific language governing rights and
  7628  // limitations under the License.
  7629  //
  7630  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7631  // @OSF_COPYRIGHT@
  7632  
  7633  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  7634  //
  7635  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7636  //
  7637  // This file contains Original Code and/or Modifications of Original Code
  7638  // as defined in and that are subject to the Apple Public Source License
  7639  // Version 2.0 (the 'License'). You may not use this file except in
  7640  // compliance with the License. The rights granted to you under the License
  7641  // may not be used to create, or enable the creation or redistribution of,
  7642  // unlawful or unlicensed copies of an Apple operating system, or to
  7643  // circumvent, violate, or enable the circumvention or violation of, any
  7644  // terms of an Apple operating system software license agreement.
  7645  //
  7646  // Please obtain a copy of the License at
  7647  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7648  //
  7649  // The Original Code and all software distributed under the License are
  7650  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7651  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7652  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7653  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7654  // Please see the License for the specific language governing rights and
  7655  // limitations under the License.
  7656  //
  7657  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7658  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  7659  // Copyright (c) 1991, 1993
  7660  //	The Regents of the University of California.  All rights reserved.
  7661  //
  7662  // This code is derived from software contributed to Berkeley by
  7663  // Berkeley Software Design, Inc.
  7664  //
  7665  // Redistribution and use in source and binary forms, with or without
  7666  // modification, are permitted provided that the following conditions
  7667  // are met:
  7668  // 1. Redistributions of source code must retain the above copyright
  7669  //    notice, this list of conditions and the following disclaimer.
  7670  // 2. Redistributions in binary form must reproduce the above copyright
  7671  //    notice, this list of conditions and the following disclaimer in the
  7672  //    documentation and/or other materials provided with the distribution.
  7673  // 3. All advertising materials mentioning features or use of this software
  7674  //    must display the following acknowledgement:
  7675  //	This product includes software developed by the University of
  7676  //	California, Berkeley and its contributors.
  7677  // 4. Neither the name of the University nor the names of its contributors
  7678  //    may be used to endorse or promote products derived from this software
  7679  //    without specific prior written permission.
  7680  //
  7681  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  7682  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  7683  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  7684  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  7685  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  7686  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  7687  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  7688  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  7689  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  7690  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  7691  // SUCH DAMAGE.
  7692  //
  7693  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  7694  
  7695  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  7696  //
  7697  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7698  //
  7699  // This file contains Original Code and/or Modifications of Original Code
  7700  // as defined in and that are subject to the Apple Public Source License
  7701  // Version 2.0 (the 'License'). You may not use this file except in
  7702  // compliance with the License. The rights granted to you under the License
  7703  // may not be used to create, or enable the creation or redistribution of,
  7704  // unlawful or unlicensed copies of an Apple operating system, or to
  7705  // circumvent, violate, or enable the circumvention or violation of, any
  7706  // terms of an Apple operating system software license agreement.
  7707  //
  7708  // Please obtain a copy of the License at
  7709  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7710  //
  7711  // The Original Code and all software distributed under the License are
  7712  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7713  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7714  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7715  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7716  // Please see the License for the specific language governing rights and
  7717  // limitations under the License.
  7718  //
  7719  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7720  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  7721  
  7722  type __darwin_arm_exception_state = struct {
  7723  	__exception uint32
  7724  	__fsr       uint32
  7725  	__far       uint32
  7726  } /* _structs.h:39:1 */
  7727  
  7728  type __darwin_arm_exception_state64 = struct {
  7729  	__far       uint64
  7730  	__esr       uint32
  7731  	__exception uint32
  7732  } /* _structs.h:57:1 */
  7733  
  7734  type __darwin_arm_thread_state = struct {
  7735  	__r    [13]uint32
  7736  	__sp   uint32
  7737  	__lr   uint32
  7738  	__pc   uint32
  7739  	__cpsr uint32
  7740  } /* _structs.h:75:1 */
  7741  
  7742  // By default, the pointer fields in the arm_thread_state64_t structure are
  7743  // opaque on the arm64e architecture and require the use of accessor macros.
  7744  // This mode can also be enabled on the arm64 architecture by building with
  7745  // -D__DARWIN_OPAQUE_ARM_THREAD_STATE64=1.
  7746  
  7747  type __darwin_arm_thread_state64 = struct {
  7748  	__x    [29]uint64
  7749  	__fp   uint64
  7750  	__lr   uint64
  7751  	__sp   uint64
  7752  	__pc   uint64
  7753  	__cpsr uint32
  7754  	__pad  uint32
  7755  } /* _structs.h:134:1 */
  7756  
  7757  // Accessor macros for arm_thread_state64_t pointer fields
  7758  
  7759  // Return pc field of arm_thread_state64_t as a data pointer value
  7760  // Return pc field of arm_thread_state64_t as a function pointer
  7761  // Set pc field of arm_thread_state64_t to a function pointer
  7762  // Return lr field of arm_thread_state64_t as a data pointer value
  7763  // Return lr field of arm_thread_state64_t as a function pointer
  7764  // Set lr field of arm_thread_state64_t to a function pointer
  7765  // Return sp field of arm_thread_state64_t as a data pointer value
  7766  // Set sp field of arm_thread_state64_t to a data pointer value
  7767  // Return fp field of arm_thread_state64_t as a data pointer value
  7768  // Set fp field of arm_thread_state64_t to a data pointer value
  7769  // Strip ptr auth bits from pc, lr, sp and fp field of arm_thread_state64_t
  7770  
  7771  type __darwin_arm_vfp_state = struct {
  7772  	__r     [64]uint32
  7773  	__fpscr uint32
  7774  } /* _structs.h:422:1 */
  7775  
  7776  type __darwin_arm_neon_state64 = struct {
  7777  	__v [32]struct {
  7778  		lo uint64
  7779  		hi uint64
  7780  	}
  7781  	__fpsr uint32
  7782  	__fpcr uint32
  7783  } /* _structs.h:441:1 */
  7784  
  7785  type __darwin_arm_neon_state = struct {
  7786  	__v [16]struct {
  7787  		lo uint64
  7788  		hi uint64
  7789  	}
  7790  	__fpsr uint32
  7791  	__fpcr uint32
  7792  } /* _structs.h:448:1 */
  7793  
  7794  type __darwin_arm_amx_state_v1 = struct {
  7795  	_                 [0]uint64
  7796  	__x               [8][64]uint8
  7797  	__y               [8][64]uint8
  7798  	__z               [64][64]uint8
  7799  	__amx_state_t_el1 uint64
  7800  } /* _structs.h:512:1 */
  7801  
  7802  type __arm_pagein_state = struct{ __pagein_error int32 } /* _structs.h:531:1 */
  7803  
  7804  // Debug State
  7805  
  7806  // ARM's arm_debug_state is ARM64's arm_legacy_debug_state
  7807  
  7808  type __arm_legacy_debug_state = struct {
  7809  	__bvr [16]uint32
  7810  	__bcr [16]uint32
  7811  	__wvr [16]uint32
  7812  	__wcr [16]uint32
  7813  } /* _structs.h:568:1 */
  7814  
  7815  type __darwin_arm_debug_state32 = struct {
  7816  	__bvr       [16]uint32
  7817  	__bcr       [16]uint32
  7818  	__wvr       [16]uint32
  7819  	__wcr       [16]uint32
  7820  	__mdscr_el1 uint64
  7821  } /* _structs.h:591:1 */
  7822  
  7823  type __darwin_arm_debug_state64 = struct {
  7824  	__bvr       [16]uint64
  7825  	__bcr       [16]uint64
  7826  	__wvr       [16]uint64
  7827  	__wcr       [16]uint64
  7828  	__mdscr_el1 uint64
  7829  } /* _structs.h:601:1 */
  7830  
  7831  type __darwin_arm_cpmu_state64 = struct{ __ctrs [16]uint64 } /* _structs.h:633:1 */
  7832  
  7833  type __darwin_mcontext32 = struct {
  7834  	__es struct {
  7835  		__exception uint32
  7836  		__fsr       uint32
  7837  		__far       uint32
  7838  	}
  7839  	__ss struct {
  7840  		__r    [13]uint32
  7841  		__sp   uint32
  7842  		__lr   uint32
  7843  		__pc   uint32
  7844  		__cpsr uint32
  7845  	}
  7846  	__fs struct {
  7847  		__r     [64]uint32
  7848  		__fpscr uint32
  7849  	}
  7850  } /* _mcontext.h:39:1 */
  7851  
  7852  type __darwin_mcontext64 = struct {
  7853  	__es struct {
  7854  		__far       uint64
  7855  		__esr       uint32
  7856  		__exception uint32
  7857  	}
  7858  	__ss struct {
  7859  		__x    [29]uint64
  7860  		__fp   uint64
  7861  		__lr   uint64
  7862  		__sp   uint64
  7863  		__pc   uint64
  7864  		__cpsr uint32
  7865  		__pad  uint32
  7866  	}
  7867  	__ns struct {
  7868  		__v [32]struct {
  7869  			lo uint64
  7870  			hi uint64
  7871  		}
  7872  		__fpsr uint32
  7873  		__fpcr uint32
  7874  	}
  7875  } /* _mcontext.h:62:1 */
  7876  
  7877  type mcontext_t = uintptr /* _mcontext.h:83:33 */
  7878  
  7879  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  7880  //
  7881  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7882  //
  7883  // This file contains Original Code and/or Modifications of Original Code
  7884  // as defined in and that are subject to the Apple Public Source License
  7885  // Version 2.0 (the 'License'). You may not use this file except in
  7886  // compliance with the License. The rights granted to you under the License
  7887  // may not be used to create, or enable the creation or redistribution of,
  7888  // unlawful or unlicensed copies of an Apple operating system, or to
  7889  // circumvent, violate, or enable the circumvention or violation of, any
  7890  // terms of an Apple operating system software license agreement.
  7891  //
  7892  // Please obtain a copy of the License at
  7893  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7894  //
  7895  // The Original Code and all software distributed under the License are
  7896  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7897  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7898  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7899  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7900  // Please see the License for the specific language governing rights and
  7901  // limitations under the License.
  7902  //
  7903  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7904  // Copyright (c) 2003-2013 Apple Inc. All rights reserved.
  7905  //
  7906  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7907  //
  7908  // This file contains Original Code and/or Modifications of Original Code
  7909  // as defined in and that are subject to the Apple Public Source License
  7910  // Version 2.0 (the 'License'). You may not use this file except in
  7911  // compliance with the License. The rights granted to you under the License
  7912  // may not be used to create, or enable the creation or redistribution of,
  7913  // unlawful or unlicensed copies of an Apple operating system, or to
  7914  // circumvent, violate, or enable the circumvention or violation of, any
  7915  // terms of an Apple operating system software license agreement.
  7916  //
  7917  // Please obtain a copy of the License at
  7918  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7919  //
  7920  // The Original Code and all software distributed under the License are
  7921  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7922  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7923  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7924  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7925  // Please see the License for the specific language governing rights and
  7926  // limitations under the License.
  7927  //
  7928  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7929  
  7930  type pthread_attr_t = _opaque_pthread_attr_t /* _pthread_attr_t.h:31:33 */
  7931  
  7932  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  7933  //
  7934  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7935  //
  7936  // This file contains Original Code and/or Modifications of Original Code
  7937  // as defined in and that are subject to the Apple Public Source License
  7938  // Version 2.0 (the 'License'). You may not use this file except in
  7939  // compliance with the License. The rights granted to you under the License
  7940  // may not be used to create, or enable the creation or redistribution of,
  7941  // unlawful or unlicensed copies of an Apple operating system, or to
  7942  // circumvent, violate, or enable the circumvention or violation of, any
  7943  // terms of an Apple operating system software license agreement.
  7944  //
  7945  // Please obtain a copy of the License at
  7946  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7947  //
  7948  // The Original Code and all software distributed under the License are
  7949  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7950  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7951  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7952  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7953  // Please see the License for the specific language governing rights and
  7954  // limitations under the License.
  7955  //
  7956  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7957  
  7958  // Structure used in sigaltstack call.
  7959  
  7960  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  7961  //
  7962  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  7963  //
  7964  // This file contains Original Code and/or Modifications of Original Code
  7965  // as defined in and that are subject to the Apple Public Source License
  7966  // Version 2.0 (the 'License'). You may not use this file except in
  7967  // compliance with the License. The rights granted to you under the License
  7968  // may not be used to create, or enable the creation or redistribution of,
  7969  // unlawful or unlicensed copies of an Apple operating system, or to
  7970  // circumvent, violate, or enable the circumvention or violation of, any
  7971  // terms of an Apple operating system software license agreement.
  7972  //
  7973  // Please obtain a copy of the License at
  7974  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  7975  //
  7976  // The Original Code and all software distributed under the License are
  7977  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  7978  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  7979  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  7980  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  7981  // Please see the License for the specific language governing rights and
  7982  // limitations under the License.
  7983  //
  7984  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  7985  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  7986  // Copyright (c) 1991, 1993
  7987  //	The Regents of the University of California.  All rights reserved.
  7988  //
  7989  // This code is derived from software contributed to Berkeley by
  7990  // Berkeley Software Design, Inc.
  7991  //
  7992  // Redistribution and use in source and binary forms, with or without
  7993  // modification, are permitted provided that the following conditions
  7994  // are met:
  7995  // 1. Redistributions of source code must retain the above copyright
  7996  //    notice, this list of conditions and the following disclaimer.
  7997  // 2. Redistributions in binary form must reproduce the above copyright
  7998  //    notice, this list of conditions and the following disclaimer in the
  7999  //    documentation and/or other materials provided with the distribution.
  8000  // 3. All advertising materials mentioning features or use of this software
  8001  //    must display the following acknowledgement:
  8002  //	This product includes software developed by the University of
  8003  //	California, Berkeley and its contributors.
  8004  // 4. Neither the name of the University nor the names of its contributors
  8005  //    may be used to endorse or promote products derived from this software
  8006  //    without specific prior written permission.
  8007  //
  8008  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  8009  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  8010  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  8011  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  8012  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  8013  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  8014  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  8015  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  8016  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  8017  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  8018  // SUCH DAMAGE.
  8019  //
  8020  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  8021  
  8022  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  8023  //
  8024  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8025  //
  8026  // This file contains Original Code and/or Modifications of Original Code
  8027  // as defined in and that are subject to the Apple Public Source License
  8028  // Version 2.0 (the 'License'). You may not use this file except in
  8029  // compliance with the License. The rights granted to you under the License
  8030  // may not be used to create, or enable the creation or redistribution of,
  8031  // unlawful or unlicensed copies of an Apple operating system, or to
  8032  // circumvent, violate, or enable the circumvention or violation of, any
  8033  // terms of an Apple operating system software license agreement.
  8034  //
  8035  // Please obtain a copy of the License at
  8036  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8037  //
  8038  // The Original Code and all software distributed under the License are
  8039  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8040  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8041  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8042  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8043  // Please see the License for the specific language governing rights and
  8044  // limitations under the License.
  8045  //
  8046  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8047  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  8048  
  8049  type __darwin_sigaltstack = struct {
  8050  	ss_sp    uintptr
  8051  	ss_size  uint64
  8052  	ss_flags int32
  8053  	_        [4]byte
  8054  } /* _sigaltstack.h:42:1 */
  8055  
  8056  type stack_t = __darwin_sigaltstack /* _sigaltstack.h:48:33 */ // [???] signal stack
  8057  
  8058  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  8059  //
  8060  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8061  //
  8062  // This file contains Original Code and/or Modifications of Original Code
  8063  // as defined in and that are subject to the Apple Public Source License
  8064  // Version 2.0 (the 'License'). You may not use this file except in
  8065  // compliance with the License. The rights granted to you under the License
  8066  // may not be used to create, or enable the creation or redistribution of,
  8067  // unlawful or unlicensed copies of an Apple operating system, or to
  8068  // circumvent, violate, or enable the circumvention or violation of, any
  8069  // terms of an Apple operating system software license agreement.
  8070  //
  8071  // Please obtain a copy of the License at
  8072  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8073  //
  8074  // The Original Code and all software distributed under the License are
  8075  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8076  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8077  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8078  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8079  // Please see the License for the specific language governing rights and
  8080  // limitations under the License.
  8081  //
  8082  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8083  
  8084  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  8085  //
  8086  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8087  //
  8088  // This file contains Original Code and/or Modifications of Original Code
  8089  // as defined in and that are subject to the Apple Public Source License
  8090  // Version 2.0 (the 'License'). You may not use this file except in
  8091  // compliance with the License. The rights granted to you under the License
  8092  // may not be used to create, or enable the creation or redistribution of,
  8093  // unlawful or unlicensed copies of an Apple operating system, or to
  8094  // circumvent, violate, or enable the circumvention or violation of, any
  8095  // terms of an Apple operating system software license agreement.
  8096  //
  8097  // Please obtain a copy of the License at
  8098  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8099  //
  8100  // The Original Code and all software distributed under the License are
  8101  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8102  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8103  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8104  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8105  // Please see the License for the specific language governing rights and
  8106  // limitations under the License.
  8107  //
  8108  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8109  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  8110  // Copyright (c) 1991, 1993
  8111  //	The Regents of the University of California.  All rights reserved.
  8112  //
  8113  // This code is derived from software contributed to Berkeley by
  8114  // Berkeley Software Design, Inc.
  8115  //
  8116  // Redistribution and use in source and binary forms, with or without
  8117  // modification, are permitted provided that the following conditions
  8118  // are met:
  8119  // 1. Redistributions of source code must retain the above copyright
  8120  //    notice, this list of conditions and the following disclaimer.
  8121  // 2. Redistributions in binary form must reproduce the above copyright
  8122  //    notice, this list of conditions and the following disclaimer in the
  8123  //    documentation and/or other materials provided with the distribution.
  8124  // 3. All advertising materials mentioning features or use of this software
  8125  //    must display the following acknowledgement:
  8126  //	This product includes software developed by the University of
  8127  //	California, Berkeley and its contributors.
  8128  // 4. Neither the name of the University nor the names of its contributors
  8129  //    may be used to endorse or promote products derived from this software
  8130  //    without specific prior written permission.
  8131  //
  8132  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  8133  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  8134  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  8135  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  8136  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  8137  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  8138  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  8139  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  8140  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  8141  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  8142  // SUCH DAMAGE.
  8143  //
  8144  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  8145  
  8146  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  8147  //
  8148  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8149  //
  8150  // This file contains Original Code and/or Modifications of Original Code
  8151  // as defined in and that are subject to the Apple Public Source License
  8152  // Version 2.0 (the 'License'). You may not use this file except in
  8153  // compliance with the License. The rights granted to you under the License
  8154  // may not be used to create, or enable the creation or redistribution of,
  8155  // unlawful or unlicensed copies of an Apple operating system, or to
  8156  // circumvent, violate, or enable the circumvention or violation of, any
  8157  // terms of an Apple operating system software license agreement.
  8158  //
  8159  // Please obtain a copy of the License at
  8160  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8161  //
  8162  // The Original Code and all software distributed under the License are
  8163  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8164  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8165  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8166  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8167  // Please see the License for the specific language governing rights and
  8168  // limitations under the License.
  8169  //
  8170  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8171  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  8172  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  8173  //
  8174  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8175  //
  8176  // This file contains Original Code and/or Modifications of Original Code
  8177  // as defined in and that are subject to the Apple Public Source License
  8178  // Version 2.0 (the 'License'). You may not use this file except in
  8179  // compliance with the License. The rights granted to you under the License
  8180  // may not be used to create, or enable the creation or redistribution of,
  8181  // unlawful or unlicensed copies of an Apple operating system, or to
  8182  // circumvent, violate, or enable the circumvention or violation of, any
  8183  // terms of an Apple operating system software license agreement.
  8184  //
  8185  // Please obtain a copy of the License at
  8186  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8187  //
  8188  // The Original Code and all software distributed under the License are
  8189  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8190  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8191  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8192  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8193  // Please see the License for the specific language governing rights and
  8194  // limitations under the License.
  8195  //
  8196  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8197  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  8198  //
  8199  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8200  //
  8201  // This file contains Original Code and/or Modifications of Original Code
  8202  // as defined in and that are subject to the Apple Public Source License
  8203  // Version 2.0 (the 'License'). You may not use this file except in
  8204  // compliance with the License. The rights granted to you under the License
  8205  // may not be used to create, or enable the creation or redistribution of,
  8206  // unlawful or unlicensed copies of an Apple operating system, or to
  8207  // circumvent, violate, or enable the circumvention or violation of, any
  8208  // terms of an Apple operating system software license agreement.
  8209  //
  8210  // Please obtain a copy of the License at
  8211  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8212  //
  8213  // The Original Code and all software distributed under the License are
  8214  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8215  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8216  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8217  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8218  // Please see the License for the specific language governing rights and
  8219  // limitations under the License.
  8220  //
  8221  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8222  
  8223  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  8224  //
  8225  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8226  //
  8227  // This file contains Original Code and/or Modifications of Original Code
  8228  // as defined in and that are subject to the Apple Public Source License
  8229  // Version 2.0 (the 'License'). You may not use this file except in
  8230  // compliance with the License. The rights granted to you under the License
  8231  // may not be used to create, or enable the creation or redistribution of,
  8232  // unlawful or unlicensed copies of an Apple operating system, or to
  8233  // circumvent, violate, or enable the circumvention or violation of, any
  8234  // terms of an Apple operating system software license agreement.
  8235  //
  8236  // Please obtain a copy of the License at
  8237  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8238  //
  8239  // The Original Code and all software distributed under the License are
  8240  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8241  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8242  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8243  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8244  // Please see the License for the specific language governing rights and
  8245  // limitations under the License.
  8246  //
  8247  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8248  
  8249  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  8250  //
  8251  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8252  //
  8253  // This file contains Original Code and/or Modifications of Original Code
  8254  // as defined in and that are subject to the Apple Public Source License
  8255  // Version 2.0 (the 'License'). You may not use this file except in
  8256  // compliance with the License. The rights granted to you under the License
  8257  // may not be used to create, or enable the creation or redistribution of,
  8258  // unlawful or unlicensed copies of an Apple operating system, or to
  8259  // circumvent, violate, or enable the circumvention or violation of, any
  8260  // terms of an Apple operating system software license agreement.
  8261  //
  8262  // Please obtain a copy of the License at
  8263  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8264  //
  8265  // The Original Code and all software distributed under the License are
  8266  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8267  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8268  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8269  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8270  // Please see the License for the specific language governing rights and
  8271  // limitations under the License.
  8272  //
  8273  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8274  
  8275  // Structure used in sigaltstack call.
  8276  
  8277  type __darwin_ucontext = struct {
  8278  	uc_onstack int32
  8279  	uc_sigmask uint32
  8280  	uc_stack   struct {
  8281  		ss_sp    uintptr
  8282  		ss_size  uint64
  8283  		ss_flags int32
  8284  		_        [4]byte
  8285  	}
  8286  	uc_link     uintptr
  8287  	uc_mcsize   uint64
  8288  	uc_mcontext uintptr
  8289  } /* _ucontext.h:43:1 */
  8290  
  8291  // user context
  8292  type ucontext_t = __darwin_ucontext /* _ucontext.h:57:33 */ // [???] user context
  8293  
  8294  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  8295  //
  8296  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8297  //
  8298  // This file contains Original Code and/or Modifications of Original Code
  8299  // as defined in and that are subject to the Apple Public Source License
  8300  // Version 2.0 (the 'License'). You may not use this file except in
  8301  // compliance with the License. The rights granted to you under the License
  8302  // may not be used to create, or enable the creation or redistribution of,
  8303  // unlawful or unlicensed copies of an Apple operating system, or to
  8304  // circumvent, violate, or enable the circumvention or violation of, any
  8305  // terms of an Apple operating system software license agreement.
  8306  //
  8307  // Please obtain a copy of the License at
  8308  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8309  //
  8310  // The Original Code and all software distributed under the License are
  8311  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8312  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8313  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8314  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8315  // Please see the License for the specific language governing rights and
  8316  // limitations under the License.
  8317  //
  8318  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8319  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  8320  //
  8321  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8322  //
  8323  // This file contains Original Code and/or Modifications of Original Code
  8324  // as defined in and that are subject to the Apple Public Source License
  8325  // Version 2.0 (the 'License'). You may not use this file except in
  8326  // compliance with the License. The rights granted to you under the License
  8327  // may not be used to create, or enable the creation or redistribution of,
  8328  // unlawful or unlicensed copies of an Apple operating system, or to
  8329  // circumvent, violate, or enable the circumvention or violation of, any
  8330  // terms of an Apple operating system software license agreement.
  8331  //
  8332  // Please obtain a copy of the License at
  8333  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8334  //
  8335  // The Original Code and all software distributed under the License are
  8336  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8337  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8338  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8339  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8340  // Please see the License for the specific language governing rights and
  8341  // limitations under the License.
  8342  //
  8343  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8344  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  8345  //
  8346  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8347  //
  8348  // This file contains Original Code and/or Modifications of Original Code
  8349  // as defined in and that are subject to the Apple Public Source License
  8350  // Version 2.0 (the 'License'). You may not use this file except in
  8351  // compliance with the License. The rights granted to you under the License
  8352  // may not be used to create, or enable the creation or redistribution of,
  8353  // unlawful or unlicensed copies of an Apple operating system, or to
  8354  // circumvent, violate, or enable the circumvention or violation of, any
  8355  // terms of an Apple operating system software license agreement.
  8356  //
  8357  // Please obtain a copy of the License at
  8358  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8359  //
  8360  // The Original Code and all software distributed under the License are
  8361  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8362  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8363  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8364  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8365  // Please see the License for the specific language governing rights and
  8366  // limitations under the License.
  8367  //
  8368  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8369  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  8370  //
  8371  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8372  //
  8373  // This file contains Original Code and/or Modifications of Original Code
  8374  // as defined in and that are subject to the Apple Public Source License
  8375  // Version 2.0 (the 'License'). You may not use this file except in
  8376  // compliance with the License. The rights granted to you under the License
  8377  // may not be used to create, or enable the creation or redistribution of,
  8378  // unlawful or unlicensed copies of an Apple operating system, or to
  8379  // circumvent, violate, or enable the circumvention or violation of, any
  8380  // terms of an Apple operating system software license agreement.
  8381  //
  8382  // Please obtain a copy of the License at
  8383  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8384  //
  8385  // The Original Code and all software distributed under the License are
  8386  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8387  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8388  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8389  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8390  // Please see the License for the specific language governing rights and
  8391  // limitations under the License.
  8392  //
  8393  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8394  
  8395  type sigval = struct {
  8396  	_         [0]uint64
  8397  	sival_int int32
  8398  	_         [4]byte
  8399  } /* signal.h:158:1 */
  8400  
  8401  type sigevent = struct {
  8402  	sigev_notify int32
  8403  	sigev_signo  int32
  8404  	sigev_value  struct {
  8405  		_         [0]uint64
  8406  		sival_int int32
  8407  		_         [4]byte
  8408  	}
  8409  	sigev_notify_function   uintptr
  8410  	sigev_notify_attributes uintptr
  8411  } /* signal.h:168:1 */
  8412  
  8413  type __siginfo = struct {
  8414  	si_signo  int32
  8415  	si_errno  int32
  8416  	si_code   int32
  8417  	si_pid    pid_t
  8418  	si_uid    uid_t
  8419  	si_status int32
  8420  	si_addr   uintptr
  8421  	si_value  struct {
  8422  		_         [0]uint64
  8423  		sival_int int32
  8424  		_         [4]byte
  8425  	}
  8426  	si_band int64
  8427  	__pad   [7]uint64
  8428  } /* signal.h:177:9 */
  8429  
  8430  type siginfo_t = __siginfo /* signal.h:188:3 */
  8431  
  8432  // When the signal is SIGILL or SIGFPE, si_addr contains the address of
  8433  // the faulting instruction.
  8434  // When the signal is SIGSEGV or SIGBUS, si_addr contains the address of
  8435  // the faulting memory reference. Although for x86 there are cases of SIGSEGV
  8436  // for which si_addr cannot be determined and is NULL.
  8437  // If the signal is SIGCHLD, the si_pid field will contain the child process ID,
  8438  //  si_status contains the exit value or signal and
  8439  //  si_uid contains the real user ID of the process that sent the signal.
  8440  
  8441  // Values for si_code
  8442  
  8443  // Codes for SIGILL
  8444  
  8445  // Codes for SIGFPE
  8446  
  8447  // Codes for SIGSEGV
  8448  
  8449  // Codes for SIGBUS
  8450  
  8451  // Codes for SIGTRAP
  8452  
  8453  // Codes for SIGCHLD
  8454  
  8455  // Codes for SIGPOLL
  8456  
  8457  // union for signal handlers
  8458  type __sigaction_u = struct{ __sa_handler uintptr } /* signal.h:269:1 */
  8459  
  8460  // Signal vector template for Kernel user boundary
  8461  type __sigaction = struct {
  8462  	__sigaction_u struct{ __sa_handler uintptr }
  8463  	sa_tramp      uintptr
  8464  	sa_mask       sigset_t
  8465  	sa_flags      int32
  8466  } /* signal.h:276:1 */
  8467  
  8468  // Signal vector "template" used in sigaction call.
  8469  type sigaction = struct {
  8470  	__sigaction_u struct{ __sa_handler uintptr }
  8471  	sa_mask       sigset_t
  8472  	sa_flags      int32
  8473  } /* signal.h:286:1 */
  8474  
  8475  // if SA_SIGINFO is set, sa_sigaction is to be used instead of sa_handler.
  8476  
  8477  // This will provide 64bit register set in a 32bit user address space
  8478  
  8479  // the following are the only bits we support from user space, the
  8480  // rest are for kernel use only.
  8481  
  8482  // Flags for sigprocmask:
  8483  
  8484  // POSIX 1003.1b required values.
  8485  
  8486  type sig_t = uintptr /* signal.h:331:14 */ // type of signal function
  8487  
  8488  // Structure used in sigaltstack call.
  8489  
  8490  // 4.3 compatibility:
  8491  // Signal vector "template" used in sigvec call.
  8492  type sigvec = struct {
  8493  	sv_handler uintptr
  8494  	sv_mask    int32
  8495  	sv_flags   int32
  8496  } /* signal.h:348:1 */
  8497  
  8498  // Structure used in sigstack call.
  8499  type sigstack = struct {
  8500  	ss_sp      uintptr
  8501  	ss_onstack int32
  8502  	_          [4]byte
  8503  } /* signal.h:367:1 */
  8504  
  8505  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  8506  //
  8507  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8508  //
  8509  // This file contains Original Code and/or Modifications of Original Code
  8510  // as defined in and that are subject to the Apple Public Source License
  8511  // Version 2.0 (the 'License'). You may not use this file except in
  8512  // compliance with the License. The rights granted to you under the License
  8513  // may not be used to create, or enable the creation or redistribution of,
  8514  // unlawful or unlicensed copies of an Apple operating system, or to
  8515  // circumvent, violate, or enable the circumvention or violation of, any
  8516  // terms of an Apple operating system software license agreement.
  8517  //
  8518  // Please obtain a copy of the License at
  8519  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8520  //
  8521  // The Original Code and all software distributed under the License are
  8522  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8523  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8524  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8525  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8526  // Please see the License for the specific language governing rights and
  8527  // limitations under the License.
  8528  //
  8529  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8530  // Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
  8531  // Copyright (c) 1982, 1986, 1993
  8532  //	The Regents of the University of California.  All rights reserved.
  8533  //
  8534  // Redistribution and use in source and binary forms, with or without
  8535  // modification, are permitted provided that the following conditions
  8536  // are met:
  8537  // 1. Redistributions of source code must retain the above copyright
  8538  //    notice, this list of conditions and the following disclaimer.
  8539  // 2. Redistributions in binary form must reproduce the above copyright
  8540  //    notice, this list of conditions and the following disclaimer in the
  8541  //    documentation and/or other materials provided with the distribution.
  8542  // 3. All advertising materials mentioning features or use of this software
  8543  //    must display the following acknowledgement:
  8544  //	This product includes software developed by the University of
  8545  //	California, Berkeley and its contributors.
  8546  // 4. Neither the name of the University nor the names of its contributors
  8547  //    may be used to endorse or promote products derived from this software
  8548  //    without specific prior written permission.
  8549  //
  8550  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  8551  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  8552  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  8553  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  8554  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  8555  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  8556  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  8557  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  8558  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  8559  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  8560  // SUCH DAMAGE.
  8561  //
  8562  //	@(#)resource.h	8.2 (Berkeley) 1/4/94
  8563  
  8564  // Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
  8565  //
  8566  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8567  //
  8568  // This file contains Original Code and/or Modifications of Original Code
  8569  // as defined in and that are subject to the Apple Public Source License
  8570  // Version 2.0 (the 'License'). You may not use this file except in
  8571  // compliance with the License. The rights granted to you under the License
  8572  // may not be used to create, or enable the creation or redistribution of,
  8573  // unlawful or unlicensed copies of an Apple operating system, or to
  8574  // circumvent, violate, or enable the circumvention or violation of, any
  8575  // terms of an Apple operating system software license agreement.
  8576  //
  8577  // Please obtain a copy of the License at
  8578  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8579  //
  8580  // The Original Code and all software distributed under the License are
  8581  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8582  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8583  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8584  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8585  // Please see the License for the specific language governing rights and
  8586  // limitations under the License.
  8587  //
  8588  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8589  
  8590  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  8591  //
  8592  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8593  //
  8594  // This file contains Original Code and/or Modifications of Original Code
  8595  // as defined in and that are subject to the Apple Public Source License
  8596  // Version 2.0 (the 'License'). You may not use this file except in
  8597  // compliance with the License. The rights granted to you under the License
  8598  // may not be used to create, or enable the creation or redistribution of,
  8599  // unlawful or unlicensed copies of an Apple operating system, or to
  8600  // circumvent, violate, or enable the circumvention or violation of, any
  8601  // terms of an Apple operating system software license agreement.
  8602  //
  8603  // Please obtain a copy of the License at
  8604  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8605  //
  8606  // The Original Code and all software distributed under the License are
  8607  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8608  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8609  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8610  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8611  // Please see the License for the specific language governing rights and
  8612  // limitations under the License.
  8613  //
  8614  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8615  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  8616  // Copyright (c) 1991, 1993
  8617  //	The Regents of the University of California.  All rights reserved.
  8618  //
  8619  // This code is derived from software contributed to Berkeley by
  8620  // Berkeley Software Design, Inc.
  8621  //
  8622  // Redistribution and use in source and binary forms, with or without
  8623  // modification, are permitted provided that the following conditions
  8624  // are met:
  8625  // 1. Redistributions of source code must retain the above copyright
  8626  //    notice, this list of conditions and the following disclaimer.
  8627  // 2. Redistributions in binary form must reproduce the above copyright
  8628  //    notice, this list of conditions and the following disclaimer in the
  8629  //    documentation and/or other materials provided with the distribution.
  8630  // 3. All advertising materials mentioning features or use of this software
  8631  //    must display the following acknowledgement:
  8632  //	This product includes software developed by the University of
  8633  //	California, Berkeley and its contributors.
  8634  // 4. Neither the name of the University nor the names of its contributors
  8635  //    may be used to endorse or promote products derived from this software
  8636  //    without specific prior written permission.
  8637  //
  8638  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  8639  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  8640  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  8641  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  8642  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  8643  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  8644  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  8645  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  8646  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  8647  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  8648  // SUCH DAMAGE.
  8649  //
  8650  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  8651  
  8652  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  8653  //
  8654  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8655  //
  8656  // This file contains Original Code and/or Modifications of Original Code
  8657  // as defined in and that are subject to the Apple Public Source License
  8658  // Version 2.0 (the 'License'). You may not use this file except in
  8659  // compliance with the License. The rights granted to you under the License
  8660  // may not be used to create, or enable the creation or redistribution of,
  8661  // unlawful or unlicensed copies of an Apple operating system, or to
  8662  // circumvent, violate, or enable the circumvention or violation of, any
  8663  // terms of an Apple operating system software license agreement.
  8664  //
  8665  // Please obtain a copy of the License at
  8666  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8667  //
  8668  // The Original Code and all software distributed under the License are
  8669  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8670  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8671  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8672  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8673  // Please see the License for the specific language governing rights and
  8674  // limitations under the License.
  8675  //
  8676  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8677  
  8678  //  DO NOT EDIT THIS FILE.
  8679  //
  8680  //     It has been auto-edited by fixincludes from:
  8681  //
  8682  // 	"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdint.h"
  8683  //
  8684  //     This had to be done to correct non-standard usages in the
  8685  //     original, manufacturer supplied header file.
  8686  
  8687  // Copyright (c) 2000-2010 Apple Inc.
  8688  // All rights reserved.
  8689  
  8690  // from ISO/IEC 988:1999 spec
  8691  
  8692  // 7.18.1.1 Exact-width integer types
  8693  // Copyright (c) 2012 Apple Inc. All rights reserved.
  8694  //
  8695  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8696  //
  8697  // This file contains Original Code and/or Modifications of Original Code
  8698  // as defined in and that are subject to the Apple Public Source License
  8699  // Version 2.0 (the 'License'). You may not use this file except in
  8700  // compliance with the License. The rights granted to you under the License
  8701  // may not be used to create, or enable the creation or redistribution of,
  8702  // unlawful or unlicensed copies of an Apple operating system, or to
  8703  // circumvent, violate, or enable the circumvention or violation of, any
  8704  // terms of an Apple operating system software license agreement.
  8705  //
  8706  // Please obtain a copy of the License at
  8707  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8708  //
  8709  // The Original Code and all software distributed under the License are
  8710  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8711  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8712  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8713  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8714  // Please see the License for the specific language governing rights and
  8715  // limitations under the License.
  8716  //
  8717  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8718  // Copyright (c) 2012 Apple Inc. All rights reserved.
  8719  //
  8720  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8721  //
  8722  // This file contains Original Code and/or Modifications of Original Code
  8723  // as defined in and that are subject to the Apple Public Source License
  8724  // Version 2.0 (the 'License'). You may not use this file except in
  8725  // compliance with the License. The rights granted to you under the License
  8726  // may not be used to create, or enable the creation or redistribution of,
  8727  // unlawful or unlicensed copies of an Apple operating system, or to
  8728  // circumvent, violate, or enable the circumvention or violation of, any
  8729  // terms of an Apple operating system software license agreement.
  8730  //
  8731  // Please obtain a copy of the License at
  8732  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8733  //
  8734  // The Original Code and all software distributed under the License are
  8735  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8736  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8737  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8738  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8739  // Please see the License for the specific language governing rights and
  8740  // limitations under the License.
  8741  //
  8742  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8743  // Copyright (c) 2012 Apple Inc. All rights reserved.
  8744  //
  8745  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8746  //
  8747  // This file contains Original Code and/or Modifications of Original Code
  8748  // as defined in and that are subject to the Apple Public Source License
  8749  // Version 2.0 (the 'License'). You may not use this file except in
  8750  // compliance with the License. The rights granted to you under the License
  8751  // may not be used to create, or enable the creation or redistribution of,
  8752  // unlawful or unlicensed copies of an Apple operating system, or to
  8753  // circumvent, violate, or enable the circumvention or violation of, any
  8754  // terms of an Apple operating system software license agreement.
  8755  //
  8756  // Please obtain a copy of the License at
  8757  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8758  //
  8759  // The Original Code and all software distributed under the License are
  8760  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8761  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8762  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8763  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8764  // Please see the License for the specific language governing rights and
  8765  // limitations under the License.
  8766  //
  8767  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8768  // Copyright (c) 2012 Apple Inc. All rights reserved.
  8769  //
  8770  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8771  //
  8772  // This file contains Original Code and/or Modifications of Original Code
  8773  // as defined in and that are subject to the Apple Public Source License
  8774  // Version 2.0 (the 'License'). You may not use this file except in
  8775  // compliance with the License. The rights granted to you under the License
  8776  // may not be used to create, or enable the creation or redistribution of,
  8777  // unlawful or unlicensed copies of an Apple operating system, or to
  8778  // circumvent, violate, or enable the circumvention or violation of, any
  8779  // terms of an Apple operating system software license agreement.
  8780  //
  8781  // Please obtain a copy of the License at
  8782  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8783  //
  8784  // The Original Code and all software distributed under the License are
  8785  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8786  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8787  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8788  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8789  // Please see the License for the specific language governing rights and
  8790  // limitations under the License.
  8791  //
  8792  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8793  
  8794  // Copyright (c) 2012 Apple Inc. All rights reserved.
  8795  //
  8796  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8797  //
  8798  // This file contains Original Code and/or Modifications of Original Code
  8799  // as defined in and that are subject to the Apple Public Source License
  8800  // Version 2.0 (the 'License'). You may not use this file except in
  8801  // compliance with the License. The rights granted to you under the License
  8802  // may not be used to create, or enable the creation or redistribution of,
  8803  // unlawful or unlicensed copies of an Apple operating system, or to
  8804  // circumvent, violate, or enable the circumvention or violation of, any
  8805  // terms of an Apple operating system software license agreement.
  8806  //
  8807  // Please obtain a copy of the License at
  8808  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8809  //
  8810  // The Original Code and all software distributed under the License are
  8811  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8812  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8813  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8814  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8815  // Please see the License for the specific language governing rights and
  8816  // limitations under the License.
  8817  //
  8818  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8819  
  8820  type uint8_t = uint8 /* _uint8_t.h:31:23 */
  8821  // Copyright (c) 2012 Apple Inc. All rights reserved.
  8822  //
  8823  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8824  //
  8825  // This file contains Original Code and/or Modifications of Original Code
  8826  // as defined in and that are subject to the Apple Public Source License
  8827  // Version 2.0 (the 'License'). You may not use this file except in
  8828  // compliance with the License. The rights granted to you under the License
  8829  // may not be used to create, or enable the creation or redistribution of,
  8830  // unlawful or unlicensed copies of an Apple operating system, or to
  8831  // circumvent, violate, or enable the circumvention or violation of, any
  8832  // terms of an Apple operating system software license agreement.
  8833  //
  8834  // Please obtain a copy of the License at
  8835  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8836  //
  8837  // The Original Code and all software distributed under the License are
  8838  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8839  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8840  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8841  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8842  // Please see the License for the specific language governing rights and
  8843  // limitations under the License.
  8844  //
  8845  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8846  
  8847  type uint16_t = uint16 /* _uint16_t.h:31:24 */
  8848  // Copyright (c) 2012 Apple Inc. All rights reserved.
  8849  //
  8850  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8851  //
  8852  // This file contains Original Code and/or Modifications of Original Code
  8853  // as defined in and that are subject to the Apple Public Source License
  8854  // Version 2.0 (the 'License'). You may not use this file except in
  8855  // compliance with the License. The rights granted to you under the License
  8856  // may not be used to create, or enable the creation or redistribution of,
  8857  // unlawful or unlicensed copies of an Apple operating system, or to
  8858  // circumvent, violate, or enable the circumvention or violation of, any
  8859  // terms of an Apple operating system software license agreement.
  8860  //
  8861  // Please obtain a copy of the License at
  8862  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8863  //
  8864  // The Original Code and all software distributed under the License are
  8865  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8866  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8867  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8868  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8869  // Please see the License for the specific language governing rights and
  8870  // limitations under the License.
  8871  //
  8872  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8873  
  8874  // Copyright (c) 2012 Apple Inc. All rights reserved.
  8875  //
  8876  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8877  //
  8878  // This file contains Original Code and/or Modifications of Original Code
  8879  // as defined in and that are subject to the Apple Public Source License
  8880  // Version 2.0 (the 'License'). You may not use this file except in
  8881  // compliance with the License. The rights granted to you under the License
  8882  // may not be used to create, or enable the creation or redistribution of,
  8883  // unlawful or unlicensed copies of an Apple operating system, or to
  8884  // circumvent, violate, or enable the circumvention or violation of, any
  8885  // terms of an Apple operating system software license agreement.
  8886  //
  8887  // Please obtain a copy of the License at
  8888  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8889  //
  8890  // The Original Code and all software distributed under the License are
  8891  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8892  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8893  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8894  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8895  // Please see the License for the specific language governing rights and
  8896  // limitations under the License.
  8897  //
  8898  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8899  
  8900  // 7.18.1.2 Minimum-width integer types
  8901  type int_least8_t = int8_t     /* stdint.h:38:26 */
  8902  type int_least16_t = int16_t   /* stdint.h:39:25 */
  8903  type int_least32_t = int32_t   /* stdint.h:40:25 */
  8904  type int_least64_t = int64_t   /* stdint.h:41:25 */
  8905  type uint_least8_t = uint8_t   /* stdint.h:42:25 */
  8906  type uint_least16_t = uint16_t /* stdint.h:43:24 */
  8907  type uint_least32_t = uint32_t /* stdint.h:44:24 */
  8908  type uint_least64_t = uint64_t /* stdint.h:45:24 */
  8909  
  8910  // 7.18.1.3 Fastest-width integer types
  8911  type int_fast8_t = int8_t     /* stdint.h:49:27 */
  8912  type int_fast16_t = int16_t   /* stdint.h:50:26 */
  8913  type int_fast32_t = int32_t   /* stdint.h:51:26 */
  8914  type int_fast64_t = int64_t   /* stdint.h:52:26 */
  8915  type uint_fast8_t = uint8_t   /* stdint.h:53:26 */
  8916  type uint_fast16_t = uint16_t /* stdint.h:54:25 */
  8917  type uint_fast32_t = uint32_t /* stdint.h:55:25 */
  8918  type uint_fast64_t = uint64_t /* stdint.h:56:25 */
  8919  
  8920  // 7.18.1.4 Integer types capable of holding object pointers
  8921  
  8922  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  8923  //
  8924  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8925  //
  8926  // This file contains Original Code and/or Modifications of Original Code
  8927  // as defined in and that are subject to the Apple Public Source License
  8928  // Version 2.0 (the 'License'). You may not use this file except in
  8929  // compliance with the License. The rights granted to you under the License
  8930  // may not be used to create, or enable the creation or redistribution of,
  8931  // unlawful or unlicensed copies of an Apple operating system, or to
  8932  // circumvent, violate, or enable the circumvention or violation of, any
  8933  // terms of an Apple operating system software license agreement.
  8934  //
  8935  // Please obtain a copy of the License at
  8936  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8937  //
  8938  // The Original Code and all software distributed under the License are
  8939  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8940  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8941  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8942  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8943  // Please see the License for the specific language governing rights and
  8944  // limitations under the License.
  8945  //
  8946  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8947  
  8948  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  8949  //
  8950  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8951  //
  8952  // This file contains Original Code and/or Modifications of Original Code
  8953  // as defined in and that are subject to the Apple Public Source License
  8954  // Version 2.0 (the 'License'). You may not use this file except in
  8955  // compliance with the License. The rights granted to you under the License
  8956  // may not be used to create, or enable the creation or redistribution of,
  8957  // unlawful or unlicensed copies of an Apple operating system, or to
  8958  // circumvent, violate, or enable the circumvention or violation of, any
  8959  // terms of an Apple operating system software license agreement.
  8960  //
  8961  // Please obtain a copy of the License at
  8962  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8963  //
  8964  // The Original Code and all software distributed under the License are
  8965  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8966  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8967  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8968  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8969  // Please see the License for the specific language governing rights and
  8970  // limitations under the License.
  8971  //
  8972  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8973  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  8974  //
  8975  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  8976  //
  8977  // This file contains Original Code and/or Modifications of Original Code
  8978  // as defined in and that are subject to the Apple Public Source License
  8979  // Version 2.0 (the 'License'). You may not use this file except in
  8980  // compliance with the License. The rights granted to you under the License
  8981  // may not be used to create, or enable the creation or redistribution of,
  8982  // unlawful or unlicensed copies of an Apple operating system, or to
  8983  // circumvent, violate, or enable the circumvention or violation of, any
  8984  // terms of an Apple operating system software license agreement.
  8985  //
  8986  // Please obtain a copy of the License at
  8987  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  8988  //
  8989  // The Original Code and all software distributed under the License are
  8990  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  8991  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  8992  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  8993  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  8994  // Please see the License for the specific language governing rights and
  8995  // limitations under the License.
  8996  //
  8997  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  8998  
  8999  // 7.18.1.5 Greatest-width integer types
  9000  // Copyright (c) 2012 Apple Inc. All rights reserved.
  9001  //
  9002  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  9003  //
  9004  // This file contains Original Code and/or Modifications of Original Code
  9005  // as defined in and that are subject to the Apple Public Source License
  9006  // Version 2.0 (the 'License'). You may not use this file except in
  9007  // compliance with the License. The rights granted to you under the License
  9008  // may not be used to create, or enable the creation or redistribution of,
  9009  // unlawful or unlicensed copies of an Apple operating system, or to
  9010  // circumvent, violate, or enable the circumvention or violation of, any
  9011  // terms of an Apple operating system software license agreement.
  9012  //
  9013  // Please obtain a copy of the License at
  9014  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  9015  //
  9016  // The Original Code and all software distributed under the License are
  9017  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9018  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9019  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9020  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  9021  // Please see the License for the specific language governing rights and
  9022  // limitations under the License.
  9023  //
  9024  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  9025  
  9026  type intmax_t = int64 /* _intmax_t.h:32:25 */
  9027  // Copyright (c) 2012 Apple Inc. All rights reserved.
  9028  //
  9029  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  9030  //
  9031  // This file contains Original Code and/or Modifications of Original Code
  9032  // as defined in and that are subject to the Apple Public Source License
  9033  // Version 2.0 (the 'License'). You may not use this file except in
  9034  // compliance with the License. The rights granted to you under the License
  9035  // may not be used to create, or enable the creation or redistribution of,
  9036  // unlawful or unlicensed copies of an Apple operating system, or to
  9037  // circumvent, violate, or enable the circumvention or violation of, any
  9038  // terms of an Apple operating system software license agreement.
  9039  //
  9040  // Please obtain a copy of the License at
  9041  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  9042  //
  9043  // The Original Code and all software distributed under the License are
  9044  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9045  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9046  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9047  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  9048  // Please see the License for the specific language governing rights and
  9049  // limitations under the License.
  9050  //
  9051  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  9052  
  9053  type uintmax_t = uint64 /* _uintmax_t.h:32:26 */
  9054  
  9055  // 7.18.4 Macros for integer constants
  9056  
  9057  // 7.18.2 Limits of specified-width integer types:
  9058  //   These #defines specify the minimum and maximum limits
  9059  //   of each of the types declared above.
  9060  //
  9061  //   They must have "the same type as would an expression that is an
  9062  //   object of the corresponding type converted according to the integer
  9063  //   promotion".
  9064  
  9065  // 7.18.2.1 Limits of exact-width integer types
  9066  
  9067  //
  9068  //       Note:  the literal "most negative int" cannot be written in C --
  9069  //       the rules in the standard (section 6.4.4.1 in C99) will give it
  9070  //       an unsigned type, so INT32_MIN (and the most negative member of
  9071  //       any larger signed type) must be written via a constant expression.
  9072  //
  9073  
  9074  // 7.18.2.2 Limits of minimum-width integer types
  9075  
  9076  // 7.18.2.3 Limits of fastest minimum-width integer types
  9077  
  9078  // 7.18.2.4 Limits of integer types capable of holding object pointers
  9079  
  9080  // 7.18.2.5 Limits of greatest-width integer types
  9081  
  9082  // 7.18.3 "Other"
  9083  
  9084  // WCHAR_MIN should be 0 if wchar_t is an unsigned type and
  9085  //    (-WCHAR_MAX-1) if wchar_t is a signed type.  Unfortunately,
  9086  //    it turns out that -fshort-wchar changes the signedness of
  9087  //    the type.
  9088  
  9089  // Copyright (c) 2007-2016 by Apple Inc.. All rights reserved.
  9090  //
  9091  // @APPLE_LICENSE_HEADER_START@
  9092  //
  9093  // This file contains Original Code and/or Modifications of Original Code
  9094  // as defined in and that are subject to the Apple Public Source License
  9095  // Version 2.0 (the 'License'). You may not use this file except in
  9096  // compliance with the License. Please obtain a copy of the License at
  9097  // http://www.opensource.apple.com/apsl/ and read it before using this
  9098  // file.
  9099  //
  9100  // The Original Code and all software distributed under the License are
  9101  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9102  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9103  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9104  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  9105  // Please see the License for the specific language governing rights and
  9106  // limitations under the License.
  9107  //
  9108  // @APPLE_LICENSE_HEADER_END@
  9109  
  9110  // [XSI] The timeval structure shall be defined as described in
  9111  // <sys/time.h>
  9112  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  9113  //
  9114  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  9115  //
  9116  // This file contains Original Code and/or Modifications of Original Code
  9117  // as defined in and that are subject to the Apple Public Source License
  9118  // Version 2.0 (the 'License'). You may not use this file except in
  9119  // compliance with the License. The rights granted to you under the License
  9120  // may not be used to create, or enable the creation or redistribution of,
  9121  // unlawful or unlicensed copies of an Apple operating system, or to
  9122  // circumvent, violate, or enable the circumvention or violation of, any
  9123  // terms of an Apple operating system software license agreement.
  9124  //
  9125  // Please obtain a copy of the License at
  9126  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  9127  //
  9128  // The Original Code and all software distributed under the License are
  9129  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9130  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9131  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9132  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  9133  // Please see the License for the specific language governing rights and
  9134  // limitations under the License.
  9135  //
  9136  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  9137  
  9138  // The id_t type shall be defined as described in <sys/types.h>
  9139  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  9140  //
  9141  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  9142  //
  9143  // This file contains Original Code and/or Modifications of Original Code
  9144  // as defined in and that are subject to the Apple Public Source License
  9145  // Version 2.0 (the 'License'). You may not use this file except in
  9146  // compliance with the License. The rights granted to you under the License
  9147  // may not be used to create, or enable the creation or redistribution of,
  9148  // unlawful or unlicensed copies of an Apple operating system, or to
  9149  // circumvent, violate, or enable the circumvention or violation of, any
  9150  // terms of an Apple operating system software license agreement.
  9151  //
  9152  // Please obtain a copy of the License at
  9153  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  9154  //
  9155  // The Original Code and all software distributed under the License are
  9156  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9157  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9158  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9159  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  9160  // Please see the License for the specific language governing rights and
  9161  // limitations under the License.
  9162  //
  9163  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  9164  
  9165  // Resource limit type (low 63 bits, excluding the sign bit)
  9166  type rlim_t = uint64 /* resource.h:89:25 */
  9167  
  9168  // ****
  9169  //
  9170  // PRIORITY
  9171  
  9172  // Possible values of the first parameter to getpriority()/setpriority(),
  9173  // used to indicate the type of the second parameter.
  9174  
  9175  // Range limitations for the value of the third parameter to setpriority().
  9176  
  9177  // use PRIO_DARWIN_BG to set the current thread into "background" state
  9178  // which lowers CPU, disk IO, and networking priorites until thread terminates
  9179  // or "background" state is revoked
  9180  
  9181  // use PRIO_DARWIN_NONUI to restrict a process's ability to make calls to
  9182  // the GPU. (deprecated)
  9183  
  9184  // ****
  9185  //
  9186  // RESOURCE USAGE
  9187  
  9188  // Possible values of the first parameter to getrusage(), used to indicate
  9189  // the scope of the information to be returned.
  9190  
  9191  // A structure representing an accounting of resource utilization.  The
  9192  // address of an instance of this structure is the second parameter to
  9193  // getrusage().
  9194  //
  9195  // Note: All values other than ru_utime and ru_stime are implementaiton
  9196  //       defined and subject to change in a future release.  Their use
  9197  //       is discouraged for standards compliant programs.
  9198  type rusage = struct {
  9199  	ru_utime struct {
  9200  		tv_sec  int64
  9201  		tv_usec int32
  9202  		_       [4]byte
  9203  	}
  9204  	ru_stime struct {
  9205  		tv_sec  int64
  9206  		tv_usec int32
  9207  		_       [4]byte
  9208  	}
  9209  	ru_maxrss   int64
  9210  	ru_ixrss    int64
  9211  	ru_idrss    int64
  9212  	ru_isrss    int64
  9213  	ru_minflt   int64
  9214  	ru_majflt   int64
  9215  	ru_nswap    int64
  9216  	ru_inblock  int64
  9217  	ru_oublock  int64
  9218  	ru_msgsnd   int64
  9219  	ru_msgrcv   int64
  9220  	ru_nsignals int64
  9221  	ru_nvcsw    int64
  9222  	ru_nivcsw   int64
  9223  } /* resource.h:152:1 */
  9224  
  9225  // Flavors for proc_pid_rusage().
  9226  
  9227  // Flags for RUSAGE_INFO_V5
  9228  
  9229  type rusage_info_t = uintptr /* resource.h:199:14 */
  9230  
  9231  type rusage_info_v0 = struct {
  9232  	ri_uuid               [16]uint8_t
  9233  	ri_user_time          uint64_t
  9234  	ri_system_time        uint64_t
  9235  	ri_pkg_idle_wkups     uint64_t
  9236  	ri_interrupt_wkups    uint64_t
  9237  	ri_pageins            uint64_t
  9238  	ri_wired_size         uint64_t
  9239  	ri_resident_size      uint64_t
  9240  	ri_phys_footprint     uint64_t
  9241  	ri_proc_start_abstime uint64_t
  9242  	ri_proc_exit_abstime  uint64_t
  9243  } /* resource.h:201:1 */
  9244  
  9245  type rusage_info_v1 = struct {
  9246  	ri_uuid                  [16]uint8_t
  9247  	ri_user_time             uint64_t
  9248  	ri_system_time           uint64_t
  9249  	ri_pkg_idle_wkups        uint64_t
  9250  	ri_interrupt_wkups       uint64_t
  9251  	ri_pageins               uint64_t
  9252  	ri_wired_size            uint64_t
  9253  	ri_resident_size         uint64_t
  9254  	ri_phys_footprint        uint64_t
  9255  	ri_proc_start_abstime    uint64_t
  9256  	ri_proc_exit_abstime     uint64_t
  9257  	ri_child_user_time       uint64_t
  9258  	ri_child_system_time     uint64_t
  9259  	ri_child_pkg_idle_wkups  uint64_t
  9260  	ri_child_interrupt_wkups uint64_t
  9261  	ri_child_pageins         uint64_t
  9262  	ri_child_elapsed_abstime uint64_t
  9263  } /* resource.h:215:1 */
  9264  
  9265  type rusage_info_v2 = struct {
  9266  	ri_uuid                  [16]uint8_t
  9267  	ri_user_time             uint64_t
  9268  	ri_system_time           uint64_t
  9269  	ri_pkg_idle_wkups        uint64_t
  9270  	ri_interrupt_wkups       uint64_t
  9271  	ri_pageins               uint64_t
  9272  	ri_wired_size            uint64_t
  9273  	ri_resident_size         uint64_t
  9274  	ri_phys_footprint        uint64_t
  9275  	ri_proc_start_abstime    uint64_t
  9276  	ri_proc_exit_abstime     uint64_t
  9277  	ri_child_user_time       uint64_t
  9278  	ri_child_system_time     uint64_t
  9279  	ri_child_pkg_idle_wkups  uint64_t
  9280  	ri_child_interrupt_wkups uint64_t
  9281  	ri_child_pageins         uint64_t
  9282  	ri_child_elapsed_abstime uint64_t
  9283  	ri_diskio_bytesread      uint64_t
  9284  	ri_diskio_byteswritten   uint64_t
  9285  } /* resource.h:235:1 */
  9286  
  9287  type rusage_info_v3 = struct {
  9288  	ri_uuid                          [16]uint8_t
  9289  	ri_user_time                     uint64_t
  9290  	ri_system_time                   uint64_t
  9291  	ri_pkg_idle_wkups                uint64_t
  9292  	ri_interrupt_wkups               uint64_t
  9293  	ri_pageins                       uint64_t
  9294  	ri_wired_size                    uint64_t
  9295  	ri_resident_size                 uint64_t
  9296  	ri_phys_footprint                uint64_t
  9297  	ri_proc_start_abstime            uint64_t
  9298  	ri_proc_exit_abstime             uint64_t
  9299  	ri_child_user_time               uint64_t
  9300  	ri_child_system_time             uint64_t
  9301  	ri_child_pkg_idle_wkups          uint64_t
  9302  	ri_child_interrupt_wkups         uint64_t
  9303  	ri_child_pageins                 uint64_t
  9304  	ri_child_elapsed_abstime         uint64_t
  9305  	ri_diskio_bytesread              uint64_t
  9306  	ri_diskio_byteswritten           uint64_t
  9307  	ri_cpu_time_qos_default          uint64_t
  9308  	ri_cpu_time_qos_maintenance      uint64_t
  9309  	ri_cpu_time_qos_background       uint64_t
  9310  	ri_cpu_time_qos_utility          uint64_t
  9311  	ri_cpu_time_qos_legacy           uint64_t
  9312  	ri_cpu_time_qos_user_initiated   uint64_t
  9313  	ri_cpu_time_qos_user_interactive uint64_t
  9314  	ri_billed_system_time            uint64_t
  9315  	ri_serviced_system_time          uint64_t
  9316  } /* resource.h:257:1 */
  9317  
  9318  type rusage_info_v4 = struct {
  9319  	ri_uuid                          [16]uint8_t
  9320  	ri_user_time                     uint64_t
  9321  	ri_system_time                   uint64_t
  9322  	ri_pkg_idle_wkups                uint64_t
  9323  	ri_interrupt_wkups               uint64_t
  9324  	ri_pageins                       uint64_t
  9325  	ri_wired_size                    uint64_t
  9326  	ri_resident_size                 uint64_t
  9327  	ri_phys_footprint                uint64_t
  9328  	ri_proc_start_abstime            uint64_t
  9329  	ri_proc_exit_abstime             uint64_t
  9330  	ri_child_user_time               uint64_t
  9331  	ri_child_system_time             uint64_t
  9332  	ri_child_pkg_idle_wkups          uint64_t
  9333  	ri_child_interrupt_wkups         uint64_t
  9334  	ri_child_pageins                 uint64_t
  9335  	ri_child_elapsed_abstime         uint64_t
  9336  	ri_diskio_bytesread              uint64_t
  9337  	ri_diskio_byteswritten           uint64_t
  9338  	ri_cpu_time_qos_default          uint64_t
  9339  	ri_cpu_time_qos_maintenance      uint64_t
  9340  	ri_cpu_time_qos_background       uint64_t
  9341  	ri_cpu_time_qos_utility          uint64_t
  9342  	ri_cpu_time_qos_legacy           uint64_t
  9343  	ri_cpu_time_qos_user_initiated   uint64_t
  9344  	ri_cpu_time_qos_user_interactive uint64_t
  9345  	ri_billed_system_time            uint64_t
  9346  	ri_serviced_system_time          uint64_t
  9347  	ri_logical_writes                uint64_t
  9348  	ri_lifetime_max_phys_footprint   uint64_t
  9349  	ri_instructions                  uint64_t
  9350  	ri_cycles                        uint64_t
  9351  	ri_billed_energy                 uint64_t
  9352  	ri_serviced_energy               uint64_t
  9353  	ri_interval_max_phys_footprint   uint64_t
  9354  	ri_runnable_time                 uint64_t
  9355  } /* resource.h:288:1 */
  9356  
  9357  type rusage_info_v5 = struct {
  9358  	ri_uuid                          [16]uint8_t
  9359  	ri_user_time                     uint64_t
  9360  	ri_system_time                   uint64_t
  9361  	ri_pkg_idle_wkups                uint64_t
  9362  	ri_interrupt_wkups               uint64_t
  9363  	ri_pageins                       uint64_t
  9364  	ri_wired_size                    uint64_t
  9365  	ri_resident_size                 uint64_t
  9366  	ri_phys_footprint                uint64_t
  9367  	ri_proc_start_abstime            uint64_t
  9368  	ri_proc_exit_abstime             uint64_t
  9369  	ri_child_user_time               uint64_t
  9370  	ri_child_system_time             uint64_t
  9371  	ri_child_pkg_idle_wkups          uint64_t
  9372  	ri_child_interrupt_wkups         uint64_t
  9373  	ri_child_pageins                 uint64_t
  9374  	ri_child_elapsed_abstime         uint64_t
  9375  	ri_diskio_bytesread              uint64_t
  9376  	ri_diskio_byteswritten           uint64_t
  9377  	ri_cpu_time_qos_default          uint64_t
  9378  	ri_cpu_time_qos_maintenance      uint64_t
  9379  	ri_cpu_time_qos_background       uint64_t
  9380  	ri_cpu_time_qos_utility          uint64_t
  9381  	ri_cpu_time_qos_legacy           uint64_t
  9382  	ri_cpu_time_qos_user_initiated   uint64_t
  9383  	ri_cpu_time_qos_user_interactive uint64_t
  9384  	ri_billed_system_time            uint64_t
  9385  	ri_serviced_system_time          uint64_t
  9386  	ri_logical_writes                uint64_t
  9387  	ri_lifetime_max_phys_footprint   uint64_t
  9388  	ri_instructions                  uint64_t
  9389  	ri_cycles                        uint64_t
  9390  	ri_billed_energy                 uint64_t
  9391  	ri_serviced_energy               uint64_t
  9392  	ri_interval_max_phys_footprint   uint64_t
  9393  	ri_runnable_time                 uint64_t
  9394  	ri_flags                         uint64_t
  9395  } /* resource.h:327:1 */
  9396  
  9397  type rusage_info_current = rusage_info_v5 /* resource.h:367:31 */
  9398  
  9399  // ****
  9400  //
  9401  // RESOURCE LIMITS
  9402  
  9403  // Symbolic constants for resource limits; since all limits are representable
  9404  // as a type rlim_t, we are permitted to define RLIM_SAVED_* in terms of
  9405  // RLIM_INFINITY.
  9406  
  9407  // Possible values of the first parameter to getrlimit()/setrlimit(), to
  9408  // indicate for which resource the operation is being performed.
  9409  
  9410  // A structure representing a resource limit.  The address of an instance
  9411  // of this structure is the second parameter to getrlimit()/setrlimit().
  9412  type rlimit = struct {
  9413  	rlim_cur rlim_t
  9414  	rlim_max rlim_t
  9415  } /* resource.h:411:1 */
  9416  
  9417  // proc_rlimit_control()
  9418  //
  9419  // Resource limit flavors
  9420  
  9421  // Flags for wakeups monitor control.
  9422  
  9423  // Flags for CPU usage monitor control.
  9424  
  9425  // Flags for memory footprint interval tracking.
  9426  
  9427  type proc_rlimit_control_wakeupmon = struct {
  9428  	wm_flags uint32_t
  9429  	wm_rate  int32_t
  9430  } /* resource.h:446:1 */
  9431  
  9432  // Option bits for the third argument of wait4.  WNOHANG causes the
  9433  // wait to not hang if there are no stopped or terminated processes, rather
  9434  // returning an error indication in this case (pid==0).  WUNTRACED
  9435  // indicates that the caller should receive status about untraced children
  9436  // which stop due to signals.  If children are stopped and a wait without
  9437  // this option is done, it is as though they were still running... nothing
  9438  // about them is returned.
  9439  
  9440  // Macros to test the exit status returned by wait
  9441  // and extract the relevant values.
  9442  
  9443  // These macros are permited, as they are in the implementation namespace
  9444  
  9445  // [XSI] The <sys/wait.h> header shall define the following macros for
  9446  // analysis of process status values
  9447  // 0x13 == SIGCONT
  9448  
  9449  // [XSI] The following symbolic constants shall be defined as possible
  9450  // values for the fourth argument to waitid().
  9451  // WNOHANG already defined for wait4()
  9452  // WUNTRACED defined for wait4() but not for waitid()
  9453  // waitid() parameter
  9454  
  9455  // POSIX extensions and 4.2/4.3 compatability:
  9456  
  9457  // Tokens for special values of the "pid" parameter to wait4.
  9458  
  9459  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  9460  //
  9461  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  9462  //
  9463  // This file contains Original Code and/or Modifications of Original Code
  9464  // as defined in and that are subject to the Apple Public Source License
  9465  // Version 2.0 (the 'License'). You may not use this file except in
  9466  // compliance with the License. The rights granted to you under the License
  9467  // may not be used to create, or enable the creation or redistribution of,
  9468  // unlawful or unlicensed copies of an Apple operating system, or to
  9469  // circumvent, violate, or enable the circumvention or violation of, any
  9470  // terms of an Apple operating system software license agreement.
  9471  //
  9472  // Please obtain a copy of the License at
  9473  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  9474  //
  9475  // The Original Code and all software distributed under the License are
  9476  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9477  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9478  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9479  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  9480  // Please see the License for the specific language governing rights and
  9481  // limitations under the License.
  9482  //
  9483  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  9484  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  9485  
  9486  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  9487  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  9488  // Copyright (c) 1987, 1991, 1993
  9489  //	The Regents of the University of California.  All rights reserved.
  9490  //
  9491  // Redistribution and use in source and binary forms, with or without
  9492  // modification, are permitted provided that the following conditions
  9493  // are met:
  9494  // 1. Redistributions of source code must retain the above copyright
  9495  //    notice, this list of conditions and the following disclaimer.
  9496  // 2. Redistributions in binary form must reproduce the above copyright
  9497  //    notice, this list of conditions and the following disclaimer in the
  9498  //    documentation and/or other materials provided with the distribution.
  9499  // 3. All advertising materials mentioning features or use of this software
  9500  //    must display the following acknowledgement:
  9501  //	This product includes software developed by the University of
  9502  //	California, Berkeley and its contributors.
  9503  // 4. Neither the name of the University nor the names of its contributors
  9504  //    may be used to endorse or promote products derived from this software
  9505  //    without specific prior written permission.
  9506  //
  9507  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  9508  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  9509  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  9510  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  9511  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  9512  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  9513  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  9514  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  9515  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  9516  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  9517  // SUCH DAMAGE.
  9518  //
  9519  //	@(#)endian.h	8.1 (Berkeley) 6/11/93
  9520  
  9521  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  9522  //
  9523  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  9524  //
  9525  // This file contains Original Code and/or Modifications of Original Code
  9526  // as defined in and that are subject to the Apple Public Source License
  9527  // Version 2.0 (the 'License'). You may not use this file except in
  9528  // compliance with the License. The rights granted to you under the License
  9529  // may not be used to create, or enable the creation or redistribution of,
  9530  // unlawful or unlicensed copies of an Apple operating system, or to
  9531  // circumvent, violate, or enable the circumvention or violation of, any
  9532  // terms of an Apple operating system software license agreement.
  9533  //
  9534  // Please obtain a copy of the License at
  9535  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  9536  //
  9537  // The Original Code and all software distributed under the License are
  9538  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9539  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9540  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9541  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  9542  // Please see the License for the specific language governing rights and
  9543  // limitations under the License.
  9544  //
  9545  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  9546  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  9547  // Copyright (c) 1991, 1993
  9548  //	The Regents of the University of California.  All rights reserved.
  9549  //
  9550  // This code is derived from software contributed to Berkeley by
  9551  // Berkeley Software Design, Inc.
  9552  //
  9553  // Redistribution and use in source and binary forms, with or without
  9554  // modification, are permitted provided that the following conditions
  9555  // are met:
  9556  // 1. Redistributions of source code must retain the above copyright
  9557  //    notice, this list of conditions and the following disclaimer.
  9558  // 2. Redistributions in binary form must reproduce the above copyright
  9559  //    notice, this list of conditions and the following disclaimer in the
  9560  //    documentation and/or other materials provided with the distribution.
  9561  // 3. All advertising materials mentioning features or use of this software
  9562  //    must display the following acknowledgement:
  9563  //	This product includes software developed by the University of
  9564  //	California, Berkeley and its contributors.
  9565  // 4. Neither the name of the University nor the names of its contributors
  9566  //    may be used to endorse or promote products derived from this software
  9567  //    without specific prior written permission.
  9568  //
  9569  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  9570  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  9571  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  9572  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  9573  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  9574  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  9575  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  9576  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  9577  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  9578  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  9579  // SUCH DAMAGE.
  9580  //
  9581  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  9582  
  9583  // Define _NOQUAD if the compiler does NOT support 64-bit integers.
  9584  // #define _NOQUAD
  9585  
  9586  // Define the order of 32-bit words in 64-bit words.
  9587  
  9588  // Definitions for byte order, according to byte significance from low
  9589  // address to high.
  9590  
  9591  // Copyright (c) 2004, 2006 Apple Computer, Inc. All rights reserved.
  9592  //
  9593  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  9594  //
  9595  // This file contains Original Code and/or Modifications of Original Code
  9596  // as defined in and that are subject to the Apple Public Source License
  9597  // Version 2.0 (the 'License'). You may not use this file except in
  9598  // compliance with the License. The rights granted to you under the License
  9599  // may not be used to create, or enable the creation or redistribution of,
  9600  // unlawful or unlicensed copies of an Apple operating system, or to
  9601  // circumvent, violate, or enable the circumvention or violation of, any
  9602  // terms of an Apple operating system software license agreement.
  9603  //
  9604  // Please obtain a copy of the License at
  9605  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  9606  //
  9607  // The Original Code and all software distributed under the License are
  9608  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9609  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9610  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9611  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  9612  // Please see the License for the specific language governing rights and
  9613  // limitations under the License.
  9614  //
  9615  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  9616  
  9617  // Copyright (c) 1995 NeXT Computer, Inc. All rights reserved.
  9618  // Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
  9619  //
  9620  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  9621  //
  9622  // This file contains Original Code and/or Modifications of Original Code
  9623  // as defined in and that are subject to the Apple Public Source License
  9624  // Version 2.0 (the 'License'). You may not use this file except in
  9625  // compliance with the License. The rights granted to you under the License
  9626  // may not be used to create, or enable the creation or redistribution of,
  9627  // unlawful or unlicensed copies of an Apple operating system, or to
  9628  // circumvent, violate, or enable the circumvention or violation of, any
  9629  // terms of an Apple operating system software license agreement.
  9630  //
  9631  // Please obtain a copy of the License at
  9632  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  9633  //
  9634  // The Original Code and all software distributed under the License are
  9635  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9636  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9637  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9638  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  9639  // Please see the License for the specific language governing rights and
  9640  // limitations under the License.
  9641  //
  9642  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  9643  // Copyright (c) 1987, 1991, 1993
  9644  //	The Regents of the University of California.  All rights reserved.
  9645  //
  9646  // Redistribution and use in source and binary forms, with or without
  9647  // modification, are permitted provided that the following conditions
  9648  // are met:
  9649  // 1. Redistributions of source code must retain the above copyright
  9650  //    notice, this list of conditions and the following disclaimer.
  9651  // 2. Redistributions in binary form must reproduce the above copyright
  9652  //    notice, this list of conditions and the following disclaimer in the
  9653  //    documentation and/or other materials provided with the distribution.
  9654  // 3. All advertising materials mentioning features or use of this software
  9655  //    must display the following acknowledgement:
  9656  //	This product includes software developed by the University of
  9657  //	California, Berkeley and its contributors.
  9658  // 4. Neither the name of the University nor the names of its contributors
  9659  //    may be used to endorse or promote products derived from this software
  9660  //    without specific prior written permission.
  9661  //
  9662  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  9663  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  9664  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  9665  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  9666  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  9667  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  9668  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  9669  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  9670  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  9671  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  9672  // SUCH DAMAGE.
  9673  
  9674  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  9675  //
  9676  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  9677  //
  9678  // This file contains Original Code and/or Modifications of Original Code
  9679  // as defined in and that are subject to the Apple Public Source License
  9680  // Version 2.0 (the 'License'). You may not use this file except in
  9681  // compliance with the License. The rights granted to you under the License
  9682  // may not be used to create, or enable the creation or redistribution of,
  9683  // unlawful or unlicensed copies of an Apple operating system, or to
  9684  // circumvent, violate, or enable the circumvention or violation of, any
  9685  // terms of an Apple operating system software license agreement.
  9686  //
  9687  // Please obtain a copy of the License at
  9688  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  9689  //
  9690  // The Original Code and all software distributed under the License are
  9691  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9692  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9693  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9694  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  9695  // Please see the License for the specific language governing rights and
  9696  // limitations under the License.
  9697  //
  9698  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  9699  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  9700  // Copyright (c) 1991, 1993
  9701  //	The Regents of the University of California.  All rights reserved.
  9702  //
  9703  // This code is derived from software contributed to Berkeley by
  9704  // Berkeley Software Design, Inc.
  9705  //
  9706  // Redistribution and use in source and binary forms, with or without
  9707  // modification, are permitted provided that the following conditions
  9708  // are met:
  9709  // 1. Redistributions of source code must retain the above copyright
  9710  //    notice, this list of conditions and the following disclaimer.
  9711  // 2. Redistributions in binary form must reproduce the above copyright
  9712  //    notice, this list of conditions and the following disclaimer in the
  9713  //    documentation and/or other materials provided with the distribution.
  9714  // 3. All advertising materials mentioning features or use of this software
  9715  //    must display the following acknowledgement:
  9716  //	This product includes software developed by the University of
  9717  //	California, Berkeley and its contributors.
  9718  // 4. Neither the name of the University nor the names of its contributors
  9719  //    may be used to endorse or promote products derived from this software
  9720  //    without specific prior written permission.
  9721  //
  9722  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  9723  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  9724  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  9725  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  9726  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  9727  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  9728  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  9729  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  9730  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  9731  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  9732  // SUCH DAMAGE.
  9733  //
  9734  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  9735  
  9736  // Macros for network/external number representation conversion.
  9737  
  9738  // Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
  9739  //
  9740  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  9741  //
  9742  // This file contains Original Code and/or Modifications of Original Code
  9743  // as defined in and that are subject to the Apple Public Source License
  9744  // Version 2.0 (the 'License'). You may not use this file except in
  9745  // compliance with the License. The rights granted to you under the License
  9746  // may not be used to create, or enable the creation or redistribution of,
  9747  // unlawful or unlicensed copies of an Apple operating system, or to
  9748  // circumvent, violate, or enable the circumvention or violation of, any
  9749  // terms of an Apple operating system software license agreement.
  9750  //
  9751  // Please obtain a copy of the License at
  9752  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  9753  //
  9754  // The Original Code and all software distributed under the License are
  9755  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9756  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9757  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9758  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  9759  // Please see the License for the specific language governing rights and
  9760  // limitations under the License.
  9761  //
  9762  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  9763  
  9764  // This header is normally included from <libkern/OSByteOrder.h>.  However,
  9765  // <sys/_endian.h> also includes this in the case of little-endian
  9766  // architectures, so that we can map OSByteOrder routines to the hton* and ntoh*
  9767  // macros.  This results in the asymmetry below; we only include
  9768  // <libkern/arch/_OSByteOrder.h> for little-endian architectures.
  9769  
  9770  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  9771  //
  9772  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  9773  //
  9774  // This file contains Original Code and/or Modifications of Original Code
  9775  // as defined in and that are subject to the Apple Public Source License
  9776  // Version 2.0 (the 'License'). You may not use this file except in
  9777  // compliance with the License. The rights granted to you under the License
  9778  // may not be used to create, or enable the creation or redistribution of,
  9779  // unlawful or unlicensed copies of an Apple operating system, or to
  9780  // circumvent, violate, or enable the circumvention or violation of, any
  9781  // terms of an Apple operating system software license agreement.
  9782  //
  9783  // Please obtain a copy of the License at
  9784  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  9785  //
  9786  // The Original Code and all software distributed under the License are
  9787  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9788  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9789  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9790  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  9791  // Please see the License for the specific language governing rights and
  9792  // limitations under the License.
  9793  //
  9794  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  9795  
  9796  // Macros for swapping constant values in the preprocessing stage.
  9797  
  9798  // Copyright (c) 1999-2007 Apple Inc. All rights reserved.
  9799  
  9800  // Copyright (c) 2007 Apple Inc. All rights reserved.
  9801  //
  9802  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  9803  //
  9804  // This file contains Original Code and/or Modifications of Original Code
  9805  // as defined in and that are subject to the Apple Public Source License
  9806  // Version 2.0 (the 'License'). You may not use this file except in
  9807  // compliance with the License. The rights granted to you under the License
  9808  // may not be used to create, or enable the creation or redistribution of,
  9809  // unlawful or unlicensed copies of an Apple operating system, or to
  9810  // circumvent, violate, or enable the circumvention or violation of, any
  9811  // terms of an Apple operating system software license agreement.
  9812  //
  9813  // Please obtain a copy of the License at
  9814  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  9815  //
  9816  // The Original Code and all software distributed under the License are
  9817  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9818  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9819  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9820  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  9821  // Please see the License for the specific language governing rights and
  9822  // limitations under the License.
  9823  //
  9824  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  9825  
  9826  // Collect the __ARM_ARCH_*__ compiler flags into something easier to use.
  9827  
  9828  // Generic byte swapping functions.
  9829  
  9830  func _OSSwapInt16(tls *libc.TLS, _data uint16_t) uint16_t { /* OSByteOrder.h:15:1: */
  9831  	// Reduces to 'rev16' with clang
  9832  	return (uint16_t((int32(_data) << 8) | (int32(_data) >> 8)))
  9833  }
  9834  
  9835  func _OSSwapInt32(tls *libc.TLS, _data uint32_t) uint32_t { /* OSByteOrder.h:25:1: */
  9836  	// This actually generates the best code
  9837  	_data = ((((_data ^ ((_data >> 16) | (_data << 16))) & 0xFF00FFFF) >> 8) ^ ((_data >> 8) | (_data << 24)))
  9838  
  9839  	return _data
  9840  }
  9841  
  9842  func _OSSwapInt64(tls *libc.TLS, _data uint64_t) uint64_t { /* OSByteOrder.h:41:1: */
  9843  	bp := tls.Alloc(8)
  9844  	defer tls.Free(8)
  9845  
  9846  	// var _u struct {_ull uint64_t;} at bp, 8
  9847  
  9848  	// This actually generates the best code
  9849  	*(*uint32_t)(unsafe.Pointer((bp /* &_u */ /* &._ul */))) = (uint32_t(_data >> 32))
  9850  	*(*uint32_t)(unsafe.Pointer((bp /* &_u */ /* &._ul */) + 1*4)) = (uint32_t(_data & uint64(0xffffffff)))
  9851  	*(*uint32_t)(unsafe.Pointer((bp /* &_u */ /* &._ul */))) = _OSSwapInt32(tls, *(*uint32_t)(unsafe.Pointer((bp /* &_u */ /* &._ul */))))
  9852  	*(*uint32_t)(unsafe.Pointer((bp /* &_u */ /* &._ul */) + 1*4)) = _OSSwapInt32(tls, *(*uint32_t)(unsafe.Pointer((bp /* &_u */ /* &._ul */) + 1*4)))
  9853  	return *(*uint64_t)(unsafe.Pointer(bp /* &_u */))
  9854  }
  9855  
  9856  // Functions for byte reversed loads.
  9857  
  9858  type _OSUnalignedU16 = struct{ __val uint16_t } /* OSByteOrder.h:64:1 */
  9859  
  9860  type _OSUnalignedU32 = struct{ __val uint32_t } /* OSByteOrder.h:68:1 */
  9861  
  9862  type _OSUnalignedU64 = struct{ __val uint64_t } /* OSByteOrder.h:72:1 */
  9863  
  9864  // Deprecated:
  9865  // Structure of the information in the status word returned by wait4.
  9866  // If w_stopval==_WSTOPPED, then the second structure describes
  9867  // the information returned, else the first.
  9868  type wait = struct{ w_status int32 } /* wait.h:194:1 */
  9869  
  9870  // built-in for gcc
  9871  
  9872  // built-in for gcc 3
  9873  
  9874  // DO NOT REMOVE THIS COMMENT: fixincludes needs to see:
  9875  // _GCC_SIZE_T
  9876  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  9877  //
  9878  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  9879  //
  9880  // This file contains Original Code and/or Modifications of Original Code
  9881  // as defined in and that are subject to the Apple Public Source License
  9882  // Version 2.0 (the 'License'). You may not use this file except in
  9883  // compliance with the License. The rights granted to you under the License
  9884  // may not be used to create, or enable the creation or redistribution of,
  9885  // unlawful or unlicensed copies of an Apple operating system, or to
  9886  // circumvent, violate, or enable the circumvention or violation of, any
  9887  // terms of an Apple operating system software license agreement.
  9888  //
  9889  // Please obtain a copy of the License at
  9890  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  9891  //
  9892  // The Original Code and all software distributed under the License are
  9893  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9894  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9895  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9896  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  9897  // Please see the License for the specific language governing rights and
  9898  // limitations under the License.
  9899  //
  9900  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  9901  
  9902  // Copyright (c) 2012 Apple Inc. All rights reserved.
  9903  //
  9904  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  9905  //
  9906  // This file contains Original Code and/or Modifications of Original Code
  9907  // as defined in and that are subject to the Apple Public Source License
  9908  // Version 2.0 (the 'License'). You may not use this file except in
  9909  // compliance with the License. The rights granted to you under the License
  9910  // may not be used to create, or enable the creation or redistribution of,
  9911  // unlawful or unlicensed copies of an Apple operating system, or to
  9912  // circumvent, violate, or enable the circumvention or violation of, any
  9913  // terms of an Apple operating system software license agreement.
  9914  //
  9915  // Please obtain a copy of the License at
  9916  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  9917  //
  9918  // The Original Code and all software distributed under the License are
  9919  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9920  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9921  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9922  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  9923  // Please see the License for the specific language governing rights and
  9924  // limitations under the License.
  9925  //
  9926  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  9927  
  9928  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  9929  //
  9930  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  9931  //
  9932  // This file contains Original Code and/or Modifications of Original Code
  9933  // as defined in and that are subject to the Apple Public Source License
  9934  // Version 2.0 (the 'License'). You may not use this file except in
  9935  // compliance with the License. The rights granted to you under the License
  9936  // may not be used to create, or enable the creation or redistribution of,
  9937  // unlawful or unlicensed copies of an Apple operating system, or to
  9938  // circumvent, violate, or enable the circumvention or violation of, any
  9939  // terms of an Apple operating system software license agreement.
  9940  //
  9941  // Please obtain a copy of the License at
  9942  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  9943  //
  9944  // The Original Code and all software distributed under the License are
  9945  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9946  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9947  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9948  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  9949  // Please see the License for the specific language governing rights and
  9950  // limitations under the License.
  9951  //
  9952  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  9953  type ct_rune_t = int32 /* _ct_rune_t.h:32:28 */
  9954  // Copyright (c) 2012 Apple Inc. All rights reserved.
  9955  //
  9956  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  9957  //
  9958  // This file contains Original Code and/or Modifications of Original Code
  9959  // as defined in and that are subject to the Apple Public Source License
  9960  // Version 2.0 (the 'License'). You may not use this file except in
  9961  // compliance with the License. The rights granted to you under the License
  9962  // may not be used to create, or enable the creation or redistribution of,
  9963  // unlawful or unlicensed copies of an Apple operating system, or to
  9964  // circumvent, violate, or enable the circumvention or violation of, any
  9965  // terms of an Apple operating system software license agreement.
  9966  //
  9967  // Please obtain a copy of the License at
  9968  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  9969  //
  9970  // The Original Code and all software distributed under the License are
  9971  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9972  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9973  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9974  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  9975  // Please see the License for the specific language governing rights and
  9976  // limitations under the License.
  9977  //
  9978  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  9979  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  9980  //
  9981  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  9982  //
  9983  // This file contains Original Code and/or Modifications of Original Code
  9984  // as defined in and that are subject to the Apple Public Source License
  9985  // Version 2.0 (the 'License'). You may not use this file except in
  9986  // compliance with the License. The rights granted to you under the License
  9987  // may not be used to create, or enable the creation or redistribution of,
  9988  // unlawful or unlicensed copies of an Apple operating system, or to
  9989  // circumvent, violate, or enable the circumvention or violation of, any
  9990  // terms of an Apple operating system software license agreement.
  9991  //
  9992  // Please obtain a copy of the License at
  9993  // http://www.opensource.apple.com/apsl/ and read it before using this file.
  9994  //
  9995  // The Original Code and all software distributed under the License are
  9996  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  9997  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  9998  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  9999  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10000  // Please see the License for the specific language governing rights and
 10001  // limitations under the License.
 10002  //
 10003  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 10004  type rune_t = int32 /* _rune_t.h:31:25 */
 10005  
 10006  type div_t = struct {
 10007  	quot int32
 10008  	rem  int32
 10009  } /* stdlib.h:86:3 */
 10010  
 10011  type ldiv_t = struct {
 10012  	quot int64
 10013  	rem  int64
 10014  } /* stdlib.h:91:3 */
 10015  
 10016  type lldiv_t = struct {
 10017  	quot int64
 10018  	rem  int64
 10019  } /* stdlib.h:97:3 */
 10020  
 10021  // C11 Annex K
 10022  
 10023  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
 10024  //
 10025  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 10026  //
 10027  // This file contains Original Code and/or Modifications of Original Code
 10028  // as defined in and that are subject to the Apple Public Source License
 10029  // Version 2.0 (the 'License'). You may not use this file except in
 10030  // compliance with the License. The rights granted to you under the License
 10031  // may not be used to create, or enable the creation or redistribution of,
 10032  // unlawful or unlicensed copies of an Apple operating system, or to
 10033  // circumvent, violate, or enable the circumvention or violation of, any
 10034  // terms of an Apple operating system software license agreement.
 10035  //
 10036  // Please obtain a copy of the License at
 10037  // http://www.opensource.apple.com/apsl/ and read it before using this file.
 10038  //
 10039  // The Original Code and all software distributed under the License are
 10040  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10041  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10042  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10043  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10044  // Please see the License for the specific language governing rights and
 10045  // limitations under the License.
 10046  //
 10047  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 10048  // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
 10049  //
 10050  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 10051  //
 10052  // This file contains Original Code and/or Modifications of Original Code
 10053  // as defined in and that are subject to the Apple Public Source License
 10054  // Version 2.0 (the 'License'). You may not use this file except in
 10055  // compliance with the License. The rights granted to you under the License
 10056  // may not be used to create, or enable the creation or redistribution of,
 10057  // unlawful or unlicensed copies of an Apple operating system, or to
 10058  // circumvent, violate, or enable the circumvention or violation of, any
 10059  // terms of an Apple operating system software license agreement.
 10060  //
 10061  // Please obtain a copy of the License at
 10062  // http://www.opensource.apple.com/apsl/ and read it before using this file.
 10063  //
 10064  // The Original Code and all software distributed under the License are
 10065  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10066  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10067  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10068  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10069  // Please see the License for the specific language governing rights and
 10070  // limitations under the License.
 10071  //
 10072  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 10073  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
 10074  type rsize_t = uint64 /* _rsize_t.h:31:32 */
 10075  
 10076  // Copyright (c) 2000, 2007, 2010 Apple Inc. All rights reserved.
 10077  //
 10078  // @APPLE_LICENSE_HEADER_START@
 10079  //
 10080  // This file contains Original Code and/or Modifications of Original Code
 10081  // as defined in and that are subject to the Apple Public Source License
 10082  // Version 2.0 (the 'License'). You may not use this file except in
 10083  // compliance with the License. Please obtain a copy of the License at
 10084  // http://www.opensource.apple.com/apsl/ and read it before using this
 10085  // file.
 10086  //
 10087  // The Original Code and all software distributed under the License are
 10088  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10089  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10090  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10091  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10092  // Please see the License for the specific language governing rights and
 10093  // limitations under the License.
 10094  //
 10095  // @APPLE_LICENSE_HEADER_END@
 10096  // -
 10097  // Copyright (c) 1990, 1993
 10098  //	The Regents of the University of California.  All rights reserved.
 10099  //
 10100  // Redistribution and use in source and binary forms, with or without
 10101  // modification, are permitted provided that the following conditions
 10102  // are met:
 10103  // 1. Redistributions of source code must retain the above copyright
 10104  //    notice, this list of conditions and the following disclaimer.
 10105  // 2. Redistributions in binary form must reproduce the above copyright
 10106  //    notice, this list of conditions and the following disclaimer in the
 10107  //    documentation and/or other materials provided with the distribution.
 10108  // 3. All advertising materials mentioning features or use of this software
 10109  //    must display the following acknowledgement:
 10110  //	This product includes software developed by the University of
 10111  //	California, Berkeley and its contributors.
 10112  // 4. Neither the name of the University nor the names of its contributors
 10113  //    may be used to endorse or promote products derived from this software
 10114  //    without specific prior written permission.
 10115  //
 10116  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 10117  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 10118  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 10119  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 10120  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 10121  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 10122  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 10123  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 10124  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 10125  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 10126  // SUCH DAMAGE.
 10127  //
 10128  //	@(#)string.h	8.1 (Berkeley) 6/2/93
 10129  
 10130  // Security checking functions.
 10131  // Copyright (c) 2017 Apple Inc. All rights reserved.
 10132  //
 10133  // @APPLE_LICENSE_HEADER_START@
 10134  //
 10135  // This file contains Original Code and/or Modifications of Original Code
 10136  // as defined in and that are subject to the Apple Public Source License
 10137  // Version 2.0 (the 'License'). You may not use this file except in
 10138  // compliance with the License. Please obtain a copy of the License at
 10139  // http://www.opensource.apple.com/apsl/ and read it before using this
 10140  // file.
 10141  //
 10142  // The Original Code and all software distributed under the License are
 10143  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10144  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10145  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10146  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10147  // Please see the License for the specific language governing rights and
 10148  // limitations under the License.
 10149  //
 10150  // @APPLE_LICENSE_HEADER_END@
 10151  
 10152  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
 10153  //
 10154  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 10155  //
 10156  // This file contains Original Code and/or Modifications of Original Code
 10157  // as defined in and that are subject to the Apple Public Source License
 10158  // Version 2.0 (the 'License'). You may not use this file except in
 10159  // compliance with the License. The rights granted to you under the License
 10160  // may not be used to create, or enable the creation or redistribution of,
 10161  // unlawful or unlicensed copies of an Apple operating system, or to
 10162  // circumvent, violate, or enable the circumvention or violation of, any
 10163  // terms of an Apple operating system software license agreement.
 10164  //
 10165  // Please obtain a copy of the License at
 10166  // http://www.opensource.apple.com/apsl/ and read it before using this file.
 10167  //
 10168  // The Original Code and all software distributed under the License are
 10169  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10170  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10171  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10172  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10173  // Please see the License for the specific language governing rights and
 10174  // limitations under the License.
 10175  //
 10176  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 10177  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
 10178  // Copyright (c) 1991, 1993
 10179  //	The Regents of the University of California.  All rights reserved.
 10180  //
 10181  // This code is derived from software contributed to Berkeley by
 10182  // Berkeley Software Design, Inc.
 10183  //
 10184  // Redistribution and use in source and binary forms, with or without
 10185  // modification, are permitted provided that the following conditions
 10186  // are met:
 10187  // 1. Redistributions of source code must retain the above copyright
 10188  //    notice, this list of conditions and the following disclaimer.
 10189  // 2. Redistributions in binary form must reproduce the above copyright
 10190  //    notice, this list of conditions and the following disclaimer in the
 10191  //    documentation and/or other materials provided with the distribution.
 10192  // 3. All advertising materials mentioning features or use of this software
 10193  //    must display the following acknowledgement:
 10194  //	This product includes software developed by the University of
 10195  //	California, Berkeley and its contributors.
 10196  // 4. Neither the name of the University nor the names of its contributors
 10197  //    may be used to endorse or promote products derived from this software
 10198  //    without specific prior written permission.
 10199  //
 10200  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 10201  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 10202  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 10203  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 10204  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 10205  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 10206  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 10207  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 10208  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 10209  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 10210  // SUCH DAMAGE.
 10211  //
 10212  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
 10213  
 10214  // Copyright (c) 2007-2016 by Apple Inc.. All rights reserved.
 10215  //
 10216  // @APPLE_LICENSE_HEADER_START@
 10217  //
 10218  // This file contains Original Code and/or Modifications of Original Code
 10219  // as defined in and that are subject to the Apple Public Source License
 10220  // Version 2.0 (the 'License'). You may not use this file except in
 10221  // compliance with the License. Please obtain a copy of the License at
 10222  // http://www.opensource.apple.com/apsl/ and read it before using this
 10223  // file.
 10224  //
 10225  // The Original Code and all software distributed under the License are
 10226  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10227  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10228  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10229  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10230  // Please see the License for the specific language governing rights and
 10231  // limitations under the License.
 10232  //
 10233  // @APPLE_LICENSE_HEADER_END@
 10234  
 10235  // Copyright (c) 2007, 2008 Apple Inc. All rights reserved.
 10236  //
 10237  // @APPLE_LICENSE_HEADER_START@
 10238  //
 10239  // This file contains Original Code and/or Modifications of Original Code
 10240  // as defined in and that are subject to the Apple Public Source License
 10241  // Version 2.0 (the 'License'). You may not use this file except in
 10242  // compliance with the License. Please obtain a copy of the License at
 10243  // http://www.opensource.apple.com/apsl/ and read it before using this
 10244  // file.
 10245  //
 10246  // The Original Code and all software distributed under the License are
 10247  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10248  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10249  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10250  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10251  // Please see the License for the specific language governing rights and
 10252  // limitations under the License.
 10253  //
 10254  // @APPLE_LICENSE_HEADER_END@
 10255  
 10256  // bcopy and bzero
 10257  
 10258  // Removed in Issue 7
 10259  
 10260  // void	bcopy(const void *src, void *dst, size_t len)
 10261  
 10262  // void	bzero(void *s, size_t n)
 10263  
 10264  // Security checking functions.
 10265  // Copyright (c) 2007,2017 Apple Inc. All rights reserved.
 10266  //
 10267  // @APPLE_LICENSE_HEADER_START@
 10268  //
 10269  // This file contains Original Code and/or Modifications of Original Code
 10270  // as defined in and that are subject to the Apple Public Source License
 10271  // Version 2.0 (the 'License'). You may not use this file except in
 10272  // compliance with the License. Please obtain a copy of the License at
 10273  // http://www.opensource.apple.com/apsl/ and read it before using this
 10274  // file.
 10275  //
 10276  // The Original Code and all software distributed under the License are
 10277  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10278  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10279  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10280  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10281  // Please see the License for the specific language governing rights and
 10282  // limitations under the License.
 10283  //
 10284  // @APPLE_LICENSE_HEADER_END@
 10285  
 10286  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
 10287  //
 10288  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 10289  //
 10290  // This file contains Original Code and/or Modifications of Original Code
 10291  // as defined in and that are subject to the Apple Public Source License
 10292  // Version 2.0 (the 'License'). You may not use this file except in
 10293  // compliance with the License. The rights granted to you under the License
 10294  // may not be used to create, or enable the creation or redistribution of,
 10295  // unlawful or unlicensed copies of an Apple operating system, or to
 10296  // circumvent, violate, or enable the circumvention or violation of, any
 10297  // terms of an Apple operating system software license agreement.
 10298  //
 10299  // Please obtain a copy of the License at
 10300  // http://www.opensource.apple.com/apsl/ and read it before using this file.
 10301  //
 10302  // The Original Code and all software distributed under the License are
 10303  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10304  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10305  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10306  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10307  // Please see the License for the specific language governing rights and
 10308  // limitations under the License.
 10309  //
 10310  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 10311  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
 10312  // Copyright (c) 1991, 1993
 10313  //	The Regents of the University of California.  All rights reserved.
 10314  //
 10315  // This code is derived from software contributed to Berkeley by
 10316  // Berkeley Software Design, Inc.
 10317  //
 10318  // Redistribution and use in source and binary forms, with or without
 10319  // modification, are permitted provided that the following conditions
 10320  // are met:
 10321  // 1. Redistributions of source code must retain the above copyright
 10322  //    notice, this list of conditions and the following disclaimer.
 10323  // 2. Redistributions in binary form must reproduce the above copyright
 10324  //    notice, this list of conditions and the following disclaimer in the
 10325  //    documentation and/or other materials provided with the distribution.
 10326  // 3. All advertising materials mentioning features or use of this software
 10327  //    must display the following acknowledgement:
 10328  //	This product includes software developed by the University of
 10329  //	California, Berkeley and its contributors.
 10330  // 4. Neither the name of the University nor the names of its contributors
 10331  //    may be used to endorse or promote products derived from this software
 10332  //    without specific prior written permission.
 10333  //
 10334  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 10335  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 10336  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 10337  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 10338  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 10339  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 10340  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 10341  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 10342  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 10343  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 10344  // SUCH DAMAGE.
 10345  //
 10346  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
 10347  
 10348  // Copyright (c) 2007-2016 by Apple Inc.. All rights reserved.
 10349  //
 10350  // @APPLE_LICENSE_HEADER_START@
 10351  //
 10352  // This file contains Original Code and/or Modifications of Original Code
 10353  // as defined in and that are subject to the Apple Public Source License
 10354  // Version 2.0 (the 'License'). You may not use this file except in
 10355  // compliance with the License. Please obtain a copy of the License at
 10356  // http://www.opensource.apple.com/apsl/ and read it before using this
 10357  // file.
 10358  //
 10359  // The Original Code and all software distributed under the License are
 10360  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10361  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10362  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10363  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10364  // Please see the License for the specific language governing rights and
 10365  // limitations under the License.
 10366  //
 10367  // @APPLE_LICENSE_HEADER_END@
 10368  
 10369  // Copyright (c) 2007, 2008 Apple Inc. All rights reserved.
 10370  //
 10371  // @APPLE_LICENSE_HEADER_START@
 10372  //
 10373  // This file contains Original Code and/or Modifications of Original Code
 10374  // as defined in and that are subject to the Apple Public Source License
 10375  // Version 2.0 (the 'License'). You may not use this file except in
 10376  // compliance with the License. Please obtain a copy of the License at
 10377  // http://www.opensource.apple.com/apsl/ and read it before using this
 10378  // file.
 10379  //
 10380  // The Original Code and all software distributed under the License are
 10381  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10382  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10383  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10384  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10385  // Please see the License for the specific language governing rights and
 10386  // limitations under the License.
 10387  //
 10388  // @APPLE_LICENSE_HEADER_END@
 10389  
 10390  // <rdar://problem/12622659>
 10391  
 10392  // memccpy, memcpy, mempcpy, memmove, memset, strcpy, strlcpy, stpcpy,
 10393  //    strncpy, stpncpy, strcat, strlcat, and strncat
 10394  
 10395  // void *memcpy(void *dst, const void *src, size_t n)
 10396  
 10397  // void *memmove(void *dst, const void *src, size_t len)
 10398  
 10399  // void *memset(void *b, int c, size_t len)
 10400  
 10401  // char *strcpy(char *dst, const char *src)
 10402  
 10403  // char *stpcpy(char *dst, const char *src)
 10404  
 10405  // char *stpncpy(char *dst, const char *src, size_t n)
 10406  
 10407  // char *strncpy(char *dst, const char *src, size_t n)
 10408  
 10409  // char *strcat(char *s1, const char *s2)
 10410  
 10411  // char *strncat(char *s1, const char *s2, size_t n)
 10412  
 10413  // -
 10414  // Copyright (c) 1992, 1993
 10415  //	The Regents of the University of California.  All rights reserved.
 10416  // (c) UNIX System Laboratories, Inc.
 10417  // All or some portions of this file are derived from material licensed
 10418  // to the University of California by American Telephone and Telegraph
 10419  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
 10420  // the permission of UNIX System Laboratories, Inc.
 10421  //
 10422  // Redistribution and use in source and binary forms, with or without
 10423  // modification, are permitted provided that the following conditions
 10424  // are met:
 10425  // 1. Redistributions of source code must retain the above copyright
 10426  //    notice, this list of conditions and the following disclaimer.
 10427  // 2. Redistributions in binary form must reproduce the above copyright
 10428  //    notice, this list of conditions and the following disclaimer in the
 10429  //    documentation and/or other materials provided with the distribution.
 10430  // 3. All advertising materials mentioning features or use of this software
 10431  //    must display the following acknowledgement:
 10432  //	This product includes software developed by the University of
 10433  //	California, Berkeley and its contributors.
 10434  // 4. Neither the name of the University nor the names of its contributors
 10435  //    may be used to endorse or promote products derived from this software
 10436  //    without specific prior written permission.
 10437  //
 10438  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 10439  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 10440  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 10441  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 10442  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 10443  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 10444  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 10445  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 10446  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 10447  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 10448  // SUCH DAMAGE.
 10449  //
 10450  //	@(#)assert.h	8.2 (Berkeley) 1/21/94
 10451  // $FreeBSD: src/include/assert.h,v 1.4 2002/03/23 17:24:53 imp Exp $
 10452  
 10453  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
 10454  //
 10455  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 10456  //
 10457  // This file contains Original Code and/or Modifications of Original Code
 10458  // as defined in and that are subject to the Apple Public Source License
 10459  // Version 2.0 (the 'License'). You may not use this file except in
 10460  // compliance with the License. The rights granted to you under the License
 10461  // may not be used to create, or enable the creation or redistribution of,
 10462  // unlawful or unlicensed copies of an Apple operating system, or to
 10463  // circumvent, violate, or enable the circumvention or violation of, any
 10464  // terms of an Apple operating system software license agreement.
 10465  //
 10466  // Please obtain a copy of the License at
 10467  // http://www.opensource.apple.com/apsl/ and read it before using this file.
 10468  //
 10469  // The Original Code and all software distributed under the License are
 10470  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10471  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10472  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10473  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10474  // Please see the License for the specific language governing rights and
 10475  // limitations under the License.
 10476  //
 10477  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 10478  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
 10479  // Copyright (c) 1991, 1993
 10480  //	The Regents of the University of California.  All rights reserved.
 10481  //
 10482  // This code is derived from software contributed to Berkeley by
 10483  // Berkeley Software Design, Inc.
 10484  //
 10485  // Redistribution and use in source and binary forms, with or without
 10486  // modification, are permitted provided that the following conditions
 10487  // are met:
 10488  // 1. Redistributions of source code must retain the above copyright
 10489  //    notice, this list of conditions and the following disclaimer.
 10490  // 2. Redistributions in binary form must reproduce the above copyright
 10491  //    notice, this list of conditions and the following disclaimer in the
 10492  //    documentation and/or other materials provided with the distribution.
 10493  // 3. All advertising materials mentioning features or use of this software
 10494  //    must display the following acknowledgement:
 10495  //	This product includes software developed by the University of
 10496  //	California, Berkeley and its contributors.
 10497  // 4. Neither the name of the University nor the names of its contributors
 10498  //    may be used to endorse or promote products derived from this software
 10499  //    without specific prior written permission.
 10500  //
 10501  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 10502  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 10503  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 10504  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 10505  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 10506  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 10507  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 10508  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 10509  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 10510  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 10511  // SUCH DAMAGE.
 10512  //
 10513  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
 10514  
 10515  // Unlike other ANSI header files, <assert.h> may usefully be included
 10516  // multiple times, with and without NDEBUG defined.
 10517  
 10518  // Copyright (c) 2000, 2005, 2008 Apple Inc. All rights reserved.
 10519  //
 10520  // @APPLE_LICENSE_HEADER_START@
 10521  //
 10522  // This file contains Original Code and/or Modifications of Original Code
 10523  // as defined in and that are subject to the Apple Public Source License
 10524  // Version 2.0 (the 'License'). You may not use this file except in
 10525  // compliance with the License. Please obtain a copy of the License at
 10526  // http://www.opensource.apple.com/apsl/ and read it before using this
 10527  // file.
 10528  //
 10529  // The Original Code and all software distributed under the License are
 10530  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10531  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10532  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10533  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10534  // Please see the License for the specific language governing rights and
 10535  // limitations under the License.
 10536  //
 10537  // @APPLE_LICENSE_HEADER_END@
 10538  // Copyright (c) 1989, 1993
 10539  //	The Regents of the University of California.  All rights reserved.
 10540  // (c) UNIX System Laboratories, Inc.
 10541  // All or some portions of this file are derived from material licensed
 10542  // to the University of California by American Telephone and Telegraph
 10543  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
 10544  // the permission of UNIX System Laboratories, Inc.
 10545  //
 10546  // This code is derived from software contributed to Berkeley by
 10547  // Paul Borman at Krystal Technologies.
 10548  //
 10549  // Redistribution and use in source and binary forms, with or without
 10550  // modification, are permitted provided that the following conditions
 10551  // are met:
 10552  // 1. Redistributions of source code must retain the above copyright
 10553  //    notice, this list of conditions and the following disclaimer.
 10554  // 2. Redistributions in binary form must reproduce the above copyright
 10555  //    notice, this list of conditions and the following disclaimer in the
 10556  //    documentation and/or other materials provided with the distribution.
 10557  // 3. All advertising materials mentioning features or use of this software
 10558  //    must display the following acknowledgement:
 10559  //	This product includes software developed by the University of
 10560  //	California, Berkeley and its contributors.
 10561  // 4. Neither the name of the University nor the names of its contributors
 10562  //    may be used to endorse or promote products derived from this software
 10563  //    without specific prior written permission.
 10564  //
 10565  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 10566  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 10567  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 10568  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 10569  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 10570  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 10571  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 10572  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 10573  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 10574  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 10575  // SUCH DAMAGE.
 10576  //
 10577  //	@(#)ctype.h	8.4 (Berkeley) 1/21/94
 10578  
 10579  // Copyright (c) 2000, 2005, 2008 Apple Inc. All rights reserved.
 10580  //
 10581  // @APPLE_LICENSE_HEADER_START@
 10582  //
 10583  // This file contains Original Code and/or Modifications of Original Code
 10584  // as defined in and that are subject to the Apple Public Source License
 10585  // Version 2.0 (the 'License'). You may not use this file except in
 10586  // compliance with the License. Please obtain a copy of the License at
 10587  // http://www.opensource.apple.com/apsl/ and read it before using this
 10588  // file.
 10589  //
 10590  // The Original Code and all software distributed under the License are
 10591  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10592  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10593  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10594  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10595  // Please see the License for the specific language governing rights and
 10596  // limitations under the License.
 10597  //
 10598  // @APPLE_LICENSE_HEADER_END@
 10599  // Copyright (c) 1989, 1993
 10600  //	The Regents of the University of California.  All rights reserved.
 10601  // (c) UNIX System Laboratories, Inc.
 10602  // All or some portions of this file are derived from material licensed
 10603  // to the University of California by American Telephone and Telegraph
 10604  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
 10605  // the permission of UNIX System Laboratories, Inc.
 10606  //
 10607  // This code is derived from software contributed to Berkeley by
 10608  // Paul Borman at Krystal Technologies.
 10609  //
 10610  // Redistribution and use in source and binary forms, with or without
 10611  // modification, are permitted provided that the following conditions
 10612  // are met:
 10613  // 1. Redistributions of source code must retain the above copyright
 10614  //    notice, this list of conditions and the following disclaimer.
 10615  // 2. Redistributions in binary form must reproduce the above copyright
 10616  //    notice, this list of conditions and the following disclaimer in the
 10617  //    documentation and/or other materials provided with the distribution.
 10618  // 3. All advertising materials mentioning features or use of this software
 10619  //    must display the following acknowledgement:
 10620  //	This product includes software developed by the University of
 10621  //	California, Berkeley and its contributors.
 10622  // 4. Neither the name of the University nor the names of its contributors
 10623  //    may be used to endorse or promote products derived from this software
 10624  //    without specific prior written permission.
 10625  //
 10626  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 10627  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 10628  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 10629  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 10630  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 10631  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 10632  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 10633  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 10634  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 10635  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 10636  // SUCH DAMAGE.
 10637  //
 10638  //	@(#)ctype.h	8.4 (Berkeley) 1/21/94
 10639  
 10640  // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
 10641  //
 10642  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 10643  //
 10644  // This file contains Original Code and/or Modifications of Original Code
 10645  // as defined in and that are subject to the Apple Public Source License
 10646  // Version 2.0 (the 'License'). You may not use this file except in
 10647  // compliance with the License. The rights granted to you under the License
 10648  // may not be used to create, or enable the creation or redistribution of,
 10649  // unlawful or unlicensed copies of an Apple operating system, or to
 10650  // circumvent, violate, or enable the circumvention or violation of, any
 10651  // terms of an Apple operating system software license agreement.
 10652  //
 10653  // Please obtain a copy of the License at
 10654  // http://www.opensource.apple.com/apsl/ and read it before using this file.
 10655  //
 10656  // The Original Code and all software distributed under the License are
 10657  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10658  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10659  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10660  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10661  // Please see the License for the specific language governing rights and
 10662  // limitations under the License.
 10663  //
 10664  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 10665  // Copyright 1995 NeXT Computer, Inc. All rights reserved.
 10666  // Copyright (c) 1991, 1993
 10667  //	The Regents of the University of California.  All rights reserved.
 10668  //
 10669  // This code is derived from software contributed to Berkeley by
 10670  // Berkeley Software Design, Inc.
 10671  //
 10672  // Redistribution and use in source and binary forms, with or without
 10673  // modification, are permitted provided that the following conditions
 10674  // are met:
 10675  // 1. Redistributions of source code must retain the above copyright
 10676  //    notice, this list of conditions and the following disclaimer.
 10677  // 2. Redistributions in binary form must reproduce the above copyright
 10678  //    notice, this list of conditions and the following disclaimer in the
 10679  //    documentation and/or other materials provided with the distribution.
 10680  // 3. All advertising materials mentioning features or use of this software
 10681  //    must display the following acknowledgement:
 10682  //	This product includes software developed by the University of
 10683  //	California, Berkeley and its contributors.
 10684  // 4. Neither the name of the University nor the names of its contributors
 10685  //    may be used to endorse or promote products derived from this software
 10686  //    without specific prior written permission.
 10687  //
 10688  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 10689  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 10690  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 10691  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 10692  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 10693  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 10694  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 10695  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 10696  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 10697  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 10698  // SUCH DAMAGE.
 10699  //
 10700  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
 10701  
 10702  // -
 10703  // Copyright (c) 1993
 10704  //	The Regents of the University of California.  All rights reserved.
 10705  //
 10706  // This code is derived from software contributed to Berkeley by
 10707  // Paul Borman at Krystal Technologies.
 10708  //
 10709  // Redistribution and use in source and binary forms, with or without
 10710  // modification, are permitted provided that the following conditions
 10711  // are met:
 10712  // 1. Redistributions of source code must retain the above copyright
 10713  //    notice, this list of conditions and the following disclaimer.
 10714  // 2. Redistributions in binary form must reproduce the above copyright
 10715  //    notice, this list of conditions and the following disclaimer in the
 10716  //    documentation and/or other materials provided with the distribution.
 10717  // 3. All advertising materials mentioning features or use of this software
 10718  //    must display the following acknowledgement:
 10719  //	This product includes software developed by the University of
 10720  //	California, Berkeley and its contributors.
 10721  // 4. Neither the name of the University nor the names of its contributors
 10722  //    may be used to endorse or promote products derived from this software
 10723  //    without specific prior written permission.
 10724  //
 10725  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 10726  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 10727  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 10728  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 10729  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 10730  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 10731  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 10732  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 10733  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 10734  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 10735  // SUCH DAMAGE.
 10736  //
 10737  //	@(#)runetype.h	8.1 (Berkeley) 6/2/93
 10738  
 10739  // Copyright (c) 2004, 2008, 2009 Apple Inc. All rights reserved.
 10740  //
 10741  // @APPLE_LICENSE_HEADER_START@
 10742  //
 10743  // This file contains Original Code and/or Modifications of Original Code
 10744  // as defined in and that are subject to the Apple Public Source License
 10745  // Version 2.0 (the 'License'). You may not use this file except in
 10746  // compliance with the License. Please obtain a copy of the License at
 10747  // http://www.opensource.apple.com/apsl/ and read it before using this
 10748  // file.
 10749  //
 10750  // The Original Code and all software distributed under the License are
 10751  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10752  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10753  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10754  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10755  // Please see the License for the specific language governing rights and
 10756  // limitations under the License.
 10757  //
 10758  // @APPLE_LICENSE_HEADER_END@
 10759  
 10760  // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
 10761  //
 10762  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 10763  //
 10764  // This file contains Original Code and/or Modifications of Original Code
 10765  // as defined in and that are subject to the Apple Public Source License
 10766  // Version 2.0 (the 'License'). You may not use this file except in
 10767  // compliance with the License. The rights granted to you under the License
 10768  // may not be used to create, or enable the creation or redistribution of,
 10769  // unlawful or unlicensed copies of an Apple operating system, or to
 10770  // circumvent, violate, or enable the circumvention or violation of, any
 10771  // terms of an Apple operating system software license agreement.
 10772  //
 10773  // Please obtain a copy of the License at
 10774  // http://www.opensource.apple.com/apsl/ and read it before using this file.
 10775  //
 10776  // The Original Code and all software distributed under the License are
 10777  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10778  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10779  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10780  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10781  // Please see the License for the specific language governing rights and
 10782  // limitations under the License.
 10783  //
 10784  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 10785  // Copyright (c) 2012 Apple Inc. All rights reserved.
 10786  //
 10787  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 10788  //
 10789  // This file contains Original Code and/or Modifications of Original Code
 10790  // as defined in and that are subject to the Apple Public Source License
 10791  // Version 2.0 (the 'License'). You may not use this file except in
 10792  // compliance with the License. The rights granted to you under the License
 10793  // may not be used to create, or enable the creation or redistribution of,
 10794  // unlawful or unlicensed copies of an Apple operating system, or to
 10795  // circumvent, violate, or enable the circumvention or violation of, any
 10796  // terms of an Apple operating system software license agreement.
 10797  //
 10798  // Please obtain a copy of the License at
 10799  // http://www.opensource.apple.com/apsl/ and read it before using this file.
 10800  //
 10801  // The Original Code and all software distributed under the License are
 10802  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10803  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10804  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10805  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10806  // Please see the License for the specific language governing rights and
 10807  // limitations under the License.
 10808  //
 10809  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 10810  
 10811  // Copyright (c) 2012 Apple Inc. All rights reserved.
 10812  //
 10813  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 10814  //
 10815  // This file contains Original Code and/or Modifications of Original Code
 10816  // as defined in and that are subject to the Apple Public Source License
 10817  // Version 2.0 (the 'License'). You may not use this file except in
 10818  // compliance with the License. The rights granted to you under the License
 10819  // may not be used to create, or enable the creation or redistribution of,
 10820  // unlawful or unlicensed copies of an Apple operating system, or to
 10821  // circumvent, violate, or enable the circumvention or violation of, any
 10822  // terms of an Apple operating system software license agreement.
 10823  //
 10824  // Please obtain a copy of the License at
 10825  // http://www.opensource.apple.com/apsl/ and read it before using this file.
 10826  //
 10827  // The Original Code and all software distributed under the License are
 10828  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10829  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10830  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10831  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10832  // Please see the License for the specific language governing rights and
 10833  // limitations under the License.
 10834  //
 10835  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 10836  // Copyright (c) 2012 Apple Inc. All rights reserved.
 10837  //
 10838  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 10839  //
 10840  // This file contains Original Code and/or Modifications of Original Code
 10841  // as defined in and that are subject to the Apple Public Source License
 10842  // Version 2.0 (the 'License'). You may not use this file except in
 10843  // compliance with the License. The rights granted to you under the License
 10844  // may not be used to create, or enable the creation or redistribution of,
 10845  // unlawful or unlicensed copies of an Apple operating system, or to
 10846  // circumvent, violate, or enable the circumvention or violation of, any
 10847  // terms of an Apple operating system software license agreement.
 10848  //
 10849  // Please obtain a copy of the License at
 10850  // http://www.opensource.apple.com/apsl/ and read it before using this file.
 10851  //
 10852  // The Original Code and all software distributed under the License are
 10853  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10854  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10855  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10856  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10857  // Please see the License for the specific language governing rights and
 10858  // limitations under the License.
 10859  //
 10860  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 10861  
 10862  // wchar_t is a built-in type in C++
 10863  // Copyright (c) 2012 Apple Inc. All rights reserved.
 10864  //
 10865  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 10866  //
 10867  // This file contains Original Code and/or Modifications of Original Code
 10868  // as defined in and that are subject to the Apple Public Source License
 10869  // Version 2.0 (the 'License'). You may not use this file except in
 10870  // compliance with the License. The rights granted to you under the License
 10871  // may not be used to create, or enable the creation or redistribution of,
 10872  // unlawful or unlicensed copies of an Apple operating system, or to
 10873  // circumvent, violate, or enable the circumvention or violation of, any
 10874  // terms of an Apple operating system software license agreement.
 10875  //
 10876  // Please obtain a copy of the License at
 10877  // http://www.opensource.apple.com/apsl/ and read it before using this file.
 10878  //
 10879  // The Original Code and all software distributed under the License are
 10880  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10881  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10882  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10883  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10884  // Please see the License for the specific language governing rights and
 10885  // limitations under the License.
 10886  //
 10887  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 10888  
 10889  // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
 10890  //
 10891  // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 10892  //
 10893  // This file contains Original Code and/or Modifications of Original Code
 10894  // as defined in and that are subject to the Apple Public Source License
 10895  // Version 2.0 (the 'License'). You may not use this file except in
 10896  // compliance with the License. The rights granted to you under the License
 10897  // may not be used to create, or enable the creation or redistribution of,
 10898  // unlawful or unlicensed copies of an Apple operating system, or to
 10899  // circumvent, violate, or enable the circumvention or violation of, any
 10900  // terms of an Apple operating system software license agreement.
 10901  //
 10902  // Please obtain a copy of the License at
 10903  // http://www.opensource.apple.com/apsl/ and read it before using this file.
 10904  //
 10905  // The Original Code and all software distributed under the License are
 10906  // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 10907  // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 10908  // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 10909  // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 10910  // Please see the License for the specific language governing rights and
 10911  // limitations under the License.
 10912  //
 10913  // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 10914  type wint_t = int32 /* _wint_t.h:32:25 */
 10915  
 10916  // The lower 8 bits of runetype[] contain the digit value of the rune.
 10917  type _RuneEntry = struct {
 10918  	__min   int32
 10919  	__max   int32
 10920  	__map   int32
 10921  	_       [4]byte
 10922  	__types uintptr
 10923  } /* runetype.h:65:3 */
 10924  
 10925  type _RuneRange = struct {
 10926  	__nranges int32
 10927  	_         [4]byte
 10928  	__ranges  uintptr
 10929  } /* runetype.h:70:3 */
 10930  
 10931  type _RuneCharClass = struct {
 10932  	__name [14]int8
 10933  	_      [2]byte
 10934  	__mask uint32
 10935  } /* runetype.h:75:3 */
 10936  
 10937  type _RuneLocale = struct {
 10938  	__magic        [8]int8
 10939  	__encoding     [32]int8
 10940  	__sgetrune     uintptr
 10941  	__sputrune     uintptr
 10942  	__invalid_rune int32
 10943  	__runetype     [256]uint32
 10944  	__maplower     [256]int32
 10945  	__mapupper     [256]int32
 10946  	_              [4]byte
 10947  	__runetype_ext _RuneRange
 10948  	__maplower_ext _RuneRange
 10949  	__mapupper_ext _RuneRange
 10950  	__variable     uintptr
 10951  	__variable_len int32
 10952  	__ncharclasses int32
 10953  	__charclasses  uintptr
 10954  } /* runetype.h:106:3 */
 10955  
 10956  // The suffix to append to the child command lines, if any
 10957  
 10958  // The directory separator character(s)
 10959  
 10960  // Mark a parameter as unused to suppress compiler warnings
 10961  
 10962  // Global data
 10963  type Global = struct {
 10964  	argv0            uintptr
 10965  	zVfs             uintptr
 10966  	zDbFile          uintptr
 10967  	db               uintptr
 10968  	zErrLog          uintptr
 10969  	pErrLog          uintptr
 10970  	zLog             uintptr
 10971  	pLog             uintptr
 10972  	zName            [32]int8
 10973  	taskId           int32
 10974  	iTrace           int32
 10975  	bSqlTrace        int32
 10976  	bIgnoreSqlErrors int32
 10977  	nError           int32
 10978  	nTest            int32
 10979  	iTimeout         int32
 10980  	bSync            int32
 10981  } /* mptest.c:72:8 */
 10982  
 10983  // The suffix to append to the child command lines, if any
 10984  
 10985  // The directory separator character(s)
 10986  
 10987  // Mark a parameter as unused to suppress compiler warnings
 10988  
 10989  // Global data
 10990  var g Global /* mptest.c:90:3: */
 10991  
 10992  // Default timeout
 10993  
 10994  // Print a message adding zPrefix[] to the beginning of every line.
 10995  func printWithPrefix(tls *libc.TLS, pOut uintptr, zPrefix uintptr, zMsg uintptr) { /* mptest.c:98:13: */
 10996  	bp := tls.Alloc(24)
 10997  	defer tls.Free(24)
 10998  
 10999  	for (zMsg != 0) && (*(*int8)(unsafe.Pointer(zMsg)) != 0) {
 11000  		var i int32
 11001  		for i = 0; ((*(*int8)(unsafe.Pointer(zMsg + uintptr(i))) != 0) && (int32(*(*int8)(unsafe.Pointer(zMsg + uintptr(i)))) != '\n')) && (int32(*(*int8)(unsafe.Pointer(zMsg + uintptr(i)))) != '\r'); i++ {
 11002  		}
 11003  		libc.Xfprintf(tls, pOut, ts /* "%s%.*s\n" */, libc.VaList(bp, zPrefix, i, zMsg))
 11004  		zMsg += uintptr(i)
 11005  		for (int32(*(*int8)(unsafe.Pointer(zMsg))) == '\n') || (int32(*(*int8)(unsafe.Pointer(zMsg))) == '\r') {
 11006  			zMsg++
 11007  		}
 11008  	}
 11009  }
 11010  
 11011  // Compare two pointers to strings, where the pointers might be NULL.
 11012  func safe_strcmp(tls *libc.TLS, a uintptr, b uintptr) int32 { /* mptest.c:111:12: */
 11013  	if a == b {
 11014  		return 0
 11015  	}
 11016  	if a == uintptr(0) {
 11017  		return -1
 11018  	}
 11019  	if b == uintptr(0) {
 11020  		return 1
 11021  	}
 11022  	return libc.Xstrcmp(tls, a, b)
 11023  }
 11024  
 11025  // Return TRUE if string z[] matches glob pattern zGlob[].
 11026  // Return FALSE if the pattern does not match.
 11027  //
 11028  // Globbing rules:
 11029  //
 11030  //      '*'       Matches any sequence of zero or more characters.
 11031  //
 11032  //      '?'       Matches exactly one character.
 11033  //
 11034  //     [...]      Matches one character from the enclosed list of
 11035  //                characters.
 11036  //
 11037  //     [^...]     Matches one character not in the enclosed list.
 11038  //
 11039  //      '#'       Matches any sequence of one or more digits with an
 11040  //                optional + or - sign in front
 11041  func strglob(tls *libc.TLS, zGlob uintptr, z uintptr) int32 { /* mptest.c:136:5: */
 11042  	var c int32
 11043  	var c2 int32
 11044  	var invert int32
 11045  	var seen int32
 11046  
 11047  	for (libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1)))))) != 0 {
 11048  		if c == '*' {
 11049  			for ((libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1)))))) == '*') || (c == '?') {
 11050  				if (c == '?') && ((int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))) == 0) {
 11051  					return 0
 11052  				}
 11053  			}
 11054  			if c == 0 {
 11055  				return 1
 11056  			} else if c == '[' {
 11057  				for (*(*int8)(unsafe.Pointer(z)) != 0) && (strglob(tls, (zGlob-uintptr(1)), z) != 0) {
 11058  					z++
 11059  				}
 11060  				return (libc.Bool32((int32(*(*int8)(unsafe.Pointer(z)))) != 0))
 11061  			}
 11062  			for (libc.AssignInt32(&c2, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))))) != 0 {
 11063  				for c2 != c {
 11064  					c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))
 11065  					if c2 == 0 {
 11066  						return 0
 11067  					}
 11068  				}
 11069  				if strglob(tls, zGlob, z) != 0 {
 11070  					return 1
 11071  				}
 11072  			}
 11073  			return 0
 11074  		} else if c == '?' {
 11075  			if (int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))) == 0 {
 11076  				return 0
 11077  			}
 11078  		} else if c == '[' {
 11079  			var prior_c int32 = 0
 11080  			seen = 0
 11081  			invert = 0
 11082  			c = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))
 11083  			if c == 0 {
 11084  				return 0
 11085  			}
 11086  			c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1))))
 11087  			if c2 == '^' {
 11088  				invert = 1
 11089  				c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1))))
 11090  			}
 11091  			if c2 == ']' {
 11092  				if c == ']' {
 11093  					seen = 1
 11094  				}
 11095  				c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1))))
 11096  			}
 11097  			for (c2 != 0) && (c2 != ']') {
 11098  				if (((c2 == '-') && (int32(*(*int8)(unsafe.Pointer(zGlob))) != ']')) && (int32(*(*int8)(unsafe.Pointer(zGlob))) != 0)) && (prior_c > 0) {
 11099  					c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1))))
 11100  					if (c >= prior_c) && (c <= c2) {
 11101  						seen = 1
 11102  					}
 11103  					prior_c = 0
 11104  				} else {
 11105  					if c == c2 {
 11106  						seen = 1
 11107  					}
 11108  					prior_c = c2
 11109  				}
 11110  				c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1))))
 11111  			}
 11112  			if (c2 == 0) || ((seen ^ invert) == 0) {
 11113  				return 0
 11114  			}
 11115  		} else if c == '#' {
 11116  			if ((int32(*(*int8)(unsafe.Pointer(z))) == '-') || (int32(*(*int8)(unsafe.Pointer(z))) == '+')) && (libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(z + 1))))) != 0) {
 11117  				z++
 11118  			}
 11119  			if !(libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(z))))) != 0) {
 11120  				return 0
 11121  			}
 11122  			z++
 11123  			for libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(z))))) != 0 {
 11124  				z++
 11125  			}
 11126  		} else {
 11127  			if c != (int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))) {
 11128  				return 0
 11129  			}
 11130  		}
 11131  	}
 11132  	return (libc.Bool32(int32(*(*int8)(unsafe.Pointer(z))) == 0))
 11133  }
 11134  
 11135  // Close output stream pOut if it is not stdout or stderr
 11136  func maybeClose(tls *libc.TLS, pOut uintptr) { /* mptest.c:208:13: */
 11137  	if (pOut != libc.X__stdoutp) && (pOut != libc.X__stderrp) {
 11138  		libc.Xfclose(tls, pOut)
 11139  	}
 11140  }
 11141  
 11142  // Print an error message
 11143  func errorMessage(tls *libc.TLS, zFormat uintptr, va uintptr) { /* mptest.c:215:13: */
 11144  	bp := tls.Alloc(38)
 11145  	defer tls.Free(38)
 11146  
 11147  	var ap va_list
 11148  	_ = ap
 11149  	var zMsg uintptr
 11150  	// var zPrefix [30]int8 at bp+8, 30
 11151  
 11152  	ap = va
 11153  	zMsg = sqlite3.Xsqlite3_vmprintf(tls, zFormat, ap)
 11154  	_ = ap
 11155  	sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+8 /* &zPrefix[0] */, ts+8 /* "%s:ERROR: " */, libc.VaList(bp, uintptr(unsafe.Pointer(&g))+64 /* &.zName */))
 11156  	if g.pLog != 0 {
 11157  		printWithPrefix(tls, g.pLog, bp+8 /* &zPrefix[0] */, zMsg)
 11158  		libc.Xfflush(tls, g.pLog)
 11159  	}
 11160  	if (g.pErrLog != 0) && (safe_strcmp(tls, g.zErrLog, g.zLog) != 0) {
 11161  		printWithPrefix(tls, g.pErrLog, bp+8 /* &zPrefix[0] */, zMsg)
 11162  		libc.Xfflush(tls, g.pErrLog)
 11163  	}
 11164  	sqlite3.Xsqlite3_free(tls, zMsg)
 11165  	g.nError++
 11166  }
 11167  
 11168  // Print an error message and then quit.
 11169  func fatalError(tls *libc.TLS, zFormat uintptr, va uintptr) { /* mptest.c:241:13: */
 11170  	bp := tls.Alloc(38)
 11171  	defer tls.Free(38)
 11172  
 11173  	var ap va_list
 11174  	_ = ap
 11175  	var zMsg uintptr
 11176  	// var zPrefix [30]int8 at bp+8, 30
 11177  
 11178  	ap = va
 11179  	zMsg = sqlite3.Xsqlite3_vmprintf(tls, zFormat, ap)
 11180  	_ = ap
 11181  	sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+8 /* &zPrefix[0] */, ts+19 /* "%s:FATAL: " */, libc.VaList(bp, uintptr(unsafe.Pointer(&g))+64 /* &.zName */))
 11182  	if g.pLog != 0 {
 11183  		printWithPrefix(tls, g.pLog, bp+8 /* &zPrefix[0] */, zMsg)
 11184  		libc.Xfflush(tls, g.pLog)
 11185  		maybeClose(tls, g.pLog)
 11186  	}
 11187  	if (g.pErrLog != 0) && (safe_strcmp(tls, g.zErrLog, g.zLog) != 0) {
 11188  		printWithPrefix(tls, g.pErrLog, bp+8 /* &zPrefix[0] */, zMsg)
 11189  		libc.Xfflush(tls, g.pErrLog)
 11190  		maybeClose(tls, g.pErrLog)
 11191  	}
 11192  	sqlite3.Xsqlite3_free(tls, zMsg)
 11193  	if g.db != 0 {
 11194  		var nTry int32 = 0
 11195  		g.iTimeout = 0
 11196  		for (trySql(tls, ts+30 /* "UPDATE client SE..." */, 0) == SQLITE_BUSY) &&
 11197  			((libc.PostIncInt32(&nTry, 1)) < 100) {
 11198  			sqlite3.Xsqlite3_sleep(tls, 10)
 11199  		}
 11200  	}
 11201  	sqlite3.Xsqlite3_close(tls, g.db)
 11202  	libc.Xexit(tls, 1)
 11203  }
 11204  
 11205  // Print a log message
 11206  func logMessage(tls *libc.TLS, zFormat uintptr, va uintptr) { /* mptest.c:276:13: */
 11207  	bp := tls.Alloc(38)
 11208  	defer tls.Free(38)
 11209  
 11210  	var ap va_list
 11211  	_ = ap
 11212  	var zMsg uintptr
 11213  	// var zPrefix [30]int8 at bp+8, 30
 11214  
 11215  	ap = va
 11216  	zMsg = sqlite3.Xsqlite3_vmprintf(tls, zFormat, ap)
 11217  	_ = ap
 11218  	sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+8 /* &zPrefix[0] */, ts+60 /* "%s: " */, libc.VaList(bp, uintptr(unsafe.Pointer(&g))+64 /* &.zName */))
 11219  	if g.pLog != 0 {
 11220  		printWithPrefix(tls, g.pLog, bp+8 /* &zPrefix[0] */, zMsg)
 11221  		libc.Xfflush(tls, g.pLog)
 11222  	}
 11223  	sqlite3.Xsqlite3_free(tls, zMsg)
 11224  }
 11225  
 11226  // Return the length of a string omitting trailing whitespace
 11227  func clipLength(tls *libc.TLS, z uintptr) int32 { /* mptest.c:294:12: */
 11228  	var n int32 = int32(libc.Xstrlen(tls, z))
 11229  	for (n > 0) && (libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n - 1))))))) != 0) {
 11230  		n--
 11231  	}
 11232  	return n
 11233  }
 11234  
 11235  // Auxiliary SQL function to return the name of the VFS
 11236  func vfsNameFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* mptest.c:303:13: */
 11237  	bp := tls.Alloc(8)
 11238  	defer tls.Free(8)
 11239  
 11240  	var db uintptr = sqlite3.Xsqlite3_context_db_handle(tls, context)
 11241  	*(*uintptr)(unsafe.Pointer(bp /* zVfs */)) = uintptr(0)
 11242  	_ = argc
 11243  	_ = argv
 11244  	sqlite3.Xsqlite3_file_control(tls, db, ts+65 /* "main" */, SQLITE_FCNTL_VFSNAME, bp /* &zVfs */)
 11245  	if *(*uintptr)(unsafe.Pointer(bp /* zVfs */)) != 0 {
 11246  		sqlite3.Xsqlite3_result_text(tls, context, *(*uintptr)(unsafe.Pointer(bp /* zVfs */)), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free})))
 11247  	}
 11248  }
 11249  
 11250  // Busy handler with a g.iTimeout-millisecond timeout
 11251  func busyHandler(tls *libc.TLS, pCD uintptr, count int32) int32 { /* mptest.c:321:12: */
 11252  	bp := tls.Alloc(8)
 11253  	defer tls.Free(8)
 11254  
 11255  	_ = pCD
 11256  	if (count * 10) > g.iTimeout {
 11257  		if g.iTimeout > 0 {
 11258  			errorMessage(tls, ts+70 /* "timeout after %d..." */, libc.VaList(bp, g.iTimeout))
 11259  		}
 11260  		return 0
 11261  	}
 11262  	sqlite3.Xsqlite3_sleep(tls, 10)
 11263  	return 1
 11264  }
 11265  
 11266  // SQL Trace callback
 11267  func sqlTraceCallback(tls *libc.TLS, NotUsed1 uintptr, zSql uintptr) { /* mptest.c:334:13: */
 11268  	bp := tls.Alloc(16)
 11269  	defer tls.Free(16)
 11270  
 11271  	_ = NotUsed1
 11272  	logMessage(tls, ts+89 /* "[%.*s]" */, libc.VaList(bp, clipLength(tls, zSql), zSql))
 11273  }
 11274  
 11275  // SQL error log callback
 11276  func sqlErrorCallback(tls *libc.TLS, pArg uintptr, iErrCode int32, zMsg uintptr) { /* mptest.c:342:13: */
 11277  	bp := tls.Alloc(24)
 11278  	defer tls.Free(24)
 11279  
 11280  	_ = pArg
 11281  	if (iErrCode == SQLITE_ERROR) && (g.bIgnoreSqlErrors != 0) {
 11282  		return
 11283  	}
 11284  	if ((iErrCode & 0xff) == SQLITE_SCHEMA) && (g.iTrace < 3) {
 11285  		return
 11286  	}
 11287  	if ((g.iTimeout == 0) && ((iErrCode & 0xff) == SQLITE_BUSY)) && (g.iTrace < 3) {
 11288  		return
 11289  	}
 11290  	if (iErrCode & 0xff) == SQLITE_NOTICE {
 11291  		logMessage(tls, ts+96 /* "(info) %s" */, libc.VaList(bp, zMsg))
 11292  	} else {
 11293  		errorMessage(tls, ts+106 /* "(errcode=%d) %s" */, libc.VaList(bp+8, iErrCode, zMsg))
 11294  	}
 11295  }
 11296  
 11297  // Prepare an SQL statement.  Issue a fatal error if unable.
 11298  func prepareSql(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* mptest.c:357:21: */
 11299  	bp := tls.Alloc(24)
 11300  	defer tls.Free(24)
 11301  
 11302  	var ap va_list
 11303  	_ = ap
 11304  	var zSql uintptr
 11305  	var rc int32
 11306  	*(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)) = uintptr(0)
 11307  	ap = va
 11308  	zSql = sqlite3.Xsqlite3_vmprintf(tls, zFormat, ap)
 11309  	_ = ap
 11310  	rc = sqlite3.Xsqlite3_prepare_v2(tls, g.db, zSql, -1, bp+16 /* &pStmt */, uintptr(0))
 11311  	if rc != SQLITE_OK {
 11312  		sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)))
 11313  		fatalError(tls, ts+122 /* "%s\n%s\n" */, libc.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, g.db), zSql))
 11314  	}
 11315  	sqlite3.Xsqlite3_free(tls, zSql)
 11316  	return *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))
 11317  }
 11318  
 11319  // Run arbitrary SQL.  Issue a fatal error on failure.
 11320  func runSql(tls *libc.TLS, zFormat uintptr, va uintptr) { /* mptest.c:377:13: */
 11321  	bp := tls.Alloc(16)
 11322  	defer tls.Free(16)
 11323  
 11324  	var ap va_list
 11325  	_ = ap
 11326  	var zSql uintptr
 11327  	var rc int32
 11328  	ap = va
 11329  	zSql = sqlite3.Xsqlite3_vmprintf(tls, zFormat, ap)
 11330  	_ = ap
 11331  	rc = sqlite3.Xsqlite3_exec(tls, g.db, zSql, uintptr(0), uintptr(0), uintptr(0))
 11332  	if rc != SQLITE_OK {
 11333  		fatalError(tls, ts+122 /* "%s\n%s\n" */, libc.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, g.db), zSql))
 11334  	}
 11335  	sqlite3.Xsqlite3_free(tls, zSql)
 11336  }
 11337  
 11338  // Try to run arbitrary SQL.  Return success code.
 11339  func trySql(tls *libc.TLS, zFormat uintptr, va uintptr) int32 { /* mptest.c:394:12: */
 11340  	var ap va_list
 11341  	_ = ap
 11342  	var zSql uintptr
 11343  	var rc int32
 11344  	ap = va
 11345  	zSql = sqlite3.Xsqlite3_vmprintf(tls, zFormat, ap)
 11346  	_ = ap
 11347  	rc = sqlite3.Xsqlite3_exec(tls, g.db, zSql, uintptr(0), uintptr(0), uintptr(0))
 11348  	sqlite3.Xsqlite3_free(tls, zSql)
 11349  	return rc
 11350  }
 11351  
 11352  // Structure for holding an arbitrary length string
 11353  type String1 = struct {
 11354  	z      uintptr
 11355  	n      int32
 11356  	nAlloc int32
 11357  } /* mptest.c:408:9 */
 11358  
 11359  // Structure for holding an arbitrary length string
 11360  type String = String1 /* mptest.c:408:23 */
 11361  
 11362  // Free a string
 11363  func stringFree(tls *libc.TLS, p uintptr) { /* mptest.c:416:13: */
 11364  	if (*String)(unsafe.Pointer(p)).z != 0 {
 11365  		sqlite3.Xsqlite3_free(tls, (*String)(unsafe.Pointer(p)).z)
 11366  	}
 11367  	libc.X__builtin___memset_chk(tls, p, 0, uint64(unsafe.Sizeof(String{})), libc.X__builtin_object_size(tls, p, 0))
 11368  }
 11369  
 11370  // Append n bytes of text to a string.  If n<0 append the entire string.
 11371  func stringAppend(tls *libc.TLS, p uintptr, z uintptr, n int32) { /* mptest.c:422:13: */
 11372  	if n < 0 {
 11373  		n = int32(libc.Xstrlen(tls, z))
 11374  	}
 11375  	if ((*String)(unsafe.Pointer(p)).n + n) >= (*String)(unsafe.Pointer(p)).nAlloc {
 11376  		var nAlloc int32 = ((((*String)(unsafe.Pointer(p)).nAlloc * 2) + n) + 100)
 11377  		var zNew uintptr = sqlite3.Xsqlite3_realloc(tls, (*String)(unsafe.Pointer(p)).z, nAlloc)
 11378  		if zNew == uintptr(0) {
 11379  			fatalError(tls, ts+129 /* "out of memory" */, 0)
 11380  		}
 11381  		(*String)(unsafe.Pointer(p)).z = zNew
 11382  		(*String)(unsafe.Pointer(p)).nAlloc = nAlloc
 11383  	}
 11384  	libc.X__builtin___memcpy_chk(tls, ((*String)(unsafe.Pointer(p)).z + uintptr((*String)(unsafe.Pointer(p)).n)), z, uint64(n), libc.X__builtin_object_size(tls, ((*String)(unsafe.Pointer(p)).z+uintptr((*String)(unsafe.Pointer(p)).n)), 0))
 11385  	*(*int32)(unsafe.Pointer(p + 8 /* &.n */)) += (n)
 11386  	*(*int8)(unsafe.Pointer((*String)(unsafe.Pointer(p)).z + uintptr((*String)(unsafe.Pointer(p)).n))) = int8(0)
 11387  }
 11388  
 11389  // Reset a string to an empty string
 11390  func stringReset(tls *libc.TLS, p uintptr) { /* mptest.c:437:13: */
 11391  	if (*String)(unsafe.Pointer(p)).z == uintptr(0) {
 11392  		stringAppend(tls, p, ts+143 /* " " */, 1)
 11393  	}
 11394  	(*String)(unsafe.Pointer(p)).n = 0
 11395  	*(*int8)(unsafe.Pointer((*String)(unsafe.Pointer(p)).z)) = int8(0)
 11396  }
 11397  
 11398  // Append a new token onto the end of the string
 11399  func stringAppendTerm(tls *libc.TLS, p uintptr, z uintptr) { /* mptest.c:444:13: */
 11400  	var i int32
 11401  	if (*String)(unsafe.Pointer(p)).n != 0 {
 11402  		stringAppend(tls, p, ts+143 /* " " */, 1)
 11403  	}
 11404  	if z == uintptr(0) {
 11405  		stringAppend(tls, p, ts+145 /* "nil" */, 3)
 11406  		return
 11407  	}
 11408  	for i = 0; (*(*int8)(unsafe.Pointer(z + uintptr(i))) != 0) && !(libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr(i)))))) != 0); i++ {
 11409  	}
 11410  	if (i > 0) && (int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) == 0) {
 11411  		stringAppend(tls, p, z, i)
 11412  		return
 11413  	}
 11414  	stringAppend(tls, p, ts+149 /* "'" */, 1)
 11415  	for *(*int8)(unsafe.Pointer(z)) != 0 {
 11416  		for i = 0; (*(*int8)(unsafe.Pointer(z + uintptr(i))) != 0) && (int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) != '\''); i++ {
 11417  		}
 11418  		if *(*int8)(unsafe.Pointer(z + uintptr(i))) != 0 {
 11419  			stringAppend(tls, p, z, (i + 1))
 11420  			stringAppend(tls, p, ts+149 /* "'" */, 1)
 11421  			z += (uintptr(i + 1))
 11422  		} else {
 11423  			stringAppend(tls, p, z, i)
 11424  			break
 11425  		}
 11426  	}
 11427  	stringAppend(tls, p, ts+149 /* "'" */, 1)
 11428  }
 11429  
 11430  // Callback function for evalSql()
 11431  func evalCallback(tls *libc.TLS, pCData uintptr, argc int32, argv uintptr, azCol uintptr) int32 { /* mptest.c:474:12: */
 11432  	var p uintptr = pCData
 11433  	var i int32
 11434  	_ = azCol
 11435  	for i = 0; i < argc; i++ {
 11436  		stringAppendTerm(tls, p, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))
 11437  	}
 11438  	return 0
 11439  }
 11440  
 11441  // Run arbitrary SQL and record the results in an output string
 11442  // given by the first parameter.
 11443  func evalSql(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) int32 { /* mptest.c:486:12: */
 11444  	bp := tls.Alloc(46)
 11445  	defer tls.Free(46)
 11446  
 11447  	var ap va_list
 11448  	_ = ap
 11449  	var zSql uintptr
 11450  	var rc int32
 11451  	*(*uintptr)(unsafe.Pointer(bp + 8 /* zErrMsg */)) = uintptr(0)
 11452  	ap = va
 11453  	zSql = sqlite3.Xsqlite3_vmprintf(tls, zFormat, ap)
 11454  	_ = ap
 11455  
 11456  	rc = sqlite3.Xsqlite3_exec(tls, g.db, zSql, *(*uintptr)(unsafe.Pointer(&struct {
 11457  		f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32
 11458  	}{evalCallback})), p, bp+8 /* &zErrMsg */)
 11459  	sqlite3.Xsqlite3_free(tls, zSql)
 11460  	if rc != 0 {
 11461  		// var zErr [30]int8 at bp+16, 30
 11462  
 11463  		sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+16 /* &zErr[0] */, ts+151 /* "error(%d)" */, libc.VaList(bp, rc))
 11464  		stringAppendTerm(tls, p, bp+16 /* &zErr[0] */)
 11465  		if *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrMsg */)) != 0 {
 11466  			stringAppendTerm(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrMsg */)))
 11467  			sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrMsg */)))
 11468  		}
 11469  	}
 11470  	return rc
 11471  }
 11472  
 11473  // Auxiliary SQL function to recursively evaluate SQL.
 11474  func evalFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* mptest.c:512:13: */
 11475  	bp := tls.Alloc(24)
 11476  	defer tls.Free(24)
 11477  
 11478  	var db uintptr = sqlite3.Xsqlite3_context_db_handle(tls, context)
 11479  	var zSql uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))
 11480  	// var res String at bp, 16
 11481  
 11482  	*(*uintptr)(unsafe.Pointer(bp + 16 /* zErrMsg */)) = uintptr(0)
 11483  	var rc int32
 11484  	_ = argc
 11485  	libc.X__builtin___memset_chk(tls, bp /* &res */, 0, uint64(unsafe.Sizeof(String{})), libc.X__builtin_object_size(tls, bp /* &res */, 0))
 11486  	rc = sqlite3.Xsqlite3_exec(tls, db, zSql, *(*uintptr)(unsafe.Pointer(&struct {
 11487  		f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32
 11488  	}{evalCallback})), bp /* &res */, bp+16 /* &zErrMsg */)
 11489  	if *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrMsg */)) != 0 {
 11490  		sqlite3.Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrMsg */)), -1)
 11491  		sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrMsg */)))
 11492  	} else if rc != 0 {
 11493  		sqlite3.Xsqlite3_result_error_code(tls, context, rc)
 11494  	} else {
 11495  		sqlite3.Xsqlite3_result_text(tls, context, (*String)(unsafe.Pointer(bp /* &res */)).z, -1, libc.UintptrFromInt32(-1))
 11496  	}
 11497  	stringFree(tls, bp /* &res */)
 11498  }
 11499  
 11500  // Look up the next task for client iClient in the database.
 11501  // Return the task script and the task number and mark that
 11502  // task as being under way.
 11503  func startScript(tls *libc.TLS, iClient int32, pzScript uintptr, pTaskId uintptr, pzTaskName uintptr) int32 { /* mptest.c:541:12: */
 11504  	bp := tls.Alloc(80)
 11505  	defer tls.Free(80)
 11506  
 11507  	var pStmt uintptr = uintptr(0)
 11508  	var taskId int32
 11509  	var rc int32
 11510  	var totalTime int32 = 0
 11511  
 11512  	*(*uintptr)(unsafe.Pointer(pzScript)) = uintptr(0)
 11513  	g.iTimeout = 0
 11514  	for 1 != 0 {
 11515  		rc = trySql(tls, ts+161 /* "BEGIN IMMEDIATE" */, 0)
 11516  		if rc == SQLITE_BUSY {
 11517  			sqlite3.Xsqlite3_sleep(tls, 10)
 11518  			totalTime = totalTime + (10)
 11519  			continue
 11520  		}
 11521  		if rc != SQLITE_OK {
 11522  			fatalError(tls, ts+177 /* "in startScript: ..." */, libc.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, g.db)))
 11523  		}
 11524  		if (g.nError != 0) || (g.nTest != 0) {
 11525  			runSql(tls, ts+196, /* "UPDATE counters ..." */
 11526  				libc.VaList(bp+8, g.nError, g.nTest))
 11527  			g.nError = 0
 11528  			g.nTest = 0
 11529  		}
 11530  		pStmt = prepareSql(tls, ts+249 /* "SELECT 1 FROM cl..." */, libc.VaList(bp+24, iClient))
 11531  		rc = sqlite3.Xsqlite3_step(tls, pStmt)
 11532  		sqlite3.Xsqlite3_finalize(tls, pStmt)
 11533  		if rc == SQLITE_ROW {
 11534  			runSql(tls, ts+295 /* "DELETE FROM clie..." */, libc.VaList(bp+32, iClient))
 11535  			g.iTimeout = DEFAULT_TIMEOUT
 11536  			runSql(tls, ts+326 /* "COMMIT TRANSACTI..." */, 0)
 11537  			return SQLITE_DONE
 11538  		}
 11539  		pStmt = prepareSql(tls,
 11540  
 11541  			ts+346 /* "SELECT script, i..." */, libc.VaList(bp+40, iClient))
 11542  		rc = sqlite3.Xsqlite3_step(tls, pStmt)
 11543  		if rc == SQLITE_ROW {
 11544  			var n int32 = sqlite3.Xsqlite3_column_bytes(tls, pStmt, 0)
 11545  			*(*uintptr)(unsafe.Pointer(pzScript)) = sqlite3.Xsqlite3_malloc(tls, (n + 1))
 11546  			libc.X__builtin___strcpy_chk(tls, *(*uintptr)(unsafe.Pointer(pzScript)), sqlite3.Xsqlite3_column_text(tls, pStmt, 0), libc.X__builtin_object_size(tls, *(*uintptr)(unsafe.Pointer(pzScript)), func() int32 {
 11547  				if X_USE_FORTIFY_LEVEL > 1 {
 11548  					return 1
 11549  				}
 11550  				return 0
 11551  			}()))
 11552  			*(*int32)(unsafe.Pointer(pTaskId)) = libc.AssignInt32(&taskId, sqlite3.Xsqlite3_column_int(tls, pStmt, 1))
 11553  			*(*uintptr)(unsafe.Pointer(pzTaskName)) = sqlite3.Xsqlite3_mprintf(tls, ts+438 /* "%s" */, libc.VaList(bp+48, sqlite3.Xsqlite3_column_text(tls, pStmt, 2)))
 11554  			sqlite3.Xsqlite3_finalize(tls, pStmt)
 11555  			runSql(tls,
 11556  
 11557  				ts+441 /* "UPDATE task   SE..." */, libc.VaList(bp+56, taskId))
 11558  			g.iTimeout = DEFAULT_TIMEOUT
 11559  			runSql(tls, ts+326 /* "COMMIT TRANSACTI..." */, 0)
 11560  			return SQLITE_OK
 11561  		}
 11562  		sqlite3.Xsqlite3_finalize(tls, pStmt)
 11563  		if rc == SQLITE_DONE {
 11564  			if totalTime > 30000 {
 11565  				errorMessage(tls, ts+524 /* "Waited over 30 s..." */, 0)
 11566  				runSql(tls, ts+573 /* "DELETE FROM clie..." */, libc.VaList(bp+64, iClient))
 11567  				sqlite3.Xsqlite3_close(tls, g.db)
 11568  				libc.Xexit(tls, 1)
 11569  			}
 11570  			for trySql(tls, ts+613 /* "COMMIT" */, 0) == SQLITE_BUSY {
 11571  				sqlite3.Xsqlite3_sleep(tls, 10)
 11572  				totalTime = totalTime + (10)
 11573  			}
 11574  			sqlite3.Xsqlite3_sleep(tls, 100)
 11575  			totalTime = totalTime + (100)
 11576  			continue
 11577  		}
 11578  		fatalError(tls, ts+438 /* "%s" */, libc.VaList(bp+72, sqlite3.Xsqlite3_errmsg(tls, g.db)))
 11579  	}
 11580  	g.iTimeout = DEFAULT_TIMEOUT
 11581  	return int32(0)
 11582  }
 11583  
 11584  // Mark a script as having finished.   Remove the CLIENT table entry
 11585  // if bShutdown is true.
 11586  func finishScript(tls *libc.TLS, iClient int32, taskId int32, bShutdown int32) int32 { /* mptest.c:623:12: */
 11587  	bp := tls.Alloc(16)
 11588  	defer tls.Free(16)
 11589  
 11590  	runSql(tls,
 11591  
 11592  		ts+620 /* "UPDATE task   SE..." */, libc.VaList(bp, taskId))
 11593  	if bShutdown != 0 {
 11594  		runSql(tls, ts+295 /* "DELETE FROM clie..." */, libc.VaList(bp+8, iClient))
 11595  	}
 11596  	return SQLITE_OK
 11597  }
 11598  
 11599  // Start up a client process for iClient, if it is not already
 11600  // running.  If the client is already running, then this routine
 11601  // is a no-op.
 11602  func startClient(tls *libc.TLS, iClient int32) { /* mptest.c:638:13: */
 11603  	bp := tls.Alloc(96)
 11604  	defer tls.Free(96)
 11605  
 11606  	runSql(tls, ts+701 /* "INSERT OR IGNORE..." */, libc.VaList(bp, iClient))
 11607  	if sqlite3.Xsqlite3_changes(tls, g.db) != 0 {
 11608  		var zSys uintptr
 11609  		var rc int32
 11610  		zSys = sqlite3.Xsqlite3_mprintf(tls, ts+743, /* "%s \"%s\" --client..." */
 11611  			libc.VaList(bp+8, g.argv0, g.zDbFile, iClient, g.iTrace))
 11612  		if g.bSqlTrace != 0 {
 11613  			zSys = sqlite3.Xsqlite3_mprintf(tls, ts+774 /* "%z --sqltrace" */, libc.VaList(bp+40, zSys))
 11614  		}
 11615  		if g.bSync != 0 {
 11616  			zSys = sqlite3.Xsqlite3_mprintf(tls, ts+788 /* "%z --sync" */, libc.VaList(bp+48, zSys))
 11617  		}
 11618  		if g.zVfs != 0 {
 11619  			zSys = sqlite3.Xsqlite3_mprintf(tls, ts+798 /* "%z --vfs \"%s\"" */, libc.VaList(bp+56, zSys, g.zVfs))
 11620  		}
 11621  		if g.iTrace >= 2 {
 11622  			logMessage(tls, ts+812 /* "system('%q')" */, libc.VaList(bp+72, zSys))
 11623  		}
 11624  		zSys = sqlite3.Xsqlite3_mprintf(tls, ts+825 /* "%z &" */, libc.VaList(bp+80, zSys))
 11625  		rc = libc.Xsystem(tls, zSys)
 11626  		if rc != 0 {
 11627  			errorMessage(tls, ts+830 /* "system() fails w..." */, libc.VaList(bp+88, rc))
 11628  		}
 11629  		sqlite3.Xsqlite3_free(tls, zSys)
 11630  	}
 11631  }
 11632  
 11633  // Read the entire content of a file into memory
 11634  func readFile(tls *libc.TLS, zFilename uintptr) uintptr { /* mptest.c:684:13: */
 11635  	bp := tls.Alloc(8)
 11636  	defer tls.Free(8)
 11637  
 11638  	var in uintptr = libc.Xfopen(tls, zFilename, ts+864 /* "rb" */)
 11639  	var sz int64
 11640  	var z uintptr
 11641  	if in == uintptr(0) {
 11642  		fatalError(tls, ts+867 /* "cannot open \"%s\"..." */, libc.VaList(bp, zFilename))
 11643  	}
 11644  	libc.Xfseek(tls, in, int64(0), SEEK_END)
 11645  	sz = libc.Xftell(tls, in)
 11646  	libc.Xrewind(tls, in)
 11647  	z = sqlite3.Xsqlite3_malloc(tls, (int32(sz + int64(1))))
 11648  	sz = int64(libc.Xfread(tls, z, uint64(1), uint64(sz), in))
 11649  	*(*int8)(unsafe.Pointer(z + uintptr(sz))) = int8(0)
 11650  	libc.Xfclose(tls, in)
 11651  	return z
 11652  }
 11653  
 11654  // Return the length of the next token.
 11655  func tokenLength(tls *libc.TLS, z uintptr, pnLine uintptr) int32 { /* mptest.c:704:12: */
 11656  	var n int32 = 0
 11657  	if (libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(z))))) != 0) || ((int32(*(*int8)(unsafe.Pointer(z))) == '/') && (int32(*(*int8)(unsafe.Pointer(z + 1))) == '*')) {
 11658  		var inC int32 = 0
 11659  		var c int32
 11660  		if int32(*(*int8)(unsafe.Pointer(z))) == '/' {
 11661  			inC = 1
 11662  			n = 2
 11663  		}
 11664  		for (libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&n, 1))))))) != 0 {
 11665  			if c == '\n' {
 11666  				(*(*int32)(unsafe.Pointer(pnLine)))++
 11667  			}
 11668  			if libc.Xisspace(tls, int32(uint8(c))) != 0 {
 11669  				continue
 11670  			}
 11671  			if ((inC != 0) && (c == '*')) && (int32(*(*int8)(unsafe.Pointer(z + uintptr(n)))) == '/') {
 11672  				n++
 11673  				inC = 0
 11674  			} else if (!(inC != 0) && (c == '/')) && (int32(*(*int8)(unsafe.Pointer(z + uintptr(n)))) == '*') {
 11675  				n++
 11676  				inC = 1
 11677  			} else if !(inC != 0) {
 11678  				break
 11679  			}
 11680  		}
 11681  		n--
 11682  	} else if (int32(*(*int8)(unsafe.Pointer(z))) == '-') && (int32(*(*int8)(unsafe.Pointer(z + 1))) == '-') {
 11683  		for n = 2; (*(*int8)(unsafe.Pointer(z + uintptr(n))) != 0) && (int32(*(*int8)(unsafe.Pointer(z + uintptr(n)))) != '\n'); n++ {
 11684  		}
 11685  		if *(*int8)(unsafe.Pointer(z + uintptr(n))) != 0 {
 11686  			(*(*int32)(unsafe.Pointer(pnLine)))++
 11687  			n++
 11688  		}
 11689  	} else if (int32(*(*int8)(unsafe.Pointer(z))) == '"') || (int32(*(*int8)(unsafe.Pointer(z))) == '\'') {
 11690  		var delim int32 = int32(*(*int8)(unsafe.Pointer(z)))
 11691  		for n = 1; *(*int8)(unsafe.Pointer(z + uintptr(n))) != 0; n++ {
 11692  			if int32(*(*int8)(unsafe.Pointer(z + uintptr(n)))) == '\n' {
 11693  				(*(*int32)(unsafe.Pointer(pnLine)))++
 11694  			}
 11695  			if int32(*(*int8)(unsafe.Pointer(z + uintptr(n)))) == delim {
 11696  				n++
 11697  				if int32(*(*int8)(unsafe.Pointer(z + uintptr((n + 1))))) != delim {
 11698  					break
 11699  				}
 11700  			}
 11701  		}
 11702  	} else {
 11703  		var c int32
 11704  		for n = 1; (((((libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(z + uintptr(n)))))) != 0) && !(libc.Xisspace(tls, int32(uint8(c))) != 0)) && (c != '"')) && (c != '\'')) && (c != ';'); n++ {
 11705  		}
 11706  	}
 11707  	return n
 11708  }
 11709  
 11710  // Copy a single token into a string buffer.
 11711  func extractToken(tls *libc.TLS, zIn uintptr, nIn int32, zOut uintptr, nOut int32) int32 { /* mptest.c:749:12: */
 11712  	var i int32
 11713  	if nIn <= 0 {
 11714  		*(*int8)(unsafe.Pointer(zOut)) = int8(0)
 11715  		return 0
 11716  	}
 11717  	for i = 0; ((i < nIn) && (i < (nOut - 1))) && !(libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))))) != 0); i++ {
 11718  		*(*int8)(unsafe.Pointer(zOut + uintptr(i))) = *(*int8)(unsafe.Pointer(zIn + uintptr(i)))
 11719  	}
 11720  	*(*int8)(unsafe.Pointer(zOut + uintptr(i))) = int8(0)
 11721  	return i
 11722  }
 11723  
 11724  // Find the number of characters up to the start of the next "--end" token.
 11725  func findEnd(tls *libc.TLS, z uintptr, pnLine uintptr) int32 { /* mptest.c:763:12: */
 11726  	var n int32 = 0
 11727  	for (*(*int8)(unsafe.Pointer(z + uintptr(n))) != 0) && ((libc.Xstrncmp(tls, (z+uintptr(n)), ts+896 /* "--end" */, uint64(5)) != 0) || !(libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n + 5))))))) != 0)) {
 11728  		n = n + (tokenLength(tls, (z + uintptr(n)), pnLine))
 11729  	}
 11730  	return n
 11731  }
 11732  
 11733  // Find the number of characters up to the first character past the
 11734  // of the next "--endif"  or "--else" token. Nested --if commands are
 11735  // also skipped.
 11736  func findEndif(tls *libc.TLS, z uintptr, stopAtElse int32, pnLine uintptr) int32 { /* mptest.c:776:12: */
 11737  	var n int32 = 0
 11738  	for *(*int8)(unsafe.Pointer(z + uintptr(n))) != 0 {
 11739  		var len int32 = tokenLength(tls, (z + uintptr(n)), pnLine)
 11740  		if ((libc.Xstrncmp(tls, (z+uintptr(n)), ts+902 /* "--endif" */, uint64(7)) == 0) && (libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n + 7))))))) != 0)) ||
 11741  			(((stopAtElse != 0) && (libc.Xstrncmp(tls, (z+uintptr(n)), ts+910 /* "--else" */, uint64(6)) == 0)) && (libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n + 6))))))) != 0)) {
 11742  			return (n + len)
 11743  		}
 11744  		if (libc.Xstrncmp(tls, (z+uintptr(n)), ts+917 /* "--if" */, uint64(4)) == 0) && (libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n + 4))))))) != 0) {
 11745  			var skip int32 = findEndif(tls, ((z + uintptr(n)) + uintptr(len)), 0, pnLine)
 11746  			n = n + (skip + len)
 11747  		} else {
 11748  			n = n + (len)
 11749  		}
 11750  	}
 11751  	return n
 11752  }
 11753  
 11754  // Wait for a client process to complete all its tasks
 11755  func waitForClient(tls *libc.TLS, iClient int32, iTimeout int32, zErrPrefix uintptr) { /* mptest.c:798:13: */
 11756  	bp := tls.Alloc(32)
 11757  	defer tls.Free(32)
 11758  
 11759  	var pStmt uintptr
 11760  	var rc int32
 11761  	if iClient > 0 {
 11762  		pStmt = prepareSql(tls,
 11763  
 11764  			ts+922, /* "SELECT 1 FROM ta..." */
 11765  			libc.VaList(bp, iClient))
 11766  	} else {
 11767  		pStmt = prepareSql(tls,
 11768  
 11769  			ts+1018 /* "SELECT 1 FROM ta..." */, 0)
 11770  	}
 11771  	g.iTimeout = 0
 11772  	for (((libc.AssignInt32(&rc, sqlite3.Xsqlite3_step(tls, pStmt))) == SQLITE_BUSY) || (rc == SQLITE_ROW)) &&
 11773  		(iTimeout > 0) {
 11774  		sqlite3.Xsqlite3_reset(tls, pStmt)
 11775  		sqlite3.Xsqlite3_sleep(tls, 50)
 11776  		iTimeout = iTimeout - (50)
 11777  	}
 11778  	sqlite3.Xsqlite3_finalize(tls, pStmt)
 11779  	g.iTimeout = DEFAULT_TIMEOUT
 11780  	if rc != SQLITE_DONE {
 11781  		if zErrPrefix == uintptr(0) {
 11782  			zErrPrefix = ts + 1099 /* "" */
 11783  		}
 11784  		if iClient > 0 {
 11785  			errorMessage(tls, ts+1100 /* "%stimeout waitin..." */, libc.VaList(bp+8, zErrPrefix, iClient))
 11786  		} else {
 11787  			errorMessage(tls, ts+1132 /* "%stimeout waitin..." */, libc.VaList(bp+24, zErrPrefix))
 11788  		}
 11789  	}
 11790  }
 11791  
 11792  // Return a pointer to the tail of a filename
 11793  func filenameTail(tls *libc.TLS, z uintptr) uintptr { /* mptest.c:836:13: */
 11794  	var i int32
 11795  	var j int32
 11796  	for i = libc.AssignInt32(&j, 0); *(*int8)(unsafe.Pointer(z + uintptr(i))) != 0; i++ {
 11797  		if (int32(*(*int8)(unsafe.Pointer(z + uintptr(i))))) == '/' {
 11798  			j = (i + 1)
 11799  		}
 11800  	}
 11801  	return (z + uintptr(j))
 11802  }
 11803  
 11804  // Interpret zArg as a boolean value.  Return either 0 or 1.
 11805  func booleanValue(tls *libc.TLS, zArg uintptr) int32 { /* mptest.c:845:12: */
 11806  	bp := tls.Alloc(8)
 11807  	defer tls.Free(8)
 11808  
 11809  	var i int32
 11810  	if zArg == uintptr(0) {
 11811  		return 0
 11812  	}
 11813  	for i = 0; (int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i)))) >= '0') && (int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i)))) <= '9'); i++ {
 11814  	}
 11815  	if (i > 0) && (int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i)))) == 0) {
 11816  		return libc.Xatoi(tls, zArg)
 11817  	}
 11818  	if (sqlite3.Xsqlite3_stricmp(tls, zArg, ts+1166 /* "on" */) == 0) || (sqlite3.Xsqlite3_stricmp(tls, zArg, ts+1169 /* "yes" */) == 0) {
 11819  		return 1
 11820  	}
 11821  	if (sqlite3.Xsqlite3_stricmp(tls, zArg, ts+1173 /* "off" */) == 0) || (sqlite3.Xsqlite3_stricmp(tls, zArg, ts+1177 /* "no" */) == 0) {
 11822  		return 0
 11823  	}
 11824  	errorMessage(tls, ts+1180 /* "unknown boolean:..." */, libc.VaList(bp, zArg))
 11825  	return 0
 11826  }
 11827  
 11828  // This routine exists as a convenient place to set a debugger
 11829  // breakpoint.
 11830  func test_breakpoint(tls *libc.TLS) { /* mptest.c:864:13: */
 11831  	atomic.AddInt32(&cnt, 1)
 11832  }
 11833  
 11834  var cnt int32 = 0 /* mptest.c:864:56 */
 11835  
 11836  // Maximum number of arguments to a --command
 11837  
 11838  // Run a script.
 11839  func runScript(tls *libc.TLS, iClient int32, taskId int32, zScript uintptr, zFilename uintptr) { /* mptest.c:872:13: */
 11840  	bp := tls.Alloc(1610)
 11841  	defer tls.Free(1610)
 11842  
 11843  	*(*int32)(unsafe.Pointer(bp + 376 /* lineno */)) = 1
 11844  	var prevLine int32 = 1
 11845  	var ii int32 = 0
 11846  	var iBegin int32 = 0
 11847  	var n int32
 11848  	var c int32
 11849  	var j int32
 11850  	var len int32
 11851  	var nArg int32
 11852  	// var sResult String at bp+360, 16
 11853  
 11854  	// var zCmd [30]int8 at bp+380, 30
 11855  
 11856  	// var zError [1000]int8 at bp+610, 1000
 11857  
 11858  	// var azArg [2][100]int8 at bp+410, 200
 11859  
 11860  	libc.X__builtin___memset_chk(tls, bp+360 /* &sResult */, 0, uint64(unsafe.Sizeof(String{})), libc.X__builtin_object_size(tls, bp+360 /* &sResult */, 0))
 11861  	stringReset(tls, bp+360 /* &sResult */)
 11862  	for (libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(zScript + uintptr(ii)))))) != 0 {
 11863  		prevLine = *(*int32)(unsafe.Pointer(bp + 376 /* lineno */))
 11864  		len = tokenLength(tls, (zScript + uintptr(ii)), bp+376 /* &lineno */)
 11865  		if (libc.Xisspace(tls, int32(uint8(c))) != 0) || ((c == '/') && (int32(*(*int8)(unsafe.Pointer(zScript + uintptr((ii + 1))))) == '*')) {
 11866  			ii = ii + (len)
 11867  			continue
 11868  		}
 11869  		if ((c != '-') || (int32(*(*int8)(unsafe.Pointer(zScript + uintptr((ii + 1))))) != '-')) || !(libc.Xisalpha(tls, int32(*(*int8)(unsafe.Pointer(zScript + uintptr((ii + 2)))))) != 0) {
 11870  			ii = ii + (len)
 11871  			continue
 11872  		}
 11873  
 11874  		// Run any prior SQL before processing the new --command
 11875  		if ii > iBegin {
 11876  			var zSql uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+1202 /* "%.*s" */, libc.VaList(bp, (ii-iBegin), (zScript+uintptr(iBegin))))
 11877  			evalSql(tls, bp+360 /* &sResult */, zSql, 0)
 11878  			sqlite3.Xsqlite3_free(tls, zSql)
 11879  			iBegin = (ii + len)
 11880  		}
 11881  
 11882  		// Parse the --command
 11883  		if g.iTrace >= 2 {
 11884  			logMessage(tls, ts+1202 /* "%.*s" */, libc.VaList(bp+16, len, (zScript+uintptr(ii))))
 11885  		}
 11886  		n = extractToken(tls, ((zScript + uintptr(ii)) + uintptr(2)), (len - 2), bp+380 /* &zCmd[0] */, int32(unsafe.Sizeof([30]int8{})))
 11887  		for nArg = 0; (n < (len - 2)) && (nArg < MX_ARG); nArg++ {
 11888  			for (n < (len - 2)) && (libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(zScript + uintptr(((ii + 2) + n))))))) != 0) {
 11889  				n++
 11890  			}
 11891  			if n >= (len - 2) {
 11892  				break
 11893  			}
 11894  			n = n + (extractToken(tls, (((zScript + uintptr(ii)) + uintptr(2)) + uintptr(n)), ((len - 2) - n),
 11895  				(bp + 410 /* &azArg[0] */ + uintptr(nArg)*100), int32(unsafe.Sizeof([100]int8{}))))
 11896  		}
 11897  		for j = nArg; j < MX_ARG; j++ {
 11898  			*(*int8)(unsafe.Pointer((bp + 410 /* &azArg[0] */ + uintptr(libc.PostIncInt32(&j, 1))*100))) = int8(0)
 11899  		}
 11900  
 11901  		//  --sleep N
 11902  		//
 11903  		// Pause for N milliseconds
 11904  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1207 /* "sleep" */) == 0 {
 11905  			sqlite3.Xsqlite3_sleep(tls, libc.Xatoi(tls, (bp+410 /* &azArg[0] */)))
 11906  		} else
 11907  
 11908  		//   --exit N
 11909  		//
 11910  		// Exit this process.  If N>0 then exit without shutting down
 11911  		// SQLite.  (In other words, simulate a crash.)
 11912  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1213 /* "exit" */) == 0 {
 11913  			var rc int32 = libc.Xatoi(tls, (bp + 410 /* &azArg[0] */))
 11914  			finishScript(tls, iClient, taskId, 1)
 11915  			if rc == 0 {
 11916  				sqlite3.Xsqlite3_close(tls, g.db)
 11917  			}
 11918  			libc.Xexit(tls, rc)
 11919  		} else
 11920  
 11921  		//   --testcase NAME
 11922  		//
 11923  		// Begin a new test case.  Announce in the log that the test case
 11924  		// has begun.
 11925  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1218 /* "testcase" */) == 0 {
 11926  			if g.iTrace == 1 {
 11927  				logMessage(tls, ts+1202 /* "%.*s" */, libc.VaList(bp+32, (len-1), (zScript+uintptr(ii))))
 11928  			}
 11929  			stringReset(tls, bp+360 /* &sResult */)
 11930  		} else
 11931  
 11932  		//   --finish
 11933  		//
 11934  		// Mark the current task as having finished, even if it is not.
 11935  		// This can be used in conjunction with --exit to simulate a crash.
 11936  		if (libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1227 /* "finish" */) == 0) && (iClient > 0) {
 11937  			finishScript(tls, iClient, taskId, 1)
 11938  		} else
 11939  
 11940  		//  --reset
 11941  		//
 11942  		// Reset accumulated results back to an empty string
 11943  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1234 /* "reset" */) == 0 {
 11944  			stringReset(tls, bp+360 /* &sResult */)
 11945  		} else
 11946  
 11947  		//  --match ANSWER...
 11948  		//
 11949  		// Check to see if output matches ANSWER.  Report an error if not.
 11950  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1240 /* "match" */) == 0 {
 11951  			var jj int32
 11952  			var zAns uintptr = (zScript + uintptr(ii))
 11953  			for jj = 7; (jj < (len - 1)) && (libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(zAns + uintptr(jj)))))) != 0); jj++ {
 11954  			}
 11955  			zAns += uintptr(jj)
 11956  			if (((len - jj) - 1) != (*String)(unsafe.Pointer(bp+360 /* &sResult */)).n) || (libc.Xstrncmp(tls, (*String)(unsafe.Pointer(bp+360 /* &sResult */)).z, zAns, (uint64((len-jj)-1))) != 0) {
 11957  				errorMessage(tls, ts+1246, /* "line %d of %s:\nE..." */
 11958  					libc.VaList(bp+48, prevLine, zFilename, ((len-jj)-1), zAns, (*String)(unsafe.Pointer(bp+360 /* &sResult */)).z))
 11959  			}
 11960  			g.nTest++
 11961  			stringReset(tls, bp+360 /* &sResult */)
 11962  		} else
 11963  
 11964  		//  --glob ANSWER...
 11965  		//  --notglob ANSWER....
 11966  		//
 11967  		// Check to see if output does or does not match the glob pattern
 11968  		// ANSWER.
 11969  		if (libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1291 /* "glob" */) == 0) || (libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1296 /* "notglob" */) == 0) {
 11970  			var jj int32
 11971  			var zAns uintptr = (zScript + uintptr(ii))
 11972  			var zCopy uintptr
 11973  			var isGlob int32 = (libc.Bool32(int32(*(*int8)(unsafe.Pointer(bp + 380 /* &zCmd[0] */))) == 'g'))
 11974  			for jj = (9 - (3 * isGlob)); (jj < (len - 1)) && (libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(zAns + uintptr(jj)))))) != 0); jj++ {
 11975  			}
 11976  			zAns += uintptr(jj)
 11977  			zCopy = sqlite3.Xsqlite3_mprintf(tls, ts+1202 /* "%.*s" */, libc.VaList(bp+88, ((len-jj)-1), zAns))
 11978  			if ((libc.Bool32(sqlite3.Xsqlite3_strglob(tls, zCopy, (*String)(unsafe.Pointer(bp+360 /* &sResult */)).z) == 0)) ^ isGlob) != 0 {
 11979  				errorMessage(tls, ts+1304, /* "line %d of %s:\nE..." */
 11980  					libc.VaList(bp+104, prevLine, zFilename, zCopy, (*String)(unsafe.Pointer(bp+360 /* &sResult */)).z))
 11981  			}
 11982  			sqlite3.Xsqlite3_free(tls, zCopy)
 11983  			g.nTest++
 11984  			stringReset(tls, bp+360 /* &sResult */)
 11985  		} else
 11986  
 11987  		//  --output
 11988  		//
 11989  		// Output the result of the previous SQL.
 11990  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1347 /* "output" */) == 0 {
 11991  			logMessage(tls, ts+438 /* "%s" */, libc.VaList(bp+136, (*String)(unsafe.Pointer(bp+360 /* &sResult */)).z))
 11992  		} else
 11993  
 11994  		//  --source FILENAME
 11995  		//
 11996  		// Run a subscript from a separate file.
 11997  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1354 /* "source" */) == 0 {
 11998  			var zNewFile uintptr
 11999  			var zNewScript uintptr
 12000  			var zToDel uintptr = uintptr(0)
 12001  			zNewFile = (bp + 410 /* &azArg[0] */)
 12002  			if !((int32(*(*int8)(unsafe.Pointer(zNewFile)))) == '/') {
 12003  				var k int32
 12004  				for k = (int32(libc.Xstrlen(tls, zFilename)) - 1); (k >= 0) && !((int32(*(*int8)(unsafe.Pointer(zFilename + uintptr(k))))) == '/'); k-- {
 12005  				}
 12006  				if k > 0 {
 12007  					zNewFile = libc.AssignUintptr(&zToDel, sqlite3.Xsqlite3_mprintf(tls, ts+1361 /* "%.*s/%s" */, libc.VaList(bp+144, k, zFilename, zNewFile)))
 12008  				}
 12009  			}
 12010  			zNewScript = readFile(tls, zNewFile)
 12011  			if g.iTrace != 0 {
 12012  				logMessage(tls, ts+1369 /* "begin script [%s..." */, libc.VaList(bp+168, zNewFile))
 12013  			}
 12014  			runScript(tls, 0, 0, zNewScript, zNewFile)
 12015  			sqlite3.Xsqlite3_free(tls, zNewScript)
 12016  			if g.iTrace != 0 {
 12017  				logMessage(tls, ts+1388 /* "end script [%s]\n" */, libc.VaList(bp+176, zNewFile))
 12018  			}
 12019  			sqlite3.Xsqlite3_free(tls, zToDel)
 12020  		} else
 12021  
 12022  		//  --print MESSAGE....
 12023  		//
 12024  		// Output the remainder of the line to the log file
 12025  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1405 /* "print" */) == 0 {
 12026  			var jj int32
 12027  			for jj = 7; (jj < len) && (libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(zScript + uintptr((ii + jj))))))) != 0); jj++ {
 12028  			}
 12029  			logMessage(tls, ts+1202 /* "%.*s" */, libc.VaList(bp+184, (len-jj), ((zScript+uintptr(ii))+uintptr(jj))))
 12030  		} else
 12031  
 12032  		//  --if EXPR
 12033  		//
 12034  		// Skip forward to the next matching --endif or --else if EXPR is false.
 12035  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1411 /* "if" */) == 0 {
 12036  			var jj int32
 12037  			var rc int32
 12038  			var pStmt uintptr
 12039  			for jj = 4; (jj < len) && (libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(zScript + uintptr((ii + jj))))))) != 0); jj++ {
 12040  			}
 12041  			pStmt = prepareSql(tls, ts+1414 /* "SELECT %.*s" */, libc.VaList(bp+200, (len-jj), ((zScript+uintptr(ii))+uintptr(jj))))
 12042  			rc = sqlite3.Xsqlite3_step(tls, pStmt)
 12043  			if (rc != SQLITE_ROW) || (sqlite3.Xsqlite3_column_int(tls, pStmt, 0) == 0) {
 12044  				ii = ii + (findEndif(tls, ((zScript + uintptr(ii)) + uintptr(len)), 1, bp+376 /* &lineno */))
 12045  			}
 12046  			sqlite3.Xsqlite3_finalize(tls, pStmt)
 12047  		} else
 12048  
 12049  		//  --else
 12050  		//
 12051  		// This command can only be encountered if currently inside an --if that
 12052  		// is true.  Skip forward to the next matching --endif.
 12053  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1426 /* "else" */) == 0 {
 12054  			ii = ii + (findEndif(tls, ((zScript + uintptr(ii)) + uintptr(len)), 0, bp+376 /* &lineno */))
 12055  		} else
 12056  
 12057  		//  --endif
 12058  		//
 12059  		// This command can only be encountered if currently inside an --if that
 12060  		// is true or an --else of a false if.  This is a no-op.
 12061  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1431 /* "endif" */) == 0 {
 12062  			// no-op
 12063  		} else
 12064  
 12065  		//  --start CLIENT
 12066  		//
 12067  		// Start up the given client.
 12068  		if (libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1437 /* "start" */) == 0) && (iClient == 0) {
 12069  			var iNewClient int32 = libc.Xatoi(tls, (bp + 410 /* &azArg[0] */))
 12070  			if iNewClient > 0 {
 12071  				startClient(tls, iNewClient)
 12072  			}
 12073  		} else
 12074  
 12075  		//  --wait CLIENT TIMEOUT
 12076  		//
 12077  		// Wait until all tasks complete for the given client.  If CLIENT is
 12078  		// "all" then wait for all clients to complete.  Wait no longer than
 12079  		// TIMEOUT milliseconds (default 10,000)
 12080  		if (libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1443 /* "wait" */) == 0) && (iClient == 0) {
 12081  			var iTimeout int32
 12082  			if nArg >= 2 {
 12083  				iTimeout = libc.Xatoi(tls, (bp + 410 /* &azArg[0] */ + 1*100))
 12084  			} else {
 12085  				iTimeout = 10000
 12086  			}
 12087  			sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([1000]int8{})), bp+610 /* &zError[0] */, ts+1448, /* "line %d of %s\n" */
 12088  				libc.VaList(bp+216, prevLine, zFilename))
 12089  			waitForClient(tls, libc.Xatoi(tls, (bp+410 /* &azArg[0] */)), iTimeout, bp+610 /* &zError[0] */)
 12090  		} else
 12091  
 12092  		//  --task CLIENT
 12093  		//     <task-content-here>
 12094  		//  --end
 12095  		//
 12096  		// Assign work to a client.  Start the client if it is not running
 12097  		// already.
 12098  		if (libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1463 /* "task" */) == 0) && (iClient == 0) {
 12099  			var iTarget int32 = libc.Xatoi(tls, (bp + 410 /* &azArg[0] */))
 12100  			var iEnd int32
 12101  			var zTask uintptr
 12102  			var zTName uintptr
 12103  			iEnd = findEnd(tls, ((zScript + uintptr(ii)) + uintptr(len)), bp+376 /* &lineno */)
 12104  			if iTarget < 0 {
 12105  				errorMessage(tls, ts+1468, /* "line %d of %s: b..." */
 12106  					libc.VaList(bp+232, prevLine, zFilename, iTarget))
 12107  			} else {
 12108  				zTask = sqlite3.Xsqlite3_mprintf(tls, ts+1202 /* "%.*s" */, libc.VaList(bp+256, iEnd, ((zScript+uintptr(ii))+uintptr(len))))
 12109  				if nArg > 1 {
 12110  					zTName = sqlite3.Xsqlite3_mprintf(tls, ts+438 /* "%s" */, libc.VaList(bp+272, (bp+410 /* &azArg[0] */ +1*100)))
 12111  				} else {
 12112  					zTName = sqlite3.Xsqlite3_mprintf(tls, ts+1505 /* "%s:%d" */, libc.VaList(bp+280, filenameTail(tls, zFilename), prevLine))
 12113  				}
 12114  				startClient(tls, iTarget)
 12115  				runSql(tls,
 12116  					ts+1511 /* "INSERT INTO task..." */, libc.VaList(bp+296, iTarget, zTask, zTName))
 12117  				sqlite3.Xsqlite3_free(tls, zTask)
 12118  				sqlite3.Xsqlite3_free(tls, zTName)
 12119  			}
 12120  			iEnd = iEnd + (tokenLength(tls, (((zScript + uintptr(ii)) + uintptr(len)) + uintptr(iEnd)), bp+376 /* &lineno */))
 12121  			len = len + (iEnd)
 12122  			iBegin = (ii + len)
 12123  		} else
 12124  
 12125  		//  --breakpoint
 12126  		//
 12127  		// This command calls "test_breakpoint()" which is a routine provided
 12128  		// as a convenient place to set a debugger breakpoint.
 12129  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1567 /* "breakpoint" */) == 0 {
 12130  			test_breakpoint(tls)
 12131  		} else
 12132  
 12133  		//  --show-sql-errors BOOLEAN
 12134  		//
 12135  		// Turn display of SQL errors on and off.
 12136  		if libc.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1578 /* "show-sql-errors" */) == 0 {
 12137  			g.bIgnoreSqlErrors = func() int32 {
 12138  				if nArg >= 1 {
 12139  					return libc.BoolInt32(!(booleanValue(tls, (bp+410 /* &azArg[0] */)) != 0))
 12140  				}
 12141  				return 1
 12142  			}()
 12143  		} else {
 12144  			errorMessage(tls, ts+1594, /* "line %d of %s: u..." */
 12145  				libc.VaList(bp+320, prevLine, zFilename, bp+380 /* &zCmd[0] */))
 12146  		}
 12147  		ii = ii + (len)
 12148  	}
 12149  	if iBegin < ii {
 12150  		var zSql uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+1202 /* "%.*s" */, libc.VaList(bp+344, (ii-iBegin), (zScript+uintptr(iBegin))))
 12151  		runSql(tls, zSql, 0)
 12152  		sqlite3.Xsqlite3_free(tls, zSql)
 12153  	}
 12154  	stringFree(tls, bp+360 /* &sResult */)
 12155  }
 12156  
 12157  // Look for a command-line option.  If present, return a pointer.
 12158  // Return NULL if missing.
 12159  //
 12160  // hasArg==0 means the option is a flag.  It is either present or not.
 12161  // hasArg==1 means the option has an argument.  Return a pointer to the
 12162  // argument.
 12163  func findOption(tls *libc.TLS, azArg uintptr, pnArg uintptr, zOption uintptr, hasArg int32) uintptr { /* mptest.c:1201:13: */
 12164  	bp := tls.Alloc(8)
 12165  	defer tls.Free(8)
 12166  
 12167  	var i int32
 12168  	var j int32
 12169  	var zReturn uintptr = uintptr(0)
 12170  	var nArg int32 = *(*int32)(unsafe.Pointer(pnArg))
 12171  
 12172  	for i = 0; i < nArg; i++ {
 12173  		var z uintptr
 12174  		if (i + hasArg) >= nArg {
 12175  			break
 12176  		}
 12177  		z = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8))
 12178  		if int32(*(*int8)(unsafe.Pointer(z))) != '-' {
 12179  			continue
 12180  		}
 12181  		z++
 12182  		if int32(*(*int8)(unsafe.Pointer(z))) == '-' {
 12183  			if int32(*(*int8)(unsafe.Pointer(z + 1))) == 0 {
 12184  				break
 12185  			}
 12186  			z++
 12187  		}
 12188  		if libc.Xstrcmp(tls, z, zOption) == 0 {
 12189  			if (hasArg != 0) && (i == (nArg - 1)) {
 12190  				fatalError(tls, ts+1630 /* "command-line opt..." */, libc.VaList(bp, z))
 12191  			}
 12192  			if hasArg != 0 {
 12193  				zReturn = *(*uintptr)(unsafe.Pointer(azArg + uintptr((i+1))*8))
 12194  			} else {
 12195  				zReturn = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8))
 12196  			}
 12197  			j = ((i + 1) + (libc.Bool32(hasArg != 0)))
 12198  			for j < nArg {
 12199  				*(*uintptr)(unsafe.Pointer(azArg + uintptr(libc.PostIncInt32(&i, 1))*8)) = *(*uintptr)(unsafe.Pointer(azArg + uintptr(libc.PostIncInt32(&j, 1))*8))
 12200  			}
 12201  			*(*int32)(unsafe.Pointer(pnArg)) = i
 12202  			return zReturn
 12203  		}
 12204  	}
 12205  	return zReturn
 12206  }
 12207  
 12208  // Print a usage message for the program and exit
 12209  func usage(tls *libc.TLS, argv0 uintptr) { /* mptest.c:1241:13: */
 12210  	bp := tls.Alloc(8)
 12211  	defer tls.Free(8)
 12212  
 12213  	var i int32
 12214  	var zTail uintptr = argv0
 12215  	for i = 0; *(*int8)(unsafe.Pointer(argv0 + uintptr(i))) != 0; i++ {
 12216  		if (int32(*(*int8)(unsafe.Pointer(argv0 + uintptr(i))))) == '/' {
 12217  			zTail = ((argv0 + uintptr(i)) + uintptr(1))
 12218  		}
 12219  	}
 12220  	libc.Xfprintf(tls, libc.X__stderrp, ts+1678 /* "Usage: %s DATABA..." */, libc.VaList(bp, zTail))
 12221  	libc.Xfprintf(tls, libc.X__stderrp,
 12222  
 12223  		ts+1717 /* "Options:\n   --er..." */, 0)
 12224  	libc.Xexit(tls, 1)
 12225  }
 12226  
 12227  // Report on unrecognized arguments
 12228  func unrecognizedArguments(tls *libc.TLS, argv0 uintptr, nArg int32, azArg uintptr) { /* mptest.c:1265:13: */
 12229  	bp := tls.Alloc(16)
 12230  	defer tls.Free(16)
 12231  
 12232  	var i int32
 12233  	libc.Xfprintf(tls, libc.X__stderrp, ts+2289 /* "%s: unrecognized..." */, libc.VaList(bp, argv0))
 12234  	for i = 0; i < nArg; i++ {
 12235  		libc.Xfprintf(tls, libc.X__stderrp, ts+2317 /* " %s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8))))
 12236  	}
 12237  	libc.Xfprintf(tls, libc.X__stderrp, ts+2321 /* "\n" */, 0)
 12238  	libc.Xexit(tls, 1)
 12239  }
 12240  
 12241  func main1(tls *libc.TLS, argc int32, argv uintptr) int32 { /* mptest.c:1279:18: */
 12242  	bp := tls.Alloc(264)
 12243  	defer tls.Free(264)
 12244  
 12245  	var zClient uintptr
 12246  	var iClient int32
 12247  	// var n int32 at bp+232, 4
 12248  
 12249  	var i int32
 12250  	var openFlags int32 = SQLITE_OPEN_READWRITE
 12251  	var rc int32
 12252  	// var zScript uintptr at bp+240, 8
 12253  
 12254  	// var taskId int32 at bp+248, 4
 12255  
 12256  	var zTrace uintptr
 12257  	var zCOption uintptr
 12258  	var zJMode uintptr
 12259  	var zNRep uintptr
 12260  	var nRep int32 = 1
 12261  	var iRep int32
 12262  	var iTmout int32 = 0 // Default: no timeout
 12263  	var zTmout uintptr
 12264  
 12265  	g.argv0 = *(*uintptr)(unsafe.Pointer(argv))
 12266  	g.iTrace = 1
 12267  	if argc < 2 {
 12268  		usage(tls, *(*uintptr)(unsafe.Pointer(argv)))
 12269  	}
 12270  	g.zDbFile = *(*uintptr)(unsafe.Pointer(argv + 1*8))
 12271  	if strglob(tls, ts+2323 /* "*.test" */, g.zDbFile) != 0 {
 12272  		usage(tls, *(*uintptr)(unsafe.Pointer(argv)))
 12273  	}
 12274  	if libc.Xstrcmp(tls, sqlite3.Xsqlite3_sourceid(tls), ts+2330 /* "2021-06-18 18:36..." */) != 0 {
 12275  		libc.Xfprintf(tls, libc.X__stderrp,
 12276  
 12277  			ts+2415, /* "SQLite library a..." */
 12278  			libc.VaList(bp, sqlite3.Xsqlite3_sourceid(tls), ts+2330 /* "2021-06-18 18:36..." */))
 12279  		libc.Xexit(tls, 1)
 12280  	}
 12281  	*(*int32)(unsafe.Pointer(bp + 232 /* n */)) = (argc - 2)
 12282  	sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([32]int8{})), uintptr(unsafe.Pointer(&g))+64 /* &.zName */, ts+2475 /* "%05d.mptest" */, libc.VaList(bp+16, libc.Xgetpid(tls)))
 12283  	zJMode = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2487 /* "journalmode" */, 1)
 12284  	zNRep = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2499 /* "repeat" */, 1)
 12285  	if zNRep != 0 {
 12286  		nRep = libc.Xatoi(tls, zNRep)
 12287  	}
 12288  	if nRep < 1 {
 12289  		nRep = 1
 12290  	}
 12291  	g.zVfs = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2506 /* "vfs" */, 1)
 12292  	zClient = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2510 /* "client" */, 1)
 12293  	g.zErrLog = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2517 /* "errlog" */, 1)
 12294  	g.zLog = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2524 /* "log" */, 1)
 12295  	zTrace = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2528 /* "trace" */, 1)
 12296  	if zTrace != 0 {
 12297  		g.iTrace = libc.Xatoi(tls, zTrace)
 12298  	}
 12299  	if findOption(tls, (argv+uintptr(2)*8), bp+232 /* &n */, ts+2534 /* "quiet" */, 0) != uintptr(0) {
 12300  		g.iTrace = 0
 12301  	}
 12302  	zTmout = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2540 /* "timeout" */, 1)
 12303  	if zTmout != 0 {
 12304  		iTmout = libc.Xatoi(tls, zTmout)
 12305  	}
 12306  	g.bSqlTrace = (libc.Bool32(findOption(tls, (argv+uintptr(2)*8), bp+232 /* &n */, ts+2548 /* "sqltrace" */, 0) != uintptr(0)))
 12307  	g.bSync = (libc.Bool32(findOption(tls, (argv+uintptr(2)*8), bp+232 /* &n */, ts+2557 /* "sync" */, 0) != uintptr(0)))
 12308  	if g.zErrLog != 0 {
 12309  		g.pErrLog = libc.Xfopen(tls, g.zErrLog, ts+2562 /* "a" */)
 12310  	} else {
 12311  		g.pErrLog = libc.X__stderrp
 12312  	}
 12313  	if g.zLog != 0 {
 12314  		g.pLog = libc.Xfopen(tls, g.zLog, ts+2562 /* "a" */)
 12315  	} else {
 12316  		g.pLog = libc.X__stdoutp
 12317  	}
 12318  
 12319  	sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_LOG, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(&struct {
 12320  		f func(*libc.TLS, uintptr, int32, uintptr)
 12321  	}{sqlErrorCallback})), 0))
 12322  	if zClient != 0 {
 12323  		iClient = libc.Xatoi(tls, zClient)
 12324  		if iClient < 1 {
 12325  			fatalError(tls, ts+2564 /* "illegal client n..." */, libc.VaList(bp+40, iClient))
 12326  		}
 12327  		sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([32]int8{})), uintptr(unsafe.Pointer(&g))+64 /* &.zName */, ts+2591, /* "%05d.client%02d" */
 12328  			libc.VaList(bp+48, libc.Xgetpid(tls), iClient))
 12329  	} else {
 12330  		var nTry int32 = 0
 12331  		if g.iTrace > 0 {
 12332  			libc.Xprintf(tls, ts+2607 /* "BEGIN: %s" */, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(argv))))
 12333  			for i = 1; i < argc; i++ {
 12334  				libc.Xprintf(tls, ts+2317 /* " %s" */, libc.VaList(bp+72, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))))
 12335  			}
 12336  			libc.Xprintf(tls, ts+2321 /* "\n" */, 0)
 12337  			libc.Xprintf(tls, ts+2617 /* "With SQLite 3.36..." */, 0)
 12338  			for i = 0; (libc.AssignUintptr(&zCOption, sqlite3.Xsqlite3_compileoption_get(tls, i))) != uintptr(0); i++ {
 12339  				libc.Xprintf(tls, ts+2722 /* "-DSQLITE_%s\n" */, libc.VaList(bp+80, zCOption))
 12340  			}
 12341  			libc.Xfflush(tls, libc.X__stdoutp)
 12342  		}
 12343  		iClient = 0
 12344  		for ok := true; ok; ok = (((rc != 0) && ((libc.PreIncInt32(&nTry, 1)) < 60)) && (sqlite3.Xsqlite3_sleep(tls, 1000) > 0)) {
 12345  			if (nTry % 5) == 4 {
 12346  				libc.Xprintf(tls, ts+2735, /* "... %strying to ..." */
 12347  					libc.VaList(bp+88, func() uintptr {
 12348  						if nTry > 5 {
 12349  							return ts + 2764 /* "still " */
 12350  						}
 12351  						return ts + 1099 /* "" */
 12352  					}(), g.zDbFile))
 12353  			}
 12354  			rc = libc.Xunlink(tls, g.zDbFile)
 12355  			if (rc != 0) && ((*(*int32)(unsafe.Pointer(libc.X__error(tls)))) == ENOENT) {
 12356  				rc = 0
 12357  			}
 12358  		}
 12359  		if rc != 0 {
 12360  			fatalError(tls, ts+2771, /* "unable to unlink..." */
 12361  				libc.VaList(bp+104, g.zDbFile, nTry))
 12362  		}
 12363  		openFlags = openFlags | (SQLITE_OPEN_CREATE)
 12364  	}
 12365  	rc = sqlite3.Xsqlite3_open_v2(tls, g.zDbFile, (uintptr(unsafe.Pointer(&g)) + 24 /* &.db */), openFlags, g.zVfs)
 12366  	if rc != 0 {
 12367  		fatalError(tls, ts+2812 /* "cannot open [%s]" */, libc.VaList(bp+120, g.zDbFile))
 12368  	}
 12369  	if iTmout > 0 {
 12370  		sqlite3.Xsqlite3_busy_timeout(tls, g.db, iTmout)
 12371  	}
 12372  
 12373  	if zJMode != 0 {
 12374  		runSql(tls, ts+2829 /* "PRAGMA journal_m..." */, libc.VaList(bp+128, zJMode))
 12375  	}
 12376  	if !(g.bSync != 0) {
 12377  		trySql(tls, ts+2853 /* "PRAGMA synchrono..." */, 0)
 12378  	}
 12379  	sqlite3.Xsqlite3_enable_load_extension(tls, g.db, 1)
 12380  	sqlite3.Xsqlite3_busy_handler(tls, g.db, *(*uintptr)(unsafe.Pointer(&struct {
 12381  		f func(*libc.TLS, uintptr, int32) int32
 12382  	}{busyHandler})), uintptr(0))
 12383  	sqlite3.Xsqlite3_create_function(tls, g.db, ts+2876 /* "vfsname" */, 0, SQLITE_UTF8, uintptr(0),
 12384  		*(*uintptr)(unsafe.Pointer(&struct {
 12385  			f func(*libc.TLS, uintptr, int32, uintptr)
 12386  		}{vfsNameFunc})), uintptr(0), uintptr(0))
 12387  	sqlite3.Xsqlite3_create_function(tls, g.db, ts+2884 /* "eval" */, 1, SQLITE_UTF8, uintptr(0),
 12388  		*(*uintptr)(unsafe.Pointer(&struct {
 12389  			f func(*libc.TLS, uintptr, int32, uintptr)
 12390  		}{evalFunc})), uintptr(0), uintptr(0))
 12391  	g.iTimeout = DEFAULT_TIMEOUT
 12392  	if g.bSqlTrace != 0 {
 12393  		sqlite3.Xsqlite3_trace(tls, g.db, *(*uintptr)(unsafe.Pointer(&struct {
 12394  			f func(*libc.TLS, uintptr, uintptr)
 12395  		}{sqlTraceCallback})), uintptr(0))
 12396  	}
 12397  	if iClient > 0 {
 12398  		if *(*int32)(unsafe.Pointer(bp + 232 /* n */)) > 0 {
 12399  			unrecognizedArguments(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*int32)(unsafe.Pointer(bp + 232 /* n */)), (argv + uintptr(2)*8))
 12400  		}
 12401  		if g.iTrace != 0 {
 12402  			logMessage(tls, ts+2889 /* "start-client" */, 0)
 12403  		}
 12404  		for 1 != 0 {
 12405  			*(*uintptr)(unsafe.Pointer(bp + 256 /* zTaskName */)) = uintptr(0)
 12406  			rc = startScript(tls, iClient, bp+240 /* &zScript */, bp+248 /* &taskId */, bp+256 /* &zTaskName */)
 12407  			if rc == SQLITE_DONE {
 12408  				break
 12409  			}
 12410  			if g.iTrace != 0 {
 12411  				logMessage(tls, ts+2902 /* "begin %s (%d)" */, libc.VaList(bp+136, *(*uintptr)(unsafe.Pointer(bp + 256 /* zTaskName */)), *(*int32)(unsafe.Pointer(bp + 248 /* taskId */))))
 12412  			}
 12413  			runScript(tls, iClient, *(*int32)(unsafe.Pointer(bp + 248 /* taskId */)), *(*uintptr)(unsafe.Pointer(bp + 240 /* zScript */)), *(*uintptr)(unsafe.Pointer(bp + 256 /* zTaskName */)))
 12414  			if g.iTrace != 0 {
 12415  				logMessage(tls, ts+2916 /* "end %s (%d)" */, libc.VaList(bp+152, *(*uintptr)(unsafe.Pointer(bp + 256 /* zTaskName */)), *(*int32)(unsafe.Pointer(bp + 248 /* taskId */))))
 12416  			}
 12417  			finishScript(tls, iClient, *(*int32)(unsafe.Pointer(bp + 248 /* taskId */)), 0)
 12418  			sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 256 /* zTaskName */)))
 12419  			sqlite3.Xsqlite3_sleep(tls, 10)
 12420  		}
 12421  		if g.iTrace != 0 {
 12422  			logMessage(tls, ts+2928 /* "end-client" */, 0)
 12423  		}
 12424  	} else {
 12425  		var pStmt uintptr
 12426  		var iTimeout int32
 12427  		if *(*int32)(unsafe.Pointer(bp + 232 /* n */)) == 0 {
 12428  			fatalError(tls, ts+2939 /* "missing script f..." */, 0)
 12429  		}
 12430  		if *(*int32)(unsafe.Pointer(bp + 232 /* n */)) > 1 {
 12431  			unrecognizedArguments(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*int32)(unsafe.Pointer(bp + 232 /* n */)), (argv + uintptr(2)*8))
 12432  		}
 12433  		runSql(tls,
 12434  
 12435  			ts+2963 /* "DROP TABLE IF EX..." */, 0)
 12436  		*(*uintptr)(unsafe.Pointer(bp + 240 /* zScript */)) = readFile(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))
 12437  		for iRep = 1; iRep <= nRep; iRep++ {
 12438  			if g.iTrace != 0 {
 12439  				logMessage(tls, ts+3399 /* "begin script [%s..." */, libc.VaList(bp+168, *(*uintptr)(unsafe.Pointer(argv + 2*8)), iRep))
 12440  			}
 12441  			runScript(tls, 0, 0, *(*uintptr)(unsafe.Pointer(bp + 240 /* zScript */)), *(*uintptr)(unsafe.Pointer(argv + 2*8)))
 12442  			if g.iTrace != 0 {
 12443  				logMessage(tls, ts+3427 /* "end script [%s] ..." */, libc.VaList(bp+184, *(*uintptr)(unsafe.Pointer(argv + 2*8)), iRep))
 12444  			}
 12445  		}
 12446  		sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 240 /* zScript */)))
 12447  		waitForClient(tls, 0, 2000, ts+3453 /* "during shutdown...." */)
 12448  		trySql(tls, ts+3473 /* "UPDATE client SE..." */, 0)
 12449  		sqlite3.Xsqlite3_sleep(tls, 10)
 12450  		g.iTimeout = 0
 12451  		iTimeout = 1000
 12452  		for (((libc.AssignInt32(&rc, trySql(tls, ts+3502 /* "SELECT 1 FROM cl..." */, 0))) == SQLITE_BUSY) ||
 12453  			(rc == SQLITE_ROW)) && (iTimeout > 0) {
 12454  			sqlite3.Xsqlite3_sleep(tls, 10)
 12455  			iTimeout = iTimeout - (10)
 12456  		}
 12457  		sqlite3.Xsqlite3_sleep(tls, 100)
 12458  		pStmt = prepareSql(tls, ts+3523 /* "SELECT nError, n..." */, 0)
 12459  		iTimeout = 1000
 12460  		for ((libc.AssignInt32(&rc, sqlite3.Xsqlite3_step(tls, pStmt))) == SQLITE_BUSY) && (iTimeout > 0) {
 12461  			sqlite3.Xsqlite3_sleep(tls, 10)
 12462  			iTimeout = iTimeout - (10)
 12463  		}
 12464  		if rc == SQLITE_ROW {
 12465  			*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&g)) + 112 /* &.nError */)) += (sqlite3.Xsqlite3_column_int(tls, pStmt, 0))
 12466  			*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&g)) + 116 /* &.nTest */)) += (sqlite3.Xsqlite3_column_int(tls, pStmt, 1))
 12467  		}
 12468  		sqlite3.Xsqlite3_finalize(tls, pStmt)
 12469  	}
 12470  	sqlite3.Xsqlite3_close(tls, g.db)
 12471  	maybeClose(tls, g.pLog)
 12472  	maybeClose(tls, g.pErrLog)
 12473  	if iClient == 0 {
 12474  		libc.Xprintf(tls, ts+3558 /* "Summary: %d erro..." */, libc.VaList(bp+200, g.nError, g.nTest))
 12475  		libc.Xprintf(tls, ts+3594 /* "END: %s" */, libc.VaList(bp+216, *(*uintptr)(unsafe.Pointer(argv))))
 12476  		for i = 1; i < argc; i++ {
 12477  			libc.Xprintf(tls, ts+2317 /* " %s" */, libc.VaList(bp+224, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))))
 12478  		}
 12479  		libc.Xprintf(tls, ts+2321 /* "\n" */, 0)
 12480  	}
 12481  	return (libc.Bool32(g.nError > 0))
 12482  }
 12483  
 12484  var ts1 = "%s%.*s\n\x00%s:ERROR: \x00%s:FATAL: \x00UPDATE client SET wantHalt=1;\x00%s: \x00main\x00timeout after %dms\x00[%.*s]\x00(info) %s\x00(errcode=%d) %s\x00%s\n%s\n\x00out of memory\x00 \x00nil\x00'\x00error(%d)\x00BEGIN IMMEDIATE\x00in startScript: %s\x00UPDATE counters SET nError=nError+%d, nTest=nTest+%d\x00SELECT 1 FROM client WHERE id=%d AND wantHalt\x00DELETE FROM client WHERE id=%d\x00COMMIT TRANSACTION;\x00SELECT script, id, name FROM task WHERE client=%d AND starttime IS NULL ORDER BY id LIMIT 1\x00%s\x00UPDATE task   SET starttime=strftime('%%Y-%%m-%%d %%H:%%M:%%f','now') WHERE id=%d;\x00Waited over 30 seconds with no work.  Giving up.\x00DELETE FROM client WHERE id=%d; COMMIT;\x00COMMIT\x00UPDATE task   SET endtime=strftime('%%Y-%%m-%%d %%H:%%M:%%f','now') WHERE id=%d;\x00INSERT OR IGNORE INTO client VALUES(%d,0)\x00%s \"%s\" --client %d --trace %d\x00%z --sqltrace\x00%z --sync\x00%z --vfs \"%s\"\x00system('%q')\x00%z &\x00system() fails with error code %d\x00rb\x00cannot open \"%s\" for reading\x00--end\x00--endif\x00--else\x00--if\x00SELECT 1 FROM task WHERE client=%d   AND client IN (SELECT id FROM client)  AND endtime IS NULL\x00SELECT 1 FROM task WHERE client IN (SELECT id FROM client)   AND endtime IS NULL\x00\x00%stimeout waiting for client %d\x00%stimeout waiting for all clients\x00on\x00yes\x00off\x00no\x00unknown boolean: [%s]\x00%.*s\x00sleep\x00exit\x00testcase\x00finish\x00reset\x00match\x00line %d of %s:\nExpected [%.*s]\n     Got [%s]\x00glob\x00notglob\x00line %d of %s:\nExpected [%s]\n     Got [%s]\x00output\x00source\x00%.*s/%s\x00begin script [%s]\n\x00end script [%s]\n\x00print\x00if\x00SELECT %.*s\x00else\x00endif\x00start\x00wait\x00line %d of %s\n\x00task\x00line %d of %s: bad client number: %d\x00%s:%d\x00INSERT INTO task(client,script,name) VALUES(%d,'%q',%Q)\x00breakpoint\x00show-sql-errors\x00line %d of %s: unknown command --%s\x00command-line option \"--%s\" requires an argument\x00Usage: %s DATABASE ?OPTIONS? ?SCRIPT?\n\x00Options:\n   --errlog FILENAME           Write errors to FILENAME\n   --journalmode MODE          Use MODE as the journal_mode\n   --log FILENAME              Log messages to FILENAME\n   --quiet                     Suppress unnecessary output\n   --vfs NAME                  Use NAME as the VFS\n   --repeat N                  Repeat the test N times\n   --sqltrace                  Enable SQL tracing\n   --sync                      Enable synchronous disk writes\n   --timeout MILLISEC          Busy timeout is MILLISEC\n   --trace BOOLEAN             Enable or disable tracing\n\x00%s: unrecognized arguments:\x00 %s\x00\n\x00*.test\x002021-06-18 18:36:39 5c9a6c06871cb9fe42814af9c039eb6da5427a6ec28f187af7ebfb62eafa66e5\x00SQLite library and header mismatch\nLibrary: %s\nHeader:  %s\n\x00%05d.mptest\x00journalmode\x00repeat\x00vfs\x00client\x00errlog\x00log\x00trace\x00quiet\x00timeout\x00sqltrace\x00sync\x00a\x00illegal client number: %d\n\x00%05d.client%02d\x00BEGIN: %s\x00With SQLite 3.36.0 2021-06-18 18:36:39 5c9a6c06871cb9fe42814af9c039eb6da5427a6ec28f187af7ebfb62eafa66e5\n\x00-DSQLITE_%s\n\x00... %strying to unlink '%s'\n\x00still \x00unable to unlink '%s' after %d attempts\n\x00cannot open [%s]\x00PRAGMA journal_mode=%Q;\x00PRAGMA synchronous=OFF\x00vfsname\x00eval\x00start-client\x00begin %s (%d)\x00end %s (%d)\x00end-client\x00missing script filename\x00DROP TABLE IF EXISTS task;\nDROP TABLE IF EXISTS counters;\nDROP TABLE IF EXISTS client;\nCREATE TABLE task(\n  id INTEGER PRIMARY KEY,\n  name TEXT,\n  client INTEGER,\n  starttime DATE,\n  endtime DATE,\n  script TEXT\n);CREATE INDEX task_i1 ON task(client, starttime);\nCREATE INDEX task_i2 ON task(client, endtime);\nCREATE TABLE counters(nError,nTest);\nINSERT INTO counters VALUES(0,0);\nCREATE TABLE client(id INTEGER PRIMARY KEY, wantHalt);\n\x00begin script [%s] cycle %d\n\x00end script [%s] cycle %d\n\x00during shutdown...\n\x00UPDATE client SET wantHalt=1\x00SELECT 1 FROM client\x00SELECT nError, nTest FROM counters\x00Summary: %d errors out of %d tests\n\x00END: %s\x00"
 12485  var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data