diff options
author | Jakob Kaivo <jkk@ung.org> | 2024-01-31 16:46:49 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2024-01-31 16:46:49 -0500 |
commit | cb7967b40d4a9b6e17003b8518c7cd49d29108ab (patch) | |
tree | 5b4c7cbe991ae5ddee64afc152150dc1b739be8d | |
parent | 2bc46bd54cc8cdcd7647461f2d76384266f2a0e4 (diff) |
purge last of posix-specific headers
114 files changed, 0 insertions, 766 deletions
diff --git a/src/sys/mman/MAP_FAILED.h b/src/sys/mman/MAP_FAILED.h deleted file mode 100644 index 468ff528..00000000 --- a/src/sys/mman/MAP_FAILED.h +++ /dev/null @@ -1,7 +0,0 @@ -#include <sys/mman.h> - -#define MAP_FAILED ((void*)-1) - -/* -POSIX(199309) -*/ diff --git a/src/sys/mman/MAP_FIXED.h b/src/sys/mman/MAP_FIXED.h deleted file mode 100644 index e53842d8..00000000 --- a/src/sys/mman/MAP_FIXED.h +++ /dev/null @@ -1,7 +0,0 @@ -#include <sys/mman.h> -#define MAP_FIXED /* TODO */ - -/* -XOPEN(400) -POSIX(199309) -*/ diff --git a/src/sys/mman/MAP_PRIVATE.h b/src/sys/mman/MAP_PRIVATE.h deleted file mode 100644 index b6159f4f..00000000 --- a/src/sys/mman/MAP_PRIVATE.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/mman.h> -#define MAP_PRIVATE /* TODO */ -/* -XOPEN(400) -POSIX(199309) -*/ diff --git a/src/sys/mman/MAP_SHARED.h b/src/sys/mman/MAP_SHARED.h deleted file mode 100644 index 99777c8a..00000000 --- a/src/sys/mman/MAP_SHARED.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/mman.h> -#define MAP_SHARED /* TODO */ -/* -XOPEN(400) -POSIX(199309) -*/ diff --git a/src/sys/mman/MCL_CURRENT.h b/src/sys/mman/MCL_CURRENT.h deleted file mode 100644 index 85d542ba..00000000 --- a/src/sys/mman/MCL_CURRENT.h +++ /dev/null @@ -1,7 +0,0 @@ -#include <sys/mman.h> - -#define MCL_CURRENT /* TODO */ - -/* -POSIX(199309) -*/ diff --git a/src/sys/mman/MCL_FUTURE.h b/src/sys/mman/MCL_FUTURE.h deleted file mode 100644 index a0d70688..00000000 --- a/src/sys/mman/MCL_FUTURE.h +++ /dev/null @@ -1,7 +0,0 @@ -#include <sys/mman.h> - -#define MCL_FUTURE /* TODO */ - -/* -POSIX(199309) -*/ diff --git a/src/sys/mman/MS_ASYNC.h b/src/sys/mman/MS_ASYNC.h deleted file mode 100644 index 2924362e..00000000 --- a/src/sys/mman/MS_ASYNC.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/mman.h> -#define MS_ASYNC /* TODO */ -/* -XOPEN(400) -POSIX(199309) -*/ diff --git a/src/sys/mman/MS_INVALIDATE.h b/src/sys/mman/MS_INVALIDATE.h deleted file mode 100644 index c7f2a40c..00000000 --- a/src/sys/mman/MS_INVALIDATE.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/mman.h> -#define MS_INVALIDATE /* TODO */ -/* -XOPEN(400) -POSIX(199309) -*/ diff --git a/src/sys/mman/MS_SYNC.h b/src/sys/mman/MS_SYNC.h deleted file mode 100644 index 0d487618..00000000 --- a/src/sys/mman/MS_SYNC.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/mman.h> -#define MS_SYNC /* TODO */ -/* -XOPEN(400) -POSIX(199309) -*/ diff --git a/src/sys/mman/PROT_EXEC.h b/src/sys/mman/PROT_EXEC.h deleted file mode 100644 index a62c13f8..00000000 --- a/src/sys/mman/PROT_EXEC.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/mman.h> -#define PROT_EXEC /* TODO */ -/* -XOPEN(400) -POSIX(199309) -*/ diff --git a/src/sys/mman/PROT_NONE.h b/src/sys/mman/PROT_NONE.h deleted file mode 100644 index 161d8a85..00000000 --- a/src/sys/mman/PROT_NONE.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/mman.h> -#define PROT_NONE /* TODO */ -/* -XOPEN(400) -POSIX(199309) -*/ diff --git a/src/sys/mman/PROT_READ.h b/src/sys/mman/PROT_READ.h deleted file mode 100644 index 940ba1a2..00000000 --- a/src/sys/mman/PROT_READ.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/mman.h> -#define PROT_READ /* TODO */ -/* -XOPEN(400) -POSIX(199309) -*/ diff --git a/src/sys/mman/PROT_WRITE.h b/src/sys/mman/PROT_WRITE.h deleted file mode 100644 index e1737bb0..00000000 --- a/src/sys/mman/PROT_WRITE.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/mman.h> -#define PROT_WRITE /* TODO */ -/* -XOPEN(400) -POSIX(199309) -*/ diff --git a/src/sys/mman/mlock.c b/src/sys/mman/mlock.c deleted file mode 100644 index c73d2a3c..00000000 --- a/src/sys/mman/mlock.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <sys/mman.h> - -int mlock(const void *addr, size_t len) -{ - return 0; -} - -/* -POSIX(199309) -*/ diff --git a/src/sys/mman/mlockall.c b/src/sys/mman/mlockall.c deleted file mode 100644 index 06f51ecf..00000000 --- a/src/sys/mman/mlockall.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <sys/mman.h> - -int mlockall(int flags) -{ - return flags; -} - -/* -POSIX(199309) -*/ diff --git a/src/sys/mman/mmap.c b/src/sys/mman/mmap.c deleted file mode 100644 index 85049ab6..00000000 --- a/src/sys/mman/mmap.c +++ /dev/null @@ -1,13 +0,0 @@ -#include <sys/types.h> -#include <sys/mman.h> -#include "_syscall.h" - -void *mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off) -{ - SYSCALL(mmap, void*, MAP_FAILED, addr, len, prot, flags, fildes, off); -} - -/* -XOPEN(400) -POSIX(199309) -*/ diff --git a/src/sys/mman/mprotect.c b/src/sys/mman/mprotect.c deleted file mode 100644 index e2aa6b3b..00000000 --- a/src/sys/mman/mprotect.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <sys/mman.h> - -int mprotect(void *addr, size_t len, int prot) -{ - return prot; -} - -/* -XOPEN(400) -POSIX(199309) -*/ diff --git a/src/sys/mman/msync.c b/src/sys/mman/msync.c deleted file mode 100644 index de8e2ef0..00000000 --- a/src/sys/mman/msync.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <sys/mman.h> - -int msync(void * addr , size_t len , int flags ) -{ -} - - -/* -XOPEN(400) -POSIX(199309) -*/ diff --git a/src/sys/mman/munlock.c b/src/sys/mman/munlock.c deleted file mode 100644 index 7445ade1..00000000 --- a/src/sys/mman/munlock.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <sys/mman.h> - -int munlock(const void *addr, size_t len) -{ - return 0; -} - -/* -POSIX(199309) -*/ diff --git a/src/sys/mman/munlockall.c b/src/sys/mman/munlockall.c deleted file mode 100644 index 0bb8d4b1..00000000 --- a/src/sys/mman/munlockall.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <sys/mman.h> - -int munlockall(void) -{ - return 0; -} - -/* -POSIX(199309) -*/ diff --git a/src/sys/mman/munmap.c b/src/sys/mman/munmap.c deleted file mode 100644 index 0e401dd8..00000000 --- a/src/sys/mman/munmap.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <sys/mman.h> - -int munmap(void*addr, size_t len) -{ - return 0; -} - -/* -XOPEN(400) -POSIX(199309) -*/ diff --git a/src/sys/mman/shm_open.c b/src/sys/mman/shm_open.c deleted file mode 100644 index 1e13c2a0..00000000 --- a/src/sys/mman/shm_open.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <sys/mman.h> - -int shm_open(const char *name, int oflag, mode_t mode) -{ - return -1; -} - -/* -POSIX(199309) -*/ diff --git a/src/sys/mman/shm_unlink.c b/src/sys/mman/shm_unlink.c deleted file mode 100644 index d0f046f8..00000000 --- a/src/sys/mman/shm_unlink.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <sys/mman.h> - -int shm_unlink(const char *name) -{ - return -1; -} - -/* -POSIX(199309) -*/ diff --git a/src/sys/stat/S_IFBLK.h b/src/sys/stat/S_IFBLK.h deleted file mode 100644 index db893bff..00000000 --- a/src/sys/stat/S_IFBLK.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_IFBLK /* TODO */ -/* -XOPEN(4) -*/ diff --git a/src/sys/stat/S_IFCHR.h b/src/sys/stat/S_IFCHR.h deleted file mode 100644 index cedc3939..00000000 --- a/src/sys/stat/S_IFCHR.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_IFCHR /* TODO */ -/* -XOPEN(4) -*/ diff --git a/src/sys/stat/S_IFDIR.h b/src/sys/stat/S_IFDIR.h deleted file mode 100644 index c72702b2..00000000 --- a/src/sys/stat/S_IFDIR.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_IFDIR /* TODO */ -/* -XOPEN(4) -*/ diff --git a/src/sys/stat/S_IFIFO.h b/src/sys/stat/S_IFIFO.h deleted file mode 100644 index b67dfe4d..00000000 --- a/src/sys/stat/S_IFIFO.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_IFIFO /* TODO */ -/* -XOPEN(4) -*/ diff --git a/src/sys/stat/S_IFLNK.h b/src/sys/stat/S_IFLNK.h deleted file mode 100644 index 8948d050..00000000 --- a/src/sys/stat/S_IFLNK.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_IFLNK /* TODO */ -/* -XOPEN(400) -*/ diff --git a/src/sys/stat/S_IFMT.h b/src/sys/stat/S_IFMT.h deleted file mode 100644 index 52829110..00000000 --- a/src/sys/stat/S_IFMT.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_IFMT /* TODO */ -/* -XOPEN(4) -*/ diff --git a/src/sys/stat/S_IFREG.h b/src/sys/stat/S_IFREG.h deleted file mode 100644 index 8e7cd9db..00000000 --- a/src/sys/stat/S_IFREG.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_IFREG /* TODO */ -/* -XOPEN(4) -*/ diff --git a/src/sys/stat/S_IRGRP.h b/src/sys/stat/S_IRGRP.h deleted file mode 100644 index 98cf739e..00000000 --- a/src/sys/stat/S_IRGRP.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/stat.h> - -#define S_IRGRP (040) -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_IROTH.h b/src/sys/stat/S_IROTH.h deleted file mode 100644 index 006421ed..00000000 --- a/src/sys/stat/S_IROTH.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/stat.h> - -#define S_IROTH (04) -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_IRUSR.h b/src/sys/stat/S_IRUSR.h deleted file mode 100644 index 2b62f4f1..00000000 --- a/src/sys/stat/S_IRUSR.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/stat.h> - -#define S_IRUSR (0400) -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_IRWXG.h b/src/sys/stat/S_IRWXG.h deleted file mode 100644 index e051625e..00000000 --- a/src/sys/stat/S_IRWXG.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/stat.h> - -#define S_IRWXG (070) -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_IRWXO.h b/src/sys/stat/S_IRWXO.h deleted file mode 100644 index 82bbadb3..00000000 --- a/src/sys/stat/S_IRWXO.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/stat.h> - -#define S_IRWXO (07) -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_IRWXU.h b/src/sys/stat/S_IRWXU.h deleted file mode 100644 index a518680e..00000000 --- a/src/sys/stat/S_IRWXU.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/stat.h> - -#define S_IRWXU (0700) -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_ISBLK.h b/src/sys/stat/S_ISBLK.h deleted file mode 100644 index 2cb951f9..00000000 --- a/src/sys/stat/S_ISBLK.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_ISBLK(__s) /* FIXME */ -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_ISCHR.h b/src/sys/stat/S_ISCHR.h deleted file mode 100644 index 91a19e27..00000000 --- a/src/sys/stat/S_ISCHR.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_ISCHR(__s) /* fixme */ -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_ISDIR.h b/src/sys/stat/S_ISDIR.h deleted file mode 100644 index b23e06bf..00000000 --- a/src/sys/stat/S_ISDIR.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_ISDIR(__s) (__s) -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_ISFIFO.h b/src/sys/stat/S_ISFIFO.h deleted file mode 100644 index 80aac6c5..00000000 --- a/src/sys/stat/S_ISFIFO.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_ISFIFO(__s) /* fixme */ -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_ISGID.h b/src/sys/stat/S_ISGID.h deleted file mode 100644 index 55ceb105..00000000 --- a/src/sys/stat/S_ISGID.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_ISGID (02000) -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_ISLNK.h b/src/sys/stat/S_ISLNK.h deleted file mode 100644 index 232bf06b..00000000 --- a/src/sys/stat/S_ISLNK.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/stat.h> -#define S_ISLNK(__m) /* TODO */ -/* -XOPEN(400) -POSIX(200112) -*/ diff --git a/src/sys/stat/S_ISREG.h b/src/sys/stat/S_ISREG.h deleted file mode 100644 index 99b470c1..00000000 --- a/src/sys/stat/S_ISREG.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_ISREG(__s) /* fixme */ -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_ISUID.h b/src/sys/stat/S_ISUID.h deleted file mode 100644 index 85295ad3..00000000 --- a/src/sys/stat/S_ISUID.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_ISUID (04000) -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_ISVTX.h b/src/sys/stat/S_ISVTX.h deleted file mode 100644 index 01f0eeee..00000000 --- a/src/sys/stat/S_ISVTX.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/stat.h> -#define S_ISVTX 01000 - -/* -XOPEN(400) -*/ diff --git a/src/sys/stat/S_IWGRP.h b/src/sys/stat/S_IWGRP.h deleted file mode 100644 index c7a716e7..00000000 --- a/src/sys/stat/S_IWGRP.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_IWGRP (020) -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_IWOTH.h b/src/sys/stat/S_IWOTH.h deleted file mode 100644 index 26e75066..00000000 --- a/src/sys/stat/S_IWOTH.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_IWOTH (02) -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_IWUSR.h b/src/sys/stat/S_IWUSR.h deleted file mode 100644 index e9af1829..00000000 --- a/src/sys/stat/S_IWUSR.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_IWUSR (0200) -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_IXGRP.h b/src/sys/stat/S_IXGRP.h deleted file mode 100644 index 34f44729..00000000 --- a/src/sys/stat/S_IXGRP.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_IXGRP (010) -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_IXOTH.h b/src/sys/stat/S_IXOTH.h deleted file mode 100644 index 10d51686..00000000 --- a/src/sys/stat/S_IXOTH.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_IXOTH (01) -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_IXUSR.h b/src/sys/stat/S_IXUSR.h deleted file mode 100644 index b4b8e494..00000000 --- a/src/sys/stat/S_IXUSR.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_IXUSR (0100) -/* -POSIX(1) -*/ diff --git a/src/sys/stat/S_TYPEISMQ.h b/src/sys/stat/S_TYPEISMQ.h deleted file mode 100644 index 064e9f6a..00000000 --- a/src/sys/stat/S_TYPEISMQ.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_TYPEISMQ(__buf) /* TODO */ -/* -POSIX(199309) -*/ diff --git a/src/sys/stat/S_TYPEISSEM.h b/src/sys/stat/S_TYPEISSEM.h deleted file mode 100644 index 4fb0f690..00000000 --- a/src/sys/stat/S_TYPEISSEM.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_TYPEISSEM(__buf) /* TODO */ -/* -POSIX(199309) -*/ diff --git a/src/sys/stat/S_TYPEISSHM.h b/src/sys/stat/S_TYPEISSHM.h deleted file mode 100644 index 34acc7ed..00000000 --- a/src/sys/stat/S_TYPEISSHM.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/stat.h> -#define S_TYPEISSHM(__buf) /* TODO */ -/* -POSIX(199309) -*/ diff --git a/src/sys/stat/chmod.c b/src/sys/stat/chmod.c deleted file mode 100644 index f1a47730..00000000 --- a/src/sys/stat/chmod.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <sys/types.h> -#include <sys/stat.h> -#include "_syscall.h" - -int chmod(const char *path, mode_t mode) -{ - SYSCALL(chmod, int, -1, path, mode, 0, 0, 0, 0); -} -/* -POSIX(1) -*/ diff --git a/src/sys/stat/dev_t.ref b/src/sys/stat/dev_t.ref deleted file mode 100644 index 00a55a40..00000000 --- a/src/sys/stat/dev_t.ref +++ /dev/null @@ -1,3 +0,0 @@ -#include <sys/stat.h> -REFERENCE(sys/types/dev_t.c) -XOPEN(4) diff --git a/src/sys/stat/fchmod.c b/src/sys/stat/fchmod.c deleted file mode 100644 index 496df326..00000000 --- a/src/sys/stat/fchmod.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <sys/stat.h> - -int fchmod(int fildes, mode_t mode) -{ -} - -/* -XOPEN(4) -POSIX(199309) -*/ diff --git a/src/sys/stat/fstat.c b/src/sys/stat/fstat.c deleted file mode 100644 index 4859bec7..00000000 --- a/src/sys/stat/fstat.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <sys/types.h> -#include <sys/stat.h> -#include "_syscall.h" - -int fstat(int fildes, struct stat *buf) -{ - SYSCALL(fstat, int, -1, fildes, buf, 0, 0, 0, 0); -} -/* -POSIX(1) -*/ diff --git a/src/sys/stat/gid_t.ref b/src/sys/stat/gid_t.ref deleted file mode 100644 index bab40c58..00000000 --- a/src/sys/stat/gid_t.ref +++ /dev/null @@ -1,3 +0,0 @@ -#include <sys/stat.h> -REFERENCE(sys/types/gid_t.c) -XOPEN(4) diff --git a/src/sys/stat/ino_t.ref b/src/sys/stat/ino_t.ref deleted file mode 100644 index 401e1106..00000000 --- a/src/sys/stat/ino_t.ref +++ /dev/null @@ -1,3 +0,0 @@ -#include <sys/stat.h> -REFERENCE(sys/types/ino_t.c) -XOPEN(4) diff --git a/src/sys/stat/lstat.c b/src/sys/stat/lstat.c deleted file mode 100644 index ea56ce24..00000000 --- a/src/sys/stat/lstat.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <sys/stat.h> - -int lstat(const char * restrict path, struct stat * restrict buf) -{ - /* if path is a symlink, return that info */ - return 0; -} - -/* -XOPEN(400) -POSIX(200112) -*/ diff --git a/src/sys/stat/mkdir.c b/src/sys/stat/mkdir.c deleted file mode 100644 index 7aa93a7e..00000000 --- a/src/sys/stat/mkdir.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <sys/types.h> -#include <sys/stat.h> -#include "_syscall.h" - -int mkdir(const char *path, mode_t mode) -{ - SYSCALL(mkdir, int, -1, path, mode, 0, 0, 0, 0); -} - -/* -POSIX(1) -*/ diff --git a/src/sys/stat/mkfifo.c b/src/sys/stat/mkfifo.c deleted file mode 100644 index 219347af..00000000 --- a/src/sys/stat/mkfifo.c +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 1 /* force definition of S_IFIFO */ -#endif - -#include <sys/types.h> -#include <sys/stat.h> -#include "_syscall.h" - -int mkfifo(const char *path, mode_t mode) -{ - SYSCALL(mknod, int, -1, path, mode, S_IFIFO, 0, 0, 0); -} - -/* -POSIX(1) -*/ diff --git a/src/sys/stat/mknod.c b/src/sys/stat/mknod.c deleted file mode 100644 index 40876f01..00000000 --- a/src/sys/stat/mknod.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <sys/stat.h> - -int mknod(const char *path, mode_t mode, dev_t dev) -{ - return 0; -} - -/* -XOPEN(400) -*/ diff --git a/src/sys/stat/mode_t.ref b/src/sys/stat/mode_t.ref deleted file mode 100644 index 6d36e5b6..00000000 --- a/src/sys/stat/mode_t.ref +++ /dev/null @@ -1,3 +0,0 @@ -#include <sys/stat.h> -REFERENCE(sys/types/mode_t.c) -XOPEN(4) diff --git a/src/sys/stat/nlink_t.ref b/src/sys/stat/nlink_t.ref deleted file mode 100644 index c4e886e7..00000000 --- a/src/sys/stat/nlink_t.ref +++ /dev/null @@ -1,3 +0,0 @@ -#include <sys/stat.h> -REFERENCE(sys/types/nlink_t.c) -XOPEN(4) diff --git a/src/sys/stat/off_t.ref b/src/sys/stat/off_t.ref deleted file mode 100644 index 916ced7f..00000000 --- a/src/sys/stat/off_t.ref +++ /dev/null @@ -1,3 +0,0 @@ -#include <sys/stat.h> -REFERENCE(sys/types/off_t.c) -XOPEN(4) diff --git a/src/sys/stat/stat.c b/src/sys/stat/stat.c deleted file mode 100644 index 0b4f341f..00000000 --- a/src/sys/stat/stat.c +++ /dev/null @@ -1,16 +0,0 @@ -#include <sys/types.h> -#include <sys/stat.h> -#include <stdlib.h> -#include "_safety.h" -#include "_syscall.h" - -int stat(const char * restrict path, struct stat * restrict buf) -{ - ASSERT_NONNULL(path); - ASSERT_NONNULL(buf); - - SYSCALL(stat, int, -1, path, buf, 0, 0, 0, 0); -} -/* -POSIX(1) -*/ diff --git a/src/sys/stat/struct_stat.h b/src/sys/stat/struct_stat.h deleted file mode 100644 index c825e561..00000000 --- a/src/sys/stat/struct_stat.h +++ /dev/null @@ -1,23 +0,0 @@ -#include <sys/stat.h> - -struct stat { - dev_t st_dev; - ino_t st_ino; - mode_t st_mode; - nlink_t st_nlink; - uid_t st_uid; - gid_t st_gid; - dev_t st_rdev; - off_t st_size; - #if 0 - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; - blksize_t st_blksize; - blkcnt_t st_blocks; - #endif -}; - -/* -POSIX(1) -*/ diff --git a/src/sys/stat/time_t.ref b/src/sys/stat/time_t.ref deleted file mode 100644 index 0963253a..00000000 --- a/src/sys/stat/time_t.ref +++ /dev/null @@ -1,3 +0,0 @@ -#include <sys/stat.h> -REFERENCE(time/time_t.c) -XOPEN(4) diff --git a/src/sys/stat/uid_t.ref b/src/sys/stat/uid_t.ref deleted file mode 100644 index 17e80662..00000000 --- a/src/sys/stat/uid_t.ref +++ /dev/null @@ -1,3 +0,0 @@ -#include <sys/stat.h> -REFERENCE(sys/types/uid_t.c) -XOPEN(4) diff --git a/src/sys/stat/umask.c b/src/sys/stat/umask.c deleted file mode 100644 index 419a0afb..00000000 --- a/src/sys/stat/umask.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <sys/types.h> -#include <sys/stat.h> -#include "_syscall.h" - -mode_t umask(mode_t cmask) -{ - SYSCALL(umask, mode_t, -1, cmask, 0, 0, 0, 0, 0); -} - -/* -POSIX(1) -*/ diff --git a/src/sys/types/clock_t.ref b/src/sys/types/clock_t.ref deleted file mode 100644 index 772333a5..00000000 --- a/src/sys/types/clock_t.ref +++ /dev/null @@ -1,2 +0,0 @@ -REFERENCE(time/clock_t.c) -XOPEN(4) diff --git a/src/sys/types/clockid_t.h b/src/sys/types/clockid_t.h deleted file mode 100644 index e38addee..00000000 --- a/src/sys/types/clockid_t.h +++ /dev/null @@ -1,5 +0,0 @@ -typedef unsigned long int clockid_t; - -/* -POSIX(199309) -*/ diff --git a/src/sys/types/dev_t.h b/src/sys/types/dev_t.h deleted file mode 100644 index 9c6af9db..00000000 --- a/src/sys/types/dev_t.h +++ /dev/null @@ -1,5 +0,0 @@ -typedef unsigned long int - dev_t; -/* -POSIX(1) -*/ diff --git a/src/sys/types/gid_t.h b/src/sys/types/gid_t.h deleted file mode 100644 index 00584110..00000000 --- a/src/sys/types/gid_t.h +++ /dev/null @@ -1,5 +0,0 @@ -typedef unsigned long int - gid_t; -/* -POSIX(1) -*/ diff --git a/src/sys/types/id_t.h b/src/sys/types/id_t.h deleted file mode 100644 index cc1973ae..00000000 --- a/src/sys/types/id_t.h +++ /dev/null @@ -1,6 +0,0 @@ -typedef unsigned long long int id_t; - -/* -XOPEN(400) -POSIX(200809) -*/ diff --git a/src/sys/types/ino_t.h b/src/sys/types/ino_t.h deleted file mode 100644 index 405bfd57..00000000 --- a/src/sys/types/ino_t.h +++ /dev/null @@ -1,6 +0,0 @@ -typedef unsigned long int - ino_t; - -/* -POSIX(1) -*/ diff --git a/src/sys/types/key_t.h b/src/sys/types/key_t.h deleted file mode 100644 index 9a295a17..00000000 --- a/src/sys/types/key_t.h +++ /dev/null @@ -1,5 +0,0 @@ -typedef unsigned long long int key_t; - -/* -XOPEN(4) -*/ diff --git a/src/sys/types/mode_t.h b/src/sys/types/mode_t.h deleted file mode 100644 index 5d4ac1e4..00000000 --- a/src/sys/types/mode_t.h +++ /dev/null @@ -1,4 +0,0 @@ -typedef unsigned long int mode_t; -/* -POSIX(1) -*/ diff --git a/src/sys/types/nlink_t.h b/src/sys/types/nlink_t.h deleted file mode 100644 index 57d08b74..00000000 --- a/src/sys/types/nlink_t.h +++ /dev/null @@ -1,5 +0,0 @@ -typedef unsigned long int - nlink_t; -/* -POSIX(1) -*/ diff --git a/src/sys/types/off_t.h b/src/sys/types/off_t.h deleted file mode 100644 index a6797386..00000000 --- a/src/sys/types/off_t.h +++ /dev/null @@ -1,5 +0,0 @@ -typedef long int - off_t; -/* -POSIX(1) -*/ diff --git a/src/sys/types/pid_t.h b/src/sys/types/pid_t.h deleted file mode 100644 index ca25422e..00000000 --- a/src/sys/types/pid_t.h +++ /dev/null @@ -1,4 +0,0 @@ -typedef long int pid_t; -/* -POSIX(1) -*/ diff --git a/src/sys/types/size_t.ref b/src/sys/types/size_t.ref deleted file mode 100644 index cdac0fd6..00000000 --- a/src/sys/types/size_t.ref +++ /dev/null @@ -1,2 +0,0 @@ -REFERENCE(stddef/size_t.c) -POSIX(1) diff --git a/src/sys/types/ssize_t.h b/src/sys/types/ssize_t.h deleted file mode 100644 index 180c980d..00000000 --- a/src/sys/types/ssize_t.h +++ /dev/null @@ -1,5 +0,0 @@ -typedef long int ssize_t; - -/* -POSIX(1) -*/ diff --git a/src/sys/types/time_t.ref b/src/sys/types/time_t.ref deleted file mode 100644 index 0c620f9d..00000000 --- a/src/sys/types/time_t.ref +++ /dev/null @@ -1,2 +0,0 @@ -REFERENCE(time/time_t.c) -XOPEN(4) diff --git a/src/sys/types/timer_t.h b/src/sys/types/timer_t.h deleted file mode 100644 index 8b2aef65..00000000 --- a/src/sys/types/timer_t.h +++ /dev/null @@ -1,5 +0,0 @@ -typedef unsigned long int timer_t; - -/* -POSIX(199309) -*/ diff --git a/src/sys/types/uid_t.h b/src/sys/types/uid_t.h deleted file mode 100644 index b78fff19..00000000 --- a/src/sys/types/uid_t.h +++ /dev/null @@ -1,5 +0,0 @@ -typedef unsigned long int - uid_t; -/* -POSIX(1) -*/ diff --git a/src/sys/types/useconds_t.h b/src/sys/types/useconds_t.h deleted file mode 100644 index 54697328..00000000 --- a/src/sys/types/useconds_t.h +++ /dev/null @@ -1,4 +0,0 @@ -typedef unsigned int useconds_t; -/* -XOPEN(400,700) -*/ diff --git a/src/sys/wait/P_ALL.h b/src/sys/wait/P_ALL.h deleted file mode 100644 index 03a16c68..00000000 --- a/src/sys/wait/P_ALL.h +++ /dev/null @@ -1 +0,0 @@ -#define P_ALL 0 diff --git a/src/sys/wait/P_PGID.h b/src/sys/wait/P_PGID.h deleted file mode 100644 index e996d78a..00000000 --- a/src/sys/wait/P_PGID.h +++ /dev/null @@ -1 +0,0 @@ -#define P_PGID 2 diff --git a/src/sys/wait/P_PID.h b/src/sys/wait/P_PID.h deleted file mode 100644 index 737761bb..00000000 --- a/src/sys/wait/P_PID.h +++ /dev/null @@ -1 +0,0 @@ -#define P_PID 1 diff --git a/src/sys/wait/WCONTINUED.h b/src/sys/wait/WCONTINUED.h deleted file mode 100644 index a0a2d2d9..00000000 --- a/src/sys/wait/WCONTINUED.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/wait.h> -#define WCONTINUED (1<<2) - -/* -XOPEN(400) -*/ diff --git a/src/sys/wait/WEXITED.h b/src/sys/wait/WEXITED.h deleted file mode 100644 index 1dfb7f42..00000000 --- a/src/sys/wait/WEXITED.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/wait.h> -#define WEXITED (1<<3) -/* -XOPEN(400) -POSIX(200809) -*/ diff --git a/src/sys/wait/WEXITSTATUS.h b/src/sys/wait/WEXITSTATUS.h deleted file mode 100644 index 4256e805..00000000 --- a/src/sys/wait/WEXITSTATUS.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/wait.h> -#define WEXITSTATUS(__stat_val) (__stat_val & 0xff) -/* -POSIX(1) -*/ diff --git a/src/sys/wait/WIFCONTINUED.h b/src/sys/wait/WIFCONTINUED.h deleted file mode 100644 index 4fa2f892..00000000 --- a/src/sys/wait/WIFCONTINUED.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/wait.h> -#define WIFCONTINUED(__stat_val) (__stat_val & 0x400) -/* -XOPEN(400) -*/ diff --git a/src/sys/wait/WIFEXITED.h b/src/sys/wait/WIFEXITED.h deleted file mode 100644 index ffaa6515..00000000 --- a/src/sys/wait/WIFEXITED.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/wait.h> -#define WIFEXITED(__stat_val) (__stat_val <= 255) -/* -POSIX(1) -*/ diff --git a/src/sys/wait/WIFSIGNALED.h b/src/sys/wait/WIFSIGNALED.h deleted file mode 100644 index 4c3305b9..00000000 --- a/src/sys/wait/WIFSIGNALED.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/wait.h> -#define WIFSIGNALED(__stat_val) (__stat_val & 0x100) -/* -POSIX(1) -*/ diff --git a/src/sys/wait/WIFSTOPPED.h b/src/sys/wait/WIFSTOPPED.h deleted file mode 100644 index 860c9520..00000000 --- a/src/sys/wait/WIFSTOPPED.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/wait.h> -#define WIFSTOPPED(__stat_val) (__stat_val & 0x200) -/* -POSIX(1) -*/ diff --git a/src/sys/wait/WNOHANG.h b/src/sys/wait/WNOHANG.h deleted file mode 100644 index e5d24eac..00000000 --- a/src/sys/wait/WNOHANG.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/wait.h> -#define WNOHANG (1<<0) -/* -POSIX(1) -*/ diff --git a/src/sys/wait/WNOWAIT.h b/src/sys/wait/WNOWAIT.h deleted file mode 100644 index 25f94a24..00000000 --- a/src/sys/wait/WNOWAIT.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/wait.h> -#define WNOWAIT (1<<4) -/* -XOPEN(400) -POSIX(200809) -*/ diff --git a/src/sys/wait/WSTOPPED.h b/src/sys/wait/WSTOPPED.h deleted file mode 100644 index 41121d3a..00000000 --- a/src/sys/wait/WSTOPPED.h +++ /dev/null @@ -1,6 +0,0 @@ -#include <sys/wait.h> -#define WSTOPPED (1<<5) -/* -XOPEN(400) -POSIX(200809) -*/ diff --git a/src/sys/wait/WSTOPSIG.h b/src/sys/wait/WSTOPSIG.h deleted file mode 100644 index 467729e4..00000000 --- a/src/sys/wait/WSTOPSIG.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/wait.h> -#define WSTOPSIG(__stat_val) (__stat_val & 0xff) -/* -POSIX(1) -*/ diff --git a/src/sys/wait/WTERMSIG.h b/src/sys/wait/WTERMSIG.h deleted file mode 100644 index d3990ec7..00000000 --- a/src/sys/wait/WTERMSIG.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/wait.h> -#define WTERMSIG(__stat_val) (__stat_val & 0xff) -/* -POSIX(1) -*/ diff --git a/src/sys/wait/WUNTRACED.h b/src/sys/wait/WUNTRACED.h deleted file mode 100644 index f8ef4ae2..00000000 --- a/src/sys/wait/WUNTRACED.h +++ /dev/null @@ -1,5 +0,0 @@ -#include <sys/wait.h> -#define WUNTRACED (1<<1) -/* -POSIX(1) -*/ diff --git a/src/sys/wait/id_t.ref b/src/sys/wait/id_t.ref deleted file mode 100644 index ee53b956..00000000 --- a/src/sys/wait/id_t.ref +++ /dev/null @@ -1,3 +0,0 @@ -#include <sys/wait.h> -REFERENCE(sys/types/id_t.c) -XOPEN(400) diff --git a/src/sys/wait/idtype_t.h b/src/sys/wait/idtype_t.h deleted file mode 100644 index 194325b6..00000000 --- a/src/sys/wait/idtype_t.h +++ /dev/null @@ -1,10 +0,0 @@ -#include <sys/wait.h> -typedef enum { - P_ALL, - P_PGID, - P_PID -} idtype_t; -/* -XOPEN(400) -POSIX(200809) -*/ diff --git a/src/sys/wait/pid_t.ref b/src/sys/wait/pid_t.ref deleted file mode 100644 index 8747814d..00000000 --- a/src/sys/wait/pid_t.ref +++ /dev/null @@ -1,3 +0,0 @@ -#include <sys/wait.h> -REFERENCE(sys/types/pid_t.c) -XOPEN(400) diff --git a/src/sys/wait/siginfo_t.ref b/src/sys/wait/siginfo_t.ref deleted file mode 100644 index 1083e5b8..00000000 --- a/src/sys/wait/siginfo_t.ref +++ /dev/null @@ -1,3 +0,0 @@ -#include <sys/wait.h> -REFERENCE(signal/siginfo_t.c) -XOPEN(400) diff --git a/src/sys/wait/struct_rusage.ref b/src/sys/wait/struct_rusage.ref deleted file mode 100644 index da177e72..00000000 --- a/src/sys/wait/struct_rusage.ref +++ /dev/null @@ -1,3 +0,0 @@ -#include <sys/wait.h> -REFERENCE(sys/resource/struct_rusage.c) -XOPEN(400) diff --git a/src/sys/wait/wait.c b/src/sys/wait/wait.c deleted file mode 100644 index ab7b5a72..00000000 --- a/src/sys/wait/wait.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <sys/types.h> -#include <sys/wait.h> - -pid_t wait(int *stat_loc) -{ - return waitpid((pid_t)-1, stat_loc, 0); -} -/* -POSIX(1) -*/ diff --git a/src/sys/wait/wait3.c b/src/sys/wait/wait3.c deleted file mode 100644 index d64c1c28..00000000 --- a/src/sys/wait/wait3.c +++ /dev/null @@ -1,21 +0,0 @@ -#include <sys/types.h> -#include <sys/resource.h> -#include <sys/wait.h> - -pid_t wait3(int *stat_loc, int options, struct rusage *resource_usage) -{ - pid_t ret = waitpid((pid_t)-1, stat_loc, options); - if (ret == (pid_t)-1) { - return (pid_t)-1; - } - - if (getrusage(RUSAGE_CHILDREN, resource_usage) == -1) { - return (pid_t)-1; - } - - return ret; -} - -/* -XOPEN(400,600) -*/ diff --git a/src/sys/wait/waitid.c b/src/sys/wait/waitid.c deleted file mode 100644 index 875aa6d7..00000000 --- a/src/sys/wait/waitid.c +++ /dev/null @@ -1,13 +0,0 @@ -#include <sys/types.h> -#include <sys/wait.h> -#include "_syscall.h" - -int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options) -{ - SYSCALL(waitid, int, -1, idtype, id, infop, option, NULL, 0); -} - -/* -XOPEN(400) -POSIX(200809) -*/ diff --git a/src/sys/wait/waitpid.c b/src/sys/wait/waitpid.c deleted file mode 100644 index 001cc2f6..00000000 --- a/src/sys/wait/waitpid.c +++ /dev/null @@ -1,45 +0,0 @@ -#include <sys/types.h> -#include <sys/wait.h> -#include <signal.h> -#include <unistd.h> -#include "_syscall.h" - -#ifndef P_PID -#include "signal/union_sigval.h" -#include "signal/siginfo_t.h" -#include "idtype_t.h" -#include "P_PID.h" -#include "P_PGID.h" -#include "P_ALL.h" -#define getpgid(_pid) __syscall(__syscall_lookup(getpgid), _pid, 0, 0, 0, 0, 0) -#define waitid(_type, _id, _si, _opt) __syscall(__syscall_lookup(waitid), _type, _id, _si, _opt, 0, 0) -#endif - -pid_t waitpid(pid_t pid, int *stat_loc, int options) -{ - /* TODO: handle WUNTRACED, is not recognized by waitid() */ - - siginfo_t si = { 0 }; - idtype_t idt = P_PID; - int ret = -1; - - if (pid == (pid_t)-1) { - idt = P_ALL; - } else if (pid == 0) { - idt = P_PGID; - pid = getpgid(0); - } else if (pid < (pid_t)-1) { - idt = P_PGID; - pid = -pid; - } - - ret = waitid(idt, pid, &si, options); - if (stat_loc) { - *stat_loc = si.si_status; - } - return ret; -} - -/* -POSIX(1) -*/ |