diff options
Diffstat (limited to 'src/unistd')
| -rw-r--r-- | src/unistd/_exit.c | 4 | ||||
| -rw-r--r-- | src/unistd/alarm.c | 2 | ||||
| -rw-r--r-- | src/unistd/chdir.c | 4 | ||||
| -rw-r--r-- | src/unistd/chown.c | 4 | ||||
| -rw-r--r-- | src/unistd/close.c | 4 | ||||
| -rw-r--r-- | src/unistd/execve.c | 4 | ||||
| -rw-r--r-- | src/unistd/fork.c | 4 | ||||
| -rw-r--r-- | src/unistd/fsync.c | 3 | ||||
| -rw-r--r-- | src/unistd/ftruncate.c | 3 | ||||
| -rw-r--r-- | src/unistd/getcwd.c | 4 | ||||
| -rw-r--r-- | src/unistd/getegid.c | 4 | ||||
| -rw-r--r-- | src/unistd/geteuid.c | 4 | ||||
| -rw-r--r-- | src/unistd/getgid.c | 4 | ||||
| -rw-r--r-- | src/unistd/getgroups.c | 4 | ||||
| -rw-r--r-- | src/unistd/getpgrp.c | 4 | ||||
| -rw-r--r-- | src/unistd/getpid.c | 4 | ||||
| -rw-r--r-- | src/unistd/getppid.c | 4 | ||||
| -rw-r--r-- | src/unistd/getuid.c | 4 | ||||
| -rw-r--r-- | src/unistd/link.c | 4 | ||||
| -rw-r--r-- | src/unistd/lseek.c | 4 | ||||
| -rw-r--r-- | src/unistd/pause.c | 4 | ||||
| -rw-r--r-- | src/unistd/pipe.c | 4 | ||||
| -rw-r--r-- | src/unistd/read.c | 4 | ||||
| -rw-r--r-- | src/unistd/rmdir.c | 4 | ||||
| -rw-r--r-- | src/unistd/setgid.c | 4 | ||||
| -rw-r--r-- | src/unistd/setpgid.c | 4 | ||||
| -rw-r--r-- | src/unistd/setsid.c | 4 | ||||
| -rw-r--r-- | src/unistd/setuid.c | 4 | ||||
| -rw-r--r-- | src/unistd/sleep.c | 2 | ||||
| -rw-r--r-- | src/unistd/unlink.c | 4 | ||||
| -rw-r--r-- | src/unistd/write.c | 4 |
31 files changed, 60 insertions, 58 deletions
diff --git a/src/unistd/_exit.c b/src/unistd/_exit.c index 0a61e87c..f892dd59 100644 --- a/src/unistd/_exit.c +++ b/src/unistd/_exit.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" void _exit(int status) { - long scno = __lookup("exit"); + long scno = __syscall_lookup(exit); for (;;) { __syscall(scno, status); } diff --git a/src/unistd/alarm.c b/src/unistd/alarm.c index ff96dbaa..00130347 100644 --- a/src/unistd/alarm.c +++ b/src/unistd/alarm.c @@ -1,7 +1,7 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" unsigned alarm(unsigned seconds) { diff --git a/src/unistd/chdir.c b/src/unistd/chdir.c index 828487d3..e4061feb 100644 --- a/src/unistd/chdir.c +++ b/src/unistd/chdir.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" int chdir(const char *path) { - SYSCALL("chdir", int, -1, path, 0, 0, 0, 0, 0); + SYSCALL(chdir, int, -1, path, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/chown.c b/src/unistd/chown.c index 08c52364..9f931765 100644 --- a/src/unistd/chown.c +++ b/src/unistd/chown.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" int chown(const char *path, uid_t owner, gid_t group) { - SYSCALL("chown", int, -1, path, owner, group, 0, 0, 0); + SYSCALL(chown, int, -1, path, owner, group, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/close.c b/src/unistd/close.c index 3744aa86..e3e038cc 100644 --- a/src/unistd/close.c +++ b/src/unistd/close.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" int close(int fildes) { - SYSCALL("close", int, -1, fildes, 0, 0, 0, 0, 0); + SYSCALL(close, int, -1, fildes, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/execve.c b/src/unistd/execve.c index 8d7a1225..81e39b93 100644 --- a/src/unistd/execve.c +++ b/src/unistd/execve.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" int execve(const char *path, char *const argv[], char *const envp[]) { - SYSCALL_NUMBER(scno, "execve", -1); + SYSCALL_NUMBER(scno, execve, -1); errno = -__syscall(scno, path, argv, envp); return -1; } diff --git a/src/unistd/fork.c b/src/unistd/fork.c index 4efcc0f4..298de865 100644 --- a/src/unistd/fork.c +++ b/src/unistd/fork.c @@ -2,11 +2,11 @@ #include "sys/types.h" #include <unistd.h> #include "errno.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" pid_t fork(void) { - SYSCALL("fork", pid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(fork, pid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/fsync.c b/src/unistd/fsync.c index 35d70cbb..b0dd3820 100644 --- a/src/unistd/fsync.c +++ b/src/unistd/fsync.c @@ -1,12 +1,13 @@ #include <unistd.h> -#include "__nonstd.h" int fsync(int fildes) { + /* __POSIX_MIN(199309L); __POSIX_OPTION(_FSYNC); __XOPEN_MIN(4); __SC(int, fildes); + */ } /* diff --git a/src/unistd/ftruncate.c b/src/unistd/ftruncate.c index 8e6cf27f..6723321f 100644 --- a/src/unistd/ftruncate.c +++ b/src/unistd/ftruncate.c @@ -1,12 +1,13 @@ #include <unistd.h> -#include "__nonstd.h" int ftruncate(int fildes, off_t length) { + /* __POSIX_MIN(199309L); __POSIX_OPTION_OR(_MAPPED_FILES, _SHARED_MEMORY); __XOPEN_MIN(450); __SC(int, fildes, length); + */ } /* diff --git a/src/unistd/getcwd.c b/src/unistd/getcwd.c index 904e2c7d..7a37a7c2 100644 --- a/src/unistd/getcwd.c +++ b/src/unistd/getcwd.c @@ -1,12 +1,12 @@ #include "sys/types.h" #include <unistd.h> #include "nonstd/assert.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" char * getcwd(char *buf, size_t size) { ASSERT_NONNULL(buf); - SYSCALL("getcwd", char *, NULL, buf, size, 0, 0, 0, 0); + SYSCALL(getcwd, char *, NULL, buf, size, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/getegid.c b/src/unistd/getegid.c index da8a372f..0c39a84a 100644 --- a/src/unistd/getegid.c +++ b/src/unistd/getegid.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" gid_t getegid(void) { - SYSCALL("getegid", gid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(getegid, gid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/geteuid.c b/src/unistd/geteuid.c index 2bc4c054..9ccb56de 100644 --- a/src/unistd/geteuid.c +++ b/src/unistd/geteuid.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" uid_t geteuid(void) { - SYSCALL("geteuid", uid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(geteuid, uid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/getgid.c b/src/unistd/getgid.c index 0d4a070d..28888be0 100644 --- a/src/unistd/getgid.c +++ b/src/unistd/getgid.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" gid_t getgid(void) { - SYSCALL("getgid", gid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(getgid, gid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/getgroups.c b/src/unistd/getgroups.c index 8af2634b..b7df2896 100644 --- a/src/unistd/getgroups.c +++ b/src/unistd/getgroups.c @@ -2,7 +2,7 @@ #include "sys/types.h" #include <unistd.h> #include "errno.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" #include "nonstd/assert.h" int getgroups(int gidsetsize, gid_t grouplist[]) @@ -10,7 +10,7 @@ int getgroups(int gidsetsize, gid_t grouplist[]) if (gidsetsize != 0) { ASSERT_NONNULL(grouplist); } - SYSCALL("getgroups", int, -1, gidsetsize, grouplist, 0, 0, 0, 0); + SYSCALL(getgroups, int, -1, gidsetsize, grouplist, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/getpgrp.c b/src/unistd/getpgrp.c index 897cd6be..7654afcb 100644 --- a/src/unistd/getpgrp.c +++ b/src/unistd/getpgrp.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" pid_t getpgrp(void) { - SYSCALL("getpgrp", pid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(getpgrp, pid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/getpid.c b/src/unistd/getpid.c index eb6be595..2c638c3c 100644 --- a/src/unistd/getpid.c +++ b/src/unistd/getpid.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" pid_t getpid(void) { - SYSCALL("getpid", pid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(getpid, pid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/getppid.c b/src/unistd/getppid.c index 2fc880a2..642501f0 100644 --- a/src/unistd/getppid.c +++ b/src/unistd/getppid.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" pid_t getppid(void) { - SYSCALL("getppid", pid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(getppid, pid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/getuid.c b/src/unistd/getuid.c index d85814d4..baccfa34 100644 --- a/src/unistd/getuid.c +++ b/src/unistd/getuid.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" uid_t getuid(void) { - SYSCALL("getuid", uid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(getuid, uid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/link.c b/src/unistd/link.c index 96e1e7b4..93726cb3 100644 --- a/src/unistd/link.c +++ b/src/unistd/link.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" int link(const char *path1, const char *path2) { - SYSCALL("link", int, -1, path1, path2, 0, 0, 0, 0); + SYSCALL(link, int, -1, path1, path2, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/lseek.c b/src/unistd/lseek.c index dd194761..a277efbd 100644 --- a/src/unistd/lseek.c +++ b/src/unistd/lseek.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" off_t lseek(int fildes, off_t offset, int whence) { - SYSCALL("lseek", off_t, -1, fildes, offset, whence, 0, 0, 0); + SYSCALL(lseek, off_t, -1, fildes, offset, whence, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/pause.c b/src/unistd/pause.c index 41e25101..d69900f9 100644 --- a/src/unistd/pause.c +++ b/src/unistd/pause.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" int pause(void) { - SYSCALL("pause", int, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(pause, int, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/pipe.c b/src/unistd/pipe.c index 5ab8b5e7..26e97dea 100644 --- a/src/unistd/pipe.c +++ b/src/unistd/pipe.c @@ -2,12 +2,12 @@ #include "sys/types.h" #include <unistd.h> #include "nonstd/assert.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" int pipe(int fildes[2]) { ASSERT_NONNULL(fildes); - SYSCALL("pipe", int, -1, fildes, 0, 0, 0, 0, 0); + SYSCALL(pipe, int, -1, fildes, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/read.c b/src/unistd/read.c index c44e406d..f7b91a9b 100644 --- a/src/unistd/read.c +++ b/src/unistd/read.c @@ -2,11 +2,11 @@ #include "sys/types.h" #include <unistd.h> #include "errno.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" ssize_t read(int fildes, void *buf, size_t nbyte) { - SYSCALL("read", ssize_t, -1, fildes, buf, nbyte, 0, 0, 0); + SYSCALL(read, ssize_t, -1, fildes, buf, nbyte, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/rmdir.c b/src/unistd/rmdir.c index 6c6df741..b1944f80 100644 --- a/src/unistd/rmdir.c +++ b/src/unistd/rmdir.c @@ -2,11 +2,11 @@ #include "sys/types.h" #include <unistd.h> #include "errno.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" int rmdir(const char *path) { - SYSCALL("rmdir", int, -1, path, 0, 0, 0, 0, 0); + SYSCALL(rmdir, int, -1, path, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/setgid.c b/src/unistd/setgid.c index 79f9695b..30aa5223 100644 --- a/src/unistd/setgid.c +++ b/src/unistd/setgid.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" int setgid(gid_t gid) { - SYSCALL("setgid", int, -1, gid, 0, 0, 0, 0, 0); + SYSCALL(setgid, int, -1, gid, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/setpgid.c b/src/unistd/setpgid.c index 28769713..2206446e 100644 --- a/src/unistd/setpgid.c +++ b/src/unistd/setpgid.c @@ -2,11 +2,11 @@ #include "sys/types.h" #include <unistd.h> #include "errno.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" int setpgid(pid_t pid, pid_t pgid) { - SYSCALL("setpgid", int, -1, pid, pgid, 0, 0, 0, 0); + SYSCALL(setpgid, int, -1, pid, pgid, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/setsid.c b/src/unistd/setsid.c index 8c1aa0c7..8dbc9d1c 100644 --- a/src/unistd/setsid.c +++ b/src/unistd/setsid.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" pid_t setsid(void) { - SYSCALL("setsid", pid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(setsid, pid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/setuid.c b/src/unistd/setuid.c index 4c6053df..4599b083 100644 --- a/src/unistd/setuid.c +++ b/src/unistd/setuid.c @@ -1,11 +1,11 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" int setuid(uid_t uid) { - SYSCALL("setuid", int, -1, uid, 0, 0, 0, 0, 0); + SYSCALL(setuid, int, -1, uid, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/sleep.c b/src/unistd/sleep.c index 1e884f8e..29ffee7b 100644 --- a/src/unistd/sleep.c +++ b/src/unistd/sleep.c @@ -1,7 +1,7 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" unsigned sleep(unsigned seconds) { diff --git a/src/unistd/unlink.c b/src/unistd/unlink.c index 09fc20b0..f658872d 100644 --- a/src/unistd/unlink.c +++ b/src/unistd/unlink.c @@ -2,12 +2,12 @@ #include "sys/types.h" #include <unistd.h> #include "nonstd/assert.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" int unlink(const char *path) { ASSERT_NONNULL(path); - SYSCALL("unlink", int, -1, path, 0, 0, 0, 0, 0); + SYSCALL(unlink, int, -1, path, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/write.c b/src/unistd/write.c index 352ef43f..6982a359 100644 --- a/src/unistd/write.c +++ b/src/unistd/write.c @@ -2,14 +2,14 @@ #include "sys/types.h" #include <unistd.h> #include "nonstd/assert.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" ssize_t write(int fildes, const void *buf, size_t nbyte) { if (nbyte != 0) { ASSERT_NONNULL(buf); } - SYSCALL("write", ssize_t, -1, fildes, buf, nbyte, 0, 0, 0); + SYSCALL(write, ssize_t, -1, fildes, buf, nbyte, 0, 0, 0); } /* POSIX(1) |
