]> git.saurik.com Git - apple/libc.git/blame - include/unistd.h
Libc-997.1.1.tar.gz
[apple/libc.git] / include / unistd.h
CommitLineData
5b2abdfb 1/*
ad3c9f2a 2 * Copyright (c) 2000, 2002-2006, 2008-2010, 2012 Apple Inc. All rights reserved.
5b2abdfb
A
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
734aad71
A
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
5b2abdfb
A
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
734aad71
A
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.
5b2abdfb
A
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23/*-
24 * Copyright (c) 1998-1999 Apple Computer, Inc. All Rights Reserved
25 * Copyright (c) 1991, 1993, 1994
26 * The Regents of the University of California. All rights reserved.
27 *
28 * Redistribution and use in source and binary forms, with or without
29 * modification, are permitted provided that the following conditions
30 * are met:
31 * 1. Redistributions of source code must retain the above copyright
32 * notice, this list of conditions and the following disclaimer.
33 * 2. Redistributions in binary form must reproduce the above copyright
34 * notice, this list of conditions and the following disclaimer in the
35 * documentation and/or other materials provided with the distribution.
36 * 3. All advertising materials mentioning features or use of this software
37 * must display the following acknowledgement:
38 * This product includes software developed by the University of
39 * California, Berkeley and its contributors.
40 * 4. Neither the name of the University nor the names of its contributors
41 * may be used to endorse or promote products derived from this software
42 * without specific prior written permission.
43 *
44 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
45 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
46 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
47 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
48 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
49 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
50 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
51 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
52 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
53 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
54 * SUCH DAMAGE.
55 *
56 * @(#)unistd.h 8.12 (Berkeley) 4/27/95
57 *
58 * Copyright (c) 1998 Apple Compter, Inc.
59 * All Rights Reserved
60 */
61
62/* History:
63 7/14/99 EKN at Apple fixed getdirentriesattr from getdirentryattr
64 3/26/98 CHW at Apple added real interface to searchfs call
65 3/5/98 CHW at Apple added hfs semantic system calls headers
66*/
67
68#ifndef _UNISTD_H_
69#define _UNISTD_H_
70
3d9156a7 71#include <_types.h>
3d9156a7 72#include <sys/unistd.h>
1f2f436a 73#include <Availability.h>
6465356a
A
74#include <sys/_types/_gid_t.h>
75#include <sys/_types/_intptr_t.h>
76#include <sys/_types/_off_t.h>
77#include <sys/_types/_pid_t.h>
3d9156a7
A
78/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see:
79 * _GCC_SIZE_T */
6465356a
A
80#include <sys/_types/_size_t.h>
81#include <sys/_types/_ssize_t.h>
82#include <sys/_types/_uid_t.h>
83#include <sys/_types/_useconds_t.h>
84#include <sys/_types/_null.h>
3d9156a7
A
85
86#define STDIN_FILENO 0 /* standard input file descriptor */
87#define STDOUT_FILENO 1 /* standard output file descriptor */
88#define STDERR_FILENO 2 /* standard error file descriptor */
89
3d9156a7
A
90
91/* Version test macros */
92/* _POSIX_VERSION and _POSIX2_VERSION from sys/unistd.h */
59e0d9fe 93#define _XOPEN_VERSION 600 /* [XSI] */
224c7076 94#define _XOPEN_XCU_VERSION 4 /* Older standard */
59e0d9fe
A
95
96
97/* Please keep this list in the same order as the applicable standard */
98#define _POSIX_ADVISORY_INFO (-1) /* [ADV] */
3d9156a7 99#define _POSIX_ASYNCHRONOUS_IO (-1) /* [AIO] */
59e0d9fe
A
100#define _POSIX_BARRIERS (-1) /* [BAR] */
101#define _POSIX_CHOWN_RESTRICTED 200112L
102#define _POSIX_CLOCK_SELECTION (-1) /* [CS] */
103#define _POSIX_CPUTIME (-1) /* [CPT] */
224c7076 104#define _POSIX_FSYNC 200112L /* [FSC] */
59e0d9fe
A
105#define _POSIX_IPV6 200112L
106#define _POSIX_JOB_CONTROL 200112L
107#define _POSIX_MAPPED_FILES 200112L /* [MF] */
3d9156a7
A
108#define _POSIX_MEMLOCK (-1) /* [ML] */
109#define _POSIX_MEMLOCK_RANGE (-1) /* [MR] */
59e0d9fe
A
110#define _POSIX_MEMORY_PROTECTION 200112L /* [MPR] */
111#define _POSIX_MESSAGE_PASSING (-1) /* [MSG] */
112#define _POSIX_MONOTONIC_CLOCK (-1) /* [MON] */
113#define _POSIX_NO_TRUNC 200112L
114#define _POSIX_PRIORITIZED_IO (-1) /* [PIO] */
115#define _POSIX_PRIORITY_SCHEDULING (-1) /* [PS] */
3d9156a7 116#define _POSIX_RAW_SOCKETS (-1) /* [RS] */
59e0d9fe
A
117#define _POSIX_READER_WRITER_LOCKS 200112L /* [THR] */
118#define _POSIX_REALTIME_SIGNALS (-1) /* [RTS] */
119#define _POSIX_REGEXP 200112L
3d9156a7
A
120#define _POSIX_SAVED_IDS 200112L /* XXX required */
121#define _POSIX_SEMAPHORES (-1) /* [SEM] */
122#define _POSIX_SHARED_MEMORY_OBJECTS (-1) /* [SHM] */
59e0d9fe
A
123#define _POSIX_SHELL 200112L
124#define _POSIX_SPAWN (-1) /* [SPN] */
125#define _POSIX_SPIN_LOCKS (-1) /* [SPI] */
126#define _POSIX_SPORADIC_SERVER (-1) /* [SS] */
3d9156a7 127#define _POSIX_SYNCHRONIZED_IO (-1) /* [SIO] */
59e0d9fe
A
128#define _POSIX_THREAD_ATTR_STACKADDR 200112L /* [TSA] */
129#define _POSIX_THREAD_ATTR_STACKSIZE 200112L /* [TSS] */
130#define _POSIX_THREAD_CPUTIME (-1) /* [TCT] */
131#define _POSIX_THREAD_PRIO_INHERIT (-1) /* [TPI] */
132#define _POSIX_THREAD_PRIO_PROTECT (-1) /* [TPP] */
133#define _POSIX_THREAD_PRIORITY_SCHEDULING (-1) /* [TPS] */
224c7076 134#define _POSIX_THREAD_PROCESS_SHARED 200112L /* [TSH] */
59e0d9fe
A
135#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L /* [TSF] */
136#define _POSIX_THREAD_SPORADIC_SERVER (-1) /* [TSP] */
224c7076 137#define _POSIX_THREADS 200112L /* [THR] */
59e0d9fe
A
138#define _POSIX_TIMEOUTS (-1) /* [TMO] */
139#define _POSIX_TIMERS (-1) /* [TMR] */
140#define _POSIX_TRACE (-1) /* [TRC] */
141#define _POSIX_TRACE_EVENT_FILTER (-1) /* [TEF] */
142#define _POSIX_TRACE_INHERIT (-1) /* [TRI] */
143#define _POSIX_TRACE_LOG (-1) /* [TRL] */
144#define _POSIX_TYPED_MEMORY_OBJECTS (-1) /* [TYM] */
145#ifndef _POSIX_VDISABLE
146#define _POSIX_VDISABLE 0xff /* same as sys/termios.h */
147#endif /* _POSIX_VDISABLE */
148
1f2f436a 149#if __DARWIN_C_LEVEL >= 199209L
59e0d9fe 150#define _POSIX2_C_BIND 200112L
3d9156a7 151#define _POSIX2_C_DEV 200112L /* c99 command */
59e0d9fe
A
152#define _POSIX2_CHAR_TERM 200112L
153#define _POSIX2_FORT_DEV (-1) /* fort77 command */
154#define _POSIX2_FORT_RUN 200112L
3d9156a7 155#define _POSIX2_LOCALEDEF 200112L /* localedef command */
59e0d9fe
A
156#define _POSIX2_PBS (-1)
157#define _POSIX2_PBS_ACCOUNTING (-1)
158#define _POSIX2_PBS_CHECKPOINT (-1)
159#define _POSIX2_PBS_LOCATE (-1)
160#define _POSIX2_PBS_MESSAGE (-1)
161#define _POSIX2_PBS_TRACK (-1)
162#define _POSIX2_SW_DEV 200112L
163#define _POSIX2_UPE 200112L /* XXXX no fc, newgrp, tabs */
1f2f436a 164#endif /* __DARWIN_C_LEVEL */
59e0d9fe 165
1f2f436a 166#define __ILP32_OFF32 (-1)
ad3c9f2a
A
167#define __ILP32_OFFBIG (1)
168#define __LP64_OFF64 (1)
169#define __LPBIG_OFFBIG (1)
59e0d9fe 170
1f2f436a
A
171#if __DARWIN_C_LEVEL >= 200112L
172#define _POSIX_V6_ILP32_OFF32 __ILP32_OFF32
173#define _POSIX_V6_ILP32_OFFBIG __ILP32_OFFBIG
174#define _POSIX_V6_LP64_OFF64 __LP64_OFF64
175#define _POSIX_V6_LPBIG_OFFBIG __LPBIG_OFFBIG
176#endif /* __DARWIN_C_LEVEL >= 200112L */
177
178#if __DARWIN_C_LEVEL >= 200809L
179#define _POSIX_V7_ILP32_OFF32 __ILP32_OFF32
180#define _POSIX_V7_ILP32_OFFBIG __ILP32_OFFBIG
181#define _POSIX_V7_LP64_OFF64 __LP64_OFF64
182#define _POSIX_V7_LPBIG_OFFBIG __LPBIG_OFFBIG
183#endif /* __DARWIN_C_LEVEL >= 200809L */
184
185#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
186#define _V6_ILP32_OFF32 __ILP32_OFF32
187#define _V6_ILP32_OFFBIG __ILP32_OFFBIG
188#define _V6_LP64_OFF64 __LP64_OFF64
189#define _V6_LPBIG_OFFBIG __LPBIG_OFFBIG
190#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
191
192#if (__DARWIN_C_LEVEL >= 199506L && __DARWIN_C_LEVEL < 200809L) || __DARWIN_C_LEVEL >= __DARWIN_C_FULL
193/* Removed in Issue 7 */
194#define _XBS5_ILP32_OFF32 __ILP32_OFF32
195#define _XBS5_ILP32_OFFBIG __ILP32_OFFBIG
196#define _XBS5_LP64_OFF64 __LP64_OFF64
197#define _XBS5_LPBIG_OFFBIG __LPBIG_OFFBIG
198#endif /* __DARWIN_C_LEVEL < 200809L */
199
200#if __DARWIN_C_LEVEL >= 199506L /* This really should be XSI */
59e0d9fe
A
201#define _XOPEN_CRYPT (1)
202#define _XOPEN_ENH_I18N (1) /* XXX required */
203#define _XOPEN_LEGACY (-1) /* no ftime gcvt, wcswcs */
204#define _XOPEN_REALTIME (-1) /* no q'ed signals, mq_* */
205#define _XOPEN_REALTIME_THREADS (-1) /* no posix_spawn, et. al. */
206#define _XOPEN_SHM (1)
1f2f436a 207#define _XOPEN_STREAMS (-1) /* Issue 6 */
59e0d9fe 208#define _XOPEN_UNIX (1)
1f2f436a 209#endif /* XSI */
5b2abdfb 210
9385eb3d 211/* configurable system variables */
59e0d9fe
A
212#define _SC_ARG_MAX 1
213#define _SC_CHILD_MAX 2
214#define _SC_CLK_TCK 3
215#define _SC_NGROUPS_MAX 4
216#define _SC_OPEN_MAX 5
217#define _SC_JOB_CONTROL 6
218#define _SC_SAVED_IDS 7
219#define _SC_VERSION 8
220#define _SC_BC_BASE_MAX 9
221#define _SC_BC_DIM_MAX 10
222#define _SC_BC_SCALE_MAX 11
223#define _SC_BC_STRING_MAX 12
224#define _SC_COLL_WEIGHTS_MAX 13
225#define _SC_EXPR_NEST_MAX 14
226#define _SC_LINE_MAX 15
227#define _SC_RE_DUP_MAX 16
228#define _SC_2_VERSION 17
229#define _SC_2_C_BIND 18
230#define _SC_2_C_DEV 19
231#define _SC_2_CHAR_TERM 20
232#define _SC_2_FORT_DEV 21
233#define _SC_2_FORT_RUN 22
234#define _SC_2_LOCALEDEF 23
235#define _SC_2_SW_DEV 24
236#define _SC_2_UPE 25
237#define _SC_STREAM_MAX 26
238#define _SC_TZNAME_MAX 27
1f2f436a
A
239
240#if __DARWIN_C_LEVEL >= 199309L
224c7076 241#define _SC_ASYNCHRONOUS_IO 28
59e0d9fe
A
242#define _SC_PAGESIZE 29
243#define _SC_MEMLOCK 30
244#define _SC_MEMLOCK_RANGE 31
245#define _SC_MEMORY_PROTECTION 32
246#define _SC_MESSAGE_PASSING 33
247#define _SC_PRIORITIZED_IO 34
248#define _SC_PRIORITY_SCHEDULING 35
249#define _SC_REALTIME_SIGNALS 36
250#define _SC_SEMAPHORES 37
251#define _SC_FSYNC 38
252#define _SC_SHARED_MEMORY_OBJECTS 39
253#define _SC_SYNCHRONIZED_IO 40
254#define _SC_TIMERS 41
255#define _SC_AIO_LISTIO_MAX 42
256#define _SC_AIO_MAX 43
257#define _SC_AIO_PRIO_DELTA_MAX 44
258#define _SC_DELAYTIMER_MAX 45
259#define _SC_MQ_OPEN_MAX 46
260#define _SC_MAPPED_FILES 47 /* swap _SC_PAGESIZE vs. BSD */
261#define _SC_RTSIG_MAX 48
262#define _SC_SEM_NSEMS_MAX 49
263#define _SC_SEM_VALUE_MAX 50
264#define _SC_SIGQUEUE_MAX 51
265#define _SC_TIMER_MAX 52
1f2f436a
A
266#endif /* __DARWIN_C_LEVEL >= 199309L */
267
268#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
224c7076
A
269#define _SC_NPROCESSORS_CONF 57
270#define _SC_NPROCESSORS_ONLN 58
1f2f436a
A
271#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
272
273#if __DARWIN_C_LEVEL >= 200112L
59e0d9fe
A
274#define _SC_2_PBS 59
275#define _SC_2_PBS_ACCOUNTING 60
276#define _SC_2_PBS_CHECKPOINT 61
277#define _SC_2_PBS_LOCATE 62
278#define _SC_2_PBS_MESSAGE 63
279#define _SC_2_PBS_TRACK 64
280#define _SC_ADVISORY_INFO 65
281#define _SC_BARRIERS 66
282#define _SC_CLOCK_SELECTION 67
283#define _SC_CPUTIME 68
284#define _SC_FILE_LOCKING 69
285#define _SC_GETGR_R_SIZE_MAX 70
286#define _SC_GETPW_R_SIZE_MAX 71
287#define _SC_HOST_NAME_MAX 72
288#define _SC_LOGIN_NAME_MAX 73
289#define _SC_MONOTONIC_CLOCK 74
290#define _SC_MQ_PRIO_MAX 75
291#define _SC_READER_WRITER_LOCKS 76
292#define _SC_REGEXP 77
293#define _SC_SHELL 78
294#define _SC_SPAWN 79
295#define _SC_SPIN_LOCKS 80
296#define _SC_SPORADIC_SERVER 81
297#define _SC_THREAD_ATTR_STACKADDR 82
298#define _SC_THREAD_ATTR_STACKSIZE 83
299#define _SC_THREAD_CPUTIME 84
300#define _SC_THREAD_DESTRUCTOR_ITERATIONS 85
301#define _SC_THREAD_KEYS_MAX 86
302#define _SC_THREAD_PRIO_INHERIT 87
303#define _SC_THREAD_PRIO_PROTECT 88
304#define _SC_THREAD_PRIORITY_SCHEDULING 89
305#define _SC_THREAD_PROCESS_SHARED 90
306#define _SC_THREAD_SAFE_FUNCTIONS 91
307#define _SC_THREAD_SPORADIC_SERVER 92
308#define _SC_THREAD_STACK_MIN 93
309#define _SC_THREAD_THREADS_MAX 94
310#define _SC_TIMEOUTS 95
311#define _SC_THREADS 96
312#define _SC_TRACE 97
313#define _SC_TRACE_EVENT_FILTER 98
314#define _SC_TRACE_INHERIT 99
315#define _SC_TRACE_LOG 100
316#define _SC_TTY_NAME_MAX 101
317#define _SC_TYPED_MEMORY_OBJECTS 102
318#define _SC_V6_ILP32_OFF32 103
319#define _SC_V6_ILP32_OFFBIG 104
320#define _SC_V6_LP64_OFF64 105
321#define _SC_V6_LPBIG_OFFBIG 106
322#define _SC_IPV6 118
323#define _SC_RAW_SOCKETS 119
324#define _SC_SYMLOOP_MAX 120
1f2f436a
A
325#endif /* __DARWIN_C_LEVEL >= 200112L */
326
327#if __DARWIN_C_LEVEL >= 199506L /* Really XSI */
59e0d9fe
A
328#define _SC_ATEXIT_MAX 107
329#define _SC_IOV_MAX 56
330#define _SC_PAGE_SIZE _SC_PAGESIZE
331#define _SC_XOPEN_CRYPT 108
332#define _SC_XOPEN_ENH_I18N 109
1f2f436a
A
333#define _SC_XOPEN_LEGACY 110 /* Issue 6 */
334#define _SC_XOPEN_REALTIME 111 /* Issue 6 */
335#define _SC_XOPEN_REALTIME_THREADS 112 /* Issue 6 */
59e0d9fe 336#define _SC_XOPEN_SHM 113
1f2f436a 337#define _SC_XOPEN_STREAMS 114 /* Issue 6 */
59e0d9fe
A
338#define _SC_XOPEN_UNIX 115
339#define _SC_XOPEN_VERSION 116
340#define _SC_XOPEN_XCU_VERSION 121
1f2f436a
A
341#endif /* XSI */
342
343#if (__DARWIN_C_LEVEL >= 199506L && __DARWIN_C_LEVEL < 200809L) || __DARWIN_C_LEVEL >= __DARWIN_C_FULL
344/* Removed in Issue 7 */
224c7076
A
345#define _SC_XBS5_ILP32_OFF32 122
346#define _SC_XBS5_ILP32_OFFBIG 123
347#define _SC_XBS5_LP64_OFF64 124
348#define _SC_XBS5_LPBIG_OFFBIG 125
1f2f436a
A
349#endif /* __DARWIN_C_LEVEL <= 200809L */
350
351#if __DARWIN_C_LEVEL >= 200112L
224c7076
A
352#define _SC_SS_REPL_MAX 126
353#define _SC_TRACE_EVENT_NAME_MAX 127
354#define _SC_TRACE_NAME_MAX 128
355#define _SC_TRACE_SYS_MAX 129
356#define _SC_TRACE_USER_EVENT_MAX 130
1f2f436a
A
357#endif
358
359#if __DARWIN_C_LEVEL < 200112L || __DARWIN_C_LEVEL >= __DARWIN_C_FULL
360/* Removed in Issue 6 */
224c7076 361#define _SC_PASS_MAX 131
1f2f436a 362#endif
59e0d9fe 363
1f2f436a
A
364#if __DARWIN_C_LEVEL >= 199209L
365#ifndef _CS_PATH /* Defined in <sys/unistd.h> */
59e0d9fe
A
366#define _CS_PATH 1
367#endif
1f2f436a
A
368#endif
369
370#if __DARWIN_C_LEVEL >= 200112
224c7076 371#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 2
59e0d9fe
A
372#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 3
373#define _CS_POSIX_V6_ILP32_OFF32_LIBS 4
374#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 5
375#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 6
376#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 7
377#define _CS_POSIX_V6_LP64_OFF64_CFLAGS 8
378#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 9
379#define _CS_POSIX_V6_LP64_OFF64_LIBS 10
380#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 11
381#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 12
382#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 13
383#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 14
1f2f436a 384#endif
59e0d9fe 385
1f2f436a
A
386#if (__DARWIN_C_LEVEL >= 199506L && __DARWIN_C_LEVEL < 200809L) || __DARWIN_C_LEVEL >= __DARWIN_C_FULL
387/* Removed in Issue 7 */
59e0d9fe
A
388#define _CS_XBS5_ILP32_OFF32_CFLAGS 20
389#define _CS_XBS5_ILP32_OFF32_LDFLAGS 21
390#define _CS_XBS5_ILP32_OFF32_LIBS 22
391#define _CS_XBS5_ILP32_OFF32_LINTFLAGS 23
392#define _CS_XBS5_ILP32_OFFBIG_CFLAGS 24
393#define _CS_XBS5_ILP32_OFFBIG_LDFLAGS 25
394#define _CS_XBS5_ILP32_OFFBIG_LIBS 26
395#define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS 27
396#define _CS_XBS5_LP64_OFF64_CFLAGS 28
397#define _CS_XBS5_LP64_OFF64_LDFLAGS 29
398#define _CS_XBS5_LP64_OFF64_LIBS 30
399#define _CS_XBS5_LP64_OFF64_LINTFLAGS 31
400#define _CS_XBS5_LPBIG_OFFBIG_CFLAGS 32
401#define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS 33
402#define _CS_XBS5_LPBIG_OFFBIG_LIBS 34
403#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS 35
1f2f436a 404#endif
59e0d9fe 405
1f2f436a 406#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
224c7076
A
407#define _CS_DARWIN_USER_DIR 65536
408#define _CS_DARWIN_USER_TEMP_DIR 65537
409#define _CS_DARWIN_USER_CACHE_DIR 65538
1f2f436a 410#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
224c7076 411
9385eb3d 412
1f2f436a
A
413#ifdef _DARWIN_UNLIMITED_GETGROUPS
414#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2
415#error "_DARWIN_UNLIMITED_GETGROUPS specified, but -miphoneos-version-min version does not support it."
416#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6
417#error "_DARWIN_UNLIMITED_GETGROUPS specified, but -mmacosx-version-min version does not support it."
418#endif
419#endif
420
421/* POSIX.1-1990 */
422
423__BEGIN_DECLS
9385eb3d
A
424void _exit(int) __dead2;
425int access(const char *, int);
3d9156a7
A
426unsigned int
427 alarm(unsigned int);
9385eb3d
A
428int chdir(const char *);
429int chown(const char *, uid_t, gid_t);
1f2f436a 430
224c7076
A
431//Begin-Libc
432#ifndef LIBC_ALIAS_CLOSE
433//End-Libc
434int close(int) __DARWIN_ALIAS_C(close);
435//Begin-Libc
436#else /* LIBC_ALIAS_CLOSE */
437int close(int) LIBC_ALIAS_C(close);
438#endif /* !LIBC_ALIAS_CLOSE */
439//End-Libc
1f2f436a 440
9385eb3d
A
441int dup(int);
442int dup2(int, int);
443int execl(const char *, const char *, ...);
444int execle(const char *, const char *, ...);
445int execlp(const char *, const char *, ...);
446int execv(const char *, char * const *);
447int execve(const char *, char * const *, char * const *);
448int execvp(const char *, char * const *);
449pid_t fork(void);
450long fpathconf(int, int);
451char *getcwd(char *, size_t);
9385eb3d
A
452gid_t getegid(void);
453uid_t geteuid(void);
454gid_t getgid(void);
34e8f829 455#if defined(_DARWIN_UNLIMITED_GETGROUPS) || defined(_DARWIN_C_SOURCE)
1f2f436a 456int getgroups(int, gid_t []) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(getgroups));
34e8f829 457#else /* !_DARWIN_UNLIMITED_GETGROUPS && !_DARWIN_C_SOURCE */
9385eb3d 458int getgroups(int, gid_t []);
34e8f829 459#endif /* _DARWIN_UNLIMITED_GETGROUPS || _DARWIN_C_SOURCE */
9385eb3d 460char *getlogin(void);
1f2f436a
A
461pid_t getpgrp(void);
462pid_t getpid(void);
463pid_t getppid(void);
464uid_t getuid(void);
465int isatty(int);
466int link(const char *, const char *);
467off_t lseek(int, off_t, int);
468long pathconf(const char *, int);
469
470//Begin-Libc
471#ifndef LIBC_ALIAS_PAUSE
472//End-Libc
473int pause(void) __DARWIN_ALIAS_C(pause);
474//Begin-Libc
475#else /* LIBC_ALIAS_PAUSE */
476int pause(void) LIBC_ALIAS_C(pause);
477#endif /* !LIBC_ALIAS_PAUSE */
478//End-Libc
479
480int pipe(int [2]);
481
482//Begin-Libc
483#ifndef LIBC_ALIAS_READ
484//End-Libc
485ssize_t read(int, void *, size_t) __DARWIN_ALIAS_C(read);
486//Begin-Libc
487#else /* LIBC_ALIAS_READ */
488ssize_t read(int, void *, size_t) LIBC_ALIAS_C(read);
489#endif /* !LIBC_ALIAS_READ */
490//End-Libc
491
492int rmdir(const char *);
493int setgid(gid_t);
494int setpgid(pid_t, pid_t);
495pid_t setsid(void);
496int setuid(uid_t);
497
498//Begin-Libc
499#ifndef LIBC_ALIAS_SLEEP
500//End-Libc
501unsigned int
502 sleep(unsigned int) __DARWIN_ALIAS_C(sleep);
503//Begin-Libc
504#else /* LIBC_ALIAS_SLEEP */
505unsigned int
506 sleep(unsigned int) LIBC_ALIAS_C(sleep);
507#endif /* !LIBC_ALIAS_SLEEP */
508//End-Libc
509
510long sysconf(int);
511pid_t tcgetpgrp(int);
512int tcsetpgrp(int, pid_t);
513char *ttyname(int);
514
515#if __DARWIN_UNIX03
516//Begin-Libc
517#ifndef LIBC_ALIAS_TTYNAME_R
518//End-Libc
519int ttyname_r(int, char *, size_t) __DARWIN_ALIAS(ttyname_r);
520//Begin-Libc
521#else /* LIBC_ALIAS_TTYNAME_R */
522int ttyname_r(int, char *, size_t) LIBC_ALIAS(ttyname_r);
523#endif /* !LIBC_ALIAS_TTYNAME_R */
524//End-Libc
525#else /* !__DARWIN_UNIX03 */
526char *ttyname_r(int, char *, size_t);
527#endif /* __DARWIN_UNIX03 */
528
529int unlink(const char *);
530
531//Begin-Libc
532#ifndef LIBC_ALIAS_WRITE
533//End-Libc
534ssize_t write(int, const void *, size_t) __DARWIN_ALIAS_C(write);
535//Begin-Libc
536#else /* LIBC_ALIAS_WRITE */
537ssize_t write(int, const void *, size_t) LIBC_ALIAS_C(write);
538#endif /* !LIBC_ALIAS_WRITE */
539//End-Libc
540__END_DECLS
541
542
543
544/* Additional functionality provided by:
545 * POSIX.2-1992 C Language Binding Option
546 */
547
548#if __DARWIN_C_LEVEL >= 199209L
549__BEGIN_DECLS
550//Begin-Libc
551#ifndef LIBC_ALIAS_CONFSTR
552//End-Libc
553size_t confstr(int, char *, size_t) __DARWIN_ALIAS(confstr);
554//Begin-Libc
555#else /* LIBC_ALIAS_CONFSTR */
556size_t confstr(int, char *, size_t) LIBC_ALIAS(confstr);
557#endif /* !LIBC_ALIAS_CONFSTR */
558//End-Libc
559
224c7076
A
560//Begin-Libc
561#ifndef LIBC_ALIAS_GETOPT
562//End-Libc
563int getopt(int, char * const [], const char *) __DARWIN_ALIAS(getopt);
564//Begin-Libc
565#else /* LIBC_ALIAS_GETOPT */
566int getopt(int, char * const [], const char *) LIBC_ALIAS(getopt);
567#endif /* !LIBC_ALIAS_GETOPT */
568//End-Libc
1f2f436a
A
569
570extern char *optarg; /* getopt(3) external variables */
571extern int optind, opterr, optopt;
572__END_DECLS
573#endif /* __DARWIN_C_LEVEL >= 199209L */
574
575
576
577/* Additional functionality provided by:
578 * POSIX.1c-1995,
579 * POSIX.1i-1995,
580 * and the omnibus ISO/IEC 9945-1: 1996
581 */
582
583#if __DARWIN_C_LEVEL >= 199506L
584 /* These F_* are really XSI or Issue 6 */
585#define F_ULOCK 0 /* unlock locked section */
586#define F_LOCK 1 /* lock a section for exclusive use */
587#define F_TLOCK 2 /* test and lock a section for exclusive use */
588#define F_TEST 3 /* test a section for locks by other procs */
589
590 __BEGIN_DECLS
591
592/* Begin XSI */
593/* Removed in Issue 6 */
594#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L
6465356a
A
595#if !defined(_POSIX_C_SOURCE)
596__deprecated
597#endif
1f2f436a
A
598void *brk(const void *);
599int chroot(const char *) __POSIX_C_DEPRECATED(199506L);
600#endif
601
602char *crypt(const char *, const char *);
603#ifndef __CTERMID_DEFINED
604/* Multiply defined in stdio.h and unistd.h by SUS */
605#define __CTERMID_DEFINED 1
606char *ctermid(char *);
607#endif
608#if __DARWIN_UNIX03
609//Begin-Libc
610#ifndef LIBC_ALIAS_ENCRYPT
611//End-Libc
612void encrypt(char *, int) __DARWIN_ALIAS(encrypt);
613//Begin-Libc
614#else /* LIBC_ALIAS_ENCRYPT */
615void encrypt(char *, int) LIBC_ALIAS(encrypt);
616#endif /* !LIBC_ALIAS_ENCRYPT */
617//End-Libc
618#else /* !__DARWIN_UNIX03 */
619int encrypt(char *, int);
620#endif /* __DARWIN_UNIX03 */
621int fchdir(int);
622long gethostid(void);
3d9156a7 623pid_t getpgid(pid_t);
3d9156a7 624pid_t getsid(pid_t);
1f2f436a
A
625
626/* Removed in Issue 6 */
627#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L
628int getdtablesize(void) __POSIX_C_DEPRECATED(199506L);
629int getpagesize(void) __pure2 __POSIX_C_DEPRECATED(199506L);
630char *getpass(const char *) __POSIX_C_DEPRECATED(199506L);
631#endif
632
633/* Removed in Issue 7 */
634#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200809L
635char *getwd(char *) __POSIX_C_DEPRECATED(200112L); /* obsoleted by getcwd() */
636#endif
637
224c7076
A
638//Begin-Libc
639#ifndef LIBC_ALIAS_LCHOWN
640//End-Libc
3d9156a7 641int lchown(const char *, uid_t, gid_t) __DARWIN_ALIAS(lchown);
224c7076
A
642//Begin-Libc
643#else /* LIBC_ALIAS_LCHOWN */
644int lchown(const char *, uid_t, gid_t) LIBC_ALIAS(lchown);
645#endif /* !LIBC_ALIAS_LCHOWN */
646//End-Libc
1f2f436a 647
224c7076
A
648//Begin-Libc
649#ifndef LIBC_ALIAS_LOCKF
650//End-Libc
651int lockf(int, int, off_t) __DARWIN_ALIAS_C(lockf);
652//Begin-Libc
653#else /* LIBC_ALIAS_LOCKF */
654int lockf(int, int, off_t) LIBC_ALIAS_C(lockf);
655#endif /* !LIBC_ALIAS_LOCKF */
656//End-Libc
1f2f436a 657
224c7076
A
658//Begin-Libc
659#ifndef LIBC_ALIAS_NICE
660//End-Libc
661int nice(int) __DARWIN_ALIAS(nice);
662//Begin-Libc
663#else /* LIBC_ALIAS_NICE */
664int nice(int) LIBC_ALIAS(nice);
665#endif /* !LIBC_ALIAS_NICE */
666//End-Libc
1f2f436a 667
224c7076
A
668//Begin-Libc
669#ifndef LIBC_ALIAS_PREAD
670//End-Libc
671ssize_t pread(int, void *, size_t, off_t) __DARWIN_ALIAS_C(pread);
672//Begin-Libc
673#else /* LIBC_ALIAS_PREAD */
674ssize_t pread(int, void *, size_t, off_t) LIBC_ALIAS_C(pread);
675#endif /* !LIBC_ALIAS_PREAD */
676//End-Libc
1f2f436a 677
224c7076
A
678//Begin-Libc
679#ifndef LIBC_ALIAS_PWRITE
680//End-Libc
681ssize_t pwrite(int, const void *, size_t, off_t) __DARWIN_ALIAS_C(pwrite);
682//Begin-Libc
683#else /* LIBC_ALIAS_PWRITE */
684ssize_t pwrite(int, const void *, size_t, off_t) LIBC_ALIAS_C(pwrite);
685#endif /* !LIBC_ALIAS_PWRITE */
686//End-Libc
1f2f436a
A
687
688/* Removed in Issue 6 */
689#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L
690/* Note that Issue 5 changed the argument as intprt_t,
691 * but we keep it as int for binary compatability. */
6465356a
A
692#if !defined(_POSIX_C_SOURCE)
693__deprecated
694#endif
1f2f436a
A
695void *sbrk(int);
696#endif
697
3d9156a7 698#if __DARWIN_UNIX03
224c7076
A
699//Begin-Libc
700#ifndef LIBC_ALIAS_SETPGRP
701//End-Libc
3d9156a7 702pid_t setpgrp(void) __DARWIN_ALIAS(setpgrp);
224c7076
A
703//Begin-Libc
704#else /* LIBC_ALIAS_SETPGRP */
705pid_t setpgrp(void) LIBC_ALIAS(setpgrp);
706#endif /* !LIBC_ALIAS_SETPGRP */
707//End-Libc
3d9156a7
A
708#else /* !__DARWIN_UNIX03 */
709int setpgrp(pid_t pid, pid_t pgrp); /* obsoleted by setpgid() */
710#endif /* __DARWIN_UNIX03 */
1f2f436a 711
224c7076
A
712//Begin-Libc
713#ifndef LIBC_ALIAS_SETREGID
714//End-Libc
715int setregid(gid_t, gid_t) __DARWIN_ALIAS(setregid);
716//Begin-Libc
717#else /* LIBC_ALIAS_SETREGID */
718int setregid(gid_t, gid_t) LIBC_ALIAS(setregid);
719#endif /* !LIBC_ALIAS_SETREGID */
720//End-Libc
1f2f436a 721
224c7076
A
722//Begin-Libc
723#ifndef LIBC_ALIAS_SETREUID
724//End-Libc
725int setreuid(uid_t, uid_t) __DARWIN_ALIAS(setreuid);
726//Begin-Libc
727#else /* LIBC_ALIAS_SETREUID */
728int setreuid(uid_t, uid_t) LIBC_ALIAS(setreuid);
729#endif /* !LIBC_ALIAS_SETREUID */
730//End-Libc
1f2f436a 731
3d9156a7 732void swab(const void * __restrict, void * __restrict, ssize_t);
3d9156a7 733void sync(void);
3d9156a7 734int truncate(const char *, off_t);
1f2f436a 735useconds_t ualarm(useconds_t, useconds_t);
224c7076
A
736//Begin-Libc
737#ifndef LIBC_ALIAS_USLEEP
738//End-Libc
739int usleep(useconds_t) __DARWIN_ALIAS_C(usleep);
740//Begin-Libc
741#else /* LIBC_ALIAS_USLEEP */
742int usleep(useconds_t) LIBC_ALIAS_C(usleep);
743#endif /* !LIBC_ALIAS_USLEEP */
744//End-Libc
3d9156a7 745pid_t vfork(void);
1f2f436a
A
746/* End XSI */
747
224c7076 748//Begin-Libc
1f2f436a 749#ifndef LIBC_ALIAS_FSYNC
224c7076 750//End-Libc
1f2f436a 751int fsync(int) __DARWIN_ALIAS_C(fsync);
224c7076 752//Begin-Libc
1f2f436a
A
753#else /* LIBC_ALIAS_FSYNC */
754int fsync(int) LIBC_ALIAS_C(fsync);
755#endif /* !LIBC_ALIAS_FSYNC */
224c7076 756//End-Libc
5b2abdfb 757
1f2f436a
A
758int ftruncate(int, off_t);
759int getlogin_r(char *, size_t);
760__END_DECLS
761#endif /* __DARWIN_C_LEVEL >= 199506L */
762
763
764
765/* Additional functionality provided by:
766 * POSIX.1-2001
767 * ISO C99
768 */
769
770#if __DARWIN_C_LEVEL >= 200112L
771__BEGIN_DECLS
772int fchown(int, uid_t, gid_t);
773int gethostname(char *, size_t);
774ssize_t readlink(const char * __restrict, char * __restrict, size_t);
775int setegid(gid_t);
776int seteuid(uid_t);
777int symlink(const char *, const char *);
778__END_DECLS
779#endif /* __DARWIN_C_LEVEL >= 200112L */
5b2abdfb 780
1f2f436a
A
781
782
783/* Darwin extensions */
784
785#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
3d9156a7
A
786#include <sys/select.h>
787
6465356a
A
788#include <sys/_types/_dev_t.h>
789#include <sys/_types/_mode_t.h>
790#include <sys/_types/_uuid_t.h>
1f2f436a
A
791
792__BEGIN_DECLS
3d9156a7
A
793void _Exit(int) __dead2;
794int accessx_np(const struct accessx_descriptor *, size_t, int *, uid_t);
9385eb3d 795int acct(const char *);
3d9156a7 796int add_profil(char *, size_t, unsigned long, unsigned int);
9385eb3d 797void endusershell(void);
3d9156a7
A
798int execvP(const char *, const char *, char * const *);
799char *fflagstostr(unsigned long);
3d9156a7 800int getdomainname(char *, int);
9385eb3d 801int getgrouplist(const char *, int, int *, int *);
6465356a
A
802#if defined(__has_include)
803#if __has_include(<gethostuuid_private.h>)
804#include <gethostuuid_private.h>
805#else
806#include <gethostuuid.h>
807#endif
808#else
809#include <gethostuuid.h>
810#endif
9385eb3d 811mode_t getmode(const void *, mode_t);
59e0d9fe 812int getpeereid(int, uid_t *, gid_t *);
3d9156a7 813int getsgroups_np(int *, uuid_t);
9385eb3d 814char *getusershell(void);
3d9156a7 815int getwgroups_np(int *, uuid_t);
9385eb3d
A
816int initgroups(const char *, int);
817int iruserok(unsigned long, int, const char *, const char *);
224c7076 818int iruserok_sa(const void *, int, int, const char *, const char *);
9385eb3d
A
819int issetugid(void);
820char *mkdtemp(char *);
821int mknod(const char *, mode_t, dev_t);
ad3c9f2a 822int mkpath_np(const char *path, mode_t omode) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_0); /* returns errno */
9385eb3d
A
823int mkstemp(char *);
824int mkstemps(char *, int);
825char *mktemp(char *);
826int nfssvc(int, void *);
3d9156a7
A
827int profil(char *, size_t, unsigned long, unsigned int);
828int pthread_setugid_np(uid_t, gid_t);
829int pthread_getugid_np( uid_t *, gid_t *);
9385eb3d 830int rcmd(char **, int, const char *, const char *, const char *, int *);
224c7076
A
831int rcmd_af(char **, int, const char *, const char *, const char *, int *,
832 int);
9385eb3d
A
833int reboot(int);
834int revoke(const char *);
835int rresvport(int *);
836int rresvport_af(int *, int);
837int ruserok(const char *, int, const char *, const char *);
3d9156a7 838int setdomainname(const char *, int);
9385eb3d
A
839int setgroups(int, const gid_t *);
840void sethostid(long);
841int sethostname(const char *, int);
3d9156a7 842#if __DARWIN_UNIX03
224c7076
A
843//Begin-Libc
844#ifndef LIBC_ALIAS_SETKEY
845//End-Libc
3d9156a7 846void setkey(const char *) __DARWIN_ALIAS(setkey);
224c7076
A
847//Begin-Libc
848#else /* LIBC_ALIAS_SETKEY */
849void setkey(const char *) LIBC_ALIAS(setkey);
850#endif /* !LIBC_ALIAS_SETKEY */
851//End-Libc
3d9156a7
A
852#else /* !__DARWIN_UNIX03 */
853int setkey(const char *);
854#endif /* __DARWIN_UNIX03 */
9385eb3d 855int setlogin(const char *);
34e8f829
A
856//Begin-Libc
857#ifndef LIBC_ALIAS_SETMODE
858//End-Libc
1f2f436a 859void *setmode(const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(setmode));
34e8f829
A
860//Begin-Libc
861#else /* LIBC_ALIAS_SETMODE */
862void *setmode(const char *) LIBC_ALIAS(setmode);
863#endif /* !LIBC_ALIAS_SETMODE */
864//End-Libc
9385eb3d
A
865int setrgid(gid_t);
866int setruid(uid_t);
3d9156a7 867int setsgroups_np(int, const uuid_t);
9385eb3d 868void setusershell(void);
3d9156a7
A
869int setwgroups_np(int, const uuid_t);
870int strtofflags(char **, unsigned long *, unsigned long *);
9385eb3d 871int swapon(const char *);
9385eb3d 872int syscall(int, ...);
9385eb3d 873int ttyslot(void);
9385eb3d
A
874int undelete(const char *);
875int unwhiteout(const char *);
9385eb3d 876void *valloc(size_t);
5b2abdfb
A
877
878extern char *suboptarg; /* getsubopt(3) external variable */
9385eb3d 879int getsubopt(char **, char * const *, char **);
5b2abdfb
A
880
881/* HFS & HFS Plus semantics system calls go here */
59e0d9fe 882#ifdef __LP64__
1f2f436a
A
883int fgetattrlist(int,void*,void*,size_t,unsigned int) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);
884int fsetattrlist(int,void*,void*,size_t,unsigned int) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);
224c7076
A
885//Begin-Libc
886#ifndef LIBC_ALIAS_GETATTRLIST
887//End-Libc
3d9156a7 888int getattrlist(const char*,void*,void*,size_t,unsigned int) __DARWIN_ALIAS(getattrlist);
224c7076
A
889//Begin-Libc
890#else /* LIBC_ALIAS_GETATTRLIST */
891int getattrlist(const char*,void*,void*,size_t,unsigned int) LIBC_ALIAS(getattrlist);
892#endif /* !LIBC_ALIAS_GETATTRLIST */
893//End-Libc
894//Begin-Libc
895#ifndef LIBC_ALIAS_SETATTRLIST
896//End-Libc
3d9156a7 897int setattrlist(const char*,void*,void*,size_t,unsigned int) __DARWIN_ALIAS(setattrlist);
224c7076
A
898//Begin-Libc
899#else /* LIBC_ALIAS_SETATTRLIST */
900int setattrlist(const char*,void*,void*,size_t,unsigned int) LIBC_ALIAS(setattrlist);
901#endif /* !LIBC_ALIAS_SETATTRLIST */
902//End-Libc
59e0d9fe 903int exchangedata(const char*,const char*,unsigned int);
59e0d9fe 904int getdirentriesattr(int,void*,void*,size_t,unsigned int*,unsigned int*,unsigned int*,unsigned int);
59e0d9fe 905
59e0d9fe 906#else /* __LP64__ */
1f2f436a
A
907int fgetattrlist(int,void*,void*,size_t,unsigned long) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);
908int fsetattrlist(int,void*,void*,size_t,unsigned long) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);
224c7076
A
909//Begin-Libc
910#ifndef LIBC_ALIAS_GETATTRLIST
911//End-Libc
3d9156a7 912int getattrlist(const char*,void*,void*,size_t,unsigned long) __DARWIN_ALIAS(getattrlist);
224c7076
A
913//Begin-Libc
914#else /* LIBC_ALIAS_GETATTRLIST */
915int getattrlist(const char*,void*,void*,size_t,unsigned long) LIBC_ALIAS(getattrlist);
916#endif /* !LIBC_ALIAS_GETATTRLIST */
917//End-Libc
918//Begin-Libc
919#ifndef LIBC_ALIAS_SETATTRLIST
920//End-Libc
3d9156a7 921int setattrlist(const char*,void*,void*,size_t,unsigned long) __DARWIN_ALIAS(setattrlist);
224c7076
A
922//Begin-Libc
923#else /* LIBC_ALIAS_SETATTRLIST */
924int setattrlist(const char*,void*,void*,size_t,unsigned long) LIBC_ALIAS(setattrlist);
925#endif /* !LIBC_ALIAS_SETATTRLIST */
926//End-Libc
9385eb3d 927int exchangedata(const char*,const char*,unsigned long);
9385eb3d 928int getdirentriesattr(int,void*,void*,size_t,unsigned long*,unsigned long*,unsigned long*,unsigned long);
9385eb3d 929
59e0d9fe 930#endif /* __LP64__ */
5b2abdfb 931
34e8f829
A
932struct fssearchblock;
933struct searchstate;
934
935int searchfs(const char *, struct fssearchblock *, unsigned long *, unsigned int, unsigned int, struct searchstate *);
936int fsctl(const char *,unsigned long,void*,unsigned int);
1f2f436a 937int ffsctl(int,unsigned long,void*,unsigned int) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);
34e8f829 938
ad3c9f2a
A
939#define SYNC_VOLUME_FULLSYNC 0x01 /* Flush data and metadata to platter, not just to disk cache */
940#define SYNC_VOLUME_WAIT 0x02 /* Wait for sync to complete */
941
942int fsync_volume_np(int, int) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0);
943int sync_volume_np(const char *, int) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0);
944
3d9156a7
A
945extern int optreset;
946
5b2abdfb 947__END_DECLS
1f2f436a 948#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
5b2abdfb 949
1f2f436a 950#endif /* _UNISTD_H_ */