libpayload: Improve compatibility
authorPatrick Georgi <patrick.georgi@secunet.com>
Tue, 12 Jul 2011 13:02:04 +0000 (15:02 +0200)
committerPatrick Georgi <patrick@georgi-clan.de>
Sat, 16 Jul 2011 09:09:28 +0000 (11:09 +0200)
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>
payloads/libpayload/include/limits.h
payloads/libpayload/include/stdarg.h
payloads/libpayload/include/stdio.h

index be7dde07faaa20bc5ccab0c6127783500f32b8be..2fecf239b0d48c5e2056188833b2c38318fbc32d 100644 (file)
@@ -41,5 +41,6 @@
 #endif
 
 #define UINT_MAX (unsigned int)0xffffffff
+#define INT_MAX (unsigned int)0x7fffffff
 
 #endif
index 7a6244e9eca15cc4c0bc1e95f24667ec5284a2c6..077645f22763f2c8004a2a083b0ce82a0601d90f 100644 (file)
@@ -30,6 +30,7 @@
 #ifndef _LIBPAYLOAD_STDARG_H
 #define _LIBPAYLOAD_STDARG_H
 
+#include <stddef.h>
 #include_next <stdarg.h>
 
 /**
index d39e9f85451f038ebe3d12c8c5e5593e677321f3..924d17e8493aa8e81856415fb91aae803e353777 100644 (file)
@@ -32,6 +32,8 @@
 
 #include <stddef.h>
 
+#define EOF (-1)
+
 typedef struct _FILE FILE;
 
 extern FILE *stdout, *stdin, *stderr;