diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/getuid.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/getuid.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/getuid.c b/sysdeps/unix/sysv/linux/i386/getuid.c index 4bd81801c1..044ce5d5a0 100644 --- a/sysdeps/unix/sysv/linux/i386/getuid.c +++ b/sysdeps/unix/sysv/linux/i386/getuid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -34,32 +34,34 @@ extern int __syscall_getuid32 (void); -1 if libc does not know yet whether kernel has 32bit uids or not. 0 if it does have them. 1 if it does not have them. */ -int __libc_missing_32bit_uids = -1; +int __libc_missing_32bit_uids attribute_hidden = -1; # endif #endif /* __NR_getuid32 */ uid_t __getuid (void) { + INTERNAL_SYSCALL_DECL (err); #if __ASSUME_32BITUIDS > 0 - return INLINE_SYSCALL (getuid32, 0); + /* No error checking. */ + return INTERNAL_SYSCALL (getuid32, err, 0); #else # ifdef __NR_getuid32 if (__libc_missing_32bit_uids <= 0) { int result; - int saved_errno = errno; - result = INLINE_SYSCALL (getuid32, 0); - if (result == 0 || errno != ENOSYS) + result = INTERNAL_SYSCALL (getuid32, err, 0); + if (! INTERNAL_SYSCALL_ERROR_P (result, err) + || INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) return result; - __set_errno (saved_errno); __libc_missing_32bit_uids = 1; } # endif /* __NR_getuid32 */ - return INLINE_SYSCALL (getuid, 0); + /* No error checking. */ + return INTERNAL_SYSCALL (getuid, err, 0); #endif } |