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