source: rtems-libbsd/freebsd-userspace/lib/libc/include/namespace.h @ 1b13f69

4.1155-freebsd-126-freebsd-12freebsd-9.3
Last change on this file since 1b13f69 was 1b13f69, checked in by Joel Sherrill <joel.sherrill@…>, on 07/11/12 at 18:23:45

FreeBSD user space support - First additions

This requires a full checkout of the FreeBSD 8.2 source code.
The checkout we have been using is missing at least the libc,
include, and sys directories. The script to copy files in is
crude.

This eventually needs to separate the manually written .h files
out and add the RTEMS specific network initialization support
with functionality to program the IP addresses and gateways as
the old stack did.

  • Property mode set to 100644
File size: 11.2 KB
Line 
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#ifndef _NAMESPACE_H_
30#define _NAMESPACE_H_
31
32/*
33 * Adjust names so that headers declare "hidden" names.
34 *
35 * README: When modifying this file don't forget to make the appropriate
36 *         changes in un-namespace.h!!!
37 */
38
39/*
40 * ISO C (C90) section.  Most names in libc aren't in ISO C, so they
41 * should be here.  Most aren't here...
42 */
43#define         err                             _err
44#define         warn                            _warn
45#define         nsdispatch                      _nsdispatch
46
47/*
48 * Prototypes for syscalls/functions that need to be overridden
49 * in libc_r/libpthread.
50 */
51#define         accept                          _accept
52#define         __acl_aclcheck_fd               ___acl_aclcheck_fd
53#define         __acl_delete_fd                 ___acl_delete_fd
54#define         __acl_get_fd                    ___acl_get_fd
55#define         __acl_set_fd                    ___acl_set_fd
56#define         bind                            _bind
57#define         __cap_get_fd                    ___cap_get_fd
58#define         __cap_set_fd                    ___cap_set_fd
59#define         close                           _close
60#define         connect                         _connect
61#define         dup                             _dup
62#define         dup2                            _dup2
63#define         execve                          _execve
64#define         fcntl                           _fcntl
65/*#define               flock                           _flock */
66#define         flockfile                       _flockfile
67#define         fpathconf                       _fpathconf
68#define         fstat                           _fstat
69#define         fstatfs                         _fstatfs
70#define         fsync                           _fsync
71#define         funlockfile                     _funlockfile
72#define         getdirentries                   _getdirentries
73#define         getlogin                        _getlogin
74#define         getpeername                     _getpeername
75#define         getprogname                     _getprogname
76#define         getsockname                     _getsockname
77#define         getsockopt                      _getsockopt
78#define         ioctl                           _ioctl
79/* #define              kevent                          _kevent */
80#define         listen                          _listen
81#define         nanosleep                       _nanosleep
82#define         open                            _open
83#define         poll                            _poll
84#define         pthread_atfork                  _pthread_atfork
85#define         pthread_attr_destroy            _pthread_attr_destroy
86#define         pthread_attr_get_np             _pthread_attr_get_np
87#define         pthread_attr_getaffinity_np     _pthread_attr_getaffinity_np
88#define         pthread_attr_getdetachstate     _pthread_attr_getdetachstate
89#define         pthread_attr_getguardsize       _pthread_attr_getguardsize
90#define         pthread_attr_getinheritsched    _pthread_attr_getinheritsched
91#define         pthread_attr_getschedparam      _pthread_attr_getschedparam
92#define         pthread_attr_getschedpolicy     _pthread_attr_getschedpolicy
93#define         pthread_attr_getscope           _pthread_attr_getscope
94#define         pthread_attr_getstack           _pthread_attr_getstack
95#define         pthread_attr_getstackaddr       _pthread_attr_getstackaddr
96#define         pthread_attr_getstacksize       _pthread_attr_getstacksize
97#define         pthread_attr_init               _pthread_attr_init
98#define         pthread_attr_setaffinity_np     _pthread_attr_setaffinity_np
99#define         pthread_attr_setcreatesuspend_np _pthread_attr_setcreatesuspend_np
100#define         pthread_attr_setdetachstate     _pthread_attr_setdetachstate
101#define         pthread_attr_setguardsize       _pthread_attr_setguardsize
102#define         pthread_attr_setinheritsched    _pthread_attr_setinheritsched
103#define         pthread_attr_setschedparam      _pthread_attr_setschedparam
104#define         pthread_attr_setschedpolicy     _pthread_attr_setschedpolicy
105#define         pthread_attr_setscope           _pthread_attr_setscope
106#define         pthread_attr_setstack           _pthread_attr_setstack
107#define         pthread_attr_setstackaddr       _pthread_attr_setstackaddr
108#define         pthread_attr_setstacksize       _pthread_attr_setstacksize
109#define         pthread_barrier_destroy         _pthread_barrier_destroy
110#define         pthread_barrier_init            _pthread_barrier_init
111#define         pthread_barrier_wait            _pthread_barrier_wait
112#define         pthread_barrierattr_destroy     _pthread_barrierattr_destroy
113#define         pthread_barrierattr_getpshared  _pthread_barrierattr_getpshared
114#define         pthread_barrierattr_init        _pthread_barrierattr_init
115#define         pthread_barrierattr_setpshared  _pthread_barrierattr_setpshared
116#define         pthread_cancel                  _pthread_cancel
117#define         pthread_cond_broadcast          _pthread_cond_broadcast
118#define         pthread_cond_destroy            _pthread_cond_destroy
119#define         pthread_cond_init               _pthread_cond_init
120#define         pthread_cond_signal             _pthread_cond_signal
121#define         pthread_cond_timedwait          _pthread_cond_timedwait
122#define         pthread_cond_wait               _pthread_cond_wait
123#define         pthread_condattr_destroy        _pthread_condattr_destroy
124#define         pthread_condattr_getclock       _pthread_condattr_getclock
125#define         pthread_condattr_getpshared     _pthread_condattr_getpshared
126#define         pthread_condattr_init           _pthread_condattr_init
127#define         pthread_condattr_setclock       _pthread_condattr_setclock
128#define         pthread_condattr_setpshared     _pthread_condattr_setpshared
129#define         pthread_create                  _pthread_create
130#define         pthread_detach                  _pthread_detach
131#define         pthread_equal                   _pthread_equal
132#define         pthread_exit                    _pthread_exit
133#define         pthread_getaffinity_np          _pthread_getaffinity_np
134#define         pthread_getconcurrency          _pthread_getconcurrency
135#define         pthread_getcpuclockid           _pthread_getcpuclockid
136#define         pthread_getprio                 _pthread_getprio
137#define         pthread_getschedparam           _pthread_getschedparam
138#define         pthread_getspecific             _pthread_getspecific
139#define         pthread_join                    _pthread_join
140#define         pthread_key_create              _pthread_key_create
141#define         pthread_key_delete              _pthread_key_delete
142#define         pthread_kill                    _pthread_kill
143#define         pthread_main_np                 _pthread_main_np
144#define         pthread_multi_np                _pthread_multi_np
145#define         pthread_mutex_destroy           _pthread_mutex_destroy
146#define         pthread_mutex_getprioceiling    _pthread_mutex_getprioceiling
147#define         pthread_mutex_init              _pthread_mutex_init
148#define         pthread_mutex_isowned_np        _pthread_mutex_isowned_np
149#define         pthread_mutex_lock              _pthread_mutex_lock
150#define         pthread_mutex_setprioceiling    _pthread_mutex_setprioceiling
151#define         pthread_mutex_timedlock         _pthread_mutex_timedlock
152#define         pthread_mutex_trylock           _pthread_mutex_trylock
153#define         pthread_mutex_unlock            _pthread_mutex_unlock
154#define         pthread_mutexattr_destroy       _pthread_mutexattr_destroy
155#define         pthread_mutexattr_getkind_np    _pthread_mutexattr_getkind_np
156#define         pthread_mutexattr_getprioceiling _pthread_mutexattr_getprioceiling
157#define         pthread_mutexattr_getprotocol   _pthread_mutexattr_getprotocol
158#define         pthread_mutexattr_getpshared    _pthread_mutexattr_getpshared
159#define         pthread_mutexattr_gettype       _pthread_mutexattr_gettype
160#define         pthread_mutexattr_init          _pthread_mutexattr_init
161#define         pthread_mutexattr_setkind_np    _pthread_mutexattr_setkind_np
162#define         pthread_mutexattr_setprioceiling _pthread_mutexattr_setprioceiling
163#define         pthread_mutexattr_setprotocol   _pthread_mutexattr_setprotocol
164#define         pthread_mutexattr_setpshared    _pthread_mutexattr_setpshared
165#define         pthread_mutexattr_settype       _pthread_mutexattr_settype
166#define         pthread_once                    _pthread_once
167#define         pthread_resume_all_np           _pthread_resume_all_np
168#define         pthread_resume_np               _pthread_resume_np
169#define         pthread_rwlock_destroy          _pthread_rwlock_destroy
170#define         pthread_rwlock_init             _pthread_rwlock_init
171#define         pthread_rwlock_rdlock           _pthread_rwlock_rdlock
172#define         pthread_rwlock_timedrdlock      _pthread_rwlock_timedrdlock
173#define         pthread_rwlock_timedwrlock      _pthread_rwlock_timedwrlock
174#define         pthread_rwlock_tryrdlock        _pthread_rwlock_tryrdlock
175#define         pthread_rwlock_trywrlock        _pthread_rwlock_trywrlock
176#define         pthread_rwlock_unlock           _pthread_rwlock_unlock
177#define         pthread_rwlock_wrlock           _pthread_rwlock_wrlock
178#define         pthread_rwlockattr_destroy      _pthread_rwlockattr_destroy
179#define         pthread_rwlockattr_getpshared   _pthread_rwlockattr_getpshared
180#define         pthread_rwlockattr_init         _pthread_rwlockattr_init
181#define         pthread_rwlockattr_setpshared   _pthread_rwlockattr_setpshared
182#define         pthread_self                    _pthread_self
183#define         pthread_set_name_np             _pthread_set_name_np
184#define         pthread_setaffinity_np          _pthread_setaffinity_np
185#define         pthread_setcancelstate          _pthread_setcancelstate
186#define         pthread_setcanceltype           _pthread_setcanceltype
187#define         pthread_setconcurrency          _pthread_setconcurrency
188#define         pthread_setprio                 _pthread_setprio
189#define         pthread_setschedparam           _pthread_setschedparam
190#define         pthread_setspecific             _pthread_setspecific
191#define         pthread_sigmask                 _pthread_sigmask
192#define         pthread_single_np               _pthread_single_np
193#define         pthread_spin_destroy            _pthread_spin_destroy
194#define         pthread_spin_init               _pthread_spin_init
195#define         pthread_spin_lock               _pthread_spin_lock
196#define         pthread_spin_trylock            _pthread_spin_trylock
197#define         pthread_spin_unlock             _pthread_spin_unlock
198#define         pthread_suspend_all_np          _pthread_suspend_all_np
199#define         pthread_suspend_np              _pthread_suspend_np
200#define         pthread_switch_add_np           _pthread_switch_add_np
201#define         pthread_switch_delete_np        _pthread_switch_delete_np
202#define         pthread_testcancel              _pthread_testcancel
203#define         pthread_timedjoin_np            _pthread_timedjoin_np
204#define         pthread_yield                   _pthread_yield
205#define         read                            _read
206#define         readv                           _readv
207#define         recvfrom                        _recvfrom
208#define         recvmsg                         _recvmsg
209#define         select                          _select
210#define         sem_close                       _sem_close
211#define         sem_destroy                     _sem_destroy
212#define         sem_getvalue                    _sem_getvalue
213#define         sem_init                        _sem_init
214#define         sem_open                        _sem_open
215#define         sem_post                        _sem_post
216#define         sem_timedwait                   _sem_timedwait
217#define         sem_trywait                     _sem_trywait
218#define         sem_unlink                      _sem_unlink
219#define         sem_wait                        _sem_wait
220#define         sendmsg                         _sendmsg
221#define         sendto                          _sendto
222#define         setsockopt                      _setsockopt
223/*#define               sigaction                       _sigaction*/
224#define         sigprocmask                     _sigprocmask
225#define         sigsuspend                      _sigsuspend
226#define         socket                          _socket
227#define         socketpair                      _socketpair
228#define         usleep                          _usleep
229#define         wait4                           _wait4
230#define         waitpid                         _waitpid
231#define         write                           _write
232#define         writev                          _writev
233
234
235/*
236 * Other hidden syscalls/functions that libc_r needs to override
237 * but are not used internally by libc.
238 *
239 * XXX - When modifying libc to use one of the following, remove
240 * the prototype from below and place it in the list above.
241 */
242#if 0
243#define         creat                           _creat
244#define         fchflags                        _fchflags
245#define         fchmod                          _fchmod
246#define         ftrylockfile                    _ftrylockfile
247#define         msync                           _msync
248#define         nfssvc                          _nfssvc
249#define         pause                           _pause
250#define         sched_yield                     _sched_yield
251#define         sendfile                        _sendfile
252#define         shutdown                        _shutdown
253#define         sigaltstack                     _sigaltstack
254#define         sigpending                      _sigpending
255#define         sigreturn                       _sigreturn
256#define         sigsetmask                      _sigsetmask
257#define         sleep                           _sleep
258#define         system                          _system
259#define         tcdrain                         _tcdrain
260#define         wait                            _wait
261#endif
262
263#endif /* _NAMESPACE_H_ */
Note: See TracBrowser for help on using the repository browser.