From f9e91a48ba509e77aadcb5349885e1777ef17372 Mon Sep 17 00:00:00 2001 From: Andrei Errapart Date: Thu, 19 Jun 2014 21:07:48 +1000 Subject: [PATCH] Work around MSVC limitations 1) No variadic macros in the form "args..."; this is a GCC extension. 2) No empty struct initializers. In any case, there is very little to win: { } vs. { 0 }. Signed-off-by: Andrei Errapart Signed-off-by: David Gibson --- dtc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dtc.h b/dtc.h index 20de073..56212c8 100644 --- a/dtc.h +++ b/dtc.h @@ -38,9 +38,9 @@ #include "util.h" #ifdef DEBUG -#define debug(fmt,args...) printf(fmt, ##args) +#define debug(...) printf(__VA_ARGS__) #else -#define debug(fmt,args...) +#define debug(...) #endif @@ -88,7 +88,7 @@ struct data { }; -#define empty_data ((struct data){ /* all .members = 0 or NULL */ }) +#define empty_data ((struct data){ 0 /* all .members = 0 or NULL */ }) #define for_each_marker(m) \ for (; (m); (m) = (m)->next)