summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlibc/sysdeps/linux/common/str_syscalls.sh9
-rw-r--r--libc/sysdeps/linux/common/syscalls.c13
-rw-r--r--libc/sysdeps/linux/common/unified_syscall_i386.h15
3 files changed, 10 insertions, 27 deletions
diff --git a/libc/sysdeps/linux/common/str_syscalls.sh b/libc/sysdeps/linux/common/str_syscalls.sh
index 0473e9bd0..a9e984821 100755
--- a/libc/sysdeps/linux/common/str_syscalls.sh
+++ b/libc/sysdeps/linux/common/str_syscalls.sh
@@ -14,9 +14,9 @@ echo "#define __NR__fcntl __NR_fcntl"
echo "#define __NR__reboot __NR_reboot"
echo "#define __NR__mmap __NR_mmap"
echo "#define __NR__syslog __NR_syslog"
-echo "#define __NR__stat __NR_stat"
-echo "#define __NR__lstat __NR_lstat"
-echo "#define __NR__fstat __NR_fstat"
+echo "#define __NR___stat __NR_stat"
+echo "#define __NR___lstat __NR_lstat"
+echo "#define __NR___fstat __NR_fstat"
echo "#define __NR__getdents __NR_getdents"
echo "#define __NR___ptrace __NR_ptrace"
echo
@@ -29,9 +29,6 @@ echo "printf(\"#define __STR_NR_fcntl __STR_NR__fcntl\n\");"
echo "printf(\"#define __STR_NR_reboot __STR_NR__reboot\n\");"
echo "printf(\"#define __STR_NR_mmap __STR_NR__mmap\n\");"
echo "printf(\"#define __STR_NR_syslog __STR_NR__syslog\n\");"
-echo "printf(\"#define __STR_NR_stat __STR_NR__stat\n\");"
-echo "printf(\"#define __STR_NR_lstat __STR_NR__lstat\n\");"
-echo "printf(\"#define __STR_NR_fstat __STR_NR__fstat\n\");"
echo "printf(\"#define __STR_NR_getdents __STR_NR__getdents\n\");"
echo
echo "return EXIT_SUCCESS; }"
diff --git a/libc/sysdeps/linux/common/syscalls.c b/libc/sysdeps/linux/common/syscalls.c
index 5c35cc679..56d9685d1 100644
--- a/libc/sysdeps/linux/common/syscalls.c
+++ b/libc/sysdeps/linux/common/syscalls.c
@@ -26,10 +26,6 @@
#include <sys/types.h>
#include <sys/syscall.h>
-#define uClibc_syscall_exit(void, _exit, int, status) \
-_syscall1(void, _exit, int, status)
-
-
#include "unified_syscall.h"
//#define __NR_exit 1
@@ -37,11 +33,16 @@ _syscall1(void, _exit, int, status)
/* Do not include unistd.h, so gcc doesn't whine about
* _exit returning. It really doesn't return... */
#define __NR__exit __NR_exit
-uClibc_syscall_exit(void, _exit, int, status);
+_syscall1(void, _exit, int, status);
#endif
//#define __NR_fork 2
-//See architecture specific implementation...
+#ifdef L_fork
+#ifndef __HAS_NO_MMU__
+#include <unistd.h>
+_syscall0(pid_t, fork);
+#endif
+#endif
//#define __NR_read 3
#ifdef L_read
diff --git a/libc/sysdeps/linux/common/unified_syscall_i386.h b/libc/sysdeps/linux/common/unified_syscall_i386.h
index f81dcba71..32909a295 100644
--- a/libc/sysdeps/linux/common/unified_syscall_i386.h
+++ b/libc/sysdeps/linux/common/unified_syscall_i386.h
@@ -7,21 +7,6 @@
#include "str_syscalls.h"
-/*
- * Disable the following for now... it only saved space if no other
- * syscalls but _exit were used, and no longer works (__uClibc_main).
- */
-#if 0
-#undef uClibc_syscall_exit
-#define uClibc_syscall_exit(type,name,type1,arg1) \
-__asm__ ( \
-".text\n.align 4\n.global "###name"\n.type "###name",@function\n" \
-#name":;\npushl %ebp;\n" \
-"movl %esp,%ebp;\nsubl $4,%esp;\npushl %ebx;\nmovl 8(%ebp),%ebx;\n" \
-"jmp _start_exit\n.Lfe1"###name":\n.size "###name",.Lfe1"###name"-"###name \
-)
-#endif
-
#define unified_syscall_body(name) \
__asm__ ( \
".text\n.align 4\n.global "###name"\n.type "###name",@function\n" \