summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/getpid.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-03-02 15:06:51 +0100
committerPeter S. Mazinger <ps.m@gmx.net>2011-03-03 18:22:50 +0100
commit83c1854b97d79e2b67065b1a2651b0d11d8a8f6b (patch)
tree43dd89c2d19570eb50a327d958697fa0a060f09b /libc/sysdeps/linux/common/getpid.c
parent45dafbdb4e221f600895aa70a69e2e306093bd90 (diff)
remove error handling from some syscalls
Remove error handling from getegid/getgid/geteuid/getuid/getppid/getpid/getpgrp Use strong_alias if fallbacks are needed Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Diffstat (limited to 'libc/sysdeps/linux/common/getpid.c')
-rw-r--r--libc/sysdeps/linux/common/getpid.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libc/sysdeps/linux/common/getpid.c b/libc/sysdeps/linux/common/getpid.c
index 8041022e7..d9a69084f 100644
--- a/libc/sysdeps/linux/common/getpid.c
+++ b/libc/sysdeps/linux/common/getpid.c
@@ -10,11 +10,13 @@
#include <sys/syscall.h>
#include <unistd.h>
-extern __typeof(getpid) __libc_getpid;
-#if defined __NR_getxpid
+#ifdef __NR_getxpid
+# undef __NR_getpid
# define __NR_getpid __NR_getxpid
#endif
-#define __NR___libc_getpid __NR_getpid
-_syscall0(pid_t, __libc_getpid)
-weak_alias(__libc_getpid, getpid)
+
+_syscall_noerr0(pid_t, getpid)
libc_hidden_weak(getpid)
+#ifndef __NR_getppid
+strong_alias(getpid,getppid)
+#endif