From 437ac77449d759469ab4d5c8e0f37b80c0ad6e31 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Tue, 7 Jul 2015 17:46:50 +0200 Subject: Better define the __GNUC__ macro which avoids the inclusion of va_list header and set the __VA_LIST macro if it is not defined. --- configure | 2 +- runtime/include/stdarg.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 4d3e812d..b906e38f 100755 --- a/configure +++ b/configure @@ -113,7 +113,7 @@ case "$target" in struct_return="int1-8" system="diab" cc="${toolprefix}dcc" - cprepro="${toolprefix}dcc -E -D__Iva_list" + cprepro="${toolprefix}dcc -E -D__GNUC__" casm="${toolprefix}das" asm_supports_cfi=false clinker="${toolprefix}dcc" diff --git a/runtime/include/stdarg.h b/runtime/include/stdarg.h index b2e7eadd..272b6320 100644 --- a/runtime/include/stdarg.h +++ b/runtime/include/stdarg.h @@ -50,6 +50,10 @@ typedef __builtin_va_list __gnuc_va_list; typedef __builtin_va_list va_list; #endif +#ifndef __VA_LIST +#define __VA_LIST +#endif + #define va_start(v,l) __builtin_va_start(v,l) #define va_end(v) __builtin_va_end(v) #define va_arg(v,l) __builtin_va_arg(v,l) -- cgit