summaryrefslogtreecommitdiff
path: root/include/linux/stringify.h
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2010-09-27 12:52:17 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-09-29 09:30:32 +0200
commit5156e781bd530a1763c0a33a49871cf58dea7eb0 (patch)
tree84c06fa3e5e5e8b497a37861ce894173c399fe8c /include/linux/stringify.h
parent683e4ef35797f702d5674410aca931a5cba570da (diff)
downloadbarebox-5156e781bd530a1763c0a33a49871cf58dea7eb0.tar.gz
import __stringify from linux
update the current code Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux/stringify.h')
-rw-r--r--include/linux/stringify.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/stringify.h b/include/linux/stringify.h
new file mode 100644
index 0000000000..841cec8ed5
--- /dev/null
+++ b/include/linux/stringify.h
@@ -0,0 +1,12 @@
+#ifndef __LINUX_STRINGIFY_H
+#define __LINUX_STRINGIFY_H
+
+/* Indirect stringification. Doing two levels allows the parameter to be a
+ * macro itself. For example, compile with -DFOO=bar, __stringify(FOO)
+ * converts to "bar".
+ */
+
+#define __stringify_1(x...) #x
+#define __stringify(x...) __stringify_1(x)
+
+#endif /* !__LINUX_STRINGIFY_H */