aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2005-05-01 11:58:54 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 11:58:54 -0400
commite9c527163d31da9f616e989a90429729525c5233 (patch)
treedd449d0954ea9a96d87541ba8a611089bd7447d7
parentc16993d9009b4311f0e6088af38844eabc8b5e5b (diff)
[PATCH] uml: move va_copy conditional def
GCC 2.95 uses __va_copy instead of va_copy. Handle it inside compiler.h instead of in a casual file, and avoid the risk that this breaks with a newer compiler (which it could do). Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/um/kernel/skas/uaccess.c4
-rw-r--r--include/linux/compiler-gcc2.h5
2 files changed, 7 insertions, 2 deletions
diff --git a/arch/um/kernel/skas/uaccess.c b/arch/um/kernel/skas/uaccess.c
index 7575ec489b63..f7da9d027672 100644
--- a/arch/um/kernel/skas/uaccess.c
+++ b/arch/um/kernel/skas/uaccess.c
@@ -3,6 +3,7 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/compiler.h"
6#include "linux/stddef.h" 7#include "linux/stddef.h"
7#include "linux/kernel.h" 8#include "linux/kernel.h"
8#include "linux/string.h" 9#include "linux/string.h"
@@ -61,8 +62,7 @@ static void do_buffer_op(void *jmpbuf, void *arg_ptr)
61 void *arg; 62 void *arg;
62 int *res; 63 int *res;
63 64
64 /* Some old gccs recognize __va_copy, but not va_copy */ 65 va_copy(args, *(va_list *)arg_ptr);
65 __va_copy(args, *(va_list *)arg_ptr);
66 addr = va_arg(args, unsigned long); 66 addr = va_arg(args, unsigned long);
67 len = va_arg(args, int); 67 len = va_arg(args, int);
68 is_write = va_arg(args, int); 68 is_write = va_arg(args, int);
diff --git a/include/linux/compiler-gcc2.h b/include/linux/compiler-gcc2.h
index 5a359153ffd9..ebed17660c5f 100644
--- a/include/linux/compiler-gcc2.h
+++ b/include/linux/compiler-gcc2.h
@@ -22,3 +22,8 @@
22# define __attribute_pure__ __attribute__((pure)) 22# define __attribute_pure__ __attribute__((pure))
23# define __attribute_const__ __attribute__((__const__)) 23# define __attribute_const__ __attribute__((__const__))
24#endif 24#endif
25
26/* GCC 2.95.x/2.96 recognize __va_copy, but not va_copy. Actually later GCC's
27 * define both va_copy and __va_copy, but the latter may go away, so limit this
28 * to this header */
29#define va_copy __va_copy