diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-02-09 03:24:42 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-02-09 03:24:42 +0000 |
commit | 831219203b354146565ccc421a12f7237e0e3faa (patch) | |
tree | d9d56a769bb261ca5f227e859d6e73cbb2457b95 /libc/sysdeps/linux/common/geteuid.c | |
parent | 7477fa1a17a5604040a51d980d21e27c6e281b6e (diff) |
use the newer versions of functions when available (fixes sparc which doesnt provide older versions at all)
Diffstat (limited to 'libc/sysdeps/linux/common/geteuid.c')
-rw-r--r-- | libc/sysdeps/linux/common/geteuid.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/common/geteuid.c b/libc/sysdeps/linux/common/geteuid.c index 819a1d65f..247f1bfda 100644 --- a/libc/sysdeps/linux/common/geteuid.c +++ b/libc/sysdeps/linux/common/geteuid.c @@ -12,19 +12,25 @@ libc_hidden_proto(geteuid) -#ifdef __NR_geteuid -#define __NR___syscall_geteuid __NR_geteuid +#if defined(__NR_geteuid32) +# undef __NR_geteuid +# define __NR_geteuid __NR_geteuid32 +_syscall0(uid_t, geteuid); + +#elif defined(__NR_geteuid) +# define __NR___syscall_geteuid __NR_geteuid static inline _syscall0(int, __syscall_geteuid); uid_t geteuid(void) { return (__syscall_geteuid()); } + #else libc_hidden_proto(getuid) - uid_t geteuid(void) { return (getuid()); } #endif + libc_hidden_def(geteuid) |