aboutsummaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2017-10-18 16:55:08 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2017-10-26 09:25:14 +0200
commit2d45d1c5c65e9b3cd020fac624ed9bf6c2855a91 (patch)
tree1d883d6e825c878cd453ddc88bb46e71f3554da8 /util.h
parent2e6fe5a107b562ce0c0ba18a9a49dd30c74ae069 (diff)
downloaddtc-2d45d1c5c65e9b3cd020fac624ed9bf6c2855a91.zip
dtc-2d45d1c5c65e9b3cd020fac624ed9bf6c2855a91.tar.gz
dtc-2d45d1c5c65e9b3cd020fac624ed9bf6c2855a91.tar.bz2
Replace FDT_VERSION() with stringify()
The FDT_VERSION() and _FDT_VERSION() macros don't really have anything specific to do with the fdt version. Rather, they're the common CPP "stringify" idiom. Move to util.h and rename to stringify() to reflect this. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'util.h')
-rw-r--r--util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/util.h b/util.h
index ad5f411..ea62715 100644
--- a/util.h
+++ b/util.h
@@ -35,6 +35,9 @@
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+#define stringify(s) stringify_(s)
+#define stringify_(s) #s
+
static inline void NORETURN PRINTF(1, 2) die(const char *str, ...)
{
va_list ap;