From a91fab8e160c4717b184b9963537f68b353cb173 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 4 Mar 2010 14:12:51 +0100 Subject: Add stringify header --- stringify/stringify.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 stringify/stringify.h (limited to 'stringify') 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_ */ -- cgit v1.2.3-54-g00ecf