]> git.saurik.com Git - apple/libc.git/blame - fbsdcompat/_fbsd_compat_.h
Libc-320.tar.gz
[apple/libc.git] / fbsdcompat / _fbsd_compat_.h
CommitLineData
9385eb3d
A
1/*
2 * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * file.
14 *
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25#ifndef __FBSD_COMPAT__H_
26#define __FBSD_COMPAT__H_
27
28#include <stdint.h>
29
30#define OFF_MAX LLONG_MAX
31#define OFF_MIN LLONG_MIN
32#ifndef _BIG_ENDIAN
33#define _BIG_ENDIAN BIG_ENDIAN
34#endif /* _BIG_ENDIAN */
35#define _BYTE_ORDER BYTE_ORDER
36#define _LITTLE_ENDIAN LITTLE_ENDIAN
37#define __ct_rune_t ct_rune_t
38#define __int32_t int32_t
39#define __int64_t int64_t
40#define __va_list _BSD_VA_LIST_
41
42/*
43 * Do the opposite of FreeBSD namespace.h; that is, map the "hidden" names
44 * back to the real names.
45 */
46
47/*
48 * ISO C (C90) section. Most names in libc aren't in ISO C, so they
49 * should be here. Most aren't here...
50 */
51#define _err err
52#define _warn warn
53
54#define _accept accept
55#define _bind bind
56#define _close close
57#define _connect connect
58#define _creat creat
59#define _dup dup
60#define _dup2 dup2
61#define _execve execve
62#define _fcntl fcntl
63/*#define _flock flock */
64#define _flockfile flockfile
65#define _ftrylockfile ftrylockfile
66#define _fstat fstat
67#define _fstatfs fstatfs
68#define _fsync fsync
69#define _funlockfile funlockfile
70#define _getdirentries getdirentries
71/* #define _getlogin getlogin */
72#define _getpeername getpeername
73#define _getprogname getprogname
74#define _getsockname getsockname
75#define _getsockopt getsockopt
76#define _ioctl ioctl
77/* #define _kevent kevent */
78#define _listen listen
79#define _nanosleep nanosleep
80#define _open open
81#define _pause pause
82#define _poll poll
83#define _pthread_cond_broadcast pthread_cond_broadcast
84#define _pthread_cond_destroy pthread_cond_destroy
85#define _pthread_cond_init pthread_cond_init
86#define _pthread_cond_signal pthread_cond_signal
87#define _pthread_cond_timedwait pthread_cond_timedwait
88#define _pthread_cond_wait pthread_cond_wait
89#define _pthread_exit pthread_exit
90#define _pthread_getspecific pthread_getspecific
91#define _pthread_key_create pthread_key_create
92#define _pthread_key_delete pthread_key_delete
93#define _pthread_main_np pthread_main_np
94#define _pthread_mutex_destroy pthread_mutex_destroy
95#define _pthread_mutex_init pthread_mutex_init
96#define _pthread_mutex_lock pthread_mutex_lock
97#define _pthread_mutex_trylock pthread_mutex_trylock
98#define _pthread_mutex_unlock pthread_mutex_unlock
99#define _pthread_mutexattr_destroy pthread_mutexattr_destroy
100#define _pthread_mutexattr_init pthread_mutexattr_init
101#define _pthread_mutexattr_settype pthread_mutexattr_settype
102#define _pthread_once pthread_once
103#define _pthread_rwlock_destroy pthread_rwlock_destroy
104#define _pthread_rwlock_init pthread_rwlock_init
105#define _pthread_rwlock_rdlock pthread_rwlock_rdlock
106#define _pthread_rwlock_wrlock pthread_rwlock_wrlock
107#define _pthread_rwlock_tryrdlock pthread_rwlock_tryrdlock
108#define _pthread_rwlock_trywrlock pthread_rwlock_trywrlock
109#define _pthread_rwlock_unlock pthread_rwlock_unlock
110#define _pthread_self pthread_self
111#define _pthread_setspecific pthread_setspecific
112#define _pthread_sigmask pthread_sigmask
113#define _read read
114#define _readv readv
115#define _recvfrom recvfrom
116#define _recvmsg recvmsg
117#define _select select
118#define _sendmsg sendmsg
119#define _sendto sendto
120#define _setsockopt setsockopt
121#define _sigaction sigaction
122#define _sigprocmask sigprocmask
123#define _sigsuspend sigsuspend
124#define _sleep sleep
125#define _socket socket
126#define _socketpair socketpair
127#define _system system
128#define _tcdrain tcdrain
129#define _wait wait
130#define _wait4 wait4
131#define _waitpid waitpid
132#define _write write
133#define _writev writev
134
135#define __creat creat
136#define __fmtcheck fmtcheck
137#define __inet_addr inet_addr
138#define __inet_aton inet_aton
139#define __inet_lnaof inet_lnaof
140#define __inet_makeaddr inet_makeaddr
141#define __inet_net_ntop inet_net_ntop
142#define __inet_net_pton inet_net_pton
143#define __inet_neta inet_neta
144#define __inet_netof inet_netof
145#define __inet_network inet_network
146#define __inet_nsap_addr inet_nsap_addr
147#define __inet_nsap_ntoa inet_nsap_ntoa
148#define __inet_ntoa inet_ntoa
149#define __inet_ntop inet_ntop
150#define __inet_pton inet_pton
151#define __makecontext makecontext
152#define __makecontext makecontext
153#define __pause pause
154#define __pselect pselect
155#define __signalcontext signalcontext
156#define __sleep sleep
157#define __strtok_r strtok_r
158#define __swapcontext swapcontext
159#define __system system
160#define __tcdrain tcdrain
161#define __vfscanf vfscanf
162#define __wait wait
163#define __waitpid waitpid
164
165#define _GENERIC_DIRSIZ(dp) \
166 ((sizeof (struct dirent) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
167
168#endif /* __FBSD_COMPAT__H_ */