freebsd-skq/lib/libc/sys
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
..
__error.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
_exit.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
accept.2 Replace .Va references to function arguments to .Fa references. 2000-06-23 03:43:34 +00:00
access.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
acct.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
adjtime.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
aio_cancel.2 Remove the only hard sentence break in the file. 2000-11-24 10:48:02 +00:00
aio_error.2 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
aio_read.2 remove outdated bugs, we actually do have aio_cancel support 2000-11-10 20:57:05 +00:00
aio_return.2 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
aio_suspend.2 Remove fullstops from the end of .Xr lines in SEE ALSO section. 2000-11-15 14:40:14 +00:00
aio_waitcomplete.2 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
aio_write.2 remove outdated bugs, we actually do have aio_cancel support 2000-11-10 20:57:05 +00:00
bind.2 Replace .Va, .Ar and .Nm with .Fa or .Va where necessary, examples: 2000-06-23 05:05:44 +00:00
brk.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
chdir.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
chflags.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
chmod.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
chown.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
chroot.2 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
clock_gettime.2 Prepare for mdoc(7)NG. 2001-01-16 09:08:22 +00:00
close.2 Replace .Va, .Ar and .Nm with .Fa or .Va where necessary, examples: 2000-06-23 05:05:44 +00:00
connect.2 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
dup.2 Replace .Va, .Ar and .Nm with .Fa or .Va where necessary, examples: 2000-06-23 05:05:44 +00:00
execve.2 Add reference to elf(5) in addition to already mentioned a.out(5) and add both 2000-11-27 15:18:25 +00:00
fcntl.2 Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
fhopen.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
flock.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
fork.2 Use `Er' variable to define first column width in ERRORS section. It was 2000-05-04 13:09:25 +00:00
fsync.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
ftruncate.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
getdirentries.2 Replace .Va, .Ar and .Nm with .Fa or .Va where necessary, examples: 2000-06-23 05:05:44 +00:00
getdtablesize.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
getfh.2 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
getfsstat.2 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
getgid.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
getgroups.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
getitimer.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
getlogin.2 mdoc(7) police: fixed (minor) mdoc bugs introduced in previous revision. 2001-01-10 11:32:04 +00:00
getpeername.2 Replace .Va, .Ar and .Nm with .Fa or .Va where necessary, examples: 2000-06-23 05:05:44 +00:00
getpgrp.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
getpid.2 Don't suggest people use getpid() to construct temporary filenames; 2000-11-19 10:30:42 +00:00
getpriority.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
getrlimit.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
getrusage.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
getsid.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
getsockname.2 Replace .Va, .Ar and .Nm with .Fa or .Va where necessary, examples: 2000-06-23 05:05:44 +00:00
getsockopt.2 use .Pp instead of faking it with an extra newline 2000-07-20 11:05:52 +00:00
gettimeofday.2 Prepare for mdoc(7)NG. 2001-01-16 09:08:22 +00:00
getuid.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
intro.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
ioctl.2 Use `Er' variable to define first column width in ERRORS section. It was 2000-05-04 13:09:25 +00:00
issetugid.2 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:15:20 +00:00
jail.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
kill.2 Use `Er' variable to define first column width in ERRORS section. It was 2000-05-04 13:09:25 +00:00
kldfind.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
kldfirstmod.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
kldload.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
kldnext.2 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
kldstat.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
kldunload.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
kqueue.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
ktrace.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
link.2 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:15:20 +00:00
listen.2 Replace .Va, .Ar and .Nm with .Fa or .Va where necessary, examples: 2000-06-23 05:05:44 +00:00
lseek.2 Use `Er' variable to define first column width in ERRORS section. It was 2000-05-04 13:09:25 +00:00
lseek.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
madvise.2 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:15:20 +00:00
Makefile.inc Add man pages for mod*(2). Shamelessly cut/pasted from the kld*(2) man 2000-09-28 22:39:59 +00:00
mincore.2 Replace an erroneous .Va error' with .Va errno'. 2000-06-23 04:25:10 +00:00
minherit.2 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:15:20 +00:00
mkdir.2 Use `Er' variable to define first column width in ERRORS section. It was 2000-05-04 13:09:25 +00:00
mkfifo.2 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
mknod.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
mlock.2 Properly separate paragraphs by using `.Pp' instead of a blank line. 2000-06-23 20:35:45 +00:00
mmap.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
mmap.c Add #include <unistd.h> to get the prototype for __syscall(). 1998-03-09 07:27:58 +00:00
modfind.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
modnext.2 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
modstat.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
mount.2 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
mprotect.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
msync.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
munmap.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
nanosleep.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
nfssvc.2 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
open.2 document O_NOFOLLOW and O_FSYNC flags to open 2000-11-29 04:08:49 +00:00
pathconf.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
pipe.2 Use `Er' variable to define first column width in ERRORS section. It was 2000-05-04 13:09:25 +00:00
poll.2 Prepare for mdoc(7)NG. 2001-01-16 09:08:22 +00:00
pread.c Add wrappers for pread and pwrite syscalls. 1999-04-04 21:46:24 +00:00
profil.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
ptrace.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
pwrite.c Add wrappers for pread and pwrite syscalls. 1999-04-04 21:46:24 +00:00
quotactl.2 Use `Er' variable to define first column width in ERRORS section. It was 2000-05-04 13:09:25 +00:00
read.2 Replace .Va, .Ar and .Nm with .Fa or .Va where necessary, examples: 2000-06-23 05:05:44 +00:00
readlink.2 Use `Er' variable to define first column width in ERRORS section. It was 2000-05-04 13:09:25 +00:00
reboot.2 Fix typo: turn of -> turn off. 2000-06-13 12:50:47 +00:00
recv.2 Prepare for mdoc(7)NG. 2001-01-16 09:08:22 +00:00
rename.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
revoke.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
rfork.2 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:15:20 +00:00
rmdir.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
rtprio.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
sched_get_priority_max.2 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:15:20 +00:00
sched_setparam.2 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:15:20 +00:00
sched_setscheduler.2 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:15:20 +00:00
sched_yield.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
select.2 Use .St -susv2 rather than "The Single UNIX Specification". 2000-09-04 15:38:58 +00:00
semctl.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
semget.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
semop.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
send.2 Document EHOSTDOWN error. 2001-01-17 21:02:50 +00:00
sendfile.2 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
setgroups.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
setpgid.2 Replace .Va, .Ar and .Nm with .Fa or .Va where necessary, examples: 2000-06-23 05:05:44 +00:00
setregid.2 Use `Er' variable to define first column width in ERRORS section. It was 2000-05-04 13:09:25 +00:00
setresuid.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
setreuid.2 Use `Er' variable to define first column width in ERRORS section. It was 2000-05-04 13:09:25 +00:00
setsid.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
setuid.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
shm_open.2 mdoc(7) police: Nm -> Fn where appropriate. 2000-11-20 14:11:46 +00:00
shmat.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
shmctl.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
shmget.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
shutdown.2 Remove blank lines. 2000-06-23 20:34:31 +00:00
sigaction.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
sigaltstack.2 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
sigpending.2 The bit about sigpending not detecting any errors is a lie, it can return 2001-01-16 21:57:42 +00:00
sigprocmask.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
sigreturn.2 Use `Er' variable to define first column width in ERRORS section. It was 2000-05-04 13:09:25 +00:00
sigstack.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
sigsuspend.2 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
sigwait.2 Change my email address in the copyright notices for the sake of consistency 2000-07-18 01:38:19 +00:00
socket.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
socketpair.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
stat.2 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
statfs.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
swapon.2 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
symlink.2 Use `Er' variable to define first column width in ERRORS section. It was 2000-05-04 13:09:25 +00:00
sync.2 Update stale references to update(4) with references to the new 2000-07-19 07:39:08 +00:00
sysarch.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
syscall.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
truncate.2 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
truncate.c Fixed missing const. Include <unistd.h> so that the function type gets 1997-04-14 15:14:58 +00:00
umask.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
undelete.2 mdoc(7) police: Nm -> Fn where appropriate. 2000-11-20 14:11:46 +00:00
unlink.2 Use `Er' variable to define first column width in ERRORS section. It was 2000-05-04 13:09:25 +00:00
utimes.2 Introduce ".Lb" macro to libc manpages. 2000-04-21 09:42:15 +00:00
vfork.2 First appeared in 2.9BSD, not 3.0. 2000-07-08 18:17:12 +00:00
wait.2 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
write.2 Replace .Va, .Ar and .Nm with .Fa or .Va where necessary, examples: 2000-06-23 05:05:44 +00:00