namespace.h revision 197968
11556Srgrimes/* 21556Srgrimes * Copyright (c) 2001 Daniel Eischen <deischen@FreeBSD.org>. 31556Srgrimes * All rights reserved. 41556Srgrimes * 51556Srgrimes * Redistribution and use in source and binary forms, with or without 61556Srgrimes * modification, are permitted provided that the following conditions 71556Srgrimes * are met: 81556Srgrimes * 1. Redistributions of source code must retain the above copyright 91556Srgrimes * notice, this list of conditions and the following disclaimer. 101556Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 111556Srgrimes * notice, this list of conditions and the following disclaimer in the 121556Srgrimes * documentation and/or other materials provided with the distribution. 131556Srgrimes * 141556Srgrimes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 151556Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 161556Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 171556Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 181556Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 191556Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 201556Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 211556Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 221556Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 231556Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 241556Srgrimes * SUCH DAMAGE. 251556Srgrimes * 261556Srgrimes * $FreeBSD: head/lib/libc/include/namespace.h 197968 2009-10-11 20:19:45Z jilles $ 271556Srgrimes */ 28127499Sgad 29127499Sgad#ifndef _NAMESPACE_H_ 30127499Sgad#define _NAMESPACE_H_ 31127499Sgad 32127499Sgad/* 33127499Sgad * Adjust names so that headers declare "hidden" names. 34127499Sgad * 351556Srgrimes * README: When modifying this file don't forget to make the appropriate 361556Srgrimes * changes in un-namespace.h!!! 371556Srgrimes */ 3890143Smarkm 391556Srgrimes/* 401556Srgrimes * ISO C (C90) section. Most names in libc aren't in ISO C, so they 411556Srgrimes * should be here. Most aren't here... 421556Srgrimes */ 4390143Smarkm#define err _err 441556Srgrimes#define warn _warn 4536049Scharnier#define nsdispatch _nsdispatch 4690143Smarkm 4736049Scharnier/* 48110391Scharnier * Prototypes for syscalls/functions that need to be overridden 4999110Sobrien * in libc_r/libpthread. 5099110Sobrien */ 511556Srgrimes#define accept _accept 521556Srgrimes#define __acl_aclcheck_fd ___acl_aclcheck_fd 53127546Sgad#define __acl_delete_fd ___acl_delete_fd 543296Sdg#define __acl_get_fd ___acl_get_fd 551556Srgrimes#define __acl_set_fd ___acl_set_fd 561556Srgrimes#define bind _bind 571556Srgrimes#define __cap_get_fd ___cap_get_fd 581556Srgrimes#define __cap_set_fd ___cap_set_fd 591556Srgrimes#define close _close 601556Srgrimes#define connect _connect 61127149Sgad#define dup _dup 621556Srgrimes#define dup2 _dup2 63127499Sgad#define execve _execve 641556Srgrimes#define fcntl _fcntl 6513514Smpp/*#define flock _flock */ 6673367Sache#define flockfile _flockfile 671556Srgrimes#define fpathconf _fpathconf 6890143Smarkm#define fstat _fstat 691556Srgrimes#define fstatfs _fstatfs 701556Srgrimes#define fsync _fsync 711556Srgrimes#define funlockfile _funlockfile 721556Srgrimes#define getdirentries _getdirentries 731556Srgrimes#define getlogin _getlogin 741556Srgrimes#define getpeername _getpeername 751556Srgrimes#define getprogname _getprogname 76127499Sgad#define getsockname _getsockname 77127499Sgad#define getsockopt _getsockopt 7866377Sbrian#define ioctl _ioctl 79127537Sgad/* #define kevent _kevent */ 80127555Sgad#define listen _listen 81127537Sgad#define nanosleep _nanosleep 82127537Sgad#define open _open 83127555Sgad#define openat _openat 84127537Sgad#define poll _poll 85127537Sgad#define pthread_atfork _pthread_atfork 86127537Sgad#define pthread_attr_destroy _pthread_attr_destroy 87129914Sgad#define pthread_attr_get_np _pthread_attr_get_np 88129914Sgad#define pthread_attr_getaffinity_np _pthread_attr_getaffinity_np 89129914Sgad#define pthread_attr_getdetachstate _pthread_attr_getdetachstate 90129914Sgad#define pthread_attr_getguardsize _pthread_attr_getguardsize 91129914Sgad#define pthread_attr_getinheritsched _pthread_attr_getinheritsched 92129914Sgad#define pthread_attr_getschedparam _pthread_attr_getschedparam 93127537Sgad#define pthread_attr_getschedpolicy _pthread_attr_getschedpolicy 94127537Sgad#define pthread_attr_getscope _pthread_attr_getscope 95127537Sgad#define pthread_attr_getstack _pthread_attr_getstack 96127537Sgad#define pthread_attr_getstackaddr _pthread_attr_getstackaddr 97127537Sgad#define pthread_attr_getstacksize _pthread_attr_getstacksize 98127537Sgad#define pthread_attr_init _pthread_attr_init 99127537Sgad#define pthread_attr_setaffinity_np _pthread_attr_setaffinity_np 100127537Sgad#define pthread_attr_setcreatesuspend_np _pthread_attr_setcreatesuspend_np 10190143Smarkm#define pthread_attr_setdetachstate _pthread_attr_setdetachstate 1021556Srgrimes#define pthread_attr_setguardsize _pthread_attr_setguardsize 103127537Sgad#define pthread_attr_setinheritsched _pthread_attr_setinheritsched 104127537Sgad#define pthread_attr_setschedparam _pthread_attr_setschedparam 105127537Sgad#define pthread_attr_setschedpolicy _pthread_attr_setschedpolicy 106127537Sgad#define pthread_attr_setscope _pthread_attr_setscope 107127537Sgad#define pthread_attr_setstack _pthread_attr_setstack 108127537Sgad#define pthread_attr_setstackaddr _pthread_attr_setstackaddr 109127537Sgad#define pthread_attr_setstacksize _pthread_attr_setstacksize 1101556Srgrimes#define pthread_barrier_destroy _pthread_barrier_destroy 111127537Sgad#define pthread_barrier_init _pthread_barrier_init 11297966Sjmallett#define pthread_barrier_wait _pthread_barrier_wait 113127499Sgad#define pthread_barrierattr_destroy _pthread_barrierattr_destroy 114127537Sgad#define pthread_barrierattr_getpshared _pthread_barrierattr_getpshared 115127499Sgad#define pthread_barrierattr_init _pthread_barrierattr_init 116127499Sgad#define pthread_barrierattr_setpshared _pthread_barrierattr_setpshared 117127499Sgad#define pthread_cancel _pthread_cancel 118127499Sgad#define pthread_cond_broadcast _pthread_cond_broadcast 119127499Sgad#define pthread_cond_destroy _pthread_cond_destroy 120127499Sgad#define pthread_cond_init _pthread_cond_init 121127499Sgad#define pthread_cond_signal _pthread_cond_signal 122127499Sgad#define pthread_cond_timedwait _pthread_cond_timedwait 123127499Sgad#define pthread_cond_wait _pthread_cond_wait 124127499Sgad#define pthread_condattr_destroy _pthread_condattr_destroy 125127499Sgad#define pthread_condattr_getclock _pthread_condattr_getclock 126127499Sgad#define pthread_condattr_getpshared _pthread_condattr_getpshared 127127499Sgad#define pthread_condattr_init _pthread_condattr_init 128127823Sgad#define pthread_condattr_setclock _pthread_condattr_setclock 129127499Sgad#define pthread_condattr_setpshared _pthread_condattr_setpshared 130127499Sgad#define pthread_create _pthread_create 131127499Sgad#define pthread_detach _pthread_detach 132127499Sgad#define pthread_equal _pthread_equal 133127499Sgad#define pthread_exit _pthread_exit 134127499Sgad#define pthread_getaffinity_np _pthread_getaffinity_np 135127499Sgad#define pthread_getconcurrency _pthread_getconcurrency 136127536Sgad#define pthread_getcpuclockid _pthread_getcpuclockid 137127499Sgad#define pthread_getprio _pthread_getprio 138127598Sgad#define pthread_getschedparam _pthread_getschedparam 139127598Sgad#define pthread_getspecific _pthread_getspecific 140127536Sgad#define pthread_join _pthread_join 141127499Sgad#define pthread_key_create _pthread_key_create 142127499Sgad#define pthread_key_delete _pthread_key_delete 143129914Sgad#define pthread_kill _pthread_kill 144127536Sgad#define pthread_main_np _pthread_main_np 145127536Sgad#define pthread_multi_np _pthread_multi_np 146127536Sgad#define pthread_mutex_destroy _pthread_mutex_destroy 147127536Sgad#define pthread_mutex_getprioceiling _pthread_mutex_getprioceiling 148127536Sgad#define pthread_mutex_init _pthread_mutex_init 149127499Sgad#define pthread_mutex_isowned_np _pthread_mutex_isowned_np 15097875Sjmallett#define pthread_mutex_lock _pthread_mutex_lock 151129635Sgad#define pthread_mutex_setprioceiling _pthread_mutex_setprioceiling 152127538Sgad#define pthread_mutex_timedlock _pthread_mutex_timedlock 153127538Sgad#define pthread_mutex_trylock _pthread_mutex_trylock 15490143Smarkm#define pthread_mutex_unlock _pthread_mutex_unlock 15597875Sjmallett#define pthread_mutexattr_destroy _pthread_mutexattr_destroy 15697875Sjmallett#define pthread_mutexattr_getkind_np _pthread_mutexattr_getkind_np 157127538Sgad#define pthread_mutexattr_getprioceiling _pthread_mutexattr_getprioceiling 158127538Sgad#define pthread_mutexattr_getprotocol _pthread_mutexattr_getprotocol 159105831Srwatson#define pthread_mutexattr_getpshared _pthread_mutexattr_getpshared 1601556Srgrimes#define pthread_mutexattr_gettype _pthread_mutexattr_gettype 161127843Sgad#define pthread_mutexattr_init _pthread_mutexattr_init 16298494Ssobomax#define pthread_mutexattr_setkind_np _pthread_mutexattr_setkind_np 1631556Srgrimes#define pthread_mutexattr_setprioceiling _pthread_mutexattr_setprioceiling 16490110Simp#define pthread_mutexattr_setprotocol _pthread_mutexattr_setprotocol 1651556Srgrimes#define pthread_mutexattr_setpshared _pthread_mutexattr_setpshared 166127499Sgad#define pthread_mutexattr_settype _pthread_mutexattr_settype 167127499Sgad#define pthread_once _pthread_once 1681556Srgrimes#define pthread_resume_all_np _pthread_resume_all_np 1691556Srgrimes#define pthread_resume_np _pthread_resume_np 1701556Srgrimes#define pthread_rwlock_destroy _pthread_rwlock_destroy 171129914Sgad#define pthread_rwlock_init _pthread_rwlock_init 172127539Sgad#define pthread_rwlock_rdlock _pthread_rwlock_rdlock 173127499Sgad#define pthread_rwlock_timedrdlock _pthread_rwlock_timedrdlock 174129914Sgad#define pthread_rwlock_timedwrlock _pthread_rwlock_timedwrlock 175127499Sgad#define pthread_rwlock_tryrdlock _pthread_rwlock_tryrdlock 17690143Smarkm#define pthread_rwlock_trywrlock _pthread_rwlock_trywrlock 1771556Srgrimes#define pthread_rwlock_unlock _pthread_rwlock_unlock 17811809Sache#define pthread_rwlock_wrlock _pthread_rwlock_wrlock 179127542Sgad#define pthread_rwlockattr_destroy _pthread_rwlockattr_destroy 18011809Sache#define pthread_rwlockattr_getpshared _pthread_rwlockattr_getpshared 18197804Stjr#define pthread_rwlockattr_init _pthread_rwlockattr_init 18297804Stjr#define pthread_rwlockattr_setpshared _pthread_rwlockattr_setpshared 18397804Stjr#define pthread_self _pthread_self 1841556Srgrimes#define pthread_set_name_np _pthread_set_name_np 1851556Srgrimes#define pthread_setaffinity_np _pthread_setaffinity_np 1861556Srgrimes#define pthread_setcancelstate _pthread_setcancelstate 1871556Srgrimes#define pthread_setcanceltype _pthread_setcanceltype 1881556Srgrimes#define pthread_setconcurrency _pthread_setconcurrency 1891556Srgrimes#define pthread_setprio _pthread_setprio 1901556Srgrimes#define pthread_setschedparam _pthread_setschedparam 19198494Ssobomax#define pthread_setspecific _pthread_setspecific 192129914Sgad#define pthread_sigmask _pthread_sigmask 193129914Sgad#define pthread_single_np _pthread_single_np 19498494Ssobomax#define pthread_spin_destroy _pthread_spin_destroy 195129914Sgad#define pthread_spin_init _pthread_spin_init 196129914Sgad#define pthread_spin_lock _pthread_spin_lock 1971556Srgrimes#define pthread_spin_trylock _pthread_spin_trylock 198127542Sgad#define pthread_spin_unlock _pthread_spin_unlock 199127542Sgad#define pthread_suspend_all_np _pthread_suspend_all_np 200127542Sgad#define pthread_suspend_np _pthread_suspend_np 201127499Sgad#define pthread_switch_add_np _pthread_switch_add_np 202127499Sgad#define pthread_switch_delete_np _pthread_switch_delete_np 203127499Sgad#define pthread_testcancel _pthread_testcancel 204127499Sgad#define pthread_timedjoin_np _pthread_timedjoin_np 205127499Sgad#define pthread_yield _pthread_yield 206127499Sgad#define read _read 207127499Sgad#define readv _readv 20889909Sru#define recvfrom _recvfrom 20998494Ssobomax#define recvmsg _recvmsg 2101556Srgrimes#define select _select 211127499Sgad#define sem_close _sem_close 212127499Sgad#define sem_destroy _sem_destroy 213127499Sgad#define sem_getvalue _sem_getvalue 214127499Sgad#define sem_init _sem_init 215127499Sgad#define sem_open _sem_open 216127499Sgad#define sem_post _sem_post 217127499Sgad#define sem_timedwait _sem_timedwait 218127499Sgad#define sem_trywait _sem_trywait 219127499Sgad#define sem_unlink _sem_unlink 2201556Srgrimes#define sem_wait _sem_wait 221127499Sgad#define sendmsg _sendmsg 2221556Srgrimes#define sendto _sendto 2231556Srgrimes#define setsockopt _setsockopt 22419068Speter/*#define sigaction _sigaction*/ 22519068Speter#define sigprocmask _sigprocmask 22619068Speter#define sigsuspend _sigsuspend 22719068Speter#define socket _socket 22819068Speter#define socketpair _socketpair 22919068Speter#define usleep _usleep 2301556Srgrimes#define wait4 _wait4 2311556Srgrimes#define waitpid _waitpid 2321556Srgrimes#define write _write 233127506Sgad#define writev _writev 234127506Sgad 235127506Sgad 236127542Sgad/* 237127506Sgad * Other hidden syscalls/functions that libc_r needs to override 238127506Sgad * but are not used internally by libc. 239127499Sgad * 240127499Sgad * XXX - When modifying libc to use one of the following, remove 241127499Sgad * the prototype from below and place it in the list above. 242127499Sgad */ 243127499Sgad#if 0 244127542Sgad#define creat _creat 245127499Sgad#define fchflags _fchflags 246127597Sgad#define fchmod _fchmod 247127542Sgad#define ftrylockfile _ftrylockfile 248127542Sgad#define msync _msync 249127542Sgad#define nfssvc _nfssvc 250127542Sgad#define pause _pause 251127499Sgad#define sched_yield _sched_yield 252127499Sgad#define sendfile _sendfile 253127499Sgad#define shutdown _shutdown 254127499Sgad#define sigaltstack _sigaltstack 255127499Sgad#define sigpending _sigpending 256127542Sgad#define sigreturn _sigreturn 2571556Srgrimes#define sigsetmask _sigsetmask 258127499Sgad#define sleep _sleep 259116265Sscottl#define system _system 260126127Sdeischen#define tcdrain _tcdrain 261116265Sscottl#define wait _wait 2621556Srgrimes#endif 2631556Srgrimes 2641556Srgrimes#endif /* _NAMESPACE_H_ */ 2651556Srgrimes