summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2024-01-31 16:06:48 -0500
committerJakob Kaivo <jkk@ung.org>2024-01-31 16:06:48 -0500
commit34386fe72b733e12f5ab45bf1d4f5b59621c3a96 (patch)
treecd3e90f47f9c46f234df635d91c133b2e8a8f94d
parent57fd57ab4005e37bfab4bf7c637eecc1eb5445b5 (diff)
remove more cruft
-rw-r--r--src/fcntl/FD_CLOEXEC.h7
-rw-r--r--src/fcntl/F_DUPFD.h7
-rw-r--r--src/fcntl/F_GETFD.h7
-rw-r--r--src/fcntl/F_GETFL.h7
-rw-r--r--src/fcntl/F_GETLK.h7
-rw-r--r--src/fcntl/F_RDLCK.h7
-rw-r--r--src/fcntl/F_SETFD.h7
-rw-r--r--src/fcntl/F_SETFL.h7
-rw-r--r--src/fcntl/F_SETLK.h7
-rw-r--r--src/fcntl/F_SETLKW.h7
-rw-r--r--src/fcntl/F_UNLCK.h7
-rw-r--r--src/fcntl/F_WRLCK.h7
-rw-r--r--src/fcntl/O_ACCMODE.h7
-rw-r--r--src/fcntl/O_APPEND.h7
-rw-r--r--src/fcntl/O_CREAT.h7
-rw-r--r--src/fcntl/O_DSYNC.h5
-rw-r--r--src/fcntl/O_EXCL.h7
-rw-r--r--src/fcntl/O_NOCTTY.h7
-rw-r--r--src/fcntl/O_NONBLOCK.h7
-rw-r--r--src/fcntl/O_RDONLY.h7
-rw-r--r--src/fcntl/O_RDWR.h7
-rw-r--r--src/fcntl/O_RSYNC.h5
-rw-r--r--src/fcntl/O_SYNC.h8
-rw-r--r--src/fcntl/O_TRUNC.h7
-rw-r--r--src/fcntl/O_WRONLY.h7
-rw-r--r--src/fcntl/SEEK_CUR.ref4
-rw-r--r--src/fcntl/SEEK_END.ref4
-rw-r--r--src/fcntl/SEEK_SET.ref4
-rw-r--r--src/fcntl/creat.c16
-rw-r--r--src/fcntl/fcntl.c65
-rw-r--r--src/fcntl/mode_t.ref4
-rw-r--r--src/fcntl/off_t.ref4
-rw-r--r--src/fcntl/open.c35
-rw-r--r--src/fcntl/pid_t.ref4
-rw-r--r--src/fcntl/struct_flock.h13
35 files changed, 0 insertions, 325 deletions
diff --git a/src/fcntl/FD_CLOEXEC.h b/src/fcntl/FD_CLOEXEC.h
deleted file mode 100644
index f406ed34..00000000
--- a/src/fcntl/FD_CLOEXEC.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define FD_CLOEXEC (1)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/F_DUPFD.h b/src/fcntl/F_DUPFD.h
deleted file mode 100644
index e0428596..00000000
--- a/src/fcntl/F_DUPFD.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define F_DUPFD (1)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/F_GETFD.h b/src/fcntl/F_GETFD.h
deleted file mode 100644
index 6d99ea3c..00000000
--- a/src/fcntl/F_GETFD.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define F_GETFD (3)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/F_GETFL.h b/src/fcntl/F_GETFL.h
deleted file mode 100644
index f9432301..00000000
--- a/src/fcntl/F_GETFL.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define F_GETFL (5)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/F_GETLK.h b/src/fcntl/F_GETLK.h
deleted file mode 100644
index 8236e213..00000000
--- a/src/fcntl/F_GETLK.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define F_GETLK (7)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/F_RDLCK.h b/src/fcntl/F_RDLCK.h
deleted file mode 100644
index 53fce2a3..00000000
--- a/src/fcntl/F_RDLCK.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define F_RDLCK (1)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/F_SETFD.h b/src/fcntl/F_SETFD.h
deleted file mode 100644
index aa0f6070..00000000
--- a/src/fcntl/F_SETFD.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define F_SETFD (4)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/F_SETFL.h b/src/fcntl/F_SETFL.h
deleted file mode 100644
index 0a40145c..00000000
--- a/src/fcntl/F_SETFL.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define F_SETFL (6)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/F_SETLK.h b/src/fcntl/F_SETLK.h
deleted file mode 100644
index ccc09f4e..00000000
--- a/src/fcntl/F_SETLK.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define F_SETLK (8)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/F_SETLKW.h b/src/fcntl/F_SETLKW.h
deleted file mode 100644
index 045e5991..00000000
--- a/src/fcntl/F_SETLKW.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define F_SETLKW (9)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/F_UNLCK.h b/src/fcntl/F_UNLCK.h
deleted file mode 100644
index 42c4c416..00000000
--- a/src/fcntl/F_UNLCK.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define F_UNLCK (2)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/F_WRLCK.h b/src/fcntl/F_WRLCK.h
deleted file mode 100644
index 8eaa8711..00000000
--- a/src/fcntl/F_WRLCK.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define F_WRLCK (3)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/O_ACCMODE.h b/src/fcntl/O_ACCMODE.h
deleted file mode 100644
index 82045649..00000000
--- a/src/fcntl/O_ACCMODE.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define O_ACCMODE (O_EXEC|O_RDONLY|O_RDWR|O_SEARCH|O_WRONLY)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/O_APPEND.h b/src/fcntl/O_APPEND.h
deleted file mode 100644
index d6526545..00000000
--- a/src/fcntl/O_APPEND.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define O_APPEND (1<<8)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/O_CREAT.h b/src/fcntl/O_CREAT.h
deleted file mode 100644
index 03d04b91..00000000
--- a/src/fcntl/O_CREAT.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define O_CREAT (1<<1)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/O_DSYNC.h b/src/fcntl/O_DSYNC.h
deleted file mode 100644
index bb1778f7..00000000
--- a/src/fcntl/O_DSYNC.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <fcntl.h>
-#define O_DSYNC (1<<9)
-/*
-POSIX(199309)
-*/
diff --git a/src/fcntl/O_EXCL.h b/src/fcntl/O_EXCL.h
deleted file mode 100644
index 144eebbb..00000000
--- a/src/fcntl/O_EXCL.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define O_EXCL (1<<3)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/O_NOCTTY.h b/src/fcntl/O_NOCTTY.h
deleted file mode 100644
index c7805910..00000000
--- a/src/fcntl/O_NOCTTY.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define O_NOCTTY (1<<4)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/O_NONBLOCK.h b/src/fcntl/O_NONBLOCK.h
deleted file mode 100644
index 7ccda6ad..00000000
--- a/src/fcntl/O_NONBLOCK.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define O_NONBLOCK (1<<10)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/O_RDONLY.h b/src/fcntl/O_RDONLY.h
deleted file mode 100644
index 00425d4e..00000000
--- a/src/fcntl/O_RDONLY.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define O_RDONLY (1<<14)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/O_RDWR.h b/src/fcntl/O_RDWR.h
deleted file mode 100644
index f1ce88b2..00000000
--- a/src/fcntl/O_RDWR.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define O_RDWR (1<<15)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/O_RSYNC.h b/src/fcntl/O_RSYNC.h
deleted file mode 100644
index a867c13d..00000000
--- a/src/fcntl/O_RSYNC.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <fcntl.h>
-#define O_RSYNC (1<<11)
-/*
-POSIX(199309)
-*/
diff --git a/src/fcntl/O_SYNC.h b/src/fcntl/O_SYNC.h
deleted file mode 100644
index 847420e5..00000000
--- a/src/fcntl/O_SYNC.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <fcntl.h>
-
-#define O_SYNC (1<<12)
-
-/*
-XOPEN(4)
-POSIX(199309)
-*/
diff --git a/src/fcntl/O_TRUNC.h b/src/fcntl/O_TRUNC.h
deleted file mode 100644
index d835021a..00000000
--- a/src/fcntl/O_TRUNC.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define O_TRUNC (1<<6)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/O_WRONLY.h b/src/fcntl/O_WRONLY.h
deleted file mode 100644
index e6c00841..00000000
--- a/src/fcntl/O_WRONLY.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-#define O_WRONLY (1<<17)
-
-/*
-POSIX(1)
-*/
diff --git a/src/fcntl/SEEK_CUR.ref b/src/fcntl/SEEK_CUR.ref
deleted file mode 100644
index ecfa73fd..00000000
--- a/src/fcntl/SEEK_CUR.ref
+++ /dev/null
@@ -1,4 +0,0 @@
-#include <fcntl.h>
-REFERENCE(stdio/SEEK_CUR.c)
-XOPEN(4)
-probably-posix
diff --git a/src/fcntl/SEEK_END.ref b/src/fcntl/SEEK_END.ref
deleted file mode 100644
index 07f90266..00000000
--- a/src/fcntl/SEEK_END.ref
+++ /dev/null
@@ -1,4 +0,0 @@
-#include <fcntl.h>
-REFERENCE(stdio/SEEK_END.c)
-XOPEN(4)
-probably-posix
diff --git a/src/fcntl/SEEK_SET.ref b/src/fcntl/SEEK_SET.ref
deleted file mode 100644
index 639c2c78..00000000
--- a/src/fcntl/SEEK_SET.ref
+++ /dev/null
@@ -1,4 +0,0 @@
-#include <fcntl.h>
-REFERENCE(stdio/SEEK_SET.c)
-XOPEN(4)
-probably-posix
diff --git a/src/fcntl/creat.c b/src/fcntl/creat.c
deleted file mode 100644
index de99ae36..00000000
--- a/src/fcntl/creat.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#if 0
-
-#include <sys/types.h>
-#include <fcntl.h>
-
-int creat(const char *path, mode_t mode)
-{
- return open(path, O_WRONLY | O_CREAT | O_TRUNC, mode);
-}
-
-/*
-POSIX(1)
-*/
-
-
-#endif
diff --git a/src/fcntl/fcntl.c b/src/fcntl/fcntl.c
deleted file mode 100644
index a66a5ec3..00000000
--- a/src/fcntl/fcntl.c
+++ /dev/null
@@ -1,65 +0,0 @@
-#if 0
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdarg.h>
-#include "_syscall.h"
-
-int fcntl(int fildes, int cmd, ...)
-{
- SYSCALL_NUMBER(scno, fcntl, -1);
-
- int r = -ENOSYS;
- enum { NONE, INT, FLOCK } arg = NONE;
-
- switch (cmd) {
- case F_GETFD:
- case F_GETFL:
- break;
-
- case F_DUPFD:
- case F_SETFD:
- case F_SETFL:
- arg = INT;
- break;
-
- case F_GETLK:
- case F_SETLK:
- case F_SETLKW:
- arg = FLOCK;
- break;
-
- default:
- errno = EINVAL;
- return -1;
- }
-
- if (arg == NONE) {
- r = __syscall(scno, fildes);
- } else {
- va_list ap;
- va_start(ap, cmd);
- if (arg == INT) {
- int n = va_arg(ap, int);
- r = __syscall(scno, fildes, n);
- } else if (arg == FLOCK) {
- struct flock *fl = va_arg(ap, struct flock *);
- r = __syscall(scno, fildes, fl);
- }
- va_end(ap);
- }
-
- if (r < 0) {
- errno = -r;
- return -1;
- }
-
- return r;
-}
-/*
-POSIX(1)
-*/
-
-
-#endif
diff --git a/src/fcntl/mode_t.ref b/src/fcntl/mode_t.ref
deleted file mode 100644
index 0eab4e54..00000000
--- a/src/fcntl/mode_t.ref
+++ /dev/null
@@ -1,4 +0,0 @@
-#include <fcntl.h>
-REFERENCE(sys/types/mode_t.c)
-XOPEN(4)
-probably-posix
diff --git a/src/fcntl/off_t.ref b/src/fcntl/off_t.ref
deleted file mode 100644
index 7913b092..00000000
--- a/src/fcntl/off_t.ref
+++ /dev/null
@@ -1,4 +0,0 @@
-#include <fcntl.h>
-REFERENCE(sys/types/off_t.c)
-XOPEN(4)
-probably-posix
diff --git a/src/fcntl/open.c b/src/fcntl/open.c
deleted file mode 100644
index 0317a888..00000000
--- a/src/fcntl/open.c
+++ /dev/null
@@ -1,35 +0,0 @@
-#if 0
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/stat.h> /* OH */
-#include <errno.h>
-#include <stdarg.h>
-#include "_syscall.h"
-
-int open(const char *path, int oflag, ...)
-{
- SYSCALL_NUMBER(scno, open, -1);
-
- mode_t mode = 0;
- if (oflag & O_CREAT) {
- va_list ap;
- va_start(ap, oflag);
- mode = va_arg(ap, mode_t);
- va_end(ap);
- }
-
- int r = __syscall(scno, path, oflag, mode);
- if (r < 0) {
- errno = -r;
- return -1;
- }
-
- return r;
-}
-/*
-POSIX(1)
-*/
-
-
-#endif
diff --git a/src/fcntl/pid_t.ref b/src/fcntl/pid_t.ref
deleted file mode 100644
index f97a3fcc..00000000
--- a/src/fcntl/pid_t.ref
+++ /dev/null
@@ -1,4 +0,0 @@
-#include <fcntl.h>
-REFERENCE(sys/types/pid_t.c)
-XOPEN(4)
-probably-posix
diff --git a/src/fcntl/struct_flock.h b/src/fcntl/struct_flock.h
deleted file mode 100644
index c910e0ff..00000000
--- a/src/fcntl/struct_flock.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <fcntl.h>
-
-struct flock {
- short l_type;
- short l_whence;
- off_t l_start;
- off_t l_len;
- pid_t l_pid;
-};
-
-/*
-POSIX(1)
-*/