support PSEUDO_ERRVAL on arm

Philip Blundell Philip.Blundell@pobox.com
Mon Aug 25 15:09:00 GMT 2003


Here's a patch for this.

p.

-------------- next part --------------
2003-08-25  Philip Blundell  <philb@gnu.org>

	* sysdeps/unix/sysv/linux/arm/sysdep.h (PSEUDO_ERRVAL): Define.
	(PSEUDO_END_ERRVAL, ret_ERRVAL): Likewise.

Index: sysdeps/unix/sysv/linux/arm/sysdep.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/arm/sysdep.h,v
retrieving revision 1.24
diff -u -p -r1.24 sysdep.h
--- sysdeps/unix/sysv/linux/arm/sysdep.h	27 Mar 2003 02:45:49 -0000	1.24
+++ sysdeps/unix/sysv/linux/arm/sysdep.h	25 Aug 2003 15:07:51 -0000
@@ -80,6 +80,20 @@
 #define	PSEUDO_END_NOERRNO(name)					      \
   END (name)
 
+/* The function has to return the error code.  */
+#undef	PSEUDO_ERRVAL
+#define	PSEUDO_ERRVAL(name, syscall_name, args) \
+  .text;								      \
+  ENTRY (name)								      \
+    DO_CALL (syscall_name, args);					      \
+    rsb r0, r0, #0
+
+#undef	PSEUDO_END_ERRVAL
+#define	PSEUDO_END_ERRVAL(name) \
+  END (name)
+
+#define ret_ERRVAL PSEUDO_RET_NOERRNO
+
 #if NOT_IN_libc
 # define SYSCALL_ERROR __local_syscall_error
 # define SYSCALL_ERROR_HANDLER					\


More information about the Libc-hacker mailing list