From 80831beee1c1db87b63e15efdcbcd0ed4354c62f Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Tue, 6 Mar 2001 15:25:28 +0000 Subject: Fix unified syscall stuff for changed ?stat. Move fork to syscalls.c wrapped with a check for NO_MMU of course. --- libc/sysdeps/linux/common/str_syscalls.sh | 9 +++------ libc/sysdeps/linux/common/syscalls.c | 13 +++++++------ libc/sysdeps/linux/common/unified_syscall_i386.h | 15 --------------- 3 files changed, 10 insertions(+), 27 deletions(-) (limited to 'libc/sysdeps') 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 #include -#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 +_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" \ -- cgit v1.2.3