From 4457398da183473d1aa525e51da6cdf6755c2e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Olav=20Sel=C3=A5sdal?= Date: Thu, 17 Jan 2013 09:36:42 +0100 Subject: [PATCH] Add UC_STRINGIFY macro --- include/ucore/ucore_utils.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/ucore/ucore_utils.h b/include/ucore/ucore_utils.h index fa559da..1b3737e 100644 --- a/include/ucore/ucore_utils.h +++ b/include/ucore/ucore_utils.h @@ -52,5 +52,11 @@ typeof( ((type *)0)->member ) *__mptr = (ptr); \ #define UC_ALIGN(val,align) (((val)+(align)-1UL)&~((align)-1UL)) +/** + * * Expands @x and turns it into a string. + * */ +#define UC_STRINGIFY(x) UC_STRINGIFY_HLP(x) +#define UC_STRINGIFY_HLP(x) #x + #endif