aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/i386/syscall.h12
-rw-r--r--arch/x86_64/syscall.h12
-rw-r--r--src/linux/chroot.c1
-rw-r--r--src/linux/klogctl.c1
-rw-r--r--src/linux/mount.c1
-rw-r--r--src/linux/sethostname.c1
-rw-r--r--src/linux/swapoff.c1
-rw-r--r--src/linux/swapon.c1
-rw-r--r--src/linux/sysinfo.c1
-rw-r--r--src/linux/utimes.c1
-rw-r--r--src/linux/wait3.c1
-rw-r--r--src/linux/wait4.c1
12 files changed, 2 insertions, 32 deletions
diff --git a/arch/i386/syscall.h b/arch/i386/syscall.h
index c87401f..ee871a9 100644
--- a/arch/i386/syscall.h
+++ b/arch/i386/syscall.h
@@ -7,17 +7,7 @@
#define SYSCALL_SIGSET_SIZE 8
-#if defined(SYSCALL_STANDALONE)
-#include <errno.h>
-static inline long __syscall_ret(unsigned long r)
-{
- if (r >= (unsigned long)-1 - 4096) {
- errno = -(long)r;
- return -1;
- }
- return (long)r;
-}
-#elif defined(SYSCALL_NORETURN)
+#if defined(SYSCALL_NORETURN)
static inline long __syscall_ret(unsigned long r)
{
for(;;);
diff --git a/arch/x86_64/syscall.h b/arch/x86_64/syscall.h
index 0b04b29..cfaa790 100644
--- a/arch/x86_64/syscall.h
+++ b/arch/x86_64/syscall.h
@@ -4,17 +4,7 @@
#define SYSCALL_LL(x) x, 0
#define SYSCALL_SIGSET_SIZE 8
-#if defined(SYSCALL_STANDALONE)
-#include <errno.h>
-static inline long __syscall_ret(unsigned long r)
-{
- if (r >= (unsigned long)-1 - 4096) {
- errno = -(long)r;
- return -1;
- }
- return (long)r;
-}
-#elif defined(SYSCALL_NORETURN)
+#if defined(SYSCALL_NORETURN)
static inline long __syscall_ret(unsigned long r)
{
for(;;);
diff --git a/src/linux/chroot.c b/src/linux/chroot.c
index b5af62d..81363a6 100644
--- a/src/linux/chroot.c
+++ b/src/linux/chroot.c
@@ -1,5 +1,4 @@
#include <unistd.h>
-#define SYSCALL_STANDALONE
#include "syscall.h"
int chroot(const char *path)
diff --git a/src/linux/klogctl.c b/src/linux/klogctl.c
index 6c288af..976f29e 100644
--- a/src/linux/klogctl.c
+++ b/src/linux/klogctl.c
@@ -1,4 +1,3 @@
-#define SYSCALL_STANDALONE
#include "syscall.h"
int klogctl (int type, char *buf, int len)
diff --git a/src/linux/mount.c b/src/linux/mount.c
index 61299d4..8e3cc12 100644
--- a/src/linux/mount.c
+++ b/src/linux/mount.c
@@ -1,5 +1,4 @@
#include <sys/mount.h>
-#define SYSCALL_STANDALONE
#include "syscall.h"
int mount(const char *special, const char *dir, const char *fstype, unsigned long flags, const void *data)
diff --git a/src/linux/sethostname.c b/src/linux/sethostname.c
index f61e0cb..c94325e 100644
--- a/src/linux/sethostname.c
+++ b/src/linux/sethostname.c
@@ -1,5 +1,4 @@
#include <unistd.h>
-#define SYSCALL_STANDALONE
#include "syscall.h"
int sethostname(const char *name, size_t len)
diff --git a/src/linux/swapoff.c b/src/linux/swapoff.c
index f6fa794..4f19823 100644
--- a/src/linux/swapoff.c
+++ b/src/linux/swapoff.c
@@ -1,5 +1,4 @@
#include <sys/swap.h>
-#define SYSCALL_STANDALONE
#include "syscall.h"
int swapoff(const char *path)
diff --git a/src/linux/swapon.c b/src/linux/swapon.c
index 13d2876..5c75247 100644
--- a/src/linux/swapon.c
+++ b/src/linux/swapon.c
@@ -1,5 +1,4 @@
#include <sys/swap.h>
-#define SYSCALL_STANDALONE
#include "syscall.h"
int swapon(const char *path, int flags)
diff --git a/src/linux/sysinfo.c b/src/linux/sysinfo.c
index 9866947..c61b7aa 100644
--- a/src/linux/sysinfo.c
+++ b/src/linux/sysinfo.c
@@ -1,4 +1,3 @@
-#define SYSCALL_STANDALONE
#include "syscall.h"
struct sysinfo;
diff --git a/src/linux/utimes.c b/src/linux/utimes.c
index 99a3b2b..59ee1a8 100644
--- a/src/linux/utimes.c
+++ b/src/linux/utimes.c
@@ -1,5 +1,4 @@
#include <sys/time.h>
-#define SYSCALL_STANDALONE
#include "syscall.h"
int utimes(const char *path, const struct timeval times[2])
diff --git a/src/linux/wait3.c b/src/linux/wait3.c
index dd63707..d1d91b0 100644
--- a/src/linux/wait3.c
+++ b/src/linux/wait3.c
@@ -1,6 +1,5 @@
#include <sys/wait.h>
#include <sys/resource.h>
-#define SYSCALL_STANDALONE
#include "syscall.h"
pid_t wait4(pid_t, int *, int, struct rusage *);
diff --git a/src/linux/wait4.c b/src/linux/wait4.c
index dda942d..5dd505a 100644
--- a/src/linux/wait4.c
+++ b/src/linux/wait4.c
@@ -1,7 +1,6 @@
#include <sys/wait.h>
#include <sys/resource.h>
#include <string.h>
-#define SYSCALL_STANDALONE
#include "syscall.h"
pid_t wait4(pid_t pid, int *status, int options, struct rusage *usage)