[parisc-linux-cvs] INLINE_SYSCALL should return signed value

Matthew Wilcox willy@ldl.fc.hp.com
Fri, 16 Mar 2001 11:54:07 -0700


Index: sysdeps/unix/sysv/linux/hppa/sysdep.h
===================================================================
RCS file: /home/cvs/parisc/glibc/sysdeps/unix/sysv/linux/hppa/sysdep.h,v
retrieving revision 1.11
diff -u -p -r1.11 sysdep.h
--- sysdep.h	2001/03/07 18:20:13	1.11
+++ sysdep.h	2001/03/16 18:48:51
@@ -187,7 +187,7 @@
 
 #undef INLINE_SYSCALL
 #define INLINE_SYSCALL(name, nr, args...)	({		\
-	unsigned long __sys_res;				\
+	long __sys_res;						\
 	{							\
 		register unsigned long __res asm("r28");	\
 		LOAD_ARGS_##nr(args)				\
@@ -199,9 +199,9 @@
 			 );					\
 		__sys_res = __res;				\
 	}							\
-	if (__sys_res >= (unsigned long)-4095) {		\
+	if ((unsigned long) __sys_res >= (unsigned long)-4095) { \
 		__set_errno(-__sys_res);			\
-		__sys_res = (unsigned long)-1;			\
+		__sys_res = -1;					\
 	}							\
 	__sys_res;						\
 })