diff options
author | Andrei Errapart <andrei@errapartengineering.com> | 2014-06-19 21:07:48 +1000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2014-06-19 21:12:38 +1000 |
commit | f9e91a48ba509e77aadcb5349885e1777ef17372 (patch) | |
tree | 1f80d2dc1c9995832394ebea13721ad7ed7e2487 | |
parent | 83e606a64d7b555bea3c3007b48bb9f790f0139c (diff) | |
download | dtc-f9e91a48ba509e77aadcb5349885e1777ef17372.zip dtc-f9e91a48ba509e77aadcb5349885e1777ef17372.tar.gz dtc-f9e91a48ba509e77aadcb5349885e1777ef17372.tar.bz2 |
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 <andrei@errapartengineering.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r-- | dtc.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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) |