[uClibc-cvs] uClibc/libc/sysdeps/linux/powerpc/bits syscalls.h,1.7,1.8

Erik Andersen andersen at uclibc.org
Sun Jun 15 01:08:49 UTC 2003


Update of /var/cvs/uClibc/libc/sysdeps/linux/powerpc/bits
In directory winder:/tmp/cvs-serv16542/libc/sysdeps/linux/powerpc/bits

Modified Files:
	syscalls.h 
Log Message:
Implement syscall() for powerpc.  Fixup syscall code so 
it compiles properly with gcc 3.3.
 -Erik


Index: syscalls.h
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/powerpc/bits/syscalls.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- syscalls.h	16 Feb 2003 01:22:40 -0000	1.7
+++ syscalls.h	15 Jun 2003 01:08:45 -0000	1.8
@@ -11,30 +11,31 @@
 #include <bits/sysnum.h>
 
 
-#define STRINGIFY(s) STRINGIFY2 (s)
-#define STRINGIFY2(s) #s
+#define __STRINGIFY(s) __STRINGIFY2 (s)
+#define __STRINGIFY2(s) #s
 
+#undef JUMPTARGET
 #ifdef __PIC__
-#define JUMPTARGET(name) STRINGIFY(name##@plt)
+#define __MAKE_SYSCALL	__STRINGIFY(__uClibc_syscall at plt)
 #else
-#define JUMPTARGET(name) STRINGIFY(name)
+#define __MAKE_SYSCALL	__STRINGIFY(__uClibc_syscall)
 #endif
 
 #define unified_syscall_body(name)			\
 	__asm__ (					\
 	".section \".text\"\n\t"			\
 	".align 2\n\t"					\
-	".globl " STRINGIFY(name) "\n\t"				\
-	".type " STRINGIFY(name) ", at function\n"			\
-	#name":\n\tli 0," STRINGIFY(__NR_##name) "\n\t"	\
-	"b " JUMPTARGET(__uClibc_syscall) "\n"		\
-	".Lfe1" STRINGIFY(name) ":\n\t"				\
-	".size\t" STRINGIFY(name) ",.Lfe1" STRINGIFY(name) "-" STRINGIFY(name) "\n"	\
+	".globl " __STRINGIFY(name) "\n\t"		\
+	".type " __STRINGIFY(name) ", at function\n\t"	\
+	#name":\n\tli 0," __STRINGIFY(__NR_##name) "\n\t"	\
+	"b " __MAKE_SYSCALL "\n\t"		\
+	".Lfe1" __STRINGIFY(name) ":\n\t"			\
+	".size\t" __STRINGIFY(name) ",.Lfe1" __STRINGIFY(name) "-" __STRINGIFY(name) "\n"	\
 	)
 
 #undef _syscall0
-#define _syscall0(type,name)						\
-type name(void);							\
+#define _syscall0(type,name)				\
+type name(void);					\
 unified_syscall_body(name)
 
 #undef _syscall1



More information about the uClibc-cvs mailing list