[coreboot] New patch to review for coreboot: 1424861 x86: provide more C standard environment

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Tue Mar 19 23:23:28 CET 2013

Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2859


commit 1424861aeb3f263365046410dbbc247aa62029d8
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Tue Mar 19 12:41:29 2013 -0500

    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 at chromium.org>
 src/arch/x86/include/stdint.h | 14 ++++++++++++++
 src/include/inttypes.h        |  4 ++++
 2 files changed, 18 insertions(+)

diff --git a/src/arch/x86/include/stdint.h b/src/arch/x86/include/stdint.h
index 07cae47..c491f4b 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)
+#ifndef UINT64_MAX
+# define UINT64_MAX (18446744073709551615ULL)
+#ifndef UINT64_C
+#define UINT64_C(c) c ## ULL
+#ifndef PRIu64
+#define PRIu64 "llu"
 #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 0000000..77c39c4
--- /dev/null
+++ b/src/include/inttypes.h
@@ -0,0 +1,4 @@
+#ifndef INTTYPES_H
+#define INTTYPES_H
+#include <stdint.h>
+#endif /* INTTYPES_H */

More information about the coreboot mailing list