diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/getegid.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/getegid.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/getegid.c b/sysdeps/unix/sysv/linux/i386/getegid.c index 8938681762..8231ae823e 100644 --- a/sysdeps/unix/sysv/linux/i386/getegid.c +++ b/sysdeps/unix/sysv/linux/i386/getegid.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 @@ -30,32 +30,34 @@ extern int __syscall_getegid32 (void); # if __ASSUME_32BITUIDS == 0 /* This variable is shared with all files that need to check for 32bit uids. */ -extern int __libc_missing_32bit_uids; +extern int __libc_missing_32bit_uids attribute_hidden; # endif #endif /* __NR_getegid32 */ gid_t __getegid (void) { + INTERNAL_SYSCALL_DECL (err); #if __ASSUME_32BITUIDS > 0 - return INLINE_SYSCALL (getegid32, 0); + /* No error checking. */ + return INTERNAL_SYSCALL (getegid32, err, 0); #else # ifdef __NR_getegid32 if (__libc_missing_32bit_uids <= 0) { int result; - int saved_errno = errno; - result = INLINE_SYSCALL (getegid32, 0); - if (result == 0 || errno != ENOSYS) + result = INTERNAL_SYSCALL (getegid32, 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_getegid32 */ - return INLINE_SYSCALL (getegid, 0); + /* No error checking. */ + return INTERNAL_SYSCALL (getegid, err, 0); #endif } |