From 400e90780632415c45984bcf80f133aa8b890669 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 5 Mar 2001 20:09:12 +0000 Subject: Fix up some long standing iterative symbol usage problem, noticed today by Michael Shmulevich, which was caused by the grafting in of GNU libc header files. -Erik --- libc/sysdeps/linux/common/syscalls.c | 41 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 20 deletions(-) (limited to 'libc') diff --git a/libc/sysdeps/linux/common/syscalls.c b/libc/sysdeps/linux/common/syscalls.c index a8348bbdc..968ce06dc 100644 --- a/libc/sysdeps/linux/common/syscalls.c +++ b/libc/sysdeps/linux/common/syscalls.c @@ -126,9 +126,10 @@ _syscall1(time_t, time, time_t *, t); #endif //#define __NR_mknod 14 -#ifdef L_mknod +#ifdef L___mknod #include -_syscall3(int, mknod, const char *, pathname, mode_t, mode, dev_t, dev); +#define __NR___mknod __NR_mknod +_syscall3(int, __mknod, const char *, pathname, mode_t, mode, dev_t, dev); #endif //#define __NR_chmod 15 @@ -712,18 +713,18 @@ _syscall2(int, getitimer, enum __itimer_which, which, struct itimerval *, value) #endif //#define __NR_stat 106 -#ifdef L__stat -#define __NR__stat __NR_stat +#ifdef L___stat +#define __NR___stat __NR_stat #include #include "statfix.h" -extern int _stat(const char *file_name, struct kernel_stat *buf); +extern int __stat(const char *file_name, struct kernel_stat *buf); -_syscall2(int, _stat, const char *, file_name, struct kernel_stat *, buf); +_syscall2(int, __stat, const char *, file_name, struct kernel_stat *, buf); -int stat(const char * file_name, struct libc_stat * cstat) +int _stat(const char * file_name, struct libc_stat * cstat) { struct kernel_stat kstat; - int result = _stat(file_name, &kstat); + int result = __stat(file_name, &kstat); if (result == 0) { statfix(cstat, &kstat); @@ -733,18 +734,18 @@ int stat(const char * file_name, struct libc_stat * cstat) #endif //#define __NR_lstat 107 -#ifdef L__lstat -#define __NR__lstat __NR_lstat +#ifdef L___lstat +#define __NR___lstat __NR_lstat #include #include "statfix.h" -extern int _lstat(const char *file_name, struct kernel_stat *buf); +extern int __lstat(const char *file_name, struct kernel_stat *buf); -_syscall2(int, _lstat, const char *, file_name, struct kernel_stat *, buf); +_syscall2(int, __lstat, const char *, file_name, struct kernel_stat *, buf); -int lstat(const char * file_name, struct libc_stat * cstat) +int _lstat(const char * file_name, struct libc_stat * cstat) { struct kernel_stat kstat; - int result = _lstat(file_name, &kstat); + int result = __lstat(file_name, &kstat); if (result == 0) { statfix(cstat, &kstat); @@ -754,18 +755,18 @@ int lstat(const char * file_name, struct libc_stat * cstat) #endif //#define __NR_fstat 108 -#ifdef L__fstat -#define __NR__fstat __NR_fstat +#ifdef L___fstat +#define __NR___fstat __NR_fstat #include #include "statfix.h" -extern int _fstat(int filedes, struct kernel_stat *buf); +extern int __fstat(int filedes, struct kernel_stat *buf); -_syscall2(int, _fstat, int, filedes, struct kernel_stat *, buf); +_syscall2(int, __fstat, int, filedes, struct kernel_stat *, buf); -int fstat(int fd, struct libc_stat *cstat) +int _fstat(int fd, struct libc_stat *cstat) { struct kernel_stat kstat; - int result = _fstat(fd, &kstat); + int result = __fstat(fd, &kstat); if (result == 0) { statfix(cstat, &kstat); -- cgit v1.2.3