summaryrefslogtreecommitdiff
path: root/src/include/string.h
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2013-04-26 11:58:35 -0500
committerRonald G. Minnich <rminnich@gmail.com>2013-05-01 03:25:04 +0200
commitac4b00e230a7f0dfa308d45a7b6034e96a243ab0 (patch)
tree989a3180e893f6cd5ab5a860a40f1516a651f38b /src/include/string.h
parent032dd14514e72777475c3e39395486627846b7c9 (diff)
downloadcoreboot-ac4b00e230a7f0dfa308d45a7b6034e96a243ab0.tar.xz
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 <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/3144 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/include/string.h')
-rw-r--r--src/include/string.h6
1 files changed, 6 insertions, 0 deletions
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 <stddef.h>
#include <stdlib.h>
+/* 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);