This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Fix ia64 build


DO_INLINE_SYSCALL is used with both syscall name and syscall number:

[hjl@gnu libc]$ find -name "*.[hc]" | xargs grep DO_INLINE_SYSCALL
./sysdeps/unix/sysv/linux/ia64/sysdep.h:# define
DO_INLINE_SYSCALL(name, nr, args...)                                 \
./sysdeps/unix/sysv/linux/ia64/sysdep.h:# define
DO_INLINE_SYSCALL(name, nr, args...)                   \
./sysdeps/unix/sysv/linux/ia64/sysdep.h:
DO_INLINE_SYSCALL(__NR_##name, nr, args)    \
./sysdeps/unix/sysv/linux/ia64/sysdep.h:    DO_INLINE_SYSCALL(name, nr,
args)  \./nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h:
DO_INLINE_SYSCALL(futex, 4, (long) (ftx), FUTEX_WAIT, (int) (val),
\
./nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h:
DO_INLINE_SYSCALL(futex, 3, (long) (ftx), FUTEX_WAKE, (int) (nr));
\
./nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h:
DO_INLINE_SYSCALL(futex, 6, (long) (ftx), FUTEX_CMP_REQUEUE,
\

This patch fixes it.


H.J.
---
2004-09-20  H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/unix/sysv/linux/ia64/sysdep.h (DO_INLINE_SYSCALL):
	Renamed to ...
	(DO_INLINE_SYSCALL_NCS): This.
	(DO_INLINE_SYSCALL): New.
	(INLINE_SYSCALL): Updated.
	(INTERNAL_SYSCALL_NCS): Updated.

--- sysdeps/unix/sysv/linux/ia64/sysdep.h.syscall	2004-09-20 09:38:24.000000000 -0700
+++ sysdeps/unix/sysv/linux/ia64/sysdep.h	2004-09-20 09:36:59.000000000 -0700
@@ -199,7 +199,7 @@
 
 #ifdef IA64_USE_NEW_STUB
 
-# define DO_INLINE_SYSCALL(name, nr, args...)				      \
+# define DO_INLINE_SYSCALL_NCS(name, nr, args...)			      \
     LOAD_ARGS_##nr (args)						      \
     register long _r8 __asm ("r8");					      \
     register long _r10 __asm ("r10");					      \
@@ -221,7 +221,7 @@
 
 #else /* !IA64_USE_NEW_STUB */
 
-# define DO_INLINE_SYSCALL(name, nr, args...)			\
+# define DO_INLINE_SYSCALL_NCS(name, nr, args...)		\
     LOAD_ARGS_##nr (args)					\
     register long _r8 asm ("r8");				\
     register long _r10 asm ("r10");				\
@@ -237,10 +237,13 @@
 
 #endif /* !IA64_USE_NEW_STUB */
 
+#define DO_INLINE_SYSCALL(name, nr, args...)	\
+  DO_INLINE_SYSCALL_NCS (__NR_##name, nr, ##args)
+
 #undef INLINE_SYSCALL
 #define INLINE_SYSCALL(name, nr, args...)	\
   ({						\
-    DO_INLINE_SYSCALL(__NR_##name, nr, args)	\
+    DO_INLINE_SYSCALL_NCS(__NR_##name, nr, args)\
     if (_r10 == -1)				\
       {						\
 	__set_errno (_retval);			\
@@ -254,7 +257,7 @@
 #undef INTERNAL_SYSCALL
 #define INTERNAL_SYSCALL_NCS(name, err, nr, args...)	\
   ({							\
-    DO_INLINE_SYSCALL(name, nr, args)			\
+    DO_INLINE_SYSCALL_NCS(name, nr, args)		\
     err = _r10;						\
     _retval; })
 #define INTERNAL_SYSCALL(name, err, nr, args...)	\


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]