diff options
Diffstat (limited to 'nuttx/arch/8051')
-rw-r--r-- | nuttx/arch/8051/include/limits.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/nuttx/arch/8051/include/limits.h b/nuttx/arch/8051/include/limits.h index f3021f6cc..fd8c086aa 100644 --- a/nuttx/arch/8051/include/limits.h +++ b/nuttx/arch/8051/include/limits.h @@ -45,7 +45,7 @@ ************************************************************/ #define CHAR_BIT 8 -#define SCHAR_MIN (-128) +#define SCHAR_MIN (-SCHAR_MAX - 1) #define SCHAR_MAX 127 #define UCHAR_MAX 255 @@ -59,17 +59,17 @@ #define CHAR_MAX SCHAR_MAX #endif -#define SHRT_MIN (-32768) +#define SHRT_MIN (-SHRT_MAX - 1) #define SHRT_MAX 32767 -#define USHRT_MAX 65535 +#define USHRT_MAX 65535U -#define INT_MIN (-32768) +#define INT_MIN (-INT_MAX - 1) #define INT_MAX 32767 -#define UINT_MAX 65535 +#define UINT_MAX 65535U /* These change on 32-bit and 64-bit platforms */ -#define LONG_MIN (-2147483648L) +#define LONG_MIN (-LONG_MAX - 1) #define LONG_MAX 2147483647L #define ULONG_MAX 4294967295UL @@ -77,8 +77,8 @@ * first byte holding data space information. */ -#define PTR_MIN (-8388608) +#define PTR_MIN (-PTR_MAX - 1) #define PTR_MAX 8388607 -#define UPTR_MAX 16777215 +#define UPTR_MAX 16777215U #endif /* __ARCH_8051_INCLUDE_LIMITS_H */ |