freebsd-dev/lib/libc/gen
Daniel Eischen d201fe46e3 Remove _THREAD_SAFE and make libc thread-safe by default by
adding (weak definitions to) stubs for some of the pthread
functions.  If the threads library is linked in, the real
pthread functions will pulled in.

Use the following convention for system calls wrapped by the
threads library:
	__sys_foo - actual system call
	_foo - weak definition to __sys_foo
	foo - weak definition to __sys_foo

Change all libc uses of system calls wrapped by the threads
library from foo to _foo.  In order to define the prototypes
for _foo(), we introduce namespace.h and un-namespace.h
(suggested by bde).  All files that need to reference these
system calls, should include namespace.h before any standard
includes, then include un-namespace.h after the standard
includes and before any local includes.  <db.h> is an exception
and shouldn't be included in between namespace.h and
un-namespace.h  namespace.h will define foo to _foo, and
un-namespace.h will undefine foo.

Try to eliminate some of the recursive calls to MT-safe
functions in libc/stdio in preparation for adding a mutex
to FILE.  We have recursive mutexes, but would like to avoid
using them if possible.

Remove uneeded includes of <errno.h> from a few files.

Add $FreeBSD$ to a few files in order to pass commitprep.

Approved by:	-arch
2001-01-24 13:01:12 +00:00
..
__xuname.c
_pthread_stubs.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
_rand48.c
_spinlock_stub.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
_thread_init.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
alarm.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
alarm.c
arc4random.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
arc4random.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
assert.c
basename.3 mdoc(7) police: use certified section headers wherever possible. 2000-11-17 11:44:16 +00:00
basename.c Import XPG4-compliant basename(3) and dirname(3) from OpenBSD. 2000-08-31 15:56:15 +00:00
clock.3
clock.c
closedir.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
confstr.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
confstr.c
crypt.c
ctermid.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
ctermid.c
daemon.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
daemon.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
devname.3 Add code to devname(3) so it can find the names of devices which 2000-09-09 11:39:59 +00:00
devname.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
directory.3 Cleanup XXXdir functions to eliminate global hash table of 2000-12-06 03:15:49 +00:00
dirname.3 mdoc(7) police: use certified section headers wherever possible. 2000-11-17 11:44:16 +00:00
dirname.c Import XPG4-compliant basename(3) and dirname(3) from OpenBSD. 2000-08-31 15:56:15 +00:00
disklabel.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
dladdr.3
dlfcn.c
dllockinit.3 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
dlopen.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
drand48.c
erand48.c
err.3 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:15:20 +00:00
err.c
errlst.c
exec.3 mdoc(7) police: Ft/Vt now accept punctuation-type arguments. 2001-01-12 15:46:56 +00:00
exec.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fnmatch.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
fnmatch.c
frexp.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
fstab.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
ftok.3
ftok.c
fts-compat.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fts-compat.h
fts.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
fts.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
getbootfile.3
getbootfile.c
getbsize.3
getbsize.c
getcap.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
getcap.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
getcwd.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
getcwd.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
getdiskbyname.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
getdomainname.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
getdomainname.c
getfsent.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
getgrent.3 Remove blank line introduced in rev 1.13. 2000-11-20 16:18:45 +00:00
getgrent.c Fix mostly harmless typo: 2000-12-17 21:10:41 +00:00
getgrouplist.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
getgrouplist.c
gethostname.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
gethostname.c
getloadavg.3
getloadavg.c
getlogin.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
getmntinfo.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
getmntinfo.c
getnetgrent.3
getnetgrent.c
getobjformat.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
getobjformat.c
getosreldate.c
getpagesize.3
getpagesize.c
getpass.3
getpass.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
getpwent.3 Add a period missing from rev 1.13. 2000-11-20 16:19:37 +00:00
getpwent.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
getttyent.3
getttyent.c
getusershell.3 Fix hard sentence break introduced in rev 1.7. 2000-11-20 16:25:10 +00:00
getusershell.c Add nsswitch support. By creating an /etc/nsswitch.conf file, you can 2000-09-06 18:16:48 +00:00
getvfsbyname.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
getvfsbyname.c
getvfsent.3 log 2000-11-22 09:23:54 +00:00
getvfsent.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
glob.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
glob.c
initgroups.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
initgroups.c
isatty.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
isinf.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
jrand48.c
lcong48.c
ldexp.3
lockf.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
lockf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
lrand48.c
Makefile.inc Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
modf.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
mrand48.c
msgctl.3 Prepare for mdoc(7)NG. 2001-01-16 09:08:22 +00:00
msgctl.c
msgget.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
msgget.c
msgrcv.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
msgrcv.c
msgsnd.3 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
msgsnd.c
nice.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
nice.c
nlist.3
nlist.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
nrand48.c
ntp_gettime.c
opendir.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
pause.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
pause.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
pmadvise.c Add a couple of new library interfaces (will be activated when the 2001-01-23 04:49:39 +00:00
popen.3 mdoc(7) police: use certified section headers wherever possible. 2000-11-17 11:44:16 +00:00
popen.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
posixshm.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
pselect.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
psignal.3 mdoc(7) police: Ft/Vt now accept punctuation-type arguments. 2001-01-12 15:46:56 +00:00
psignal.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
pw_scan.c Add nsswitch support. By creating an /etc/nsswitch.conf file, you can 2000-09-06 18:16:48 +00:00
pw_scan.h Add nsswitch support. By creating an /etc/nsswitch.conf file, you can 2000-09-06 18:16:48 +00:00
pwcache.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
pwcache.c
raise.3
raise.c
rand48.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
rand48.h
readdir.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
rewinddir.c Move telldir position recording type definitions and prototypes 2000-12-11 04:00:36 +00:00
rfork_thread.3 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:15:20 +00:00
scandir.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
scandir.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
seed48.c
seekdir.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
sem_destroy.3 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
sem_getvalue.3 Change my email address in the copyright notices for the sake of consistency 2000-07-18 01:38:19 +00:00
sem_init.3 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
sem_open.3 Change my email address in the copyright notices for the sake of consistency 2000-07-18 01:38:19 +00:00
sem_post.3 Make sem_post() safe to call from within a signal handler, as required by 2000-08-01 21:19:09 +00:00
sem_wait.3 Change my email address in the copyright notices for the sake of consistency 2000-07-18 01:38:19 +00:00
semconfig.c
semctl.c
semget.c
semop.c
setdomainname.c
sethostname.c
setjmp.3
setjmperr.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
setmode.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
setmode.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
setproctitle.3 log 2000-11-22 09:23:54 +00:00
setproctitle.c When recording the original arguments, stop short if we encounter 2000-12-04 01:45:57 +00:00
shm_open.3 mdoc(7) police: Nm -> Fn where appropriate. 2000-11-20 14:11:46 +00:00
shmat.c
shmctl.c
shmdt.c
shmget.c
siginterrupt.3 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
siginterrupt.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
siglist.c
signal.3 SIGABRT is *not* the same as calling abort(), so don't claim that it is. 2001-01-16 22:25:26 +00:00
signal.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
sigsetops.3
sigsetops.c
sleep.3 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:15:20 +00:00
sleep.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
srand48.c
stringlist.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
stringlist.c
strtofflags.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
strtofflags.c
sysconf.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
sysconf.c
sysctl.3 mdoc(7) police: replaced empty line with .Pp, updated document date. 2001-01-23 08:41:38 +00:00
sysctl.c
sysctlbyname.c
sysctlnametomib.c Add the function sysctlnametomib to libc. Details on the semantics 2001-01-23 03:40:32 +00:00
syslog.3 Back this out, we apparently have the ipfw(4). 2000-12-06 06:50:24 +00:00
syslog.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
tcgetpgrp.3
tcsendbreak.3 Prepare for mdoc(7)NG. 2001-01-16 09:08:22 +00:00
tcsetattr.3
tcsetpgrp.3 mdoc(7) police: Nm -> Fn where appropriate. 2000-11-20 14:11:46 +00:00
telldir.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
telldir.h Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
termios.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
time.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
time.c
times.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
times.c
timezone.3 Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
timezone.c
ttyname.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
ttyname.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
ttyslot.c
tzset.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
ualarm.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
ualarm.c
uname.3
uname.c
unvis.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
unvis.c
usleep.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
usleep.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
utime.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
utime.c
valloc.3 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
valloc.c
vis.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
vis.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
wait3.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
wait.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
waitpid.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00