freebsd-skq/lib/libc/stdio
deischen 1635c221b7 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
..
_flock_stub.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
asprintf.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
clrerr.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fclose.3 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
fclose.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fdopen.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
feof.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
ferror.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
ferror.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
fflush.3 Use `Er' variable to define first column width in ERRORS section. 2000-05-06 12:07:59 +00:00
fflush.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fgetc.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fgetln.3 Use `Er' variable to define first column width in ERRORS section. 2000-05-06 12:07:59 +00:00
fgetln.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
fgetpos.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fgets.3 Use `Er' variable to define first column width in ERRORS section. 2000-05-06 12:07:59 +00:00
fgets.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fileno.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
findfp.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
flags.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
floatio.h
fopen.3 Better documentation of append mode. This should have gone in -current 2000-09-22 12:55:36 +00:00
fopen.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fprintf.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
fpurge.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fputc.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fputs.3 Use `Er' variable to define first column width in ERRORS section. 2000-05-06 12:07:59 +00:00
fputs.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fread.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
fread.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
freopen.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fscanf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fseek.3 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:15:20 +00:00
fseek.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fsetpos.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
ftell.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
funopen.3 Use `Er' variable to define first column width in ERRORS section. 2000-05-06 12:07:59 +00:00
funopen.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fvwrite.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fvwrite.h
fwalk.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fwrite.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
getc.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
getc.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
getchar.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
gets.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
getw.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
glue.h
local.h Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
makebuf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
Makefile.inc $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
mktemp.3 Update the documentation to describe the new mktemp() family behaviour. 2000-11-19 10:21:32 +00:00
mktemp.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
perror.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
printf.3 Make it a bit clearer that asprintf doesn't actually "return" a pointer in 2001-01-01 05:19:52 +00:00
printf.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
putc.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
putc.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
putchar.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
puts.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
putw.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
refill.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
remove.3 According to the susv2 man pages I have, remove(3) should act as 2000-08-28 15:45:42 +00:00
remove.c According to the susv2 man pages I have, remove(3) should act as 2000-08-28 15:45:42 +00:00
rewind.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
rget.c Suggested by: Bruce Evans, Jeffrey Hsu, Gary Palmer 1996-06-22 10:34:15 +00:00
scanf.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
scanf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
setbuf.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
setbuf.c
setbuffer.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
setvbuf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
snprintf.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
sprintf.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
sscanf.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
stdio.3 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
stdio.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
tempnam.c Remove UNSAFE_WARN ifdef for mktemp warning (never defined) 1999-10-24 11:57:24 +00:00
tmpfile.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
tmpnam.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
tmpnam.c Remove UNSAFE_WARN ifdef for mktemp warning (never defined) 1999-10-24 11:57:24 +00:00
ungetc.3 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
ungetc.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
vasprintf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
vfprintf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
vfscanf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
vprintf.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
vscanf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
vsnprintf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
vsprintf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
vsscanf.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
wbuf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
wsetup.c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00