diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-02-22 00:00:19 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-02-22 00:00:19 +0000 |
commit | 1c848253fce6eadd1f9227dab74b032c049226fb (patch) | |
tree | 3cf10ab8d0d3c55aab006468c9b2cc1bf6824912 /sysdeps | |
parent | e814f74891ae248ee9d1a8d3caba9133c540e591 (diff) | |
download | glibc-1c848253fce6eadd1f9227dab74b032c049226fb.tar.gz glibc-1c848253fce6eadd1f9227dab74b032c049226fb.tar.xz glibc-1c848253fce6eadd1f9227dab74b032c049226fb.zip |
Update.
2003-02-21 Ulrich Drepper <drepper@redhat.com> * 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.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/getegid.c | 18 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/geteuid.c | 18 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/getgid.c | 18 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/getuid.c | 18 |
4 files changed, 40 insertions, 32 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 } diff --git a/sysdeps/unix/sysv/linux/i386/geteuid.c b/sysdeps/unix/sysv/linux/i386/geteuid.c index e3f3be4c88..663c37f57b 100644 --- a/sysdeps/unix/sysv/linux/i386/geteuid.c +++ b/sysdeps/unix/sysv/linux/i386/geteuid.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_geteuid32 (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_geteuid32 */ uid_t __geteuid (void) { + INTERNAL_SYSCALL_DECL (err); #if __ASSUME_32BITUIDS > 0 - return INLINE_SYSCALL (geteuid32, 0); + /* No error checking. */ + return INTERNAL_SYSCALL (geteuid32, err, 0); #else # ifdef __NR_geteuid32 if (__libc_missing_32bit_uids <= 0) { int result; - int saved_errno = errno; - result = INLINE_SYSCALL (geteuid32, 0); - if (result == 0 || errno != ENOSYS) + result = INTERNAL_SYSCALL (geteuid32, 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_geteuid32 */ - return INLINE_SYSCALL (geteuid, 0); + /* No error checking. */ + return INTERNAL_SYSCALL (getugid, err, 0); #endif } diff --git a/sysdeps/unix/sysv/linux/i386/getgid.c b/sysdeps/unix/sysv/linux/i386/getgid.c index 9b3dc5f289..da31f708b0 100644 --- a/sysdeps/unix/sysv/linux/i386/getgid.c +++ b/sysdeps/unix/sysv/linux/i386/getgid.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 @@ -31,32 +31,34 @@ extern int __syscall_getgid32 (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_getgid32 */ gid_t __getgid (void) { + INTERNAL_SYSCALL_DECL (err); #if __ASSUME_32BITUIDS > 0 - return INLINE_SYSCALL (getgid32, 0); + /* No error checking. */ + return INTERNAL_SYSCALL (getgid32, err, 0); #else # ifdef __NR_getgid32 if (__libc_missing_32bit_uids <= 0) { int result; - int saved_errno = errno; - result = INLINE_SYSCALL (getgid32, 0); - if (result == 0 || errno != ENOSYS) + result = INTERNAL_SYSCALL (getdid32, 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_getgid32 */ - return INLINE_SYSCALL (getgid, 0); + /* No error checking. */ + return INTERNAL_SYSCALL (getgid, err, 0); #endif } 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 } |