summaryrefslogtreecommitdiff
path: root/stringify
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2010-03-04 14:12:51 +0100
committerTobias Klauser <klto@zhaw.ch>2010-03-04 14:12:51 +0100
commita91fab8e160c4717b184b9963537f68b353cb173 (patch)
treebd59623730f8e452e4fdb70cde9423c31987be99 /stringify
Add stringify header
Diffstat (limited to 'stringify')
-rw-r--r--stringify/stringify.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/stringify/stringify.h b/stringify/stringify.h
new file mode 100644
index 0000000..5b7b002
--- /dev/null
+++ b/stringify/stringify.h
@@ -0,0 +1,15 @@
+/* Taken from Linux Kernel source code */
+
+#ifndef _STRINGIFY_H_
+#define _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 /* _STRINGIFY_H_ */
699cda6afbe08501098dff8a8c2fe6ae09'>Merge branch 'master' into nextJames Morris1-1/+0 2010-04-23security: whitespace coding style fixesJustin P. Mattock1-1/+1