summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nonstd/__linux.h36
-rw-r--r--src/stdlib/WEXITSTATUS.ref3
-rw-r--r--src/stdlib/WIFEXITED.ref3
-rw-r--r--src/stdlib/WIFSIGNALED.ref3
-rw-r--r--src/stdlib/WIFSTOPPED.ref3
-rw-r--r--src/stdlib/WNOHANG.ref3
-rw-r--r--src/stdlib/WSTOPSIG.ref3
-rw-r--r--src/stdlib/WTERMSIG.ref3
-rw-r--r--src/stdlib/WUNTRACED.ref3
9 files changed, 24 insertions, 36 deletions
diff --git a/nonstd/__linux.h b/nonstd/__linux.h
deleted file mode 100644
index 4684b17f..00000000
--- a/nonstd/__linux.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <stdarg.h>
-#include <stddef.h>
-#include <errno.h>
-#include <string.h>
-
-#ifndef ENOSYS
-#define ENOSYS 62
-#endif
-
-extern long __syscall_x86_64(long, ...);
-#define __linux_syscall __syscall_x86_64
-#define __syscall __linux_syscall
-
-static long __syscall_lookup(const char *call)
-{
- const char *__syscalls[] = {
- [0] = "read",
- [1] = "write",
- [2] = "open",
- [3] = "close",
- [4] = "stat",
- [5] = "fstat",
- [6] = "lstat",
- [9] = "mmap",
- [60] = "exit",
- [201] = "time",
- };
-
- size_t i;
- for (i = 0; i < sizeof(__syscalls) / sizeof(__syscalls[0]); i++) {
- if (__syscalls[i] && !strcmp(__syscalls[i], call)) {
- return i;
- }
- }
- return -1;
-}
diff --git a/src/stdlib/WEXITSTATUS.ref b/src/stdlib/WEXITSTATUS.ref
new file mode 100644
index 00000000..c7839f64
--- /dev/null
+++ b/src/stdlib/WEXITSTATUS.ref
@@ -0,0 +1,3 @@
+#include <stdlib.h>
+REFERENCE(sys/wait/WEXITSTATUS.c)
+XOPEN(4)
diff --git a/src/stdlib/WIFEXITED.ref b/src/stdlib/WIFEXITED.ref
new file mode 100644
index 00000000..fec36122
--- /dev/null
+++ b/src/stdlib/WIFEXITED.ref
@@ -0,0 +1,3 @@
+#include <stdlib.h>
+REFERENCE(sys/wait/WIFEXITED.c)
+XOPEN(4)
diff --git a/src/stdlib/WIFSIGNALED.ref b/src/stdlib/WIFSIGNALED.ref
new file mode 100644
index 00000000..d5a0975e
--- /dev/null
+++ b/src/stdlib/WIFSIGNALED.ref
@@ -0,0 +1,3 @@
+#include <stdlib.h>
+REFERENCE(sys/wait/WIFSIGNALED.c)
+XOPEN(4)
diff --git a/src/stdlib/WIFSTOPPED.ref b/src/stdlib/WIFSTOPPED.ref
new file mode 100644
index 00000000..dd4b7b8c
--- /dev/null
+++ b/src/stdlib/WIFSTOPPED.ref
@@ -0,0 +1,3 @@
+#include <stdlib.h>
+REFERENCE(sys/wait/WIFSTOPPED.c)
+XOPEN(4)
diff --git a/src/stdlib/WNOHANG.ref b/src/stdlib/WNOHANG.ref
new file mode 100644
index 00000000..abf0a225
--- /dev/null
+++ b/src/stdlib/WNOHANG.ref
@@ -0,0 +1,3 @@
+#include <stdlib.h>
+REFERENCE(sys/wait/WNOHANG.c)
+XOPEN(4)
diff --git a/src/stdlib/WSTOPSIG.ref b/src/stdlib/WSTOPSIG.ref
new file mode 100644
index 00000000..222d530f
--- /dev/null
+++ b/src/stdlib/WSTOPSIG.ref
@@ -0,0 +1,3 @@
+#include <stdlib.h>
+REFERENCE(sys/wait/WSTOPSIG.c)
+XOPEN(4)
diff --git a/src/stdlib/WTERMSIG.ref b/src/stdlib/WTERMSIG.ref
new file mode 100644
index 00000000..169dac05
--- /dev/null
+++ b/src/stdlib/WTERMSIG.ref
@@ -0,0 +1,3 @@
+#include <stdlib.h>
+REFERENCE(sys/wait/WTERMSIG.c)
+XOPEN(4)
diff --git a/src/stdlib/WUNTRACED.ref b/src/stdlib/WUNTRACED.ref
new file mode 100644
index 00000000..08aa688e
--- /dev/null
+++ b/src/stdlib/WUNTRACED.ref
@@ -0,0 +1,3 @@
+#include <stdlib.h>
+REFERENCE(sys/wait/WUNTRACED.c)
+XOPEN(4)