aboutsummaryrefslogtreecommitdiff
path: root/dtc.h
diff options
context:
space:
mode:
authorAndrei Errapart <andrei@errapartengineering.com>2014-06-19 21:07:48 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2014-06-19 21:12:38 +1000
commitf9e91a48ba509e77aadcb5349885e1777ef17372 (patch)
tree1f80d2dc1c9995832394ebea13721ad7ed7e2487 /dtc.h
parent83e606a64d7b555bea3c3007b48bb9f790f0139c (diff)
downloaddtc-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>
Diffstat (limited to 'dtc.h')
-rw-r--r--dtc.h6
1 files 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)