xref: /freebsd/lib/libc/include/namespace.h (revision 6de306ecee3831f48debaad1d0b22418faa48e10)
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$
27  *
28  */
29 
30 #ifndef _NAMESPACE_H_
31 #define _NAMESPACE_H_
32 
33 /*
34  * Prototypes for syscalls/functions that need to be overridden
35  * in libc_r/libpthread.
36  */
37 #define		accept				_accept
38 #define		bind				_bind
39 #define		close				_close
40 #define		connect				_connect
41 #define		dup				_dup
42 #define		dup2				_dup2
43 #define		execve				_execve
44 #define		fcntl				_fcntl
45 /*#define		flock				_flock */
46 #define		flockfile			_flockfile
47 #define		fstat				_fstat
48 #define		fstatfs				_fstatfs
49 #define		fsync				_fsync
50 #define		funlockfile			_funlockfile
51 #define		getdirentries			_getdirentries
52 #define		getlogin			_getlogin
53 #define		getpeername			_getpeername
54 #define		getsockname			_getsockname
55 #define		getsockopt			_getsockopt
56 #define		ioctl				_ioctl
57 /* #define		kevent				_kevent */
58 #define		listen				_listen
59 #define		nanosleep			_nanosleep
60 #define		open				_open
61 #define		pthread_getspecific		_pthread_getspecific
62 #define		pthread_key_create		_pthread_key_create
63 #define		pthread_key_delete		_pthread_key_delete
64 #define		pthread_mutex_destroy		_pthread_mutex_destroy
65 #define		pthread_mutex_init		_pthread_mutex_init
66 #define		pthread_mutex_lock		_pthread_mutex_lock
67 #define		pthread_mutex_trylock		_pthread_mutex_trylock
68 #define		pthread_mutex_unlock		_pthread_mutex_unlock
69 #define		pthread_mutexattr_init		_pthread_mutexattr_init
70 #define		pthread_mutexattr_destroy	_pthread_mutexattr_destroy
71 #define		pthread_mutexattr_settype	_pthread_mutexattr_settype
72 #define		pthread_once			_pthread_once
73 #define		pthread_self			_pthread_self
74 #define		pthread_setspecific		_pthread_setspecific
75 #define		read				_read
76 #define		readv				_readv
77 #define		recvfrom			_recvfrom
78 #define		recvmsg				_recvmsg
79 #define		select				_select
80 #define		sendmsg				_sendmsg
81 #define		sendto				_sendto
82 #define		setsockopt			_setsockopt
83 /*#define		sigaction			_sigaction*/
84 #define		sigprocmask			_sigprocmask
85 #define		sigsuspend			_sigsuspend
86 #define		socket				_socket
87 #define		socketpair			_socketpair
88 #define		wait4				_wait4
89 #define		write				_write
90 #define		writev				_writev
91 
92 
93 /*
94  * Other hidden syscalls/functions that libc_r needs to override
95  * but are not used internally by libc.
96  *
97  * XXX - When modifying libc to use one of the following, remove
98  * the prototype from below and place it in the list above.
99  */
100 #if 0
101 #define		creat				_creat
102 #define		fchflags			_fchflags
103 #define		fchmod				_fchmod
104 #define		fpathconf			_fpathconf
105 #define		ftrylockfile			_ftrylockfile
106 #define		msync				_msync
107 #define		nfssvc				_nfssvc
108 #define		pause				_pause
109 #define		poll				_poll
110 #define		pthread_rwlock_destroy		_pthread_rwlock_destroy
111 #define		pthread_rwlock_init		_pthread_rwlock_init
112 #define		pthread_rwlock_rdlock		_pthread_rwlock_rdlock
113 #define		pthread_rwlock_tryrdlock	_pthread_rwlock_tryrdlock
114 #define		pthread_rwlock_trywrlock	_pthread_rwlock_trywrlock
115 #define		pthread_rwlock_unlock		_pthread_rwlock_unlock
116 #define		pthread_rwlock_wrlock		_pthread_rwlock_wrlock
117 #define		pthread_rwlockattr_init		_pthread_rwlockattr_init
118 #define		pthread_rwlockattr_destroy	_pthread_rwlockattr_destroy
119 #define		sched_yield			_sched_yield
120 #define		sendfile			_sendfile
121 #define		shutdown			_shutdown
122 #define		sigaltstack			_sigaltstack
123 #define		signanosleep			_signanosleep
124 #define		sigpending			_sigpending
125 #define		sigreturn			_sigreturn
126 #define		sigsetmask			_sigsetmask
127 #define		sleep				_sleep
128 #define		system				_system
129 #define		tcdrain				_tcdrain
130 #define		wait				_wait
131 #define		waitpid				_waitpid
132 #endif
133 
134 #endif /* _NAMESPACE_H_ */
135