about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-10-24 13:01:17 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-10-24 13:01:17 +0000
commitc8bc40386ad9767e1e4de882182b91ae57ca211c (patch)
tree4240d5071566091d930e233aaba3db3261e765cd /sysdeps/unix/sysv/linux
parent48eb7a94e292efcbbd74902322252a99cbf74fb9 (diff)
downloadglibc-c8bc40386ad9767e1e4de882182b91ae57ca211c.tar.gz
glibc-c8bc40386ad9767e1e4de882182b91ae57ca211c.tar.xz
glibc-c8bc40386ad9767e1e4de882182b91ae57ca211c.zip
Move get*id and getgroups definitions to syscalls.list (bug 14138).
Continuing the move of syscall definitions to syscalls.list, where the
removal of support for old kernel versions has made this possible,
this patch moves various definitions of get*id functions and
getgroups.  The previous C definitions were because of the transition
to 32-bit uids and gids.

Tested for x86.

	[BZ #14138]
	* sysdeps/unix/sysv/linux/arm/getegid.c: Remove file.
	* sysdeps/unix/sysv/linux/arm/geteuid.c: Likewise.
	* sysdeps/unix/sysv/linux/arm/getgid.c: Likewise.
	* sysdeps/unix/sysv/linux/arm/getgroups.c: Likewise.
	* sysdeps/unix/sysv/linux/arm/getresgid.c: Likewise.
	* sysdeps/unix/sysv/linux/arm/getresuid.c: Likewise.
	* sysdeps/unix/sysv/linux/arm/getuid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/getegid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/geteuid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/getgid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/getgroups.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/getresgid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/getresuid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/getuid.c: Likewise.
	* sysdeps/unix/sysv/linux/m68k/getegid.c: Likewise.
	* sysdeps/unix/sysv/linux/m68k/geteuid.c: Likewise.
	* sysdeps/unix/sysv/linux/m68k/getgid.c: Likewise.
	* sysdeps/unix/sysv/linux/m68k/getgroups.c: Likewise.
	* sysdeps/unix/sysv/linux/m68k/getresgid.c: Likewise.
	* sysdeps/unix/sysv/linux/m68k/getresuid.c: Likewise.
	* sysdeps/unix/sysv/linux/m68k/getuid.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/getegid.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/geteuid.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/getgid.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/getgroups.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/getresgid.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/getresuid.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/getuid.c: Likewise.
	* sysdeps/unix/sysv/linux/sh/getegid.c: Likewise.
	* sysdeps/unix/sysv/linux/sh/geteuid.c: Likewise.
	* sysdeps/unix/sysv/linux/sh/getgid.c: Likewise.
	* sysdeps/unix/sysv/linux/sh/getgroups.c: Likewise.
	* sysdeps/unix/sysv/linux/sh/getresgid.c: Likewise.
	* sysdeps/unix/sysv/linux/sh/getresuid.c: Likewise.
	* sysdeps/unix/sysv/linux/sh/getuid.c: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/getegid.c: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/geteuid.c: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/getgid.c: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/getgroups.c: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/getuid.c: Likewise.
	* sysdeps/unix/sysv/linux/arm/syscalls.list (getegid): Add
	syscall.
	(geteuid): Likewise.
	(getgid): Likewise.
	(getuid): Likewise.
	(getresgid): Likewise.
	(getresuid): Likewise.
	(getgroups): Likewise.
	* sysdeps/unix/sysv/linux/i386/syscalls.list (getegid): Likewise.
	(geteuid): Likewise.
	(getgid): Likewise.
	(getuid): Likewise.
	(getresgid): Likewise.
	(getresuid): Likewise.
	(getgroups): Likewise.
	* sysdeps/unix/sysv/linux/m68k/syscalls.list (getegid): Likewise.
	(geteuid): Likewise.
	(getgid): Likewise.
	(getuid): Likewise.
	(getresgid): Likewise.
	(getresuid): Likewise.
	(getgroups): Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list (getegid):
	Likewise.
	(geteuid): Likewise.
	(getgid): Likewise.
	(getuid): Likewise.
	(getresgid): Likewise.
	(getresuid): Likewise.
	(getgroups): Likewise.
	* sysdeps/unix/sysv/linux/sh/syscalls.list (getegid): Likewise.
	(geteuid): Likewise.
	(getgid): Likewise.
	(getuid): Likewise.
	(getresgid): Likewise.
	(getresuid): Likewise.
	(getgroups): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (getegid):
	Likewise.
	(geteuid): Likewise.
	(getgid): Likewise.
	(getuid): Likewise.
	(getgroups): Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r--sysdeps/unix/sysv/linux/arm/getegid.c1
-rw-r--r--sysdeps/unix/sysv/linux/arm/geteuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/arm/getgid.c1
-rw-r--r--sysdeps/unix/sysv/linux/arm/getgroups.c2
-rw-r--r--sysdeps/unix/sysv/linux/arm/getresgid.c1
-rw-r--r--sysdeps/unix/sysv/linux/arm/getresuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/arm/getuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/arm/syscalls.list8
-rw-r--r--sysdeps/unix/sysv/linux/i386/getegid.c33
-rw-r--r--sysdeps/unix/sysv/linux/i386/geteuid.c33
-rw-r--r--sysdeps/unix/sysv/linux/i386/getgid.c33
-rw-r--r--sysdeps/unix/sysv/linux/i386/getgroups.c39
-rw-r--r--sysdeps/unix/sysv/linux/i386/getresgid.c35
-rw-r--r--sysdeps/unix/sysv/linux/i386/getresuid.c35
-rw-r--r--sysdeps/unix/sysv/linux/i386/getuid.c33
-rw-r--r--sysdeps/unix/sysv/linux/i386/syscalls.list8
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getegid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/geteuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getgid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getgroups.c2
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getresgid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getresuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/syscalls.list8
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/getegid.c1
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/geteuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/getgid.c1
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/getgroups.c1
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/getresgid.c1
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/getresuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/getuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list8
-rw-r--r--sysdeps/unix/sysv/linux/sh/getegid.c1
-rw-r--r--sysdeps/unix/sysv/linux/sh/geteuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/sh/getgid.c1
-rw-r--r--sysdeps/unix/sysv/linux/sh/getgroups.c2
-rw-r--r--sysdeps/unix/sysv/linux/sh/getresgid.c1
-rw-r--r--sysdeps/unix/sysv/linux/sh/getresuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/sh/getuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/sh/syscalls.list8
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/getegid.c1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/geteuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/getgid.c1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/getgroups.c2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/getuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list5
46 files changed, 45 insertions, 278 deletions
diff --git a/sysdeps/unix/sysv/linux/arm/getegid.c b/sysdeps/unix/sysv/linux/arm/getegid.c
deleted file mode 100644
index 37b4b4a530..0000000000
--- a/sysdeps/unix/sysv/linux/arm/getegid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getegid.c>
diff --git a/sysdeps/unix/sysv/linux/arm/geteuid.c b/sysdeps/unix/sysv/linux/arm/geteuid.c
deleted file mode 100644
index ebcb555b5e..0000000000
--- a/sysdeps/unix/sysv/linux/arm/geteuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/geteuid.c>
diff --git a/sysdeps/unix/sysv/linux/arm/getgid.c b/sysdeps/unix/sysv/linux/arm/getgid.c
deleted file mode 100644
index 0a4d6061f0..0000000000
--- a/sysdeps/unix/sysv/linux/arm/getgid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getgid.c>
diff --git a/sysdeps/unix/sysv/linux/arm/getgroups.c b/sysdeps/unix/sysv/linux/arm/getgroups.c
deleted file mode 100644
index 102ea24e14..0000000000
--- a/sysdeps/unix/sysv/linux/arm/getgroups.c
+++ /dev/null
@@ -1,2 +0,0 @@
-/* We also have to rewrite the kernel gid_t to the user land type.  */
-#include <sysdeps/unix/sysv/linux/i386/getgroups.c>
diff --git a/sysdeps/unix/sysv/linux/arm/getresgid.c b/sysdeps/unix/sysv/linux/arm/getresgid.c
deleted file mode 100644
index b703a414cc..0000000000
--- a/sysdeps/unix/sysv/linux/arm/getresgid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getresgid.c>
diff --git a/sysdeps/unix/sysv/linux/arm/getresuid.c b/sysdeps/unix/sysv/linux/arm/getresuid.c
deleted file mode 100644
index 0b14cefe34..0000000000
--- a/sysdeps/unix/sysv/linux/arm/getresuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getresuid.c>
diff --git a/sysdeps/unix/sysv/linux/arm/getuid.c b/sysdeps/unix/sysv/linux/arm/getuid.c
deleted file mode 100644
index d682c79a49..0000000000
--- a/sysdeps/unix/sysv/linux/arm/getuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getuid.c>
diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
index f2133bc404..15ad91edb9 100644
--- a/sysdeps/unix/sysv/linux/arm/syscalls.list
+++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -4,6 +4,14 @@ chown		-	chown32		i:sii	__chown		chown
 lchown		-	lchown32	i:sii	__lchown	lchown
 fchown		-	fchown32	i:iii	__fchown	fchown
 
+getegid		-	getegid32	Ei:	__getegid	getegid
+geteuid		-	geteuid32	Ei:	__geteuid	geteuid
+getgid		-	getgid32	Ei:	__getgid	getgid
+getuid		-	getuid32	Ei:	__getuid	getuid
+getresgid	-	getresgid32	i:ppp	__getresgid	getresgid
+getresuid	-	getresuid32	i:ppp	__getresuid	getresuid
+getgroups	-	getgroups32	i:ip	__getgroups	getgroups
+
 prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
 
 fanotify_mark	EXTRA	fanotify_mark	i:iiiiis	fanotify_mark
diff --git a/sysdeps/unix/sysv/linux/i386/getegid.c b/sysdeps/unix/sysv/linux/i386/getegid.c
deleted file mode 100644
index ec56bfbcf9..0000000000
--- a/sysdeps/unix/sysv/linux/i386/getegid.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (C) 2000-2014 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <errno.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-/* Consider moving to syscalls.list.  */
-
-gid_t
-__getegid (void)
-{
-  INTERNAL_SYSCALL_DECL (err);
-  return INTERNAL_SYSCALL (getegid32, err, 0);
-}
-
-weak_alias (__getegid, getegid)
diff --git a/sysdeps/unix/sysv/linux/i386/geteuid.c b/sysdeps/unix/sysv/linux/i386/geteuid.c
deleted file mode 100644
index c4e794ab23..0000000000
--- a/sysdeps/unix/sysv/linux/i386/geteuid.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (C) 2000-2014 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <errno.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-/* Consider moving to syscalls.list.  */
-
-uid_t
-__geteuid (void)
-{
-  INTERNAL_SYSCALL_DECL (err);
-  return INTERNAL_SYSCALL (geteuid32, err, 0);
-}
-
-weak_alias (__geteuid, geteuid)
diff --git a/sysdeps/unix/sysv/linux/i386/getgid.c b/sysdeps/unix/sysv/linux/i386/getgid.c
deleted file mode 100644
index 6ef073bb1a..0000000000
--- a/sysdeps/unix/sysv/linux/i386/getgid.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (C) 2000-2014 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <errno.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-/* Consider moving to syscalls.list.  */
-
-gid_t
-__getgid (void)
-{
-  INTERNAL_SYSCALL_DECL (err);
-  return INTERNAL_SYSCALL (getgid32, err, 0);
-}
-
-weak_alias (__getgid, getgid)
diff --git a/sysdeps/unix/sysv/linux/i386/getgroups.c b/sysdeps/unix/sysv/linux/i386/getgroups.c
deleted file mode 100644
index 556fffacda..0000000000
--- a/sysdeps/unix/sysv/linux/i386/getgroups.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 1997-2014 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <errno.h>
-#include <unistd.h>
-#include <sys/param.h>
-#include <sys/types.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-#include <linux/posix_types.h>
-
-
-/* Consider moving to syscalls.list.  */
-
-/* For Linux we must convert the array of groups from the format that the
-   kernel returns.  */
-int
-__getgroups (int n, gid_t *groups)
-{
-  return INLINE_SYSCALL (getgroups32, 2, n, groups);
-}
-
-weak_alias (__getgroups, getgroups)
diff --git a/sysdeps/unix/sysv/linux/i386/getresgid.c b/sysdeps/unix/sysv/linux/i386/getresgid.c
deleted file mode 100644
index f1fca1e755..0000000000
--- a/sysdeps/unix/sysv/linux/i386/getresgid.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 1998-2014 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <errno.h>
-#include <unistd.h>
-#include <sys/types.h>
-
-#include <linux/posix_types.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-/* Consider moving to syscalls.list.  */
-
-int
-__getresgid (gid_t *rgid, gid_t *egid, gid_t *sgid)
-{
-  return INLINE_SYSCALL (getresgid32, 3, rgid, egid, sgid);
-}
-libc_hidden_def (__getresgid)
-weak_alias (__getresgid, getresgid)
diff --git a/sysdeps/unix/sysv/linux/i386/getresuid.c b/sysdeps/unix/sysv/linux/i386/getresuid.c
deleted file mode 100644
index fff076c0ba..0000000000
--- a/sysdeps/unix/sysv/linux/i386/getresuid.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 1998-2014 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <errno.h>
-#include <unistd.h>
-#include <sys/types.h>
-
-#include <linux/posix_types.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-/* Consider moving to syscalls.list.  */
-
-int
-__getresuid (uid_t *ruid, uid_t *euid, uid_t *suid)
-{
-  return INLINE_SYSCALL (getresuid32, 3, ruid, euid, suid);
-}
-libc_hidden_def (__getresuid)
-weak_alias (__getresuid, getresuid)
diff --git a/sysdeps/unix/sysv/linux/i386/getuid.c b/sysdeps/unix/sysv/linux/i386/getuid.c
deleted file mode 100644
index 60e24cc50d..0000000000
--- a/sysdeps/unix/sysv/linux/i386/getuid.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (C) 2000-2014 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <errno.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-/* Consider moving to syscalls.list.  */
-
-uid_t
-__getuid (void)
-{
-  INTERNAL_SYSCALL_DECL (err);
-  return INTERNAL_SYSCALL (getuid32, err, 0);
-}
-
-weak_alias (__getuid, getuid)
diff --git a/sysdeps/unix/sysv/linux/i386/syscalls.list b/sysdeps/unix/sysv/linux/i386/syscalls.list
index db375a8b6b..f487c67de5 100644
--- a/sysdeps/unix/sysv/linux/i386/syscalls.list
+++ b/sysdeps/unix/sysv/linux/i386/syscalls.list
@@ -4,6 +4,14 @@ chown		-	chown32		i:sii	__chown		chown@@GLIBC_2.1
 lchown		-	lchown32	i:sii	__lchown	lchown@@GLIBC_2.0 chown@GLIBC_2.0
 fchown		-	fchown32	i:iii	__fchown	fchown
 
+getegid		-	getegid32	Ei:	__getegid	getegid
+geteuid		-	geteuid32	Ei:	__geteuid	geteuid
+getgid		-	getgid32	Ei:	__getgid	getgid
+getuid		-	getuid32	Ei:	__getuid	getuid
+getresgid	-	getresgid32	i:ppp	__getresgid	getresgid
+getresuid	-	getresuid32	i:ppp	__getresuid	getresuid
+getgroups	-	getgroups32	i:ip	__getgroups	getgroups
+
 modify_ldt	EXTRA	modify_ldt	i:ipi	__modify_ldt	modify_ldt
 vm86old		EXTRA	vm86old		i:p	__vm86old	vm86@GLIBC_2.0
 vm86		-	vm86		i:ip	__vm86		vm86@@GLIBC_2.3.4
diff --git a/sysdeps/unix/sysv/linux/m68k/getegid.c b/sysdeps/unix/sysv/linux/m68k/getegid.c
deleted file mode 100644
index 37b4b4a530..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getegid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getegid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/geteuid.c b/sysdeps/unix/sysv/linux/m68k/geteuid.c
deleted file mode 100644
index ebcb555b5e..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/geteuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/geteuid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getgid.c b/sysdeps/unix/sysv/linux/m68k/getgid.c
deleted file mode 100644
index 0a4d6061f0..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getgid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getgid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getgroups.c b/sysdeps/unix/sysv/linux/m68k/getgroups.c
deleted file mode 100644
index 102ea24e14..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getgroups.c
+++ /dev/null
@@ -1,2 +0,0 @@
-/* We also have to rewrite the kernel gid_t to the user land type.  */
-#include <sysdeps/unix/sysv/linux/i386/getgroups.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getresgid.c b/sysdeps/unix/sysv/linux/m68k/getresgid.c
deleted file mode 100644
index b703a414cc..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getresgid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getresgid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getresuid.c b/sysdeps/unix/sysv/linux/m68k/getresuid.c
deleted file mode 100644
index 0b14cefe34..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getresuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getresuid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getuid.c b/sysdeps/unix/sysv/linux/m68k/getuid.c
deleted file mode 100644
index d682c79a49..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getuid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list
index 7896b870b8..fec801dc70 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscalls.list
+++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list
@@ -5,6 +5,14 @@ lchown		-	lchown32	i:sii	__lchown	lchown
 fchown		-	fchown32	i:iii	__fchown	fchown
 waitpid		-	waitpid		Ci:ipi	__waitpid	waitpid	__libc_waitpid
 
+getegid		-	getegid32	Ei:	__getegid	getegid
+geteuid		-	geteuid32	Ei:	__geteuid	geteuid
+getgid		-	getgid32	Ei:	__getgid	getgid
+getuid		-	getuid32	Ei:	__getuid	getuid
+getresgid	-	getresgid32	i:ppp	__getresgid	getresgid
+getresuid	-	getresuid32	i:ppp	__getresuid	getresuid
+getgroups	-	getgroups32	i:ip	__getgroups	getgroups
+
 cacheflush	EXTRA	cacheflush	i:iiii	__cacheflush	cacheflush
 prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
 fanotify_mark	EXTRA	fanotify_mark	i:iiiiis	fanotify_mark
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getegid.c b/sysdeps/unix/sysv/linux/s390/s390-32/getegid.c
deleted file mode 100644
index 37b4b4a530..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getegid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getegid.c>
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/geteuid.c b/sysdeps/unix/sysv/linux/s390/s390-32/geteuid.c
deleted file mode 100644
index ebcb555b5e..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/geteuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/geteuid.c>
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getgid.c b/sysdeps/unix/sysv/linux/s390/s390-32/getgid.c
deleted file mode 100644
index 0a4d6061f0..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getgid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getgid.c>
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getgroups.c b/sysdeps/unix/sysv/linux/s390/s390-32/getgroups.c
deleted file mode 100644
index 20a7166103..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getgroups.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getgroups.c>
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getresgid.c b/sysdeps/unix/sysv/linux/s390/s390-32/getresgid.c
deleted file mode 100644
index b703a414cc..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getresgid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getresgid.c>
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getresuid.c b/sysdeps/unix/sysv/linux/s390/s390-32/getresuid.c
deleted file mode 100644
index 0b14cefe34..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getresuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getresuid.c>
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getuid.c b/sysdeps/unix/sysv/linux/s390/s390-32/getuid.c
deleted file mode 100644
index d682c79a49..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getuid.c>
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list b/sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list
index 7a6015af9f..2f795b693e 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list
@@ -4,6 +4,14 @@ chown		-	chown32		i:sii	__chown		chown@@GLIBC_2.1
 lchown		-	lchown32	i:sii	__lchown	lchown@@GLIBC_2.0 chown@GLIBC_2.0
 fchown		-	fchown32	i:iii	__fchown	fchown
 
+getegid		-	getegid32	Ei:	__getegid	getegid
+geteuid		-	geteuid32	Ei:	__geteuid	geteuid
+getgid		-	getgid32	Ei:	__getgid	getgid
+getuid		-	getuid32	Ei:	__getuid	getuid
+getresgid	-	getresgid32	i:ppp	__getresgid	getresgid
+getresuid	-	getresuid32	i:ppp	__getresuid	getresuid
+getgroups	-	getgroups32	i:ip	__getgroups	getgroups
+
 oldgetrlimit	EXTRA	getrlimit	i:ip	__old_getrlimit	getrlimit@GLIBC_2.0
 setrlimit	-	setrlimit	i:ip	__setrlimit	setrlimit@GLIBC_2.0 setrlimit@@GLIBC_2.2
 
diff --git a/sysdeps/unix/sysv/linux/sh/getegid.c b/sysdeps/unix/sysv/linux/sh/getegid.c
deleted file mode 100644
index 37b4b4a530..0000000000
--- a/sysdeps/unix/sysv/linux/sh/getegid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getegid.c>
diff --git a/sysdeps/unix/sysv/linux/sh/geteuid.c b/sysdeps/unix/sysv/linux/sh/geteuid.c
deleted file mode 100644
index ebcb555b5e..0000000000
--- a/sysdeps/unix/sysv/linux/sh/geteuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/geteuid.c>
diff --git a/sysdeps/unix/sysv/linux/sh/getgid.c b/sysdeps/unix/sysv/linux/sh/getgid.c
deleted file mode 100644
index 0a4d6061f0..0000000000
--- a/sysdeps/unix/sysv/linux/sh/getgid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getgid.c>
diff --git a/sysdeps/unix/sysv/linux/sh/getgroups.c b/sysdeps/unix/sysv/linux/sh/getgroups.c
deleted file mode 100644
index 102ea24e14..0000000000
--- a/sysdeps/unix/sysv/linux/sh/getgroups.c
+++ /dev/null
@@ -1,2 +0,0 @@
-/* We also have to rewrite the kernel gid_t to the user land type.  */
-#include <sysdeps/unix/sysv/linux/i386/getgroups.c>
diff --git a/sysdeps/unix/sysv/linux/sh/getresgid.c b/sysdeps/unix/sysv/linux/sh/getresgid.c
deleted file mode 100644
index b703a414cc..0000000000
--- a/sysdeps/unix/sysv/linux/sh/getresgid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getresgid.c>
diff --git a/sysdeps/unix/sysv/linux/sh/getresuid.c b/sysdeps/unix/sysv/linux/sh/getresuid.c
deleted file mode 100644
index 0b14cefe34..0000000000
--- a/sysdeps/unix/sysv/linux/sh/getresuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getresuid.c>
diff --git a/sysdeps/unix/sysv/linux/sh/getuid.c b/sysdeps/unix/sysv/linux/sh/getuid.c
deleted file mode 100644
index d682c79a49..0000000000
--- a/sysdeps/unix/sysv/linux/sh/getuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getuid.c>
diff --git a/sysdeps/unix/sysv/linux/sh/syscalls.list b/sysdeps/unix/sysv/linux/sh/syscalls.list
index 899d4e7afe..2c010c8281 100644
--- a/sysdeps/unix/sysv/linux/sh/syscalls.list
+++ b/sysdeps/unix/sysv/linux/sh/syscalls.list
@@ -4,6 +4,14 @@ chown		-	chown32		i:sii	__chown		chown
 lchown		-	lchown32	i:sii	__lchown	lchown
 fchown		-	fchown32	i:iii	__fchown	fchown
 
+getegid		-	getegid32	Ei:	__getegid	getegid
+geteuid		-	geteuid32	Ei:	__geteuid	geteuid
+getgid		-	getgid32	Ei:	__getgid	getgid
+getuid		-	getuid32	Ei:	__getuid	getuid
+getresgid	-	getresgid32	i:ppp	__getresgid	getresgid
+getresuid	-	getresuid32	i:ppp	__getresuid	getresuid
+getgroups	-	getgroups32	i:ip	__getgroups	getgroups
+
 waitpid		-	waitpid		Ci:ipi	__waitpid	waitpid	__libc_waitpid
 
 prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/getegid.c b/sysdeps/unix/sysv/linux/sparc/sparc32/getegid.c
deleted file mode 100644
index 37b4b4a530..0000000000
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/getegid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getegid.c>
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/geteuid.c b/sysdeps/unix/sysv/linux/sparc/sparc32/geteuid.c
deleted file mode 100644
index ebcb555b5e..0000000000
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/geteuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/geteuid.c>
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/getgid.c b/sysdeps/unix/sysv/linux/sparc/sparc32/getgid.c
deleted file mode 100644
index 0a4d6061f0..0000000000
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/getgid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getgid.c>
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/getgroups.c b/sysdeps/unix/sysv/linux/sparc/sparc32/getgroups.c
deleted file mode 100644
index 102ea24e14..0000000000
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/getgroups.c
+++ /dev/null
@@ -1,2 +0,0 @@
-/* We also have to rewrite the kernel gid_t to the user land type.  */
-#include <sysdeps/unix/sysv/linux/i386/getgroups.c>
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/getuid.c b/sysdeps/unix/sysv/linux/sparc/sparc32/getuid.c
deleted file mode 100644
index d682c79a49..0000000000
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/getuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getuid.c>
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list b/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list
index e71a044028..b52616dfa7 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list
@@ -6,8 +6,13 @@ fchown		-	fchown32	i:iii	__fchown	fchown
 
 setrlimit	-	setrlimit	2	__setrlimit	setrlimit
 getrlimit	-	getrlimit	2	__getrlimit	getrlimit
+getegid		-	getegid32	Ei:	__getegid	getegid
+geteuid		-	geteuid32	Ei:	__geteuid	geteuid
+getgid		-	getgid32	Ei:	__getgid	getgid
+getuid		-	getuid32	Ei:	__getuid	getuid
 getresuid	-	getresuid32	3	getresuid
 getresgid	-	getresgid32	3	getresgid
+getgroups	-	getgroups32	i:ip	__getgroups	getgroups
 
 prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
 fanotify_mark	EXTRA	fanotify_mark	i:iiiiis	fanotify_mark