LibC: Define correct limits for long on x86_64

This commit is contained in:
Tim Schumacher 2022-04-09 04:48:11 +02:00 committed by Ali Mohammad Pur
parent d6ccee4089
commit 3651da6a96
Notes: sideshowbarker 2024-07-17 11:49:25 +09:00

View file

@ -41,10 +41,18 @@
#define USHRT_MAX 65535 #define USHRT_MAX 65535
#define LONG_MAX 2147483647L #ifdef __x86_64__
# define LONG_MAX 9223372036854775807L
#else
# define LONG_MAX 2147483647L
#endif
#define LONG_MIN (-LONG_MAX - 1L) #define LONG_MIN (-LONG_MAX - 1L)
#define ULONG_MAX 4294967295UL #ifdef __x86_64__
# define ULONG_MAX 18446744073709551615UL
#else
# define ULONG_MAX 4294967295UL
#endif
#define LONG_LONG_MAX 9223372036854775807LL #define LONG_LONG_MAX 9223372036854775807LL
#define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL) #define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL)