From 1c848253fce6eadd1f9227dab74b032c049226fb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 22 Feb 2003 00:00:19 +0000 Subject: Update. 2003-02-21 Ulrich Drepper * sysdeps/unix/sysv/linux/i386/getuid.c: Use INTERNAL_SYSCALL and do not chechk for errors (unless testing for 32bit variant). * sysdeps/unix/sysv/linux/i386/getgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/geteuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getegid.c: Likewise. --- sysdeps/unix/sysv/linux/i386/getegid.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'sysdeps/unix/sysv/linux/i386/getegid.c') 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 } -- cgit v1.2.3-70-g09d2