diff options
author | Aaron Durbin <adurbin@chromium.org> | 2013-03-19 12:41:29 -0500 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2013-03-20 04:20:25 +0100 |
commit | d466d750d71f979ccd6636306b51f2d87cb19cba (patch) | |
tree | db8928b210f3da96bcaa4796d1d679cc14f80cc4 | |
parent | 0013a69e7098804a461ab005b33240b8addfbf8f (diff) |
x86: provide more C standard environment
There are some external libraries that are built within
coreboot's environment that expect a more common C standard
environment. That includes things like inttypes.h and UINTx_MAX
macros. This provides the minimal amount of #defines and files
to build vboot_reference.
Change-Id: I95b1f38368747af7b63eaca3650239bb8119bb13
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/2859
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
-rw-r--r-- | src/arch/x86/include/stdint.h | 14 | ||||
-rw-r--r-- | src/include/inttypes.h | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/arch/x86/include/stdint.h b/src/arch/x86/include/stdint.h index 07cae47ff9..c491f4b6e0 100644 --- a/src/arch/x86/include/stdint.h +++ b/src/arch/x86/include/stdint.h @@ -76,6 +76,20 @@ typedef int16_t s16; typedef int32_t s32; +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif +#ifndef UINT64_MAX +# define UINT64_MAX (18446744073709551615ULL) +#endif +#ifndef UINT64_C +#define UINT64_C(c) c ## ULL +#endif +#ifndef PRIu64 +#define PRIu64 "llu" +#endif + + #undef __HAVE_LONG_LONG__ #endif /* I386_STDINT_H */ diff --git a/src/include/inttypes.h b/src/include/inttypes.h new file mode 100644 index 0000000000..77c39c4199 --- /dev/null +++ b/src/include/inttypes.h @@ -0,0 +1,4 @@ +#ifndef INTTYPES_H +#define INTTYPES_H +#include <stdint.h> +#endif /* INTTYPES_H */ |