summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@gmx.at>2013-06-25 18:48:31 +0200
committerAnton Kochkov <anton.kochkov@gmail.com>2013-06-27 14:48:08 +0200
commitcb47d89bbba78e370a420d4f15b631c9ce7532c8 (patch)
treef5f73ae1b70402c9c46af9b1c4ae12ab0cc8ec12 /payloads/libpayload
parent3509ad366dceb346025d6882a59a7b6a4a357ee9 (diff)
downloadcoreboot-cb47d89bbba78e370a420d4f15b631c9ce7532c8.tar.xz
libpayload: Add more integer limits
Change-Id: If0963237806804a2a9d7f622c33013321379a04d Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at> Reviewed-on: http://review.coreboot.org/3536 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Nico Huber <nico.huber@secunet.com> Reviewed-by: Anton Kochkov <anton.kochkov@gmail.com>
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/include/stdint.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/payloads/libpayload/include/stdint.h b/payloads/libpayload/include/stdint.h
index 966a1ed996..dbdcbb89d7 100644
--- a/payloads/libpayload/include/stdint.h
+++ b/payloads/libpayload/include/stdint.h
@@ -38,7 +38,20 @@ typedef unsigned long long uintmax_t;
typedef unsigned long uintptr_t;
typedef long intptr_t;
-#define UINT32_MAX (4294967295U)
-#define UINT64_MAX (18446744073709551615ULL)
+
+#define INT8_MAX (127)
+#define INT16_MAX (32767)
+#define INT32_MAX (2147483647)
+#define INT64_MAX (9223372036854775807LL)
+
+#define INT8_MIN (-INT8_MAX - 1)
+#define INT16_MIN (-INT16_MIN - 1)
+#define INT32_MIN (-INT32_MIN - 1)
+#define INT64_MIN (-INT64_MIN - 1)
+
+#define UINT8_MAX (255)
+#define UINT16_MAX (65535)
+#define UINT32_MAX (4294967295U)
+#define UINT64_MAX (18446744073709551615ULL)
#endif