From ac4b00e230a7f0dfa308d45a7b6034e96a243ab0 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Fri, 26 Apr 2013 11:58:35 -0500 Subject: string: Add STRINGIFY macro STRINGIFY makes a string from a token. It is generally useful. Even though STRINGIFY is not defined to be in the C library it's placed in string.h because it does make a string. Change-Id: I368e14792a90d1fdce2a3d4d7a48b5d400623160 Signed-off-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/3144 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/include/string.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/include/string.h b/src/include/string.h index 44f244c733..77985e1325 100644 --- a/src/include/string.h +++ b/src/include/string.h @@ -4,6 +4,12 @@ #include #include +/* Stringify a token */ +#ifndef STRINGIFY +#define _STRINGIFY(x) #x +#define STRINGIFY(x) _STRINGIFY(x) +#endif + void *memcpy(void *dest, const void *src, size_t n); void *memmove(void *dest, const void *src, size_t n); void *memset(void *s, int c, size_t n); -- cgit v1.2.3