From f1b06bbf99d580e35c6ee89dedc9f24ec66af775 Mon Sep 17 00:00:00 2001 From: turbocat Date: Fri, 23 Jul 2021 20:24:26 +0000 Subject: [PATCH] libc.obj: updated constants git-svn-id: svn://kolibrios.org@9077 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../ktcc/trunk/libc.obj/include/limits.h | 36 ++++++++++++++++--- .../ktcc/trunk/libc.obj/include/stdint.h | 2 ++ 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/programs/develop/ktcc/trunk/libc.obj/include/limits.h b/programs/develop/ktcc/trunk/libc.obj/include/limits.h index 5ebe6fe844..6f0103663f 100644 --- a/programs/develop/ktcc/trunk/libc.obj/include/limits.h +++ b/programs/develop/ktcc/trunk/libc.obj/include/limits.h @@ -1,10 +1,36 @@ #ifndef _LIMITS_H_ #define _LIMITS_H_ + +#define CHAR_BIT 8 +#define CHAR_MAX 127 +#define CHAR_MIN (-128) +#define INT_MAX 2147483647 +#define INT_MIN (-2147483647-1) +#define LONG_MAX 2147483647L +#define LONG_MIN (-2147483647L-1L) +#define MB_LEN_MAX 5 +#define SCHAR_MAX 127 +#define SCHAR_MIN (-128) +#define SHRT_MAX 32767 +#define SHRT_MIN (-32768) +#define UCHAR_MAX 255 +#define UINT_MAX 4294967295U +#define ULONG_MAX 4294967295UL +#define USHRT_MAX 65535 +#define WCHAR_MIN 0 +#define WCHAR_MAX 127 +#define WINT_MIN 0 +#define WINT_MAX 32767 +#define SSIZE_MAX 2147483647 + +#define LLONG_MIN (-9223372036854775807LL-1LL) +#define LLONG_MAX 9223372036854775807LL +#define ULLONG_MAX 18446744073709551615ULL - -#define INT_MAX 2147483647 -#define INT_MIN -2147483648 -#define UINT_MAX (INT_MAX * 2U + 1) +/* gnuc ones */ +#define LONG_LONG_MIN LLONG_MIN +#define LONG_LONG_MAX LLONG_MAX +#define ULONG_LONG_MAX ULLONG_MAX #ifndef ARG_MAX @@ -19,4 +45,4 @@ #define STDIO_MAX_MEM 4096 #endif -#endif /* _LIMITS_H_ */ \ No newline at end of file +#endif /* _LIMITS_H_ */ diff --git a/programs/develop/ktcc/trunk/libc.obj/include/stdint.h b/programs/develop/ktcc/trunk/libc.obj/include/stdint.h index 3c8543035b..457027bf7d 100644 --- a/programs/develop/ktcc/trunk/libc.obj/include/stdint.h +++ b/programs/develop/ktcc/trunk/libc.obj/include/stdint.h @@ -29,4 +29,6 @@ #define UINT64_MAX (__CONCAT(INT64_MAX, U) * 2ULL + 1ULL) #endif +#define SIZE_MAX UINT32_MAX + #endif /* _STDINT_H_*/