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>
This commit is contained in:
Aaron Durbin 2013-03-19 12:41:29 -05:00 committed by Ronald G. Minnich
parent 0013a69e70
commit d466d750d7
2 changed files with 18 additions and 0 deletions

View File

@ -76,6 +76,20 @@ typedef int16_t s16;
typedef int32_t s32; 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__ #undef __HAVE_LONG_LONG__
#endif /* I386_STDINT_H */ #endif /* I386_STDINT_H */

4
src/include/inttypes.h Normal file
View File

@ -0,0 +1,4 @@
#ifndef INTTYPES_H
#define INTTYPES_H
#include <stdint.h>
#endif /* INTTYPES_H */