freebsd-nq/lib/libc/stdlib
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
..
abort.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
abort.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
abs.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
abs.c
alloca.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
atexit.3 Use `Er' variable to define first column width in ERRORS section. 2000-05-06 12:00:11 +00:00
atexit.c Merge Lite2 changes 1997-03-11 11:39:58 +00:00
atexit.h Import CSRG 4.4BSD-Lite2 lib/libc onto vendor branch 1997-03-11 11:29:42 +00:00
atof.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
atof.c
atoi.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
atoi.c
atol.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
atol.c
bsearch.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
bsearch.c
calloc.c malloc_sysv used before initialized, reported in PR4002 by 1997-07-01 18:39:38 +00:00
div.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
div.c
exit.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
exit.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
getenv.3 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
getenv.c
getopt.3 mdoc(7) police: Ft/Vt now accept punctuation-type arguments. 2001-01-12 15:46:56 +00:00
getopt.c Don't print an error message if the bad option is '?'. This has been 2000-09-04 03:49:22 +00:00
getsubopt.3 mdoc(7) police: Ft/Vt now accept punctuation-type arguments. 2001-01-12 15:46:56 +00:00
getsubopt.c
heapsort.c
labs.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
labs.c
ldiv.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
ldiv.c
Makefile.inc Back out previous commit (MLINK malloc.conf.5 -> malloc.3). 2000-10-29 13:20:24 +00:00
malloc.3 Prepare for mdoc(7)NG. 2001-01-16 09:08:22 +00:00
malloc.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
memory.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
merge.c Drop unused labels. 1998-11-04 09:22:07 +00:00
netbsd_strtod.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
putenv.c
qsort.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
qsort.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
radixsort.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
radixsort.c Merge Lite2 changes 1997-03-11 11:39:58 +00:00
rand.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
rand.c Added Posix rand_r function. 1999-05-24 23:30:14 +00:00
random.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
random.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
reallocf.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
realpath.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
realpath.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
setenv.c Only realloc() environ if we're sure that we know where it came from. 2000-09-20 03:05:37 +00:00
strhash.c Tidy up $Log$ debris. 1999-09-05 17:42:45 +00:00
strtod.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
strtod.c
strtol.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
strtol.c
strtoll.c Get rid of integer overflow warning. 1997-08-23 23:51:12 +00:00
strtoq.c Get rid of integer overflow warning. 1997-08-23 23:51:12 +00:00
strtoul.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
strtoul.c
strtoull.c
strtouq.c
system.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
system.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
tdelete.c bring in binary search tree code. 2000-07-01 06:55:11 +00:00
tfind.c bring in binary search tree code. 2000-07-01 06:55:11 +00:00
tsearch.3 Fixed typo not fixed in previous revision. 2000-12-29 14:36:05 +00:00
tsearch.c bring in binary search tree code. 2000-07-01 06:55:11 +00:00
twalk.c bring in binary search tree code. 2000-07-01 06:55:11 +00:00