diff options
author | Jakob Kaivo <jkk@ung.org> | 2020-08-11 20:41:05 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2020-08-11 20:41:05 -0400 |
commit | 787c3b0fd09ea8456d2391e59e7589f0cf8f5555 (patch) | |
tree | cd37698def0dca42b34bc13c6da3d7f5fdfd16c0 | |
parent | 0a908b26fa745b4b295e705564af5eaf25e4fbd4 (diff) |
move auto-generated nonstd/syscall.h to static private _syscall.h
51 files changed, 79 insertions, 430 deletions
diff --git a/src/_syscall.h b/src/_syscall.h new file mode 100644 index 00000000..fb100151 --- /dev/null +++ b/src/_syscall.h @@ -0,0 +1,37 @@ +#ifndef ___SYSCALL_H__ +#define ___SYSCALL_H__ + +#include <errno.h> +#ifndef ENOSYS +#include "errno/ENOSYS.c" +#endif + +#include <nonstd/internal.h> + +#define SYSCALL(_name, _type, _err, _a1, _a2, _a3, _a4, _a5, _a6) \ + static int _scno = -2; \ + if (_scno == -2) { \ + _scno = __syscall_lookup(_name); \ + } \ + long _ret = __syscall(_scno, _a1, _a2, _a3, _a4, _a5, _a6); \ + if (_ret < 0) { \ + errno = -_ret; \ + return _err; \ + } \ + return (_type)_ret + +#define SYSCALL_NUMBER(_var, _name, _notfound) \ + static long _var = -2; \ + do { \ + if (_var == -2) { \ + (_var) = __syscall_lookup(_name); \ + } \ + if (_var == -1) { \ + errno = ENOSYS; \ + return (_notfound); } \ + } while (0) + +long __syscall(long __number, ...); +long __syscall_lookup(const char *name); + +#endif diff --git a/src/dirent/closedir.c b/src/dirent/closedir.c index 60ea8a57..566a7940 100644 --- a/src/dirent/closedir.c +++ b/src/dirent/closedir.c @@ -1,6 +1,6 @@ #include <dirent.h> #include "nonstd/assert.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" int closedir(DIR *dirp) { diff --git a/src/fcntl/fcntl.c b/src/fcntl/fcntl.c index b02745e9..d2abcf48 100644 --- a/src/fcntl/fcntl.c +++ b/src/fcntl/fcntl.c @@ -2,7 +2,7 @@ #include <fcntl.h> #include "errno.h" #include "stdarg.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" int fcntl(int fildes, int cmd, ...) { diff --git a/src/fcntl/open.c b/src/fcntl/open.c index 07bf7f6d..04102a64 100644 --- a/src/fcntl/open.c +++ b/src/fcntl/open.c @@ -3,7 +3,7 @@ #include "sys/stat.h" /* OH */ #include "errno.h" #include "stdarg.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" int open(const char *path, int oflag, ...) { diff --git a/src/nonstd/ENOSYS.ref b/src/nonstd/ENOSYS.ref deleted file mode 100644 index 79435d21..00000000 --- a/src/nonstd/ENOSYS.ref +++ /dev/null @@ -1,2 +0,0 @@ -#include <nonstd/syscall.h> -REFERENCE(errno/ENOSYS.c) diff --git a/src/nonstd/SYSCALL.c b/src/nonstd/SYSCALL.c deleted file mode 100644 index 4f4ce61a..00000000 --- a/src/nonstd/SYSCALL.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <nonstd/syscall.h> - -#define SYSCALL(_name, _type, _err, _a1, _a2, _a3, _a4, _a5, _a6) \ - static int _scno = -2; \ - if (_scno == -2) { _scno = ((long (*)(const char *))__libc(SYSCALL_LOOKUP))(_name); } \ - long _ret = __syscall(_scno, _a1, _a2, _a3, _a4, _a5, _a6); \ - if (_ret < 0) { \ - errno = -_ret; \ - return _err; \ - } \ - return (_type)_ret diff --git a/src/nonstd/SYSCALL_NUMBER.c b/src/nonstd/SYSCALL_NUMBER.c deleted file mode 100644 index 10f2aeeb..00000000 --- a/src/nonstd/SYSCALL_NUMBER.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <nonstd/syscall.h> - -#define SYSCALL_NUMBER(_var, _name, _notfound) \ - static long _var = -2; do { \ - if (_var == -2) { (_var) = ((long (*)(char*))__libc(SYSCALL_LOOKUP))(_name); } \ - if (_var == -1) { errno = ENOSYS; return (_notfound); } \ - } while (0) diff --git a/src/nonstd/__libc_start.c b/src/nonstd/__libc_start.c index cd115068..c06d2ffb 100644 --- a/src/nonstd/__libc_start.c +++ b/src/nonstd/__libc_start.c @@ -8,7 +8,7 @@ #include "unistd.h" #else #define DEFAULT_LOCALE "C" -#include "nonstd/syscall.h" +#include "../_syscall.h" #include "../termios/NCCS.c" #include "../termios/cc_t.c" #include "../termios/tcflag_t.c" diff --git a/src/nonstd/__lookup.c b/src/nonstd/__lookup.c deleted file mode 100644 index dca2f6a9..00000000 --- a/src/nonstd/__lookup.c +++ /dev/null @@ -1,3 +0,0 @@ -#include <nonstd/syscall.h> - -#define __lookup(_name) ((long (*)(const char *))__libc(SYSCALL_LOOKUP))(_name) diff --git a/src/nonstd/__syscall.c b/src/nonstd/__syscall.c deleted file mode 100644 index a1d0d1ed..00000000 --- a/src/nonstd/__syscall.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <nonstd/syscall.h> - -long __syscall(long number, ...) -; diff --git a/src/nonstd/_syscall.h b/src/nonstd/_syscall.h deleted file mode 100644 index 9d9264c1..00000000 --- a/src/nonstd/_syscall.h +++ /dev/null @@ -1,357 +0,0 @@ -#include "string.h" - -static long __syscall_lookup(const char *name) -{ - #ifdef __linux__ - size_t i; - - struct { - long num; - char *name; - } syscalls[] = { - { 43, "accept" }, - { 288, "accept4" }, - { 21, "access" }, - { 163, "acct" }, - { 248, "add_key" }, - { 159, "adjtimex" }, - { 183, "afs_syscall" }, - { 37, "alarm" }, - { 158, "arch_prctl" }, - { 49, "bind" }, - { 321, "bpf" }, - { 12, "brk" }, - { 125, "capget" }, - { 126, "capset" }, - { 80, "chdir" }, - { 90, "chmod" }, - { 92, "chown" }, - { 161, "chroot" }, - { 305, "clock_adjtime" }, - { 229, "clock_getres" }, - { 228, "clock_gettime" }, - { 230, "clock_nanosleep" }, - { 227, "clock_settime" }, - { 56, "clone" }, - { 3, "close" }, - { 42, "connect" }, - { 326, "copy_file_range" }, - { 85, "creat" }, - { 174, "create_module" }, - { 176, "delete_module" }, - { 32, "dup" }, - { 33, "dup2" }, - { 292, "dup3" }, - { 213, "epoll_create" }, - { 291, "epoll_create1" }, - { 233, "epoll_ctl" }, - { 214, "epoll_ctl_old" }, - { 281, "epoll_pwait" }, - { 232, "epoll_wait" }, - { 215, "epoll_wait_old" }, - { 284, "eventfd" }, - { 290, "eventfd2" }, - { 59, "execve" }, - { 322, "execveat" }, - { 60, "exit" }, - { 231, "exit_group" }, - { 269, "faccessat" }, - { 221, "fadvise64" }, - { 285, "fallocate" }, - { 300, "fanotify_init" }, - { 301, "fanotify_mark" }, - { 81, "fchdir" }, - { 91, "fchmod" }, - { 268, "fchmodat" }, - { 93, "fchown" }, - { 260, "fchownat" }, - { 72, "fcntl" }, - { 75, "fdatasync" }, - { 193, "fgetxattr" }, - { 313, "finit_module" }, - { 196, "flistxattr" }, - { 73, "flock" }, - { 57, "fork" }, - { 199, "fremovexattr" }, - { 190, "fsetxattr" }, - { 5, "fstat" }, - { 138, "fstatfs" }, - { 74, "fsync" }, - { 77, "ftruncate" }, - { 202, "futex" }, - { 261, "futimesat" }, - { 309, "getcpu" }, - { 79, "getcwd" }, - { 78, "getdents" }, - { 217, "getdents64" }, - { 108, "getegid" }, - { 107, "geteuid" }, - { 104, "getgid" }, - { 115, "getgroups" }, - { 36, "getitimer" }, - { 177, "get_kernel_syms" }, - { 239, "get_mempolicy" }, - { 52, "getpeername" }, - { 121, "getpgid" }, - { 111, "getpgrp" }, - { 39, "getpid" }, - { 181, "getpmsg" }, - { 110, "getppid" }, - { 140, "getpriority" }, - { 318, "getrandom" }, - { 120, "getresgid" }, - { 118, "getresuid" }, - { 97, "getrlimit" }, - { 274, "get_robust_list" }, - { 98, "getrusage" }, - { 124, "getsid" }, - { 51, "getsockname" }, - { 55, "getsockopt" }, - { 211, "get_thread_area" }, - { 186, "gettid" }, - { 96, "gettimeofday" }, - { 102, "getuid" }, - { 191, "getxattr" }, - { 175, "init_module" }, - { 254, "inotify_add_watch" }, - { 253, "inotify_init" }, - { 294, "inotify_init1" }, - { 255, "inotify_rm_watch" }, - { 210, "io_cancel" }, - { 16, "ioctl" }, - { 207, "io_destroy" }, - { 208, "io_getevents" }, - { 173, "ioperm" }, - { 172, "iopl" }, - { 252, "ioprio_get" }, - { 251, "ioprio_set" }, - { 206, "io_setup" }, - { 209, "io_submit" }, - { 312, "kcmp" }, - { 320, "kexec_file_load" }, - { 246, "kexec_load" }, - { 250, "keyctl" }, - { 62, "kill" }, - { 94, "lchown" }, - { 192, "lgetxattr" }, - { 86, "link" }, - { 265, "linkat" }, - { 50, "listen" }, - { 194, "listxattr" }, - { 195, "llistxattr" }, - { 212, "lookup_dcookie" }, - { 198, "lremovexattr" }, - { 8, "lseek" }, - { 189, "lsetxattr" }, - { 6, "lstat" }, - { 28, "madvise" }, - { 237, "mbind" }, - { 324, "membarrier" }, - { 319, "memfd_create" }, - { 256, "migrate_pages" }, - { 27, "mincore" }, - { 83, "mkdir" }, - { 258, "mkdirat" }, - { 133, "mknod" }, - { 259, "mknodat" }, - { 149, "mlock" }, - { 325, "mlock2" }, - { 151, "mlockall" }, - { 9, "mmap" }, - { 154, "modify_ldt" }, - { 165, "mount" }, - { 279, "move_pages" }, - { 10, "mprotect" }, - { 245, "mq_getsetattr" }, - { 244, "mq_notify" }, - { 240, "mq_open" }, - { 243, "mq_timedreceive" }, - { 242, "mq_timedsend" }, - { 241, "mq_unlink" }, - { 25, "mremap" }, - { 71, "msgctl" }, - { 68, "msgget" }, - { 70, "msgrcv" }, - { 69, "msgsnd" }, - { 26, "msync" }, - { 150, "munlock" }, - { 152, "munlockall" }, - { 11, "munmap" }, - { 303, "name_to_handle_at" }, - { 35, "nanosleep" }, - { 262, "newfstatat" }, - { 180, "nfsservctl" }, - { 2, "open" }, - { 257, "openat" }, - { 304, "open_by_handle_at" }, - { 34, "pause" }, - { 298, "perf_event_open" }, - { 135, "personality" }, - { 22, "pipe" }, - { 293, "pipe2" }, - { 155, "pivot_root" }, - { 330, "pkey_alloc" }, - { 331, "pkey_free" }, - { 329, "pkey_mprotect" }, - { 7, "poll" }, - { 271, "ppoll" }, - { 157, "prctl" }, - { 17, "pread64" }, - { 295, "preadv" }, - { 327, "preadv2" }, - { 302, "prlimit64" }, - { 310, "process_vm_readv" }, - { 311, "process_vm_writev" }, - { 270, "pselect6" }, - { 101, "ptrace" }, - { 182, "putpmsg" }, - { 18, "pwrite64" }, - { 296, "pwritev" }, - { 328, "pwritev2" }, - { 178, "query_module" }, - { 179, "quotactl" }, - { 0, "read" }, - { 187, "readahead" }, - { 89, "readlink" }, - { 267, "readlinkat" }, - { 19, "readv" }, - { 169, "reboot" }, - { 45, "recvfrom" }, - { 299, "recvmmsg" }, - { 47, "recvmsg" }, - { 216, "remap_file_pages" }, - { 197, "removexattr" }, - { 82, "rename" }, - { 264, "renameat" }, - { 316, "renameat2" }, - { 249, "request_key" }, - { 219, "restart_syscall" }, - { 84, "rmdir" }, - { 13, "rt_sigaction" }, - { 127, "rt_sigpending" }, - { 14, "rt_sigprocmask" }, - { 129, "rt_sigqueueinfo" }, - { 15, "rt_sigreturn" }, - { 130, "rt_sigsuspend" }, - { 128, "rt_sigtimedwait" }, - { 297, "rt_tgsigqueueinfo" }, - { 204, "sched_getaffinity" }, - { 315, "sched_getattr" }, - { 143, "sched_getparam" }, - { 146, "sched_get_priority_max" }, - { 147, "sched_get_priority_min" }, - { 145, "sched_getscheduler" }, - { 148, "sched_rr_get_interval" }, - { 203, "sched_setaffinity" }, - { 314, "sched_setattr" }, - { 142, "sched_setparam" }, - { 144, "sched_setscheduler" }, - { 24, "sched_yield" }, - { 317, "seccomp" }, - { 185, "security" }, - { 23, "select" }, - { 66, "semctl" }, - { 64, "semget" }, - { 65, "semop" }, - { 220, "semtimedop" }, - { 40, "sendfile" }, - { 307, "sendmmsg" }, - { 46, "sendmsg" }, - { 44, "sendto" }, - { 171, "setdomainname" }, - { 123, "setfsgid" }, - { 122, "setfsuid" }, - { 106, "setgid" }, - { 116, "setgroups" }, - { 170, "sethostname" }, - { 38, "setitimer" }, - { 238, "set_mempolicy" }, - { 308, "setns" }, - { 109, "setpgid" }, - { 141, "setpriority" }, - { 114, "setregid" }, - { 119, "setresgid" }, - { 117, "setresuid" }, - { 113, "setreuid" }, - { 160, "setrlimit" }, - { 273, "set_robust_list" }, - { 112, "setsid" }, - { 54, "setsockopt" }, - { 205, "set_thread_area" }, - { 218, "set_tid_address" }, - { 164, "settimeofday" }, - { 105, "setuid" }, - { 188, "setxattr" }, - { 30, "shmat" }, - { 31, "shmctl" }, - { 67, "shmdt" }, - { 29, "shmget" }, - { 48, "shutdown" }, - { 131, "sigaltstack" }, - { 282, "signalfd" }, - { 289, "signalfd4" }, - { 41, "socket" }, - { 53, "socketpair" }, - { 275, "splice" }, - { 4, "stat" }, - { 137, "statfs" }, - { 168, "swapoff" }, - { 167, "swapon" }, - { 88, "symlink" }, - { 266, "symlinkat" }, - { 162, "sync" }, - { 277, "sync_file_range" }, - { 306, "syncfs" }, - { 156, "_sysctl" }, - { 139, "sysfs" }, - { 99, "sysinfo" }, - { 103, "syslog" }, - { 276, "tee" }, - { 234, "tgkill" }, - { 201, "time" }, - { 222, "timer_create" }, - { 226, "timer_delete" }, - { 283, "timerfd_create" }, - { 287, "timerfd_gettime" }, - { 286, "timerfd_settime" }, - { 225, "timer_getoverrun" }, - { 224, "timer_gettime" }, - { 223, "timer_settime" }, - { 100, "times" }, - { 200, "tkill" }, - { 76, "truncate" }, - { 184, "tuxcall" }, - { 95, "umask" }, - { 166, "umount2" }, - { 63, "uname" }, - { 87, "unlink" }, - { 263, "unlinkat" }, - { 272, "unshare" }, - { 134, "uselib" }, - { 323, "userfaultfd" }, - { 136, "ustat" }, - { 132, "utime" }, - { 280, "utimensat" }, - { 235, "utimes" }, - { 58, "vfork" }, - { 153, "vhangup" }, - { 278, "vmsplice" }, - { 236, "vserver" }, - { 61, "wait4" }, - { 247, "waitid" }, - { 1, "write" }, - { 20, "writev" }, - }; - - for (i = 0; i < sizeof(syscalls) / sizeof(syscalls[0]); i++) { - if (!strcmp(name, syscalls[i].name)) { - return syscalls[i].num; - } - } - - #else - (void)name; - #endif - - return -1; -} diff --git a/src/nonstd/errno.ref b/src/nonstd/errno.ref deleted file mode 100644 index 231a4835..00000000 --- a/src/nonstd/errno.ref +++ /dev/null @@ -1,2 +0,0 @@ -#include <nonstd/syscall.h> -REFERENCE(<errno.h>) diff --git a/src/nonstd/syscall-internal.ref b/src/nonstd/syscall-internal.ref deleted file mode 100644 index 839537f1..00000000 --- a/src/nonstd/syscall-internal.ref +++ /dev/null @@ -1,2 +0,0 @@ -#include <nonstd/syscall.h> -REFERENCE(<nonstd/internal.h>) diff --git a/src/signal/kill.c b/src/signal/kill.c index 05949d52..28b304f4 100644 --- a/src/signal/kill.c +++ b/src/signal/kill.c @@ -1,6 +1,6 @@ #include "sys/types.h" #include <signal.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" int kill(pid_t pid, int sig) { diff --git a/src/signal/raise.c b/src/signal/raise.c index 0f0c5e69..bfd34cf7 100644 --- a/src/signal/raise.c +++ b/src/signal/raise.c @@ -2,7 +2,7 @@ #include "sys/types.h" #include "unistd.h" #else -#include "nonstd/syscall.h" +#include "../_syscall.h" #define kill(pid, sig) __syscall(__lookup("kill"), pid, sig) #define getpid() __syscall(__lookup("getpid")) #endif diff --git a/src/stdio/fputc.c b/src/stdio/fputc.c index c392a19c..063d13a7 100644 --- a/src/stdio/fputc.c +++ b/src/stdio/fputc.c @@ -5,7 +5,7 @@ #include "sys/types.h" #include "unistd.h" #else -#include "nonstd/syscall.h" +#include "../_syscall.h" #define write(_fd, _buf, _size) __syscall(__lookup("write"), _fd, _buf, _size) #endif diff --git a/src/stdio/rename.c b/src/stdio/rename.c index 068cd73d..43500cf3 100644 --- a/src/stdio/rename.c +++ b/src/stdio/rename.c @@ -1,6 +1,6 @@ #include <stdio.h> #include "errno.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" /** rename a file **/ int rename(const char *old, const char *new) diff --git a/src/stdlib/_Exit.c b/src/stdlib/_Exit.c index a199b457..9b1defdf 100644 --- a/src/stdlib/_Exit.c +++ b/src/stdlib/_Exit.c @@ -1,5 +1,5 @@ #include <stdlib.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" /** cause normal program termination without handlers **/ _Noreturn void _Exit(int status) diff --git a/src/stdlib/exit.c b/src/stdlib/exit.c index 28f87242..0cba3147 100644 --- a/src/stdlib/exit.c +++ b/src/stdlib/exit.c @@ -1,7 +1,7 @@ #include <stdlib.h> #include "limits.h" #include "stddef.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" #include "_stdlib.h" /** cause normal program termination **/ diff --git a/src/sys/stat/chmod.c b/src/sys/stat/chmod.c index 6f77e75e..6b0d8c1a 100644 --- a/src/sys/stat/chmod.c +++ b/src/sys/stat/chmod.c @@ -1,6 +1,6 @@ #include "sys/types.h" #include <sys/stat.h> -#include "nonstd/syscall.h" +#include "../../_syscall.h" int chmod(const char *path, mode_t mode) { diff --git a/src/sys/stat/mkdir.c b/src/sys/stat/mkdir.c index 7b3f510d..24ddc4a6 100644 --- a/src/sys/stat/mkdir.c +++ b/src/sys/stat/mkdir.c @@ -1,6 +1,6 @@ #include "sys/types.h" #include <sys/stat.h> -#include "nonstd/syscall.h" +#include "../../_syscall.h" int mkdir(const char *path, mode_t mode) { diff --git a/src/time/time.c b/src/time/time.c index 8af4131b..7166e2df 100644 --- a/src/time/time.c +++ b/src/time/time.c @@ -1,6 +1,6 @@ #include <time.h> #include "errno.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" /** get current time **/ diff --git a/src/unistd/_exit.c b/src/unistd/_exit.c index 0a61e87c..53e7ddba 100644 --- a/src/unistd/_exit.c +++ b/src/unistd/_exit.c @@ -1,7 +1,7 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" void _exit(int 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..203be533 100644 --- a/src/unistd/chdir.c +++ b/src/unistd/chdir.c @@ -1,7 +1,7 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" int chdir(const char *path) { diff --git a/src/unistd/chown.c b/src/unistd/chown.c index 08c52364..2036fb28 100644 --- a/src/unistd/chown.c +++ b/src/unistd/chown.c @@ -1,7 +1,7 @@ #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) { diff --git a/src/unistd/close.c b/src/unistd/close.c index 3744aa86..4c917e27 100644 --- a/src/unistd/close.c +++ b/src/unistd/close.c @@ -1,7 +1,7 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" int close(int fildes) { diff --git a/src/unistd/execve.c b/src/unistd/execve.c index 8d7a1225..96539df2 100644 --- a/src/unistd/execve.c +++ b/src/unistd/execve.c @@ -1,7 +1,7 @@ #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[]) { diff --git a/src/unistd/fork.c b/src/unistd/fork.c index 4efcc0f4..0417a60b 100644 --- a/src/unistd/fork.c +++ b/src/unistd/fork.c @@ -2,7 +2,7 @@ #include "sys/types.h" #include <unistd.h> #include "errno.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" pid_t fork(void) { diff --git a/src/unistd/getcwd.c b/src/unistd/getcwd.c index 904e2c7d..3ddfa53a 100644 --- a/src/unistd/getcwd.c +++ b/src/unistd/getcwd.c @@ -1,7 +1,7 @@ #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) { diff --git a/src/unistd/getegid.c b/src/unistd/getegid.c index da8a372f..eecc5a06 100644 --- a/src/unistd/getegid.c +++ b/src/unistd/getegid.c @@ -1,7 +1,7 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" gid_t getegid(void) { diff --git a/src/unistd/geteuid.c b/src/unistd/geteuid.c index 2bc4c054..8c7aa204 100644 --- a/src/unistd/geteuid.c +++ b/src/unistd/geteuid.c @@ -1,7 +1,7 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" uid_t geteuid(void) { diff --git a/src/unistd/getgid.c b/src/unistd/getgid.c index 0d4a070d..f991f18d 100644 --- a/src/unistd/getgid.c +++ b/src/unistd/getgid.c @@ -1,7 +1,7 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" gid_t getgid(void) { diff --git a/src/unistd/getgroups.c b/src/unistd/getgroups.c index 8af2634b..62a3207e 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[]) diff --git a/src/unistd/getpgrp.c b/src/unistd/getpgrp.c index 897cd6be..8f06b9e8 100644 --- a/src/unistd/getpgrp.c +++ b/src/unistd/getpgrp.c @@ -1,7 +1,7 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" pid_t getpgrp(void) { diff --git a/src/unistd/getpid.c b/src/unistd/getpid.c index eb6be595..d1255f5d 100644 --- a/src/unistd/getpid.c +++ b/src/unistd/getpid.c @@ -1,7 +1,7 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" pid_t getpid(void) { diff --git a/src/unistd/getppid.c b/src/unistd/getppid.c index 2fc880a2..b39c36bc 100644 --- a/src/unistd/getppid.c +++ b/src/unistd/getppid.c @@ -1,7 +1,7 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" pid_t getppid(void) { diff --git a/src/unistd/getuid.c b/src/unistd/getuid.c index d85814d4..4373915a 100644 --- a/src/unistd/getuid.c +++ b/src/unistd/getuid.c @@ -1,7 +1,7 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" uid_t getuid(void) { diff --git a/src/unistd/link.c b/src/unistd/link.c index 96e1e7b4..1f0b0db9 100644 --- a/src/unistd/link.c +++ b/src/unistd/link.c @@ -1,7 +1,7 @@ #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) { diff --git a/src/unistd/lseek.c b/src/unistd/lseek.c index dd194761..52665cd6 100644 --- a/src/unistd/lseek.c +++ b/src/unistd/lseek.c @@ -1,7 +1,7 @@ #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) { diff --git a/src/unistd/pause.c b/src/unistd/pause.c index 41e25101..99e079cd 100644 --- a/src/unistd/pause.c +++ b/src/unistd/pause.c @@ -1,7 +1,7 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" int pause(void) { diff --git a/src/unistd/pipe.c b/src/unistd/pipe.c index 5ab8b5e7..b682f872 100644 --- a/src/unistd/pipe.c +++ b/src/unistd/pipe.c @@ -2,7 +2,7 @@ #include "sys/types.h" #include <unistd.h> #include "nonstd/assert.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" int pipe(int fildes[2]) { diff --git a/src/unistd/read.c b/src/unistd/read.c index c44e406d..dcaa5825 100644 --- a/src/unistd/read.c +++ b/src/unistd/read.c @@ -2,7 +2,7 @@ #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) { diff --git a/src/unistd/rmdir.c b/src/unistd/rmdir.c index 6c6df741..6e97c005 100644 --- a/src/unistd/rmdir.c +++ b/src/unistd/rmdir.c @@ -2,7 +2,7 @@ #include "sys/types.h" #include <unistd.h> #include "errno.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" int rmdir(const char *path) { diff --git a/src/unistd/setgid.c b/src/unistd/setgid.c index 79f9695b..478387a4 100644 --- a/src/unistd/setgid.c +++ b/src/unistd/setgid.c @@ -1,7 +1,7 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" int setgid(gid_t gid) { diff --git a/src/unistd/setpgid.c b/src/unistd/setpgid.c index 28769713..288dc4eb 100644 --- a/src/unistd/setpgid.c +++ b/src/unistd/setpgid.c @@ -2,7 +2,7 @@ #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) { diff --git a/src/unistd/setsid.c b/src/unistd/setsid.c index 8c1aa0c7..6c24594d 100644 --- a/src/unistd/setsid.c +++ b/src/unistd/setsid.c @@ -1,7 +1,7 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" pid_t setsid(void) { diff --git a/src/unistd/setuid.c b/src/unistd/setuid.c index 4c6053df..fcb39bcb 100644 --- a/src/unistd/setuid.c +++ b/src/unistd/setuid.c @@ -1,7 +1,7 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> -#include "nonstd/syscall.h" +#include "../_syscall.h" int setuid(uid_t uid) { 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..4e7b040b 100644 --- a/src/unistd/unlink.c +++ b/src/unistd/unlink.c @@ -2,7 +2,7 @@ #include "sys/types.h" #include <unistd.h> #include "nonstd/assert.h" -#include "nonstd/syscall.h" +#include "../_syscall.h" int unlink(const char *path) { diff --git a/src/unistd/write.c b/src/unistd/write.c index 352ef43f..584eda9f 100644 --- a/src/unistd/write.c +++ b/src/unistd/write.c @@ -2,7 +2,7 @@ #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) { |