about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r--sysdeps/unix/sysv/linux/i386/setegid.c3
-rw-r--r--sysdeps/unix/sysv/linux/i386/seteuid.c7
-rw-r--r--sysdeps/unix/sysv/linux/setegid.c3
-rw-r--r--sysdeps/unix/sysv/linux/seteuid.c3
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c3
6 files changed, 15 insertions, 5 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/setegid.c b/sysdeps/unix/sysv/linux/i386/setegid.c
index 880087c064..8d7618cdd6 100644
--- a/sysdeps/unix/sysv/linux/i386/setegid.c
+++ b/sysdeps/unix/sysv/linux/i386/setegid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 96, 97, 98, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 96, 97, 98, 2000, 2002 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
@@ -25,3 +25,4 @@ setegid (gid)
 {
   return __setregid (-1, gid);
 }
+libc_hidden_def (setegid)
diff --git a/sysdeps/unix/sysv/linux/i386/seteuid.c b/sysdeps/unix/sysv/linux/i386/seteuid.c
index bf38072e0d..ba0b86d318 100644
--- a/sysdeps/unix/sysv/linux/i386/seteuid.c
+++ b/sysdeps/unix/sysv/linux/i386/seteuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2002 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
@@ -33,7 +33,11 @@ seteuid (uid_t uid)
   /* First try the syscall.  */
 #ifdef __NR_setresuid
   result = __setresuid (-1, uid, -1);
+#if __ASSUME_SETRESUID_SYSCALL > 0
+  if (0)
+#else
   if (result == -1 && errno == ENOSYS)
+#endif
     /* No system call available.  Use emulation.  This may not work
        since `setreuid' also sets the saved user ID when UID is not
        equal to the real user ID, making it impossible to switch back.  */
@@ -42,3 +46,4 @@ seteuid (uid_t uid)
 
   return result;
 }
+libc_hidden_def (seteuid)
diff --git a/sysdeps/unix/sysv/linux/setegid.c b/sysdeps/unix/sysv/linux/setegid.c
index 6b9d34f038..c4b114eb07 100644
--- a/sysdeps/unix/sysv/linux/setegid.c
+++ b/sysdeps/unix/sysv/linux/setegid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2002 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
@@ -46,6 +46,7 @@ setegid (gid_t gid)
 
   return result;
 }
+libc_hidden_def (setegid)
 #else
 # include <sysdeps/unix/bsd/setegid.c>
 #endif
diff --git a/sysdeps/unix/sysv/linux/seteuid.c b/sysdeps/unix/sysv/linux/seteuid.c
index ba064ee141..ab9819b8f9 100644
--- a/sysdeps/unix/sysv/linux/seteuid.c
+++ b/sysdeps/unix/sysv/linux/seteuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2002 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
@@ -50,6 +50,7 @@ seteuid (uid_t uid)
 
   return result;
 }
+libc_hidden_def (seteuid)
 #else
 # include <sysdeps/unix/bsd/seteuid.c>
 #endif
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c b/sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c
index 14ec1378df..11643f6d39 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c
@@ -46,6 +46,7 @@ setegid (gid_t gid)
 
   return result;
 }
+libc_hidden_def (setegid)
 #else
 # include <sysdeps/unix/bsd/setegid.c>
 #endif
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c b/sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c
index d42a70dc29..34638ce4be 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2002 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
@@ -50,6 +50,7 @@ seteuid (uid_t uid)
 
   return result;
 }
+libc_hidden_def (seteuid)
 #else
 # include <sysdeps/unix/bsd/seteuid.c>
 #endif