xref: /dflybsd-src/lib/libc/include/namespace.h (revision ce0e08e21d42c06c0014fae6b9d27144aa5109b0)
1 /*
2  * Copyright (c) 2001 Daniel Eischen <deischen@FreeBSD.org>.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
18  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24  * SUCH DAMAGE.
25  *
26  * $FreeBSD: /repoman/r/ncvs/src/lib/libc/include/namespace.h,v 1.1 2001/01/24 13:00:08 deischen Exp $
27  * $DragonFly: src/lib/libc/include/namespace.h,v 1.3 2006/04/06 13:02:12 davidxu Exp $
28  *
29  */
30 
31 #ifndef _NAMESPACE_H_
32 #define _NAMESPACE_H_
33 
34 /*
35  * Prototypes for syscalls/functions that need to be overridden
36  * in libc_r/libpthread.
37  */
38 #define		accept				_accept
39 #define		bind				_bind
40 #define		close				_close
41 #define		connect				_connect
42 #define		dup				_dup
43 #define		dup2				_dup2
44 #define		execve				_execve
45 #define		fcntl				_fcntl
46 /*#define		flock				_flock */
47 #define		flockfile			_flockfile
48 #define		fstat				_fstat
49 #define		fstatfs				_fstatfs
50 #define		fsync				_fsync
51 #define		funlockfile			_funlockfile
52 #define		getdirentries			_getdirentries
53 #define		getlogin			_getlogin
54 #define		getpeername			_getpeername
55 #define		getsockname			_getsockname
56 #define		getsockopt			_getsockopt
57 #define		ioctl				_ioctl
58 /* #define		kevent				_kevent */
59 #define		listen				_listen
60 #define		nanosleep			_nanosleep
61 #define		open				_open
62 #define		poll				_poll
63 #define		pthread_atfork			_pthread_atfork
64 #define		pthread_attr_destroy		_pthread_attr_destroy
65 #define		pthread_attr_get_np		_pthread_attr_get_np
66 #define		pthread_attr_getdetachstate	_pthread_attr_getdetachstate
67 #define		pthread_attr_getguardsize	_pthread_attr_getguardsize
68 #define		pthread_attr_getinheritsched	_pthread_attr_getinheritsched
69 #define		pthread_attr_getschedparam	_pthread_attr_getschedparam
70 #define		pthread_attr_getschedpolicy	_pthread_attr_getschedpolicy
71 #define		pthread_attr_getscope		_pthread_attr_getscope
72 #define		pthread_attr_getstack		_pthread_attr_getstack
73 #define		pthread_attr_getstackaddr	_pthread_attr_getstackaddr
74 #define		pthread_attr_getstacksize	_pthread_attr_getstacksize
75 #define		pthread_attr_init		_pthread_attr_init
76 #define		pthread_attr_setcreatesuspend_np _pthread_attr_setcreatesuspend_np
77 #define		pthread_attr_setdetachstate	_pthread_attr_setdetachstate
78 #define		pthread_attr_setguardsize	_pthread_attr_setguardsize
79 #define		pthread_attr_setinheritsched	_pthread_attr_setinheritsched
80 #define		pthread_attr_setschedparam	_pthread_attr_setschedparam
81 #define		pthread_attr_setschedpolicy	_pthread_attr_setschedpolicy
82 #define		pthread_attr_setscope		_pthread_attr_setscope
83 #define		pthread_attr_setstack		_pthread_attr_setstack
84 #define		pthread_attr_setstackaddr	_pthread_attr_setstackaddr
85 #define		pthread_attr_setstacksize	_pthread_attr_setstacksize
86 #define		pthread_barrier_destroy		_pthread_barrier_destroy
87 #define		pthread_barrier_init		_pthread_barrier_init
88 #define		pthread_barrier_wait		_pthread_barrier_wait
89 #define		pthread_barrierattr_destroy	_pthread_barrierattr_destroy
90 #define		pthread_barrierattr_getpshared	_pthread_barrierattr_getpshared
91 #define		pthread_barrierattr_init	_pthread_barrierattr_init
92 #define		pthread_barrierattr_setpshared	_pthread_barrierattr_setpshared
93 #define		pthread_cancel			_pthread_cancel
94 #define		pthread_cleanup_pop		_pthread_cleanup_pop
95 #define		pthread_cleanup_push		_pthread_cleanup_push
96 #define		pthread_cond_broadcast		_pthread_cond_broadcast
97 #define		pthread_cond_destroy		_pthread_cond_destroy
98 #define		pthread_cond_init		_pthread_cond_init
99 #define		pthread_cond_signal		_pthread_cond_signal
100 #define		pthread_cond_timedwait		_pthread_cond_timedwait
101 #define		pthread_cond_wait		_pthread_cond_wait
102 #define		pthread_condattr_destroy	_pthread_condattr_destroy
103 #define		pthread_condattr_getclock	_pthread_condattr_getclock
104 #define		pthread_condattr_getpshared	_pthread_condattr_getpshared
105 #define		pthread_condattr_init		_pthread_condattr_init
106 #define		pthread_condattr_setclock	_pthread_condattr_setclock
107 #define		pthread_condattr_setpshared	_pthread_condattr_setpshared
108 #define		pthread_create			_pthread_create
109 #define		pthread_detach			_pthread_detach
110 #define		pthread_equal			_pthread_equal
111 #define		pthread_exit			_pthread_exit
112 #define		pthread_getconcurrency		_pthread_getconcurrency
113 #define		pthread_getprio			_pthread_getprio
114 #define		pthread_getschedparam		_pthread_getschedparam
115 #define		pthread_getspecific		_pthread_getspecific
116 #define		pthread_join			_pthread_join
117 #define		pthread_key_create		_pthread_key_create
118 #define		pthread_key_delete		_pthread_key_delete
119 #define		pthread_kill			_pthread_kill
120 #define		pthread_main_np			_pthread_main_np
121 #define		pthread_multi_np		_pthread_multi_np
122 #define		pthread_mutex_destroy		_pthread_mutex_destroy
123 #define		pthread_mutex_getprioceiling	_pthread_mutex_getprioceiling
124 #define		pthread_mutex_init		_pthread_mutex_init
125 #define		pthread_mutex_lock		_pthread_mutex_lock
126 #define		pthread_mutex_setprioceiling	_pthread_mutex_setprioceiling
127 #define		pthread_mutex_timedlock		_pthread_mutex_timedlock
128 #define		pthread_mutex_trylock		_pthread_mutex_trylock
129 #define		pthread_mutex_unlock		_pthread_mutex_unlock
130 #define		pthread_mutexattr_destroy	_pthread_mutexattr_destroy
131 #define		pthread_mutexattr_getkind_np	_pthread_mutexattr_getkind_np
132 #define		pthread_mutexattr_getprioceiling _pthread_mutexattr_getprioceiling
133 #define		pthread_mutexattr_getprotocol	_pthread_mutexattr_getprotocol
134 #define		pthread_mutexattr_getpshared	_pthread_mutexattr_getpshared
135 #define		pthread_mutexattr_gettype	_pthread_mutexattr_gettype
136 #define		pthread_mutexattr_init		_pthread_mutexattr_init
137 #define		pthread_mutexattr_setkind_np	_pthread_mutexattr_setkind_np
138 #define		pthread_mutexattr_setprioceiling _pthread_mutexattr_setprioceiling
139 #define		pthread_mutexattr_setprotocol	_pthread_mutexattr_setprotocol
140 #define		pthread_mutexattr_setpshared	_pthread_mutexattr_setpshared
141 #define		pthread_mutexattr_settype	_pthread_mutexattr_settype
142 #define		pthread_once			_pthread_once
143 #define		pthread_resume_all_np		_pthread_resume_all_np
144 #define		pthread_resume_np		_pthread_resume_np
145 #define		pthread_rwlock_destroy		_pthread_rwlock_destroy
146 #define		pthread_rwlock_init		_pthread_rwlock_init
147 #define		pthread_rwlock_rdlock		_pthread_rwlock_rdlock
148 #define		pthread_rwlock_timedrdlock	_pthread_rwlock_timedrdlock
149 #define		pthread_rwlock_timedwrlock	_pthread_rwlock_timedwrlock
150 #define		pthread_rwlock_tryrdlock	_pthread_rwlock_tryrdlock
151 #define		pthread_rwlock_trywrlock	_pthread_rwlock_trywrlock
152 #define		pthread_rwlock_unlock		_pthread_rwlock_unlock
153 #define		pthread_rwlock_wrlock		_pthread_rwlock_wrlock
154 #define		pthread_rwlockattr_destroy	_pthread_rwlockattr_destroy
155 #define		pthread_rwlockattr_getpshared	_pthread_rwlockattr_getpshared
156 #define		pthread_rwlockattr_init		_pthread_rwlockattr_init
157 #define		pthread_rwlockattr_setpshared	_pthread_rwlockattr_setpshared
158 #define		pthread_self			_pthread_self
159 #define		pthread_set_name_np		_pthread_set_name_np
160 #define		pthread_setcancelstate		_pthread_setcancelstate
161 #define		pthread_setcanceltype		_pthread_setcanceltype
162 #define		pthread_setconcurrency		_pthread_setconcurrency
163 #define		pthread_setprio			_pthread_setprio
164 #define		pthread_setschedparam		_pthread_setschedparam
165 #define		pthread_setspecific		_pthread_setspecific
166 #define		pthread_sigmask			_pthread_sigmask
167 #define		pthread_single_np		_pthread_single_np
168 #define		pthread_spin_destroy		_pthread_spin_destroy
169 #define		pthread_spin_init		_pthread_spin_init
170 #define		pthread_spin_lock		_pthread_spin_lock
171 #define		pthread_spin_trylock		_pthread_spin_trylock
172 #define		pthread_spin_unlock		_pthread_spin_unlock
173 #define		pthread_suspend_all_np		_pthread_suspend_all_np
174 #define		pthread_suspend_np		_pthread_suspend_np
175 #define		pthread_switch_add_np		_pthread_switch_add_np
176 #define		pthread_switch_delete_np	_pthread_switch_delete_np
177 #define		pthread_testcancel		_pthread_testcancel
178 #define		pthread_timedjoin_np		_pthread_timedjoin_np
179 #define		pthread_yield			_pthread_yield
180 #define		read				_read
181 #define		readv				_readv
182 #define		recvfrom			_recvfrom
183 #define		recvmsg				_recvmsg
184 #define		select				_select
185 #define		sem_close			_sem_close
186 #define		sem_destroy			_sem_destroy
187 #define		sem_getvalue			_sem_getvalue
188 #define		sem_init			_sem_init
189 #define		sem_open			_sem_open
190 #define		sem_post			_sem_post
191 #define		sem_timedwait			_sem_timedwait
192 #define		sem_trywait			_sem_trywait
193 #define		sem_unlink			_sem_unlink
194 #define		sem_wait			_sem_wait
195 #define		sendmsg				_sendmsg
196 #define		sendto				_sendto
197 #define		setsockopt			_setsockopt
198 /*#define		sigaction			_sigaction*/
199 #define		sigprocmask			_sigprocmask
200 #define		sigsuspend			_sigsuspend
201 #define		socket				_socket
202 #define		socketpair			_socketpair
203 #define		wait4				_wait4
204 #define		write				_write
205 #define		writev				_writev
206 
207 
208 /*
209  * Other hidden syscalls/functions that libc_r needs to override
210  * but are not used internally by libc.
211  *
212  * XXX - When modifying libc to use one of the following, remove
213  * the prototype from below and place it in the list above.
214  */
215 #if 0
216 #define		creat				_creat
217 #define		fchflags			_fchflags
218 #define		fchmod				_fchmod
219 #define		fpathconf			_fpathconf
220 #define		ftrylockfile			_ftrylockfile
221 #define		msync				_msync
222 #define		nfssvc				_nfssvc
223 #define		pause				_pause
224 #define		sched_yield			_sched_yield
225 #define		sendfile			_sendfile
226 #define		shutdown			_shutdown
227 #define		sigaltstack			_sigaltstack
228 #define		signanosleep			_signanosleep
229 #define		sigpending			_sigpending
230 #define		sigreturn			_sigreturn
231 #define		sigsetmask			_sigsetmask
232 #define		sleep				_sleep
233 #define		system				_system
234 #define		tcdrain				_tcdrain
235 #define		wait				_wait
236 #define		waitpid				_waitpid
237 #endif
238 
239 #endif /* _NAMESPACE_H_ */
240 
241