From 8959f1e0b3db4efb6deaec0b21231219faee7f1b Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sat, 25 Jul 2020 20:47:50 +0100 Subject: [PATCH] limits.h fixes --- photon/libc/include/limits.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/photon/libc/include/limits.h b/photon/libc/include/limits.h index 1defa10..6e98aa7 100644 --- a/photon/libc/include/limits.h +++ b/photon/libc/include/limits.h @@ -14,11 +14,20 @@ #define INT_MIN -2147483648 #define INT_MAX 2147483648 #define UINT_MAX 4294967295 -#define LONG_MIN -2147483648 -#define LONG_MAX 2147483648 +#define LONG_MIN -2147483647 +#define LONG_MAX 2147483647 #define ULONG_MAX 4294967295 -#define _I64_MIN -9223372036854775808 -#define _I64_MAX 9223372036854775808 -#define _UI64_MAX 18446744073709551615 +#define LLONG_MIN -9223372036854775807 +#define LLONG_MAX 9223372036854775807 +#define ULLONG_MAX 18446744073709551615 +#define INT8_MIN SCHAR_MIN +#define INT8_MAX SCHAR_MAX +#define INT16_MIN SHRT_MIN +#define INT16_MAX SHRT_MAX +#define INT32_MIN INT_MIN +#define INT32_MAX INT_MAX +#define INT64_MIN LLONG_MIN +#define INT64_MAX LLONG_MAX +#define UINT64_MAX ULLONG_MAX #endif /* LIMITS_H_ */