From 9f3eba863e386e2c604313c99f1da37d7cfdadea Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 18 Jan 2006 12:10:22 +0000 Subject: get rid of arch specific checks --- libc/sysdeps/linux/common/fdatasync.c | 6 ++---- libc/sysdeps/linux/common/getgid.c | 15 ++++----------- libc/sysdeps/linux/common/getpid.c | 8 ++++---- libc/sysdeps/linux/common/getuid.c | 16 ++++------------ 4 files changed, 14 insertions(+), 31 deletions(-) diff --git a/libc/sysdeps/linux/common/fdatasync.c b/libc/sysdeps/linux/common/fdatasync.c index fbac46ae4..c15e47b42 100644 --- a/libc/sysdeps/linux/common/fdatasync.c +++ b/libc/sysdeps/linux/common/fdatasync.c @@ -10,10 +10,8 @@ #include "syscalls.h" #include -#if defined (__alpha__) -#undef __NR_fdatasync -#define __NR_fdatasync __NR_osf_fdatasync +#if defined __NR_osf_fdatasync +# define __NR_fdatasync __NR_osf_fdatasync #endif _syscall1(int, fdatasync, int, fd); - diff --git a/libc/sysdeps/linux/common/getgid.c b/libc/sysdeps/linux/common/getgid.c index ccaed306a..61193eaf6 100644 --- a/libc/sysdeps/linux/common/getgid.c +++ b/libc/sysdeps/linux/common/getgid.c @@ -10,16 +10,9 @@ #include "syscalls.h" #include -libc_hidden_proto(getgid) - -#define __NR___syscall_getgid __NR_getgid -#if defined (__alpha__) -#define __NR_getgid __NR_getxgid +#if defined __NR_getxgid +# define __NR_getgid __NR_getxgid #endif - -static inline _syscall0(int, __syscall_getgid); -gid_t getgid(void) -{ - return (__syscall_getgid()); -} +_syscall0(gid_t, getgid); +libc_hidden_proto(getgid) libc_hidden_def(getgid) diff --git a/libc/sysdeps/linux/common/getpid.c b/libc/sysdeps/linux/common/getpid.c index be4c2ad47..d2e5a33e6 100644 --- a/libc/sysdeps/linux/common/getpid.c +++ b/libc/sysdeps/linux/common/getpid.c @@ -2,16 +2,16 @@ /* * getpid() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * Copyright (C) 2000-2006 by Erik Andersen * - * GNU Library General Public License (LGPL) version 2 or later. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #include "syscalls.h" #include -#if defined (__alpha__) -#define __NR_getpid __NR_getxpid +#if defined __NR_getxpid +# define __NR_getpid __NR_getxpid #endif #define __NR___libc_getpid __NR_getpid _syscall0(pid_t, __libc_getpid); diff --git a/libc/sysdeps/linux/common/getuid.c b/libc/sysdeps/linux/common/getuid.c index 6a06a78e4..21c504d65 100644 --- a/libc/sysdeps/linux/common/getuid.c +++ b/libc/sysdeps/linux/common/getuid.c @@ -10,17 +10,9 @@ #include "syscalls.h" #include -libc_hidden_proto(getuid) - -#if defined (__alpha__) -#define __NR_getuid __NR_getxuid +#if defined __NR_getxuid +# define __NR_getuid __NR_getxuid #endif -#define __NR___syscall_getuid __NR_getuid - -static inline _syscall0(int, __syscall_getuid); - -uid_t getuid(void) -{ - return (__syscall_getuid()); -} +libc_hidden_proto(getuid) +_syscall0(uid_t, getuid); libc_hidden_def(getuid) -- cgit v1.2.3