peachsim 0.1.1674 → 0.1.1684
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/commands/control.ts +13 -1
- package/cli/commands/coverage-swift.ts +83 -27
- package/cli/commands/coverage.ts +219 -20
- package/cli/commands/detect.ts +10 -6
- package/cli/commands/inspect/core.ts +2 -0
- package/cli/commands/inspect/wait-ready.ts +7 -0
- package/cli/outbound-endpoints.ts +12 -0
- package/detox/index.ts +11 -1
- package/detox/jest-environment.cjs +14 -0
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +3274 -1663
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +6 -4
- package/dist-lib/detox/jest-environment.cjs +14 -0
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +2407 -1126
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +2879 -1598
- package/dist-lib/host/fetch-proxy-handler.cjs +18 -5
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1904 -741
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +6215 -4283
- package/dist-lib/native-app-identity-project.cjs +31 -6
- package/dist-lib/native-app-identity-project.mjs +31 -6
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -23
- package/dist-lib/public-origins-lib-static.json +1 -1
- package/dist-lib/public-origins-lib.json +134 -78
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +2 -2
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +2 -1
- package/dist-lib/sdk.mjs +2 -1
- package/dist-lib/skills.cjs +3570 -2160
- package/dist-lib/swift-compile.cjs +473 -351
- package/dist-lib/swift-compile.mjs +471 -349
- package/dist-lib/swift-package.cjs +36 -6
- package/dist-lib/swift-package.mjs +35 -6
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +26 -11
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +2418 -1132
- package/dist-lib/vite.cjs +1907 -766
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +9 -1
- package/dist-types/packages/peach-engine/src/preview/upload-protocol.d.ts +11 -3
- package/dist-types/packages/peach-engine/src/webview-automation-host.d.ts +6 -0
- package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +2 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +51 -2
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +21 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFComposeAssistantViewController.h +29 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeControllerDeferredAction.h +14 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeViewController.h +162 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailDraft.h +24 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController+UPI.h +31 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController.h +169 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MessageUI.h +13 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Modules/module.modulemap +11 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +10 -0
- package/sdk/ios/usr/include/arm/param.h +151 -0
- package/sdk/ios/usr/include/dispatch/dispatch.h +3 -0
- package/sdk/ios/usr/include/dlfcn.h +1 -2
- package/sdk/ios/usr/include/machine/param.h +42 -0
- package/sdk/ios/usr/include/net/if.h +1 -2
- package/sdk/ios/usr/include/peach/pthread.h +4 -4
- package/sdk/ios/usr/include/pthread/qos.h +304 -0
- package/sdk/ios/usr/include/sys/_types/_fd_clr.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_copy.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_def.h +121 -0
- package/sdk/ios/usr/include/sys/_types/_fd_isset.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_set.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_setsize.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_zero.h +31 -0
- package/sdk/ios/usr/include/sys/cdefs.h +3 -0
- package/sdk/ios/usr/include/sys/param.h +235 -0
- package/sdk/ios/usr/include/sys/proc.h +1 -0
- package/sdk/ios/usr/include/sys/qos.h +151 -12
- package/sdk/ios/wasm/include/__typedef_sigset_t.h +7 -0
- package/sdk/ios/wasm/include/fcntl.h +11 -0
- package/sdk/ios/wasm/include/mach/machine/boolean.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/exception.h +5 -0
- package/sdk/ios/wasm/include/mach/machine/kern_return.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/processor_info.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/rpc.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/thread_state.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/thread_status.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/vm_param.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/vm_types.h +18 -0
- package/sdk/ios/wasm/include/machine/_types.h +153 -0
- package/sdk/ios/wasm/include/machine/endian.h +2 -0
- package/sdk/ios/wasm/include/machine/limits.h +2 -0
- package/sdk/ios/wasm/include/machine/types.h +30 -0
- package/sdk/ios/wasm/include/poll.h +8 -0
- package/sdk/ios/wasm/include/pthread.h +50 -0
- package/sdk/ios/wasm/include/signal.h +72 -0
- package/sdk/ios/wasm/include/stdlib.h +3 -0
- package/sdk/ios/wasm/include/string.h +10 -0
- package/sdk/ios/wasm/include/sys/_pthread/_pthread_attr_t.h +7 -0
- package/sdk/ios/wasm/include/sys/_pthread/_pthread_t.h +7 -0
- package/sdk/ios/wasm/include/sys/mman.h +122 -0
- package/sdk/ios/wasm/include/sys/select.h +37 -0
- package/sdk/ios/wasm/include/sys/signal.h +259 -0
- package/sdk/ios/wasm/include/sys/socket.h +8 -0
- package/sdk/ios/wasm/include/sys/types.h +14 -0
- package/sdk/ios/wasm/include/sys/ucontext.h +1 -0
- package/sdk/ios/wasm/include/sys/uio.h +11 -0
- package/sdk/ios/wasm/include/sys/wait.h +89 -0
- package/sdk/ios/wasm/include/time.h +8 -0
- package/sdk/ios/wasm/include/unistd.h +17 -0
- package/src/bridge-contract.ts +2 -0
- package/src/chromium-admission.ts +10 -5
- package/src/device-catalog.ts +4 -4
- package/src/host/fetch-proxy-handler.ts +20 -0
- package/src/metro-plugin.ts +5 -2
- package/src/nitro-adapter.lock.json +6 -6
- package/src/nitro-compile.ts +63 -2
- package/src/numbered-lock.ts +72 -0
- package/src/react-native-coverage/capability-reference-resolution.ts +62 -5
- package/src/react-native-coverage/capability-source-references.ts +50 -13
- package/src/react-native-coverage/native-source-credit.ts +126 -0
- package/src/react-native-coverage/native-source-ranges-file.ts +38 -0
- package/src/react-native-coverage/native-surface.ts +49 -0
- package/src/react-native-coverage/verified-reach.ts +22 -2
- package/src/runtime-assets.ts +17 -0
- package/src/swift-compile.ts +84 -48
- package/src/swift-coverage/indexing.ts +17 -1
- package/src/swift-coverage/sdk.ts +71 -0
- package/src/swift-coverage/source.ts +74 -2
- package/src/swift-coverage/types.ts +6 -0
- package/src/swift-distribution.lock.json +12 -12
- package/src/swift-host.ts +133 -14
- package/src/swift-objc-compile.ts +6 -21
- package/src/swift-objc-metadata.ts +2 -8
- package/src/swift-objc-platform.ts +53 -0
- package/src/swift-objc-standin.ts +45 -1
- package/src/swift-package-manifest.ts +48 -3
- package/src/swift-package.ts +59 -9
- package/src/swift-packages.ts +157 -44
- package/src/swift-source-pods.ts +288 -0
- package/src/swift-toolchain.ts +32 -10
- package/src/vite-plugin-one.ts +5 -4
- package/src/worker-system-chunks.ts +7 -1
- package/src/xcode-project.ts +40 -11
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
|
5
|
+
*
|
|
6
|
+
* This file contains Original Code and/or Modifications of Original Code
|
|
7
|
+
* as defined in and that are subject to the Apple Public Source License
|
|
8
|
+
* Version 2.0 (the 'License'). You may not use this file except in
|
|
9
|
+
* compliance with the License. The rights granted to you under the License
|
|
10
|
+
* may not be used to create, or enable the creation or redistribution of,
|
|
11
|
+
* unlawful or unlicensed copies of an Apple operating system, or to
|
|
12
|
+
* circumvent, violate, or enable the circumvention or violation of, any
|
|
13
|
+
* terms of an Apple operating system software license agreement.
|
|
14
|
+
*
|
|
15
|
+
* Please obtain a copy of the License at
|
|
16
|
+
* http://www.opensource.apple.com/apsl/ and read it before using this file.
|
|
17
|
+
*
|
|
18
|
+
* The Original Code and all software distributed under the License are
|
|
19
|
+
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
|
20
|
+
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
|
21
|
+
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
|
23
|
+
* Please see the License for the specific language governing rights and
|
|
24
|
+
* limitations under the License.
|
|
25
|
+
*
|
|
26
|
+
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
|
27
|
+
*/
|
|
28
|
+
/* Copyright (c) 1995, 1997 Apple Computer, Inc. All Rights Reserved */
|
|
29
|
+
/*-
|
|
30
|
+
* Copyright (c) 1982, 1986, 1989, 1993
|
|
31
|
+
* The Regents of the University of California. All rights reserved.
|
|
32
|
+
* (c) UNIX System Laboratories, Inc.
|
|
33
|
+
* All or some portions of this file are derived from material licensed
|
|
34
|
+
* to the University of California by American Telephone and Telegraph
|
|
35
|
+
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
|
36
|
+
* the permission of UNIX System Laboratories, Inc.
|
|
37
|
+
*
|
|
38
|
+
* Redistribution and use in source and binary forms, with or without
|
|
39
|
+
* modification, are permitted provided that the following conditions
|
|
40
|
+
* are met:
|
|
41
|
+
* 1. Redistributions of source code must retain the above copyright
|
|
42
|
+
* notice, this list of conditions and the following disclaimer.
|
|
43
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
|
44
|
+
* notice, this list of conditions and the following disclaimer in the
|
|
45
|
+
* documentation and/or other materials provided with the distribution.
|
|
46
|
+
* 3. All advertising materials mentioning features or use of this software
|
|
47
|
+
* must display the following acknowledgement:
|
|
48
|
+
* This product includes software developed by the University of
|
|
49
|
+
* California, Berkeley and its contributors.
|
|
50
|
+
* 4. Neither the name of the University nor the names of its contributors
|
|
51
|
+
* may be used to endorse or promote products derived from this software
|
|
52
|
+
* without specific prior written permission.
|
|
53
|
+
*
|
|
54
|
+
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
55
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
56
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
57
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
58
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
59
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
60
|
+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
61
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
62
|
+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
63
|
+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
64
|
+
* SUCH DAMAGE.
|
|
65
|
+
*
|
|
66
|
+
* @(#)param.h 8.3 (Berkeley) 4/4/95
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
#ifndef _SYS_PARAM_H_
|
|
70
|
+
#define _SYS_PARAM_H_
|
|
71
|
+
|
|
72
|
+
#define BSD 199506 /* System version (year & month). */
|
|
73
|
+
#define BSD4_3 1
|
|
74
|
+
#define BSD4_4 1
|
|
75
|
+
|
|
76
|
+
#define NeXTBSD 1995064 /* NeXTBSD version (year, month, release) */
|
|
77
|
+
#define NeXTBSD4_0 0 /* NeXTBSD 4.0 */
|
|
78
|
+
|
|
79
|
+
#include <sys/_types.h>
|
|
80
|
+
#include <sys/_types/_null.h>
|
|
81
|
+
|
|
82
|
+
#ifndef LOCORE
|
|
83
|
+
#include <sys/types.h>
|
|
84
|
+
#endif
|
|
85
|
+
|
|
86
|
+
/*
|
|
87
|
+
* Machine-independent constants (some used in following include files).
|
|
88
|
+
* Redefined constants are from POSIX 1003.1 limits file.
|
|
89
|
+
*
|
|
90
|
+
* MAXCOMLEN should be >= sizeof(ac_comm) (see <acct.h>)
|
|
91
|
+
* MAXLOGNAME should be >= UT_NAMESIZE (see <utmp.h>)
|
|
92
|
+
*/
|
|
93
|
+
#include <sys/syslimits.h>
|
|
94
|
+
|
|
95
|
+
#define MAXCOMLEN 16 /* max command name remembered */
|
|
96
|
+
#define MAXINTERP 64 /* max interpreter file name length */
|
|
97
|
+
#define MAXLOGNAME 255 /* max login name length */
|
|
98
|
+
#define MAXUPRC CHILD_MAX /* max simultaneous processes */
|
|
99
|
+
#define NCARGS ARG_MAX /* max bytes for an exec function */
|
|
100
|
+
#define NGROUPS NGROUPS_MAX /* max number groups */
|
|
101
|
+
#define NOFILE 256 /* default max open files per process */
|
|
102
|
+
#define NOGROUP 65535 /* marker for empty group set member */
|
|
103
|
+
#define MAXHOSTNAMELEN 256 /* max hostname size */
|
|
104
|
+
#define MAXDOMNAMELEN 256 /* maximum domain name length */
|
|
105
|
+
|
|
106
|
+
/* Machine type dependent parameters. */
|
|
107
|
+
#include <machine/param.h>
|
|
108
|
+
|
|
109
|
+
/* More types and definitions used throughout the kernel. */
|
|
110
|
+
#include <limits.h>
|
|
111
|
+
|
|
112
|
+
/* Signals. */
|
|
113
|
+
#include <sys/signal.h>
|
|
114
|
+
|
|
115
|
+
/*
|
|
116
|
+
* Priorities. Note that with 32 run queues, differences less than 4 are
|
|
117
|
+
* insignificant.
|
|
118
|
+
*/
|
|
119
|
+
#define PSWP 0
|
|
120
|
+
#define PVM 4
|
|
121
|
+
#define PINOD 8
|
|
122
|
+
#define PRIBIO 16
|
|
123
|
+
#define PVFS 20
|
|
124
|
+
#define PZERO 22 /* No longer magic, shouldn't be here. XXX */
|
|
125
|
+
#define PSOCK 24
|
|
126
|
+
#define PWAIT 32
|
|
127
|
+
#define PLOCK 36
|
|
128
|
+
#define PPAUSE 40
|
|
129
|
+
#define PUSER 50
|
|
130
|
+
#define MAXPRI 127 /* Priorities range from 0 through MAXPRI. */
|
|
131
|
+
|
|
132
|
+
#define PRIMASK 0x0ff
|
|
133
|
+
#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */
|
|
134
|
+
#define PTTYBLOCK 0x200 /* for tty SIGTTOU and SIGTTIN blocking */
|
|
135
|
+
#define PDROP 0x400 /* OR'd with pri to stop re-aquistion of mutex upon wakeup */
|
|
136
|
+
#define PSPIN 0x800 /* OR'd with pri to require mutex in spin mode upon wakeup */
|
|
137
|
+
|
|
138
|
+
#define NBPW sizeof(int) /* number of bytes per word (integer) */
|
|
139
|
+
|
|
140
|
+
#define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */
|
|
141
|
+
#define NODEV (dev_t)(-1) /* non-existent device */
|
|
142
|
+
|
|
143
|
+
/*
|
|
144
|
+
* Clustering of hardware pages on machines with ridiculously small
|
|
145
|
+
* page sizes is done here. The paging subsystem deals with units of
|
|
146
|
+
* CLSIZE pte's describing NBPG (from machine/param.h) pages each.
|
|
147
|
+
*/
|
|
148
|
+
#define CLBYTES (CLSIZE*NBPG)
|
|
149
|
+
#define CLOFSET (CLSIZE*NBPG-1) /* for clusters, like PGOFSET */
|
|
150
|
+
#define claligned(x) ((((int)(x))&CLOFSET)==0)
|
|
151
|
+
#define CLOFF CLOFSET
|
|
152
|
+
#define CLSHIFT (PGSHIFT+CLSIZELOG2)
|
|
153
|
+
|
|
154
|
+
#if CLSIZE == 1
|
|
155
|
+
#define clbase(i) (i)
|
|
156
|
+
#define clrnd(i) (i)
|
|
157
|
+
#else
|
|
158
|
+
/* Give the base virtual address (first of CLSIZE). */
|
|
159
|
+
#define clbase(i) ((i) &~ (CLSIZE-1))
|
|
160
|
+
/* Round a number of clicks up to a whole cluster. */
|
|
161
|
+
#define clrnd(i) (((i) + (CLSIZE-1)) &~ (CLSIZE-1))
|
|
162
|
+
#endif
|
|
163
|
+
|
|
164
|
+
#define CBLOCK 64 /* Clist block size, must be a power of 2. */
|
|
165
|
+
#define CBQSIZE (CBLOCK/NBBY) /* Quote bytes/cblock - can do better. */
|
|
166
|
+
/* Data chars/clist. */
|
|
167
|
+
#define CBSIZE (CBLOCK - sizeof(struct cblock *) - CBQSIZE)
|
|
168
|
+
#define CROUND (CBLOCK - 1) /* Clist rounding. */
|
|
169
|
+
|
|
170
|
+
/*
|
|
171
|
+
* File system parameters and macros.
|
|
172
|
+
*
|
|
173
|
+
* The file system is made out of blocks of at most MAXPHYS units, with
|
|
174
|
+
* smaller units (fragments) only in the last direct block. MAXBSIZE
|
|
175
|
+
* primarily determines the size of buffers in the buffer pool. It may be
|
|
176
|
+
* made larger than MAXPHYS without any effect on existing file systems;
|
|
177
|
+
* however making it smaller may make some file systems unmountable.
|
|
178
|
+
* We set this to track the value of MAX_UPL_TRANSFER_BYTES from
|
|
179
|
+
* osfmk/mach/memory_object_types.h to bound it at the maximum UPL size.
|
|
180
|
+
*/
|
|
181
|
+
#define MAXBSIZE (256 * 4096)
|
|
182
|
+
#define MAXPHYSIO MAXPHYS
|
|
183
|
+
#define MAXFRAG 8
|
|
184
|
+
|
|
185
|
+
#define MAXPHYSIO_WIRED (16 * 1024 * 1024)
|
|
186
|
+
|
|
187
|
+
/*
|
|
188
|
+
* MAXPATHLEN defines the longest permissable path length after expanding
|
|
189
|
+
* symbolic links. It is used to allocate a temporary buffer from the buffer
|
|
190
|
+
* pool in which to do the name expansion, hence should be a power of two,
|
|
191
|
+
* and must be less than or equal to MAXBSIZE. MAXSYMLINKS defines the
|
|
192
|
+
* maximum number of symbolic links that may be expanded in a path name.
|
|
193
|
+
* It should be set high enough to allow all legitimate uses, but halt
|
|
194
|
+
* infinite loops reasonably quickly.
|
|
195
|
+
*/
|
|
196
|
+
#define MAXPATHLEN PATH_MAX
|
|
197
|
+
#define MAXSYMLINKS 32
|
|
198
|
+
|
|
199
|
+
/* Bit map related macros. */
|
|
200
|
+
#define setbit(a, i) (((unsigned char *)(a))[(i)/NBBY] |= 1u<<((i)%NBBY))
|
|
201
|
+
#define clrbit(a, i) (((unsigned char *)(a))[(i)/NBBY] &= ~(1u<<((i)%NBBY)))
|
|
202
|
+
#define isset(a, i) (((unsigned char *)(a))[(i)/NBBY] & (1u<<((i)%NBBY)))
|
|
203
|
+
#define isclr(a, i) ((((unsigned char *)(a))[(i)/NBBY] & (1u<<((i)%NBBY))) == 0)
|
|
204
|
+
|
|
205
|
+
/* Macros for counting, rounding. */
|
|
206
|
+
#ifndef howmany
|
|
207
|
+
#define howmany(x, y) ((((x) % (y)) == 0) ? ((x) / (y)) : (((x) / (y)) + 1))
|
|
208
|
+
#endif
|
|
209
|
+
#define roundup(x, y) ((((x) % (y)) == 0) ? \
|
|
210
|
+
(x) : ((x) + ((y) - ((x) % (y)))))
|
|
211
|
+
#define powerof2(x) ((((x)-1)&(x))==0)
|
|
212
|
+
|
|
213
|
+
/* Macros for min/max. */
|
|
214
|
+
#ifndef MIN
|
|
215
|
+
#define MIN(a, b) (((a)<(b))?(a):(b))
|
|
216
|
+
#endif /* MIN */
|
|
217
|
+
#ifndef MAX
|
|
218
|
+
#define MAX(a, b) (((a)>(b))?(a):(b))
|
|
219
|
+
#endif /* MAX */
|
|
220
|
+
|
|
221
|
+
/*
|
|
222
|
+
* Scale factor for scaled integers used to count %cpu time and load avgs.
|
|
223
|
+
*
|
|
224
|
+
* The number of CPU `tick's that map to a unique `%age' can be expressed
|
|
225
|
+
* by the formula (1 / (2 ^ (FSHIFT - 11))). The maximum load average that
|
|
226
|
+
* can be calculated (assuming 32 bits) can be closely approximated using
|
|
227
|
+
* the formula (2 ^ (2 * (16 - FSHIFT))) for (FSHIFT < 15).
|
|
228
|
+
*
|
|
229
|
+
* For the scheduler to maintain a 1:1 mapping of CPU `tick' to `%age',
|
|
230
|
+
* FSHIFT must be at least 11; this gives us a maximum load avg of ~1024.
|
|
231
|
+
*/
|
|
232
|
+
#define FSHIFT 11 /* bits to right of fixed binary point */
|
|
233
|
+
#define FSCALE (1<<FSHIFT)
|
|
234
|
+
|
|
235
|
+
#endif /* _SYS_PARAM_H_ */
|
|
@@ -1,7 +1,115 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2013-2014 Apple Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* @APPLE_LICENSE_HEADER_START@
|
|
5
|
+
*
|
|
6
|
+
* This file contains Original Code and/or Modifications of Original Code
|
|
7
|
+
* as defined in and that are subject to the Apple Public Source License
|
|
8
|
+
* Version 2.0 (the 'License'). You may not use this file except in
|
|
9
|
+
* compliance with the License. Please obtain a copy of the License at
|
|
10
|
+
* http://www.opensource.apple.com/apsl/ and read it before using this
|
|
11
|
+
* file.
|
|
12
|
+
*
|
|
13
|
+
* The Original Code and all software distributed under the License are
|
|
14
|
+
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
|
15
|
+
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
|
16
|
+
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
|
18
|
+
* Please see the License for the specific language governing rights and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*
|
|
21
|
+
* @APPLE_LICENSE_HEADER_END@
|
|
22
|
+
*/
|
|
23
|
+
|
|
1
24
|
#ifndef _SYS_QOS_H
|
|
2
25
|
#define _SYS_QOS_H
|
|
3
26
|
|
|
4
|
-
#include <
|
|
27
|
+
#include <sys/cdefs.h>
|
|
28
|
+
#include <Availability.h>
|
|
29
|
+
|
|
30
|
+
/*!
|
|
31
|
+
* @typedef qos_class_t
|
|
32
|
+
*
|
|
33
|
+
* @abstract
|
|
34
|
+
* An abstract thread quality of service (QOS) classification.
|
|
35
|
+
*
|
|
36
|
+
* @discussion
|
|
37
|
+
* Thread quality of service (QOS) classes are ordered abstract representations
|
|
38
|
+
* of the nature of work that is expected to be performed by a pthread, dispatch
|
|
39
|
+
* queue, or NSOperation. Each class specifies a maximum thread scheduling
|
|
40
|
+
* priority for that band (which may be used in combination with a relative
|
|
41
|
+
* priority offset within the band), as well as quality of service
|
|
42
|
+
* characteristics for timer latency, CPU throughput, I/O throughput, network
|
|
43
|
+
* socket traffic management behavior and more.
|
|
44
|
+
*
|
|
45
|
+
* A best effort is made to allocate available system resources to every QOS
|
|
46
|
+
* class. Quality of service degredation only occurs during system resource
|
|
47
|
+
* contention, proportionally to the QOS class. That said, QOS classes
|
|
48
|
+
* representing user-initiated work attempt to achieve peak throughput while
|
|
49
|
+
* QOS classes for other work attempt to achieve peak energy and thermal
|
|
50
|
+
* efficiency, even in the absence of contention. Finally, the use of QOS
|
|
51
|
+
* classes does not allow threads to supersede any limits that may be applied
|
|
52
|
+
* to the overall process.
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
/*!
|
|
56
|
+
* @constant QOS_CLASS_USER_INTERACTIVE
|
|
57
|
+
* @abstract A QOS class which indicates work performed by this thread
|
|
58
|
+
* is interactive with the user.
|
|
59
|
+
* @discussion Such work is requested to run at high priority relative to other
|
|
60
|
+
* work on the system. Specifying this QOS class is a request to run with
|
|
61
|
+
* nearly all available system CPU and I/O bandwidth even under contention.
|
|
62
|
+
* This is not an energy-efficient QOS class to use for large tasks. The use of
|
|
63
|
+
* this QOS class should be limited to critical interaction with the user such
|
|
64
|
+
* as handling events on the main event loop, view drawing, animation, etc.
|
|
65
|
+
*
|
|
66
|
+
* @constant QOS_CLASS_USER_INITIATED
|
|
67
|
+
* @abstract A QOS class which indicates work performed by this thread
|
|
68
|
+
* was initiated by the user and that the user is likely waiting for the
|
|
69
|
+
* results.
|
|
70
|
+
* @discussion Such work is requested to run at a priority below critical user-
|
|
71
|
+
* interactive work, but relatively higher than other work on the system. This
|
|
72
|
+
* is not an energy-efficient QOS class to use for large tasks. Its use
|
|
73
|
+
* should be limited to operations of short enough duration that the user is
|
|
74
|
+
* unlikely to switch tasks while waiting for the results. Typical
|
|
75
|
+
* user-initiated work will have progress indicated by the display of
|
|
76
|
+
* placeholder content or modal user interface.
|
|
77
|
+
*
|
|
78
|
+
* @constant QOS_CLASS_DEFAULT
|
|
79
|
+
* @abstract A default QOS class used by the system in cases where more specific
|
|
80
|
+
* QOS class information is not available.
|
|
81
|
+
* @discussion Such work is requested to run at a priority below critical user-
|
|
82
|
+
* interactive and user-initiated work, but relatively higher than utility and
|
|
83
|
+
* background tasks. Threads created by pthread_create() without an attribute
|
|
84
|
+
* specifying a QOS class will default to QOS_CLASS_DEFAULT. This QOS class
|
|
85
|
+
* value is not intended to be used as a work classification, it should only be
|
|
86
|
+
* set when propagating or restoring QOS class values provided by the system.
|
|
87
|
+
*
|
|
88
|
+
* @constant QOS_CLASS_UTILITY
|
|
89
|
+
* @abstract A QOS class which indicates work performed by this thread
|
|
90
|
+
* may or may not be initiated by the user and that the user is unlikely to be
|
|
91
|
+
* immediately waiting for the results.
|
|
92
|
+
* @discussion Such work is requested to run at a priority below critical user-
|
|
93
|
+
* interactive and user-initiated work, but relatively higher than low-level
|
|
94
|
+
* system maintenance tasks. The use of this QOS class indicates the work
|
|
95
|
+
* should be run in an energy and thermally-efficient manner. The progress of
|
|
96
|
+
* utility work may or may not be indicated to the user, but the effect of such
|
|
97
|
+
* work is user-visible.
|
|
98
|
+
*
|
|
99
|
+
* @constant QOS_CLASS_BACKGROUND
|
|
100
|
+
* @abstract A QOS class which indicates work performed by this thread was not
|
|
101
|
+
* initiated by the user and that the user may be unaware of the results.
|
|
102
|
+
* @discussion Such work is requested to run at a priority below other work.
|
|
103
|
+
* The use of this QOS class indicates the work should be run in the most energy
|
|
104
|
+
* and thermally-efficient manner.
|
|
105
|
+
*
|
|
106
|
+
* @constant QOS_CLASS_UNSPECIFIED
|
|
107
|
+
* @abstract A QOS class value which indicates the absence or removal of QOS
|
|
108
|
+
* class information.
|
|
109
|
+
* @discussion As an API return value, may indicate that threads or pthread
|
|
110
|
+
* attributes were configured with legacy API incompatible or in conflict with
|
|
111
|
+
* the QOS class system.
|
|
112
|
+
*/
|
|
5
113
|
|
|
6
114
|
#define __QOS_ENUM(name, type, ...) enum { __VA_ARGS__ }; typedef type name##_t
|
|
7
115
|
#define __QOS_CLASS_AVAILABLE(...)
|
|
@@ -15,7 +123,7 @@
|
|
|
15
123
|
#endif
|
|
16
124
|
#if __has_feature(enumerator_attributes)
|
|
17
125
|
#undef __QOS_CLASS_AVAILABLE
|
|
18
|
-
#define __QOS_CLASS_AVAILABLE
|
|
126
|
+
#define __QOS_CLASS_AVAILABLE __API_AVAILABLE
|
|
19
127
|
#endif
|
|
20
128
|
#endif
|
|
21
129
|
|
|
@@ -36,26 +144,57 @@ __QOS_ENUM(qos_class, unsigned int,
|
|
|
36
144
|
|
|
37
145
|
#undef __QOS_ENUM
|
|
38
146
|
|
|
147
|
+
/*!
|
|
148
|
+
* @constant QOS_MIN_RELATIVE_PRIORITY
|
|
149
|
+
* @abstract The minimum relative priority that may be specified within a
|
|
150
|
+
* QOS class. These priorities are relative only within a given QOS class
|
|
151
|
+
* and meaningful only for the current process.
|
|
152
|
+
*/
|
|
39
153
|
#define QOS_MIN_RELATIVE_PRIORITY (-15)
|
|
40
154
|
|
|
155
|
+
/* Userspace (only) definitions */
|
|
156
|
+
|
|
41
157
|
#ifndef KERNEL
|
|
42
158
|
|
|
43
|
-
|
|
44
|
-
extern "C" {
|
|
45
|
-
#endif
|
|
159
|
+
__BEGIN_DECLS
|
|
46
160
|
|
|
47
|
-
|
|
161
|
+
/*!
|
|
162
|
+
* @function qos_class_self
|
|
163
|
+
*
|
|
164
|
+
* @abstract
|
|
165
|
+
* Returns the requested QOS class of the current thread.
|
|
166
|
+
*
|
|
167
|
+
* @return
|
|
168
|
+
* One of the QOS class values in qos_class_t.
|
|
169
|
+
*/
|
|
170
|
+
__API_AVAILABLE(macos(10.10), ios(8.0))
|
|
48
171
|
qos_class_t
|
|
49
172
|
qos_class_self(void);
|
|
50
173
|
|
|
51
|
-
|
|
174
|
+
/*!
|
|
175
|
+
* @function qos_class_main
|
|
176
|
+
*
|
|
177
|
+
* @abstract
|
|
178
|
+
* Returns the initial requested QOS class of the main thread.
|
|
179
|
+
*
|
|
180
|
+
* @discussion
|
|
181
|
+
* The QOS class that the main thread of a process is created with depends on
|
|
182
|
+
* the type of process (e.g. application or daemon) and on how it has been
|
|
183
|
+
* launched.
|
|
184
|
+
*
|
|
185
|
+
* This function returns that initial requested QOS class value chosen by the
|
|
186
|
+
* system to enable propagation of that classification to matching work not
|
|
187
|
+
* executing on the main thread.
|
|
188
|
+
*
|
|
189
|
+
* @return
|
|
190
|
+
* One of the QOS class values in qos_class_t.
|
|
191
|
+
*/
|
|
192
|
+
__API_AVAILABLE(macos(10.10), ios(8.0))
|
|
52
193
|
qos_class_t
|
|
53
194
|
qos_class_main(void);
|
|
54
195
|
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
#endif
|
|
196
|
+
__END_DECLS
|
|
58
197
|
|
|
59
|
-
#endif
|
|
198
|
+
#endif // KERNEL
|
|
60
199
|
|
|
61
|
-
#endif
|
|
200
|
+
#endif // _SYS_QOS_H
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// the installed libc names sigset_t through this header. darwin's sigset_t
|
|
2
|
+
// (sys/_types/_sigset_t.h) is one bit per signal, so libc, sys/signal.h and
|
|
3
|
+
// signal.h all name that type.
|
|
4
|
+
#ifndef __wasilibc___typedef_sigset_t_h
|
|
5
|
+
#define __wasilibc___typedef_sigset_t_h
|
|
6
|
+
typedef unsigned int sigset_t;
|
|
7
|
+
#endif
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// darwin's cancellation points bind to the darwin provider, which acts on a
|
|
3
|
+
// pending cancel first.
|
|
4
|
+
#include_next <fcntl.h>
|
|
5
|
+
#include <sys/cdefs.h>
|
|
6
|
+
__BEGIN_DECLS
|
|
7
|
+
int open(const char *, int, ...) __asm__("__peach_darwin_open");
|
|
8
|
+
int openat(int, const char *, int, ...) __asm__("__peach_darwin_openat");
|
|
9
|
+
int creat(const char *, mode_t) __asm__("__peach_darwin_creat");
|
|
10
|
+
int fcntl(int, int, ...) __asm__("__peach_darwin_fcntl");
|
|
11
|
+
__END_DECLS
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
#include <machine/_types.h>
|
|
3
|
+
#include <stdint.h>
|
|
4
|
+
typedef __darwin_natural_t natural_t;
|
|
5
|
+
typedef int integer_t;
|
|
6
|
+
typedef uintptr_t vm_offset_t;
|
|
7
|
+
typedef uintptr_t vm_size_t;
|
|
8
|
+
typedef uint64_t mach_vm_address_t;
|
|
9
|
+
typedef uint64_t mach_vm_offset_t;
|
|
10
|
+
typedef uint64_t mach_vm_size_t;
|
|
11
|
+
typedef uint32_t vm_map_offset_t;
|
|
12
|
+
typedef uint32_t vm_map_address_t;
|
|
13
|
+
typedef uint32_t vm_map_size_t;
|
|
14
|
+
typedef uint32_t vm32_offset_t;
|
|
15
|
+
typedef uint32_t vm32_address_t;
|
|
16
|
+
typedef uint32_t vm32_size_t;
|
|
17
|
+
typedef vm_offset_t mach_port_context_t;
|
|
18
|
+
#define MACH_MSG_TYPE_INTEGER_T MACH_MSG_TYPE_INTEGER_32
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2007 Apple Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
|
5
|
+
*
|
|
6
|
+
* This file contains Original Code and/or Modifications of Original Code
|
|
7
|
+
* as defined in and that are subject to the Apple Public Source License
|
|
8
|
+
* Version 2.0 (the 'License'). You may not use this file except in
|
|
9
|
+
* compliance with the License. The rights granted to you under the License
|
|
10
|
+
* may not be used to create, or enable the creation or redistribution of,
|
|
11
|
+
* unlawful or unlicensed copies of an Apple operating system, or to
|
|
12
|
+
* circumvent, violate, or enable the circumvention or violation of, any
|
|
13
|
+
* terms of an Apple operating system software license agreement.
|
|
14
|
+
*
|
|
15
|
+
* Please obtain a copy of the License at
|
|
16
|
+
* http://www.opensource.apple.com/apsl/ and read it before using this file.
|
|
17
|
+
*
|
|
18
|
+
* The Original Code and all software distributed under the License are
|
|
19
|
+
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
|
20
|
+
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
|
21
|
+
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
|
23
|
+
* Please see the License for the specific language governing rights and
|
|
24
|
+
* limitations under the License.
|
|
25
|
+
*
|
|
26
|
+
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
|
27
|
+
*/
|
|
28
|
+
#ifndef _BSD_MACHINE__TYPES_H_
|
|
29
|
+
#define _BSD_MACHINE__TYPES_H_
|
|
30
|
+
|
|
31
|
+
#if defined (__i386__) || defined(__x86_64__)
|
|
32
|
+
#include "i386/_types.h"
|
|
33
|
+
#elif defined (__arm__) || defined (__arm64__)
|
|
34
|
+
#include "arm/_types.h"
|
|
35
|
+
#elif defined (__wasm32__)
|
|
36
|
+
// arm/_types.h's selection, except the names the installed libc also defines
|
|
37
|
+
// through time_t, clock_t and mbstate_t, which keep its storage: the installed
|
|
38
|
+
// headers and calls carry them.
|
|
39
|
+
|
|
40
|
+
#if defined(__has_feature) && __has_feature(modules)
|
|
41
|
+
#define USE_CLANG_TYPES 1
|
|
42
|
+
#else
|
|
43
|
+
#define USE_CLANG_TYPES 0
|
|
44
|
+
#endif
|
|
45
|
+
|
|
46
|
+
#if USE_CLANG_TYPES
|
|
47
|
+
#include <sys/_types/_ptrdiff_t.h>
|
|
48
|
+
#include <sys/_types/_size_t.h>
|
|
49
|
+
#include <sys/_types/_va_list.h>
|
|
50
|
+
#include <sys/_types/_wchar_t.h>
|
|
51
|
+
#endif
|
|
52
|
+
|
|
53
|
+
/*
|
|
54
|
+
* This header file contains integer types. It's intended to also contain
|
|
55
|
+
* flotaing point and other arithmetic types, as needed, later.
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
#ifdef __GNUC__
|
|
59
|
+
typedef __signed char __int8_t;
|
|
60
|
+
#else /* !__GNUC__ */
|
|
61
|
+
typedef char __int8_t;
|
|
62
|
+
#endif /* !__GNUC__ */
|
|
63
|
+
typedef unsigned char __uint8_t;
|
|
64
|
+
typedef short __int16_t;
|
|
65
|
+
typedef unsigned short __uint16_t;
|
|
66
|
+
typedef int __int32_t;
|
|
67
|
+
typedef unsigned int __uint32_t;
|
|
68
|
+
typedef long long __int64_t;
|
|
69
|
+
typedef unsigned long long __uint64_t;
|
|
70
|
+
|
|
71
|
+
typedef long __darwin_intptr_t;
|
|
72
|
+
typedef unsigned int __darwin_natural_t;
|
|
73
|
+
|
|
74
|
+
/*
|
|
75
|
+
* The rune type below is declared to be an ``int'' instead of the more natural
|
|
76
|
+
* ``unsigned long'' or ``long''. Two things are happening here. It is not
|
|
77
|
+
* unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
|
|
78
|
+
* it looks like 10646 will be a 31 bit standard. This means that if your
|
|
79
|
+
* ints cannot hold 32 bits, you will be in trouble. The reason an int was
|
|
80
|
+
* chosen over a long is that the is*() and to*() routines take ints (says
|
|
81
|
+
* ANSI C), but they use __darwin_ct_rune_t instead of int. By changing it
|
|
82
|
+
* here, you lose a bit of ANSI conformance, but your programs will still
|
|
83
|
+
* work.
|
|
84
|
+
*
|
|
85
|
+
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
|
|
86
|
+
* be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
|
|
87
|
+
* rune_t must be the same type. Also wint_t must be no narrower than
|
|
88
|
+
* wchar_t, and should also be able to hold all members of the largest
|
|
89
|
+
* character set plus one extra value (WEOF). wint_t must be at least 16 bits.
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
typedef int __darwin_ct_rune_t; /* ct_rune_t */
|
|
93
|
+
|
|
94
|
+
/*
|
|
95
|
+
* mbstate_t is an opaque object to keep conversion state, during multibyte
|
|
96
|
+
* stream conversions. The content must not be referenced by user programs.
|
|
97
|
+
*/
|
|
98
|
+
// the installed libc completes struct __mbstate_t where it defines mbstate_t.
|
|
99
|
+
typedef struct __mbstate_t __darwin_mbstate_t; /* mbstate_t */
|
|
100
|
+
|
|
101
|
+
#if USE_CLANG_TYPES
|
|
102
|
+
typedef ptrdiff_t __darwin_ptrdiff_t; /* ptr1 - ptr2 */
|
|
103
|
+
#elif defined(__PTRDIFF_TYPE__)
|
|
104
|
+
typedef __PTRDIFF_TYPE__ __darwin_ptrdiff_t; /* ptr1 - ptr2 */
|
|
105
|
+
#elif defined(__LP64__)
|
|
106
|
+
typedef long __darwin_ptrdiff_t; /* ptr1 - ptr2 */
|
|
107
|
+
#else
|
|
108
|
+
typedef int __darwin_ptrdiff_t; /* ptr1 - ptr2 */
|
|
109
|
+
#endif /* __GNUC__ */
|
|
110
|
+
|
|
111
|
+
#if USE_CLANG_TYPES
|
|
112
|
+
typedef size_t __darwin_size_t; /* sizeof() */
|
|
113
|
+
#elif defined(__SIZE_TYPE__)
|
|
114
|
+
typedef __SIZE_TYPE__ __darwin_size_t; /* sizeof() */
|
|
115
|
+
#else
|
|
116
|
+
typedef unsigned long __darwin_size_t; /* sizeof() */
|
|
117
|
+
#endif
|
|
118
|
+
|
|
119
|
+
#if USE_CLANG_TYPES
|
|
120
|
+
typedef va_list __darwin_va_list; /* va_list */
|
|
121
|
+
#elif (__GNUC__ > 2)
|
|
122
|
+
typedef __builtin_va_list __darwin_va_list; /* va_list */
|
|
123
|
+
#else
|
|
124
|
+
typedef void * __darwin_va_list; /* va_list */
|
|
125
|
+
#endif
|
|
126
|
+
|
|
127
|
+
#if USE_CLANG_TYPES
|
|
128
|
+
typedef wchar_t __darwin_wchar_t; /* wchar_t */
|
|
129
|
+
#elif defined(__WCHAR_TYPE__)
|
|
130
|
+
typedef __WCHAR_TYPE__ __darwin_wchar_t; /* wchar_t */
|
|
131
|
+
#else
|
|
132
|
+
typedef __darwin_ct_rune_t __darwin_wchar_t; /* wchar_t */
|
|
133
|
+
#endif
|
|
134
|
+
|
|
135
|
+
typedef __darwin_wchar_t __darwin_rune_t; /* rune_t */
|
|
136
|
+
|
|
137
|
+
#if defined(__WINT_TYPE__)
|
|
138
|
+
typedef __WINT_TYPE__ __darwin_wint_t; /* wint_t */
|
|
139
|
+
#else
|
|
140
|
+
typedef __darwin_ct_rune_t __darwin_wint_t; /* wint_t */
|
|
141
|
+
#endif
|
|
142
|
+
|
|
143
|
+
typedef long long __darwin_clock_t; /* clock() */
|
|
144
|
+
typedef __uint32_t __darwin_socklen_t; /* socklen_t (duh) */
|
|
145
|
+
typedef long __darwin_ssize_t; /* byte count or error */
|
|
146
|
+
typedef long long __darwin_time_t; /* time() */
|
|
147
|
+
|
|
148
|
+
#undef USE_CLANG_TYPES
|
|
149
|
+
#else
|
|
150
|
+
#error architecture not supported
|
|
151
|
+
#endif
|
|
152
|
+
|
|
153
|
+
#endif /* _BSD_MACHINE__TYPES_H_ */
|