namespace.h revision 176058
164562Sgshapiro/*
294334Sgshapiro * Copyright (c) 2001 Daniel Eischen <deischen@FreeBSD.org>.
364562Sgshapiro * All rights reserved.
464562Sgshapiro *
564562Sgshapiro * Redistribution and use in source and binary forms, with or without
664562Sgshapiro * modification, are permitted provided that the following conditions
764562Sgshapiro * are met:
864562Sgshapiro * 1. Redistributions of source code must retain the above copyright
964562Sgshapiro *    notice, this list of conditions and the following disclaimer.
1064562Sgshapiro * 2. Redistributions in binary form must reproduce the above copyright
1164562Sgshapiro *    notice, this list of conditions and the following disclaimer in the
1264562Sgshapiro *    documentation and/or other materials provided with the distribution.
1364562Sgshapiro *
1490792Sgshapiro * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1590792Sgshapiro * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1690792Sgshapiro * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1777349Sgshapiro * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1864562Sgshapiro * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1964562Sgshapiro * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2064562Sgshapiro * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2190792Sgshapiro * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2264562Sgshapiro * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23110560Sgshapiro * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2464562Sgshapiro * SUCH DAMAGE.
2577349Sgshapiro *
2664562Sgshapiro * $FreeBSD: head/lib/libc/include/namespace.h 176058 2008-02-06 20:42:35Z des $
2764562Sgshapiro */
2864562Sgshapiro
2964562Sgshapiro#ifndef _NAMESPACE_H_
3064562Sgshapiro#define _NAMESPACE_H_
3164562Sgshapiro
3264562Sgshapiro/*
3364562Sgshapiro * Adjust names so that headers declare "hidden" names.
3490792Sgshapiro *
3564562Sgshapiro * README: When modifying this file don't forget to make the appropriate
3690792Sgshapiro *         changes in un-namespace.h!!!
3790792Sgshapiro */
3864562Sgshapiro
3990792Sgshapiro/*
4064562Sgshapiro * ISO C (C90) section.  Most names in libc aren't in ISO C, so they
4164562Sgshapiro * should be here.  Most aren't here...
4264562Sgshapiro */
4364562Sgshapiro#define		err				_err
4464562Sgshapiro#define		warn				_warn
4564562Sgshapiro#define		nsdispatch			_nsdispatch
4664562Sgshapiro
4764562Sgshapiro/*
4864562Sgshapiro * Prototypes for syscalls/functions that need to be overridden
4964562Sgshapiro * in libc_r/libpthread.
5064562Sgshapiro */
5164562Sgshapiro#define		accept				_accept
5290792Sgshapiro#define		__acl_aclcheck_fd		___acl_aclcheck_fd
5364562Sgshapiro#define		__acl_delete_fd			___acl_delete_fd
5464562Sgshapiro#define		__acl_get_fd			___acl_get_fd
5564562Sgshapiro#define		__acl_set_fd			___acl_set_fd
5664562Sgshapiro#define		bind				_bind
5764562Sgshapiro#define		__cap_get_fd			___cap_get_fd
5864562Sgshapiro#define		__cap_set_fd			___cap_set_fd
5964562Sgshapiro#define		close				_close
6064562Sgshapiro#define		connect				_connect
6164562Sgshapiro#define		dup				_dup
6264562Sgshapiro#define		dup2				_dup2
6364562Sgshapiro#define		execve				_execve
6464562Sgshapiro#define		fcntl				_fcntl
6564562Sgshapiro/*#define		flock				_flock */
6664562Sgshapiro#define		flockfile			_flockfile
6764562Sgshapiro#define		fpathconf			_fpathconf
6864562Sgshapiro#define		fstat				_fstat
6964562Sgshapiro#define		fstatfs				_fstatfs
7064562Sgshapiro#define		fsync				_fsync
7164562Sgshapiro#define		funlockfile			_funlockfile
7264562Sgshapiro#define		getdirentries			_getdirentries
7364562Sgshapiro#define		getlogin			_getlogin
7464562Sgshapiro#define		getpeername			_getpeername
7564562Sgshapiro#define		getprogname			_getprogname
7664562Sgshapiro#define		getsockname			_getsockname
7764562Sgshapiro#define		getsockopt			_getsockopt
7864562Sgshapiro#define		ioctl				_ioctl
7964562Sgshapiro/* #define		kevent				_kevent */
8064562Sgshapiro#define		listen				_listen
8164562Sgshapiro#define		nanosleep			_nanosleep
8290792Sgshapiro#define		open				_open
8390792Sgshapiro#define		poll				_poll
8490792Sgshapiro#define		pthread_atfork			_pthread_atfork
8590792Sgshapiro#define		pthread_attr_destroy		_pthread_attr_destroy
8690792Sgshapiro#define		pthread_attr_get_np		_pthread_attr_get_np
8764562Sgshapiro#define		pthread_attr_getdetachstate	_pthread_attr_getdetachstate
8890792Sgshapiro#define		pthread_attr_getguardsize	_pthread_attr_getguardsize
8990792Sgshapiro#define		pthread_attr_getinheritsched	_pthread_attr_getinheritsched
9090792Sgshapiro#define		pthread_attr_getschedparam	_pthread_attr_getschedparam
9190792Sgshapiro#define		pthread_attr_getschedpolicy	_pthread_attr_getschedpolicy
9290792Sgshapiro#define		pthread_attr_getscope		_pthread_attr_getscope
9390792Sgshapiro#define		pthread_attr_getstack		_pthread_attr_getstack
9490792Sgshapiro#define		pthread_attr_getstackaddr	_pthread_attr_getstackaddr
9590792Sgshapiro#define		pthread_attr_getstacksize	_pthread_attr_getstacksize
9690792Sgshapiro#define		pthread_attr_init		_pthread_attr_init
9790792Sgshapiro#define		pthread_attr_setcreatesuspend_np _pthread_attr_setcreatesuspend_np
9890792Sgshapiro#define		pthread_attr_setdetachstate	_pthread_attr_setdetachstate
9966494Sgshapiro#define		pthread_attr_setguardsize	_pthread_attr_setguardsize
10090792Sgshapiro#define		pthread_attr_setinheritsched	_pthread_attr_setinheritsched
10166494Sgshapiro#define		pthread_attr_setschedparam	_pthread_attr_setschedparam
10266494Sgshapiro#define		pthread_attr_setschedpolicy	_pthread_attr_setschedpolicy
10390792Sgshapiro#define		pthread_attr_setscope		_pthread_attr_setscope
10490792Sgshapiro#define		pthread_attr_setstack		_pthread_attr_setstack
10590792Sgshapiro#define		pthread_attr_setstackaddr	_pthread_attr_setstackaddr
10690792Sgshapiro#define		pthread_attr_setstacksize	_pthread_attr_setstacksize
10790792Sgshapiro#define		pthread_barrier_destroy		_pthread_barrier_destroy
10877349Sgshapiro#define		pthread_barrier_init		_pthread_barrier_init
10990792Sgshapiro#define		pthread_barrier_wait		_pthread_barrier_wait
11090792Sgshapiro#define		pthread_barrierattr_destroy	_pthread_barrierattr_destroy
11198121Sgshapiro#define		pthread_barrierattr_getpshared	_pthread_barrierattr_getpshared
11290792Sgshapiro#define		pthread_barrierattr_init	_pthread_barrierattr_init
11390792Sgshapiro#define		pthread_barrierattr_setpshared	_pthread_barrierattr_setpshared
11490792Sgshapiro#define		pthread_cancel			_pthread_cancel
11590792Sgshapiro#define		pthread_cleanup_pop		_pthread_cleanup_pop
11664562Sgshapiro#define		pthread_cleanup_push		_pthread_cleanup_push
11764562Sgshapiro#define		pthread_cond_broadcast		_pthread_cond_broadcast
11864562Sgshapiro#define		pthread_cond_destroy		_pthread_cond_destroy
11964562Sgshapiro#define		pthread_cond_init		_pthread_cond_init
12064562Sgshapiro#define		pthread_cond_signal		_pthread_cond_signal
12198121Sgshapiro#define		pthread_cond_timedwait		_pthread_cond_timedwait
12298121Sgshapiro#define		pthread_cond_wait		_pthread_cond_wait
12390792Sgshapiro#define		pthread_condattr_destroy	_pthread_condattr_destroy
12498121Sgshapiro#define		pthread_condattr_getclock	_pthread_condattr_getclock
12564562Sgshapiro#define		pthread_condattr_getpshared	_pthread_condattr_getpshared
12664562Sgshapiro#define		pthread_condattr_init		_pthread_condattr_init
12764562Sgshapiro#define		pthread_condattr_setclock	_pthread_condattr_setclock
12866494Sgshapiro#define		pthread_condattr_setpshared	_pthread_condattr_setpshared
12964562Sgshapiro#define		pthread_create			_pthread_create
13064562Sgshapiro#define		pthread_detach			_pthread_detach
13164562Sgshapiro#define		pthread_equal			_pthread_equal
13277349Sgshapiro#define		pthread_exit			_pthread_exit
13377349Sgshapiro#define		pthread_getconcurrency		_pthread_getconcurrency
13490792Sgshapiro#define		pthread_getprio			_pthread_getprio
13564562Sgshapiro#define		pthread_getschedparam		_pthread_getschedparam
13690792Sgshapiro#define		pthread_getspecific		_pthread_getspecific
13764562Sgshapiro#define		pthread_join			_pthread_join
13864562Sgshapiro#define		pthread_key_create		_pthread_key_create
13964562Sgshapiro#define		pthread_key_delete		_pthread_key_delete
14064562Sgshapiro#define		pthread_kill			_pthread_kill
14164562Sgshapiro#define		pthread_main_np			_pthread_main_np
14264562Sgshapiro#define		pthread_multi_np		_pthread_multi_np
14398121Sgshapiro#define		pthread_mutex_destroy		_pthread_mutex_destroy
14464562Sgshapiro#define		pthread_mutex_getprioceiling	_pthread_mutex_getprioceiling
14564562Sgshapiro#define		pthread_mutex_init		_pthread_mutex_init
14690792Sgshapiro#define		pthread_mutex_isowned_np	_pthread_mutex_isowned_np
14790792Sgshapiro#define		pthread_mutex_lock		_pthread_mutex_lock
14864562Sgshapiro#define		pthread_mutex_setprioceiling	_pthread_mutex_setprioceiling
14964562Sgshapiro#define		pthread_mutex_timedlock		_pthread_mutex_timedlock
15064562Sgshapiro#define		pthread_mutex_trylock		_pthread_mutex_trylock
15164562Sgshapiro#define		pthread_mutex_unlock		_pthread_mutex_unlock
15264562Sgshapiro#define		pthread_mutexattr_destroy	_pthread_mutexattr_destroy
15364562Sgshapiro#define		pthread_mutexattr_getkind_np	_pthread_mutexattr_getkind_np
15464562Sgshapiro#define		pthread_mutexattr_getprioceiling _pthread_mutexattr_getprioceiling
15564562Sgshapiro#define		pthread_mutexattr_getprotocol	_pthread_mutexattr_getprotocol
15664562Sgshapiro#define		pthread_mutexattr_getpshared	_pthread_mutexattr_getpshared
15764562Sgshapiro#define		pthread_mutexattr_gettype	_pthread_mutexattr_gettype
15890792Sgshapiro#define		pthread_mutexattr_init		_pthread_mutexattr_init
15964562Sgshapiro#define		pthread_mutexattr_setkind_np	_pthread_mutexattr_setkind_np
16064562Sgshapiro#define		pthread_mutexattr_setprioceiling _pthread_mutexattr_setprioceiling
16190792Sgshapiro#define		pthread_mutexattr_setprotocol	_pthread_mutexattr_setprotocol
16290792Sgshapiro#define		pthread_mutexattr_setpshared	_pthread_mutexattr_setpshared
16364562Sgshapiro#define		pthread_mutexattr_settype	_pthread_mutexattr_settype
16464562Sgshapiro#define		pthread_once			_pthread_once
16577349Sgshapiro#define		pthread_resume_all_np		_pthread_resume_all_np
16664562Sgshapiro#define		pthread_resume_np		_pthread_resume_np
16777349Sgshapiro#define		pthread_rwlock_destroy		_pthread_rwlock_destroy
16864562Sgshapiro#define		pthread_rwlock_init		_pthread_rwlock_init
16977349Sgshapiro#define		pthread_rwlock_rdlock		_pthread_rwlock_rdlock
17064562Sgshapiro#define		pthread_rwlock_timedrdlock	_pthread_rwlock_timedrdlock
17164562Sgshapiro#define		pthread_rwlock_timedwrlock	_pthread_rwlock_timedwrlock
17298121Sgshapiro#define		pthread_rwlock_tryrdlock	_pthread_rwlock_tryrdlock
17390792Sgshapiro#define		pthread_rwlock_trywrlock	_pthread_rwlock_trywrlock
17464562Sgshapiro#define		pthread_rwlock_unlock		_pthread_rwlock_unlock
17564562Sgshapiro#define		pthread_rwlock_wrlock		_pthread_rwlock_wrlock
17664562Sgshapiro#define		pthread_rwlockattr_destroy	_pthread_rwlockattr_destroy
17764562Sgshapiro#define		pthread_rwlockattr_getpshared	_pthread_rwlockattr_getpshared
17898121Sgshapiro#define		pthread_rwlockattr_init		_pthread_rwlockattr_init
17990792Sgshapiro#define		pthread_rwlockattr_setpshared	_pthread_rwlockattr_setpshared
18064562Sgshapiro#define		pthread_self			_pthread_self
18164562Sgshapiro#define		pthread_set_name_np		_pthread_set_name_np
18264562Sgshapiro#define		pthread_setcancelstate		_pthread_setcancelstate
18364562Sgshapiro#define		pthread_setcanceltype		_pthread_setcanceltype
18464562Sgshapiro#define		pthread_setconcurrency		_pthread_setconcurrency
18564562Sgshapiro#define		pthread_setprio			_pthread_setprio
18690792Sgshapiro#define		pthread_setschedparam		_pthread_setschedparam
18764562Sgshapiro#define		pthread_setspecific		_pthread_setspecific
18864562Sgshapiro#define		pthread_sigmask			_pthread_sigmask
18964562Sgshapiro#define		pthread_single_np		_pthread_single_np
19064562Sgshapiro#define		pthread_spin_destroy		_pthread_spin_destroy
19164562Sgshapiro#define		pthread_spin_init		_pthread_spin_init
19264562Sgshapiro#define		pthread_spin_lock		_pthread_spin_lock
19364562Sgshapiro#define		pthread_spin_trylock		_pthread_spin_trylock
19464562Sgshapiro#define		pthread_spin_unlock		_pthread_spin_unlock
19564562Sgshapiro#define		pthread_suspend_all_np		_pthread_suspend_all_np
19664562Sgshapiro#define		pthread_suspend_np		_pthread_suspend_np
19790792Sgshapiro#define		pthread_switch_add_np		_pthread_switch_add_np
19890792Sgshapiro#define		pthread_switch_delete_np	_pthread_switch_delete_np
19990792Sgshapiro#define		pthread_testcancel		_pthread_testcancel
20090792Sgshapiro#define		pthread_timedjoin_np		_pthread_timedjoin_np
20177349Sgshapiro#define		pthread_yield			_pthread_yield
20290792Sgshapiro#define		read				_read
20364562Sgshapiro#define		readv				_readv
20464562Sgshapiro#define		recvfrom			_recvfrom
20564562Sgshapiro#define		recvmsg				_recvmsg
20664562Sgshapiro#define		select				_select
20764562Sgshapiro#define		sem_close			_sem_close
20864562Sgshapiro#define		sem_destroy			_sem_destroy
20964562Sgshapiro#define		sem_getvalue			_sem_getvalue
21064562Sgshapiro#define		sem_init			_sem_init
21198121Sgshapiro#define		sem_open			_sem_open
21264562Sgshapiro#define		sem_post			_sem_post
21364562Sgshapiro#define		sem_timedwait			_sem_timedwait
21498121Sgshapiro#define		sem_trywait			_sem_trywait
21598121Sgshapiro#define		sem_unlink			_sem_unlink
21698121Sgshapiro#define		sem_wait			_sem_wait
21798121Sgshapiro#define		sendmsg				_sendmsg
21898121Sgshapiro#define		sendto				_sendto
21998121Sgshapiro#define		setsockopt			_setsockopt
22064562Sgshapiro/*#define		sigaction			_sigaction*/
22198121Sgshapiro#define		sigprocmask			_sigprocmask
22264562Sgshapiro#define		sigsuspend			_sigsuspend
22364562Sgshapiro#define		socket				_socket
22464562Sgshapiro#define		socketpair			_socketpair
22564562Sgshapiro#define		usleep				_usleep
22664562Sgshapiro#define		wait4				_wait4
22764562Sgshapiro#define		waitpid				_waitpid
22890792Sgshapiro#define		write				_write
22990792Sgshapiro#define		writev				_writev
23090792Sgshapiro
23190792Sgshapiro
23290792Sgshapiro/*
23390792Sgshapiro * Other hidden syscalls/functions that libc_r needs to override
23464562Sgshapiro * but are not used internally by libc.
23564562Sgshapiro *
23664562Sgshapiro * XXX - When modifying libc to use one of the following, remove
23764562Sgshapiro * the prototype from below and place it in the list above.
23864562Sgshapiro */
23964562Sgshapiro#if 0
24064562Sgshapiro#define		creat				_creat
24164562Sgshapiro#define		fchflags			_fchflags
24264562Sgshapiro#define		fchmod				_fchmod
24364562Sgshapiro#define		ftrylockfile			_ftrylockfile
24464562Sgshapiro#define		msync				_msync
24564562Sgshapiro#define		nfssvc				_nfssvc
24690792Sgshapiro#define		pause				_pause
24764562Sgshapiro#define		sched_yield			_sched_yield
24864562Sgshapiro#define		sendfile			_sendfile
24964562Sgshapiro#define		shutdown			_shutdown
25064562Sgshapiro#define		sigaltstack			_sigaltstack
25164562Sgshapiro#define		sigpending			_sigpending
25277349Sgshapiro#define		sigreturn			_sigreturn
25390792Sgshapiro#define		sigsetmask			_sigsetmask
25477349Sgshapiro#define		sleep				_sleep
25577349Sgshapiro#define		system				_system
25664562Sgshapiro#define		tcdrain				_tcdrain
25790792Sgshapiro#define		wait				_wait
25864562Sgshapiro#endif
25964562Sgshapiro
26064562Sgshapiro#endif /* _NAMESPACE_H_ */
26190792Sgshapiro