diff options
Diffstat (limited to 'nuttx/arch/sh/include/m16c/limits.h')
-rw-r--r-- | nuttx/arch/sh/include/m16c/limits.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/nuttx/arch/sh/include/m16c/limits.h b/nuttx/arch/sh/include/m16c/limits.h index d836522e7..dba3e4fdc 100644 --- a/nuttx/arch/sh/include/m16c/limits.h +++ b/nuttx/arch/sh/include/m16c/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,9 +59,9 @@ #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 /* For M16C, type int is 16-bits, the same size as type 'short int' */ @@ -71,18 +71,18 @@ /* For M16C, typle 'long int' is 32-bits */ -#define LONG_MIN (-2147483648L) +#define LONG_MIN (-LONG_MAX - 1) #define LONG_MAX 2147483647L #define ULONG_MAX 4294967295UL -#define LLONG_MIN (-9223372036854775808LL) +#define LLONG_MIN (-LLONG_MAX - 1) #define LLONG_MAX 9223372036854775807LL #define ULLONG_MAX 18446744073709551615ULL /* A pointer is 2 bytes */ -#define PTR_MIN (-32768) +#define PTR_MIN (-PTR_MAX - 1) #define PTR_MAX 32767 -#define UPTR_MAX 65535 +#define UPTR_MAX 65535U #endif /* __ARCH_SH_INCLUDE_M16C_LIMITS_H */ |