about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/setegid.c5
-rw-r--r--sysdeps/generic/seteuid.c5
-rw-r--r--sysdeps/mach/hurd/setegid.c1
-rw-r--r--sysdeps/mach/hurd/seteuid.c1
-rw-r--r--sysdeps/unix/bsd/setegid.c3
-rw-r--r--sysdeps/unix/bsd/seteuid.c3
-rw-r--r--sysdeps/unix/sysv/aix/setegid.c3
-rw-r--r--sysdeps/unix/sysv/aix/seteuid.c3
-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
14 files changed, 29 insertions, 15 deletions
diff --git a/sysdeps/generic/setegid.c b/sysdeps/generic/setegid.c
index f2f2529a2b..5b5e2cf4bb 100644
--- a/sysdeps/generic/setegid.c
+++ b/sysdeps/generic/setegid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992,1994,1995,1996,1997,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
@@ -27,7 +27,6 @@ setegid (gid)
   __set_errno (ENOSYS);
   return -1;
 }
-
-
+libc_hidden_def (setegid)
 stub_warning (setegid)
 #include <stub-tag.h>
diff --git a/sysdeps/generic/seteuid.c b/sysdeps/generic/seteuid.c
index dbfa15bedb..689000f993 100644
--- a/sysdeps/generic/seteuid.c
+++ b/sysdeps/generic/seteuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 1997, 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
@@ -27,7 +27,6 @@ seteuid (uid)
   __set_errno (ENOSYS);
   return -1;
 }
-
-
+libc_hidden_def (seteuid)
 stub_warning (seteuid)
 #include <stub-tag.h>
diff --git a/sysdeps/mach/hurd/setegid.c b/sysdeps/mach/hurd/setegid.c
index 10a93e5843..c84b8e2e13 100644
--- a/sysdeps/mach/hurd/setegid.c
+++ b/sysdeps/mach/hurd/setegid.c
@@ -66,3 +66,4 @@ setegid (gid)
   __mach_port_deallocate (__mach_task_self (), newauth);
   return err;
 }
+libc_hidden_def (setegid)
diff --git a/sysdeps/mach/hurd/seteuid.c b/sysdeps/mach/hurd/seteuid.c
index 3fd0b98cb1..8a6effef8e 100644
--- a/sysdeps/mach/hurd/seteuid.c
+++ b/sysdeps/mach/hurd/seteuid.c
@@ -66,3 +66,4 @@ seteuid (uid)
   __mach_port_deallocate (__mach_task_self (), newauth);
   return err;
 }
+libc_hidden_def (seteuid)
diff --git a/sysdeps/unix/bsd/setegid.c b/sysdeps/unix/bsd/setegid.c
index f6213aa605..cc9f939bac 100644
--- a/sysdeps/unix/bsd/setegid.c
+++ b/sysdeps/unix/bsd/setegid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 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
@@ -32,3 +32,4 @@ setegid (gid)
 
   return __setregid (-1, gid);
 }
+libc_hidden_def (setegid)
diff --git a/sysdeps/unix/bsd/seteuid.c b/sysdeps/unix/bsd/seteuid.c
index f46935cdf9..056b6583c5 100644
--- a/sysdeps/unix/bsd/seteuid.c
+++ b/sysdeps/unix/bsd/seteuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 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
@@ -32,3 +32,4 @@ seteuid (uid)
 
   return __setreuid (-1, uid);
 }
+libc_hidden_def (seteuid)
diff --git a/sysdeps/unix/sysv/aix/setegid.c b/sysdeps/unix/sysv/aix/setegid.c
index 75e96e387c..75123cedfd 100644
--- a/sysdeps/unix/sysv/aix/setegid.c
+++ b/sysdeps/unix/sysv/aix/setegid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 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
@@ -29,3 +29,4 @@ __setegid (gid_t gid)
   return setgidx (ID_EFFECTIVE, gid);
 }
 strong_alias (__setegid, setegid)
+libc_hidden_def (setegid)
diff --git a/sysdeps/unix/sysv/aix/seteuid.c b/sysdeps/unix/sysv/aix/seteuid.c
index 17738e78b7..6ea7e7ba03 100644
--- a/sysdeps/unix/sysv/aix/seteuid.c
+++ b/sysdeps/unix/sysv/aix/seteuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 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
@@ -29,3 +29,4 @@ __seteuid (uid_t uid)
   return setuidx (ID_EFFECTIVE, uid);
 }
 strong_alias (__seteuid, seteuid)
+libc_hidden_def (seteuid)
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