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>
main
Andrei Errapart 2014-06-19 21:07:48 +10:00 committed by David Gibson
parent 83e606a64d
commit f9e91a48ba
1 changed files with 3 additions and 3 deletions

6
dtc.h
View File

@ -38,9 +38,9 @@
#include "util.h" #include "util.h"


#ifdef DEBUG #ifdef DEBUG
#define debug(fmt,args...) printf(fmt, ##args) #define debug(...) printf(__VA_ARGS__)
#else #else
#define debug(fmt,args...) #define debug(...)
#endif #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) \ #define for_each_marker(m) \
for (; (m); (m) = (m)->next) for (; (m); (m) = (m)->next)