summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@secunet.com>2011-07-12 15:02:04 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2011-07-16 11:09:28 +0200
commitf7b30808f38eb236622902bfd93626dab4dbbb61 (patch)
treec8661aee54eb390a40b0000115d7cc321af63b65
parent229f7cb6d660ad4063c9f65e3fabfff80583f281 (diff)
downloadcoreboot-f7b30808f38eb236622902bfd93626dab4dbbb61.tar.xz
libpayload: Improve compatibility
Define INT_MAX, EOF and make sure size_t is available. Change-Id: I1b4b717d2545ea8312ec52339300307a5bd68f8a Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com> Reviewed-on: http://review.coreboot.org/104 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r--payloads/libpayload/include/limits.h1
-rw-r--r--payloads/libpayload/include/stdarg.h1
-rw-r--r--payloads/libpayload/include/stdio.h2
3 files changed, 4 insertions, 0 deletions
diff --git a/payloads/libpayload/include/limits.h b/payloads/libpayload/include/limits.h
index be7dde07fa..2fecf239b0 100644
--- a/payloads/libpayload/include/limits.h
+++ b/payloads/libpayload/include/limits.h
@@ -41,5 +41,6 @@
#endif
#define UINT_MAX (unsigned int)0xffffffff
+#define INT_MAX (unsigned int)0x7fffffff
#endif
diff --git a/payloads/libpayload/include/stdarg.h b/payloads/libpayload/include/stdarg.h
index 7a6244e9ec..077645f227 100644
--- a/payloads/libpayload/include/stdarg.h
+++ b/payloads/libpayload/include/stdarg.h
@@ -30,6 +30,7 @@
#ifndef _LIBPAYLOAD_STDARG_H
#define _LIBPAYLOAD_STDARG_H
+#include <stddef.h>
#include_next <stdarg.h>
/**
diff --git a/payloads/libpayload/include/stdio.h b/payloads/libpayload/include/stdio.h
index d39e9f8545..924d17e849 100644
--- a/payloads/libpayload/include/stdio.h
+++ b/payloads/libpayload/include/stdio.h
@@ -32,6 +32,8 @@
#include <stddef.h>
+#define EOF (-1)
+
typedef struct _FILE FILE;
extern FILE *stdout, *stdin, *stderr;