summaryrefslogtreecommitdiff
path: root/include/common.h
diff options
context:
space:
mode:
authorGabe Black <gabeblack@chromium.org>2014-10-15 04:38:31 -0600
committerTom Rini <trini@ti.com>2014-10-27 11:04:01 -0400
commit4166ecb247a1ec9f906313428e8b9059c9f2b619 (patch)
tree41f2fbbbc887d8d31788b7b087ed46c1d660db11 /include/common.h
parent0d296cc2d3b8e2ffa46b4a93d1398fa6bf85b504 (diff)
downloadu-boot-imx-4166ecb247a1ec9f906313428e8b9059c9f2b619.zip
u-boot-imx-4166ecb247a1ec9f906313428e8b9059c9f2b619.tar.gz
u-boot-imx-4166ecb247a1ec9f906313428e8b9059c9f2b619.tar.bz2
Add some standard headers external code might need
inttypes.h defines format specifiers for printf which work with data types of particular sizes. stdlib.h is currently just a passthrough to malloc.h which has declarations of the various *alloc functions. Add the required #define to common.h so that these printf format specifiers will be made available. Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-by: Gabe Black <gabeblack@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org> Reviewed-by: Bill Richardson <wfrichar@google.com> Signed-off-by: Simon Glass <sjg@chromium.org> (Replaced with a GPL version from glibc)
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index a5764d8..1082c09 100644
--- a/include/common.h
+++ b/include/common.h
@@ -83,6 +83,9 @@ typedef volatile unsigned char vu_char;
#include <flash.h>
#include <image.h>
+/* Bring in printf format macros if inttypes.h is included */
+#define __STDC_FORMAT_MACROS
+
#ifdef __LP64__
#define CONFIG_SYS_SUPPORT_64BIT_DATA
#endif