summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/powerpc
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-08-23 23:20:30 +0000
committerMike Frysinger <vapier@gentoo.org>2006-08-23 23:20:30 +0000
commit190da1cd0c221438c563b5b605ff811e9075e210 (patch)
treeca5177a27d154dfa08b85d678ce6e33ac0672522 /libc/sysdeps/linux/powerpc
parente0605c73da33c6f06b13c4bdf5cb42db97cd4b30 (diff)
sync with psm: update errno handling to be the same on all arches
Diffstat (limited to 'libc/sysdeps/linux/powerpc')
-rw-r--r--libc/sysdeps/linux/powerpc/bits/syscalls.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/powerpc/bits/syscalls.h b/libc/sysdeps/linux/powerpc/bits/syscalls.h
index e28c380ee..ae269b876 100644
--- a/libc/sysdeps/linux/powerpc/bits/syscalls.h
+++ b/libc/sysdeps/linux/powerpc/bits/syscalls.h
@@ -5,13 +5,13 @@
# error "Never use <bits/syscalls.h> directly; include <sys/syscall.h> instead."
#endif
-#include <errno.h>
-
/* This includes the `__NR_<name>' syscall numbers taken from the Linux kernel
* header files. It also defines the traditional `SYS_<name>' macros for older
* programs. */
#include <bits/sysnum.h>
+#ifndef __ASSEMBLER__
+
/* Define a macro which expands inline into the wrapper code for a system
call. This use is for internal calls that do not need to handle errors
normally. It will never touch errno.
@@ -20,6 +20,10 @@
"sc; bnslr+" sequence) and CR (where only CR0.SO is clobbered to signal
an error return status). */
+#include <errno.h>
+
+#define SYS_ify(syscall_name) (__NR_##syscall_name)
+
# undef INLINE_SYSCALL
#if 1
# define INLINE_SYSCALL(name, nr, args...) \
@@ -164,5 +168,5 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6
return (type) INLINE_SYSCALL(name, 6, arg1, arg2, arg3, arg4, arg5, arg6); \
}
+#endif /* __ASSEMBLER__ */
#endif /* _BITS_SYSCALLS_H */
-