musl/src/unistd
Rich Felker dd5f50da6f support linux kernel apis (new archs) with old syscalls removed
such archs are expected to omit definitions of the SYS_* macros for
syscalls their kernels lack from arch/$ARCH/bits/syscall.h. the
preprocessor is then able to select the an appropriate implementation
for affected functions. two basic strategies are used on a
case-by-case basis:

where the old syscalls correspond to deprecated library-level
functions, the deprecated functions have been converted to wrappers
for the modern function, and the modern function has fallback code
(omitted at the preprocessor level on new archs) to make use of the
old syscalls if the new syscall fails with ENOSYS. this also improves
functionality on older kernels and eliminates the incentive to program
with deprecated library-level functions for the sake of compatibility
with older kernels.

in other situations where the old syscalls correspond to library-level
functions which are not deprecated but merely lack some new features,
such as the *at functions, the old syscalls are still used on archs
which support them. this may change at some point in the future if or
when fallback code is added to the new functions to make them usable
(possibly with reduced functionality) on old kernels.
2014-05-29 21:01:32 -04:00
..
mips initial version of mips (o32) port, based on work by Richard Pennington (rdp) 2012-07-11 04:22:13 -04:00
sh rename superh port to "sh" for consistency 2014-02-27 22:03:25 -05:00
_exit.c further use of _Noreturn, for non-plain-C functions 2012-09-06 23:34:10 -04:00
access.c support linux kernel apis (new archs) with old syscalls removed 2014-05-29 21:01:32 -04:00
acct.c fix some indention-with-spaces that crept in 2012-09-29 01:14:07 -04:00
alarm.c
chdir.c
chown.c support linux kernel apis (new archs) with old syscalls removed 2014-05-29 21:01:32 -04:00
close.c fix handling of EINTR during close() 2012-09-24 22:39:08 -04:00
ctermid.c include cleanups: remove unused headers and add feature test macros 2013-12-12 05:09:18 +00:00
dup2.c support linux kernel apis (new archs) with old syscalls removed 2014-05-29 21:01:32 -04:00
dup3.c support linux kernel apis (new archs) with old syscalls removed 2014-05-29 21:01:32 -04:00
dup.c
faccessat.c simplify faccessat AT_EACCESS path and eliminate resource dependence 2013-11-01 20:34:05 -04:00
fchdir.c fix failure of fchmod, fstat, fchdir, and fchown to produce EBADF 2013-12-19 14:24:55 -05:00
fchown.c support linux kernel apis (new archs) with old syscalls removed 2014-05-29 21:01:32 -04:00
fchownat.c
fdatasync.c
fsync.c fix dummied-out fsync 2012-06-19 22:24:15 -04:00
ftruncate.c
getcwd.c fix errno value for getcwd when size argument is zero 2013-10-08 19:49:10 -04:00
getegid.c
geteuid.c
getgid.c
getgroups.c
gethostname.c include cleanups: remove unused headers and add feature test macros 2013-12-12 05:09:18 +00:00
getlogin_r.c include cleanups: remove unused headers and add feature test macros 2013-12-12 05:09:18 +00:00
getlogin.c
getpgid.c
getpgrp.c support linux kernel apis (new archs) with old syscalls removed 2014-05-29 21:01:32 -04:00
getpid.c
getppid.c
getsid.c
getuid.c
isatty.c
lchown.c support linux kernel apis (new archs) with old syscalls removed 2014-05-29 21:01:32 -04:00
link.c support linux kernel apis (new archs) with old syscalls removed 2014-05-29 21:01:32 -04:00
linkat.c
lseek.c
nice.c
pause.c support linux kernel apis (new archs) with old syscalls removed 2014-05-29 21:01:32 -04:00
pipe2.c in pipe2, use pipe() rather than __syscall(SYS_pipe, ...) for fallback 2013-03-25 11:34:22 -04:00
pipe.c support linux kernel apis (new archs) with old syscalls removed 2014-05-29 21:01:32 -04:00
posix_close.c add posix_close, accepted for inclusion in the next issue of POSIX 2013-12-06 21:59:01 -05:00
pread.c
preadv.c fix up lfs64 junk for preadv/pwritev 2012-09-09 16:33:47 -04:00
pwrite.c
pwritev.c fix up lfs64 junk for preadv/pwritev 2012-09-09 16:33:47 -04:00
read.c
readlink.c support linux kernel apis (new archs) with old syscalls removed 2014-05-29 21:01:32 -04:00
readlinkat.c use restrict everywhere it's required by c99 and/or posix 2008 2012-09-06 22:44:55 -04:00
readv.c
renameat.c
rmdir.c support linux kernel apis (new archs) with old syscalls removed 2014-05-29 21:01:32 -04:00
setegid.c
seteuid.c
setgid.c
setpgid.c
setpgrp.c
setregid.c
setresgid.c
setresuid.c
setreuid.c
setsid.c
setuid.c
setxid.c
sleep.c
symlink.c support linux kernel apis (new archs) with old syscalls removed 2014-05-29 21:01:32 -04:00
symlinkat.c
sync.c
tcgetpgrp.c
tcsetpgrp.c
truncate.c
ttyname_r.c include cleanups: remove unused headers and add feature test macros 2013-12-12 05:09:18 +00:00
ttyname.c
ualarm.c
unlink.c support linux kernel apis (new archs) with old syscalls removed 2014-05-29 21:01:32 -04:00
unlinkat.c
usleep.c include cleanups: remove unused headers and add feature test macros 2013-12-12 05:09:18 +00:00
write.c
writev.c