117ea2221SMatthew Dillon /* 217ea2221SMatthew Dillon * Copyright (c) 2001 Daniel Eischen <deischen@FreeBSD.org>. 317ea2221SMatthew Dillon * All rights reserved. 417ea2221SMatthew Dillon * 517ea2221SMatthew Dillon * Redistribution and use in source and binary forms, with or without 617ea2221SMatthew Dillon * modification, are permitted provided that the following conditions 717ea2221SMatthew Dillon * are met: 817ea2221SMatthew Dillon * 1. Redistributions of source code must retain the above copyright 917ea2221SMatthew Dillon * notice, this list of conditions and the following disclaimer. 1017ea2221SMatthew Dillon * 2. Redistributions in binary form must reproduce the above copyright 1117ea2221SMatthew Dillon * notice, this list of conditions and the following disclaimer in the 1217ea2221SMatthew Dillon * documentation and/or other materials provided with the distribution. 1317ea2221SMatthew Dillon * 1417ea2221SMatthew Dillon * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1517ea2221SMatthew Dillon * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1617ea2221SMatthew Dillon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1717ea2221SMatthew Dillon * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1817ea2221SMatthew Dillon * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1917ea2221SMatthew Dillon * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2017ea2221SMatthew Dillon * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2117ea2221SMatthew Dillon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2217ea2221SMatthew Dillon * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2317ea2221SMatthew Dillon * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2417ea2221SMatthew Dillon * SUCH DAMAGE. 2517ea2221SMatthew Dillon * 2617ea2221SMatthew Dillon * $FreeBSD: /repoman/r/ncvs/src/lib/libc/include/namespace.h,v 1.1 2001/01/24 13:00:08 deischen Exp $ 2717ea2221SMatthew Dillon */ 2817ea2221SMatthew Dillon 2917ea2221SMatthew Dillon #ifndef _NAMESPACE_H_ 3017ea2221SMatthew Dillon #define _NAMESPACE_H_ 3117ea2221SMatthew Dillon 3217ea2221SMatthew Dillon /* 33e2b7bcaeSSascha Wildner * Adjust names so that headers declare "hidden" names. 34e2b7bcaeSSascha Wildner * 35e2b7bcaeSSascha Wildner * README: When modifying this file don't forget to make the appropriate 36e2b7bcaeSSascha Wildner * changes in un-namespace.h!!! 37e2b7bcaeSSascha Wildner */ 38e2b7bcaeSSascha Wildner 39e2b7bcaeSSascha Wildner /* 40ed5d5720SPeter Avalos * ISO C (C90) section. Most names in libc aren't in ISO C, so they 41ed5d5720SPeter Avalos * should be here. Most aren't here... 42ed5d5720SPeter Avalos */ 43e2b7bcaeSSascha Wildner #define err _err 44e2b7bcaeSSascha Wildner #define warn _warn 45ed5d5720SPeter Avalos #define nsdispatch _nsdispatch 46ed5d5720SPeter Avalos 47ed5d5720SPeter Avalos /* 4817ea2221SMatthew Dillon * Prototypes for syscalls/functions that need to be overridden 4978897f0bSSascha Wildner * in libpthread. 5017ea2221SMatthew Dillon */ 5117ea2221SMatthew Dillon #define accept _accept 5217ea2221SMatthew Dillon #define bind _bind 5386ccdacbSAaron LI #define clock_nanosleep _clock_nanosleep 5417ea2221SMatthew Dillon #define close _close 5517ea2221SMatthew Dillon #define connect _connect 5617ea2221SMatthew Dillon #define dup _dup 5717ea2221SMatthew Dillon #define dup2 _dup2 5817ea2221SMatthew Dillon #define execve _execve 5917ea2221SMatthew Dillon #define fcntl _fcntl 6017ea2221SMatthew Dillon /*#define flock _flock*/ 6117ea2221SMatthew Dillon #define flockfile _flockfile 6217ea2221SMatthew Dillon #define fstat _fstat 6317ea2221SMatthew Dillon #define fstatfs _fstatfs 6417ea2221SMatthew Dillon #define fsync _fsync 6517ea2221SMatthew Dillon #define funlockfile _funlockfile 6617ea2221SMatthew Dillon #define getdirentries _getdirentries 6717ea2221SMatthew Dillon #define getlogin _getlogin 6817ea2221SMatthew Dillon #define getpeername _getpeername 69e735fb00SSascha Wildner #define getprogname _getprogname 7017ea2221SMatthew Dillon #define getsockname _getsockname 7117ea2221SMatthew Dillon #define getsockopt _getsockopt 7217ea2221SMatthew Dillon #define ioctl _ioctl 7317ea2221SMatthew Dillon /*#define kevent _kevent*/ 7417ea2221SMatthew Dillon #define listen _listen 7517ea2221SMatthew Dillon #define nanosleep _nanosleep 7617ea2221SMatthew Dillon #define open _open 7711699d20SMatthew Dillon #define openat _openat 78*563ed2c8SMatthew Dillon #define mkdirat _mkdirat 7911699d20SMatthew Dillon #define unlink _unlink 8011699d20SMatthew Dillon #define unlinkat _unlinkat 81ce0e08e2SPeter Avalos #define poll _poll 826d2444c4SImre Vadasz #define ppoll _ppoll 83bc2f376eSDavid Xu #define pthread_atfork _pthread_atfork 84bc2f376eSDavid Xu #define pthread_attr_destroy _pthread_attr_destroy 85bc2f376eSDavid Xu #define pthread_attr_get_np _pthread_attr_get_np 863ae362f2SSepherosa Ziehau #define pthread_attr_getaffinity_np _pthread_attr_getaffinity_np 87bc2f376eSDavid Xu #define pthread_attr_getdetachstate _pthread_attr_getdetachstate 88bc2f376eSDavid Xu #define pthread_attr_getguardsize _pthread_attr_getguardsize 89bc2f376eSDavid Xu #define pthread_attr_getinheritsched _pthread_attr_getinheritsched 90bc2f376eSDavid Xu #define pthread_attr_getschedparam _pthread_attr_getschedparam 91bc2f376eSDavid Xu #define pthread_attr_getschedpolicy _pthread_attr_getschedpolicy 92bc2f376eSDavid Xu #define pthread_attr_getscope _pthread_attr_getscope 93bc2f376eSDavid Xu #define pthread_attr_getstack _pthread_attr_getstack 94bc2f376eSDavid Xu #define pthread_attr_getstackaddr _pthread_attr_getstackaddr 95bc2f376eSDavid Xu #define pthread_attr_getstacksize _pthread_attr_getstacksize 96bc2f376eSDavid Xu #define pthread_attr_init _pthread_attr_init 973ae362f2SSepherosa Ziehau #define pthread_attr_setaffinity_np _pthread_attr_setaffinity_np 98bc2f376eSDavid Xu #define pthread_attr_setcreatesuspend_np _pthread_attr_setcreatesuspend_np 99bc2f376eSDavid Xu #define pthread_attr_setdetachstate _pthread_attr_setdetachstate 100bc2f376eSDavid Xu #define pthread_attr_setguardsize _pthread_attr_setguardsize 101bc2f376eSDavid Xu #define pthread_attr_setinheritsched _pthread_attr_setinheritsched 102bc2f376eSDavid Xu #define pthread_attr_setschedparam _pthread_attr_setschedparam 103bc2f376eSDavid Xu #define pthread_attr_setschedpolicy _pthread_attr_setschedpolicy 104bc2f376eSDavid Xu #define pthread_attr_setscope _pthread_attr_setscope 105bc2f376eSDavid Xu #define pthread_attr_setstack _pthread_attr_setstack 106bc2f376eSDavid Xu #define pthread_attr_setstackaddr _pthread_attr_setstackaddr 107bc2f376eSDavid Xu #define pthread_attr_setstacksize _pthread_attr_setstacksize 108bc2f376eSDavid Xu #define pthread_barrier_destroy _pthread_barrier_destroy 109bc2f376eSDavid Xu #define pthread_barrier_init _pthread_barrier_init 110bc2f376eSDavid Xu #define pthread_barrier_wait _pthread_barrier_wait 111bc2f376eSDavid Xu #define pthread_barrierattr_destroy _pthread_barrierattr_destroy 112bc2f376eSDavid Xu #define pthread_barrierattr_getpshared _pthread_barrierattr_getpshared 113bc2f376eSDavid Xu #define pthread_barrierattr_init _pthread_barrierattr_init 114bc2f376eSDavid Xu #define pthread_barrierattr_setpshared _pthread_barrierattr_setpshared 115bc2f376eSDavid Xu #define pthread_cancel _pthread_cancel 116bc2f376eSDavid Xu #define pthread_cleanup_pop _pthread_cleanup_pop 117bc2f376eSDavid Xu #define pthread_cleanup_push _pthread_cleanup_push 118bc2f376eSDavid Xu #define pthread_cond_broadcast _pthread_cond_broadcast 119bc2f376eSDavid Xu #define pthread_cond_destroy _pthread_cond_destroy 120bc2f376eSDavid Xu #define pthread_cond_init _pthread_cond_init 121bc2f376eSDavid Xu #define pthread_cond_signal _pthread_cond_signal 122bc2f376eSDavid Xu #define pthread_cond_timedwait _pthread_cond_timedwait 123bc2f376eSDavid Xu #define pthread_cond_wait _pthread_cond_wait 124bc2f376eSDavid Xu #define pthread_condattr_destroy _pthread_condattr_destroy 125bc2f376eSDavid Xu #define pthread_condattr_getclock _pthread_condattr_getclock 126bc2f376eSDavid Xu #define pthread_condattr_getpshared _pthread_condattr_getpshared 127bc2f376eSDavid Xu #define pthread_condattr_init _pthread_condattr_init 128bc2f376eSDavid Xu #define pthread_condattr_setclock _pthread_condattr_setclock 129bc2f376eSDavid Xu #define pthread_condattr_setpshared _pthread_condattr_setpshared 130bc2f376eSDavid Xu #define pthread_create _pthread_create 131bc2f376eSDavid Xu #define pthread_detach _pthread_detach 132bc2f376eSDavid Xu #define pthread_equal _pthread_equal 133bc2f376eSDavid Xu #define pthread_exit _pthread_exit 134ab5dc9acSSascha Wildner #define pthread_get_name_np _pthread_get_name_np 135b2920380SSepherosa Ziehau #define pthread_getaffinity_np _pthread_getaffinity_np 13655f11bd6Szrj #define pthread_getattr_np _pthread_getattr_np 137bc2f376eSDavid Xu #define pthread_getconcurrency _pthread_getconcurrency 138725edadfSSascha Wildner #define pthread_getcpuclockid _pthread_getcpuclockid 139ab5dc9acSSascha Wildner #define pthread_getname_np _pthread_getname_np 140bc2f376eSDavid Xu #define pthread_getprio _pthread_getprio 141bc2f376eSDavid Xu #define pthread_getschedparam _pthread_getschedparam 14217ea2221SMatthew Dillon #define pthread_getspecific _pthread_getspecific 143c0f25c26SImre Vadász #define pthread_getthreadid_np _pthread_getthreadid_np 144139374e6Szrj #define pthread_is_threaded_np _pthread_is_threaded_np 145bc2f376eSDavid Xu #define pthread_join _pthread_join 14617ea2221SMatthew Dillon #define pthread_key_create _pthread_key_create 14717ea2221SMatthew Dillon #define pthread_key_delete _pthread_key_delete 148bc2f376eSDavid Xu #define pthread_kill _pthread_kill 149bc2f376eSDavid Xu #define pthread_main_np _pthread_main_np 150bc2f376eSDavid Xu #define pthread_multi_np _pthread_multi_np 15117ea2221SMatthew Dillon #define pthread_mutex_destroy _pthread_mutex_destroy 152bc2f376eSDavid Xu #define pthread_mutex_getprioceiling _pthread_mutex_getprioceiling 15317ea2221SMatthew Dillon #define pthread_mutex_init _pthread_mutex_init 15417ea2221SMatthew Dillon #define pthread_mutex_lock _pthread_mutex_lock 155bc2f376eSDavid Xu #define pthread_mutex_setprioceiling _pthread_mutex_setprioceiling 156bc2f376eSDavid Xu #define pthread_mutex_timedlock _pthread_mutex_timedlock 15717ea2221SMatthew Dillon #define pthread_mutex_trylock _pthread_mutex_trylock 15817ea2221SMatthew Dillon #define pthread_mutex_unlock _pthread_mutex_unlock 15917ea2221SMatthew Dillon #define pthread_mutexattr_destroy _pthread_mutexattr_destroy 160bc2f376eSDavid Xu #define pthread_mutexattr_getkind_np _pthread_mutexattr_getkind_np 161bc2f376eSDavid Xu #define pthread_mutexattr_getprioceiling _pthread_mutexattr_getprioceiling 162bc2f376eSDavid Xu #define pthread_mutexattr_getprotocol _pthread_mutexattr_getprotocol 163bc2f376eSDavid Xu #define pthread_mutexattr_getpshared _pthread_mutexattr_getpshared 164bc2f376eSDavid Xu #define pthread_mutexattr_gettype _pthread_mutexattr_gettype 165bc2f376eSDavid Xu #define pthread_mutexattr_init _pthread_mutexattr_init 166bc2f376eSDavid Xu #define pthread_mutexattr_setkind_np _pthread_mutexattr_setkind_np 167bc2f376eSDavid Xu #define pthread_mutexattr_setprioceiling _pthread_mutexattr_setprioceiling 168bc2f376eSDavid Xu #define pthread_mutexattr_setprotocol _pthread_mutexattr_setprotocol 169bc2f376eSDavid Xu #define pthread_mutexattr_setpshared _pthread_mutexattr_setpshared 17017ea2221SMatthew Dillon #define pthread_mutexattr_settype _pthread_mutexattr_settype 17117ea2221SMatthew Dillon #define pthread_once _pthread_once 172bc2f376eSDavid Xu #define pthread_resume_all_np _pthread_resume_all_np 173bc2f376eSDavid Xu #define pthread_resume_np _pthread_resume_np 174bc2f376eSDavid Xu #define pthread_rwlock_destroy _pthread_rwlock_destroy 175bc2f376eSDavid Xu #define pthread_rwlock_init _pthread_rwlock_init 176bc2f376eSDavid Xu #define pthread_rwlock_rdlock _pthread_rwlock_rdlock 177bc2f376eSDavid Xu #define pthread_rwlock_timedrdlock _pthread_rwlock_timedrdlock 178bc2f376eSDavid Xu #define pthread_rwlock_timedwrlock _pthread_rwlock_timedwrlock 179bc2f376eSDavid Xu #define pthread_rwlock_tryrdlock _pthread_rwlock_tryrdlock 180bc2f376eSDavid Xu #define pthread_rwlock_trywrlock _pthread_rwlock_trywrlock 181bc2f376eSDavid Xu #define pthread_rwlock_unlock _pthread_rwlock_unlock 182bc2f376eSDavid Xu #define pthread_rwlock_wrlock _pthread_rwlock_wrlock 183bc2f376eSDavid Xu #define pthread_rwlockattr_destroy _pthread_rwlockattr_destroy 184bc2f376eSDavid Xu #define pthread_rwlockattr_getpshared _pthread_rwlockattr_getpshared 185bc2f376eSDavid Xu #define pthread_rwlockattr_init _pthread_rwlockattr_init 186bc2f376eSDavid Xu #define pthread_rwlockattr_setpshared _pthread_rwlockattr_setpshared 187e2500a97SJoerg Sonnenberger #define pthread_self _pthread_self 188bc2f376eSDavid Xu #define pthread_set_name_np _pthread_set_name_np 189b2920380SSepherosa Ziehau #define pthread_setaffinity_np _pthread_setaffinity_np 190bc2f376eSDavid Xu #define pthread_setcancelstate _pthread_setcancelstate 191bc2f376eSDavid Xu #define pthread_setcanceltype _pthread_setcanceltype 192bc2f376eSDavid Xu #define pthread_setconcurrency _pthread_setconcurrency 193ab5dc9acSSascha Wildner #define pthread_setname_np _pthread_setname_np 194bc2f376eSDavid Xu #define pthread_setprio _pthread_setprio 195bc2f376eSDavid Xu #define pthread_setschedparam _pthread_setschedparam 19617ea2221SMatthew Dillon #define pthread_setspecific _pthread_setspecific 197bc2f376eSDavid Xu #define pthread_sigmask _pthread_sigmask 198bc2f376eSDavid Xu #define pthread_single_np _pthread_single_np 199bc2f376eSDavid Xu #define pthread_spin_destroy _pthread_spin_destroy 200bc2f376eSDavid Xu #define pthread_spin_init _pthread_spin_init 201bc2f376eSDavid Xu #define pthread_spin_lock _pthread_spin_lock 202bc2f376eSDavid Xu #define pthread_spin_trylock _pthread_spin_trylock 203bc2f376eSDavid Xu #define pthread_spin_unlock _pthread_spin_unlock 204bc2f376eSDavid Xu #define pthread_suspend_all_np _pthread_suspend_all_np 205bc2f376eSDavid Xu #define pthread_suspend_np _pthread_suspend_np 206bc2f376eSDavid Xu #define pthread_switch_add_np _pthread_switch_add_np 207bc2f376eSDavid Xu #define pthread_switch_delete_np _pthread_switch_delete_np 208bc2f376eSDavid Xu #define pthread_testcancel _pthread_testcancel 209bc2f376eSDavid Xu #define pthread_timedjoin_np _pthread_timedjoin_np 210bc2f376eSDavid Xu #define pthread_yield _pthread_yield 2119d94a5bbSzrj #define pthread_yield_np _pthread_yield_np 21217ea2221SMatthew Dillon #define read _read 21317ea2221SMatthew Dillon #define readv _readv 21417ea2221SMatthew Dillon #define recvfrom _recvfrom 21517ea2221SMatthew Dillon #define recvmsg _recvmsg 21617ea2221SMatthew Dillon #define select _select 217bc2f376eSDavid Xu #define sem_close _sem_close 218bc2f376eSDavid Xu #define sem_destroy _sem_destroy 219bc2f376eSDavid Xu #define sem_getvalue _sem_getvalue 220bc2f376eSDavid Xu #define sem_init _sem_init 221bc2f376eSDavid Xu #define sem_open _sem_open 222bc2f376eSDavid Xu #define sem_post _sem_post 223bc2f376eSDavid Xu #define sem_timedwait _sem_timedwait 224bc2f376eSDavid Xu #define sem_trywait _sem_trywait 225bc2f376eSDavid Xu #define sem_unlink _sem_unlink 226bc2f376eSDavid Xu #define sem_wait _sem_wait 22717ea2221SMatthew Dillon #define sendmsg _sendmsg 22817ea2221SMatthew Dillon #define sendto _sendto 22917ea2221SMatthew Dillon #define setsockopt _setsockopt 23017ea2221SMatthew Dillon /*#define sigaction _sigaction*/ 23117ea2221SMatthew Dillon #define sigprocmask _sigprocmask 23217ea2221SMatthew Dillon #define sigsuspend _sigsuspend 23317ea2221SMatthew Dillon #define socket _socket 23417ea2221SMatthew Dillon #define socketpair _socketpair 235e2b7bcaeSSascha Wildner #define usleep _usleep 23617ea2221SMatthew Dillon #define wait4 _wait4 23733b81dc9SMatthew Dillon #define wait6 _wait6 238e2b7bcaeSSascha Wildner #define waitpid _waitpid 23933b81dc9SMatthew Dillon #define waitid _waitid 24017ea2221SMatthew Dillon #define write _write 24117ea2221SMatthew Dillon #define writev _writev 24217ea2221SMatthew Dillon 24317ea2221SMatthew Dillon 24417ea2221SMatthew Dillon /* 24578897f0bSSascha Wildner * Other hidden syscalls/functions that libpthread needs to override 24617ea2221SMatthew Dillon * but are not used internally by libc. 24717ea2221SMatthew Dillon * 24817ea2221SMatthew Dillon * XXX - When modifying libc to use one of the following, remove 24917ea2221SMatthew Dillon * the prototype from below and place it in the list above. 25017ea2221SMatthew Dillon */ 25117ea2221SMatthew Dillon #if 0 25217ea2221SMatthew Dillon #define creat _creat 25317ea2221SMatthew Dillon #define fchflags _fchflags 25417ea2221SMatthew Dillon #define fchmod _fchmod 25517ea2221SMatthew Dillon #define fpathconf _fpathconf 25617ea2221SMatthew Dillon #define ftrylockfile _ftrylockfile 25717ea2221SMatthew Dillon #define msync _msync 25817ea2221SMatthew Dillon #define nfssvc _nfssvc 25917ea2221SMatthew Dillon #define pause _pause 26017ea2221SMatthew Dillon #define sched_yield _sched_yield 26117ea2221SMatthew Dillon #define sendfile _sendfile 26217ea2221SMatthew Dillon #define shutdown _shutdown 26317ea2221SMatthew Dillon #define sigaltstack _sigaltstack 26417ea2221SMatthew Dillon #define signanosleep _signanosleep 26517ea2221SMatthew Dillon #define sigpending _sigpending 26617ea2221SMatthew Dillon #define sigreturn _sigreturn 26717ea2221SMatthew Dillon #define sigsetmask _sigsetmask 26817ea2221SMatthew Dillon #define sleep _sleep 26917ea2221SMatthew Dillon #define system _system 27017ea2221SMatthew Dillon #define tcdrain _tcdrain 27117ea2221SMatthew Dillon #define wait _wait 27217ea2221SMatthew Dillon #endif 27317ea2221SMatthew Dillon 27417ea2221SMatthew Dillon #endif /* _NAMESPACE_H_ */ 27517ea2221SMatthew Dillon 276