Commit e9c52716 authored by Paolo 'Blaisorblade' Giarrusso's avatar Paolo 'Blaisorblade' Giarrusso Committed by Linus Torvalds

[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: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c16993d9
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
* Licensed under the GPL * Licensed under the GPL
*/ */
#include "linux/compiler.h"
#include "linux/stddef.h" #include "linux/stddef.h"
#include "linux/kernel.h" #include "linux/kernel.h"
#include "linux/string.h" #include "linux/string.h"
...@@ -61,8 +62,7 @@ static void do_buffer_op(void *jmpbuf, void *arg_ptr) ...@@ -61,8 +62,7 @@ static void do_buffer_op(void *jmpbuf, void *arg_ptr)
void *arg; void *arg;
int *res; int *res;
/* Some old gccs recognize __va_copy, but not va_copy */ va_copy(args, *(va_list *)arg_ptr);
__va_copy(args, *(va_list *)arg_ptr);
addr = va_arg(args, unsigned long); addr = va_arg(args, unsigned long);
len = va_arg(args, int); len = va_arg(args, int);
is_write = va_arg(args, int); is_write = va_arg(args, int);
......
...@@ -22,3 +22,8 @@ ...@@ -22,3 +22,8 @@
# define __attribute_pure__ __attribute__((pure)) # define __attribute_pure__ __attribute__((pure))
# define __attribute_const__ __attribute__((__const__)) # define __attribute_const__ __attribute__((__const__))
#endif #endif
/* GCC 2.95.x/2.96 recognize __va_copy, but not va_copy. Actually later GCC's
* define both va_copy and __va_copy, but the latter may go away, so limit this
* to this header */
#define va_copy __va_copy
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment