From: Ian Jackson Date: Wed, 13 Jul 2011 22:53:55 +0000 (+0100) Subject: secnet.h: provide helpful STRING macro (for preprocessor stringification) X-Git-Tag: v0.2.0~30 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=45cfab8ca7db61ce4677e2e77e76b9266c57ab12;p=secnet.git secnet.h: provide helpful STRING macro (for preprocessor stringification) Uses preprocessor stringification; can be helpful for rendering compile-time constants (eg compile time limit macros) for messages, etc. Not used yet; will be used later in this series. Signed-off-by: Ian Jackson --- diff --git a/secnet.h b/secnet.h index b60972f..6559ef3 100644 --- a/secnet.h +++ b/secnet.h @@ -495,4 +495,7 @@ extern void log_from_fd(int fd, cstring_t prefix, struct log_if *log); /***** END of log functions *****/ +#define STRING2(x) #x +#define STRING(x) STRING2(x) + #endif /* secnet_h */