changeset 864:98b6273204bc

add _VA_LIST to ignore stdarg.h in LLVM
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 31 Mar 2014 19:40:57 +0900
parents e253ffedf947
children e12f4a4d796d
files mc-code-i64.c
diffstat 1 files changed, 16 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mc-code-i64.c	Mon Mar 31 19:12:09 2014 +0900
+++ b/mc-code-i64.c	Mon Mar 31 19:40:57 2014 +0900
@@ -350,6 +350,7 @@
 "#define __APPLE__ 1\n"
 "#define __GNUC__ 4\n"
 "#define __BIG_ENDIAN__ 1\n"
+"#define _VA_LIST\n"
 #endif
 ;
 
@@ -381,14 +382,25 @@
 #define __inline__ inline\n\
 #define __inline inline\n\
 #define __GNUC__ 3\n\
-#define __builtin_va_list int\n\
-typedef long unsigned int __SIZE_TYPE__ ;\n\
+"
+#ifdef __llvm__
+"#define _VA_LIST\n"
+#endif
+"#define __builtin_va_list int\n\
+"
+
+"typedef long unsigned int __SIZE_TYPE__ ;\n\
 "
 
 #else
 static
-char *init_src0 = "\
-#define va_list int\n\
+char *init_src0 = 
+#ifdef __llvm__
+"#define _VA_LIST\n"
+#endif
+"#define __builtin_va_list int\n\
+"
+"\
 #define va_start(ap,arg) ap=(((int)(&arg))+sizeof(arg))\n\
 #define va_arg(ap,type)  (*((type *)ap)++)\n\
 #define va_end\n\