Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / include / asm-s390 / unistd.h
index 78e34a8..e15cf98 100644 (file)
 
 #endif
 
-/* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */
+#ifdef __KERNEL__
 
 #define __syscall_return(type, res)                         \
 do {                                                        \
-       if ((unsigned long)(res) >= (unsigned long)(-125)) { \
+       if ((unsigned long)(res) >= (unsigned long)(-4095)) {\
                errno = -(res);                              \
                res = -1;                                    \
        }                                                    \
@@ -546,7 +546,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4,    \
        __syscall_return(type,__res);                        \
 }
 
-#ifdef __KERNEL__
 #define __ARCH_WANT_IPC_PARSE_VERSION
 #define __ARCH_WANT_OLD_READDIR
 #define __ARCH_WANT_SYS_ALARM
@@ -573,11 +572,9 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4,    \
 #   define __ARCH_WANT_COMPAT_SYS_TIME
 #   define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
 # endif
-#endif
 
 #ifdef __KERNEL_SYSCALLS__
 
-#include <linux/config.h>
 #include <linux/compiler.h>
 #include <linux/types.h>
 #include <asm/ptrace.h>
@@ -625,7 +622,7 @@ asmlinkage long sys_rt_sigaction(int sig,
                                struct sigaction __user *oact,
                                size_t sigsetsize);
 
-#endif
+#endif /* __KERNEL_SYSCALLS__ */
 
 /*
  * "Conditional" syscalls
@@ -635,4 +632,5 @@ asmlinkage long sys_rt_sigaction(int sig,
  */
 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 
+#endif /* __KERNEL__ */
 #endif /* _ASM_S390_UNISTD_H_ */