summaryrefslogtreecommitdiff
path: root/nuttx/arch/x86/include/i486/limits.h
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/x86/include/i486/limits.h')
-rwxr-xr-xnuttx/arch/x86/include/i486/limits.h41
1 files changed, 23 insertions, 18 deletions
diff --git a/nuttx/arch/x86/include/i486/limits.h b/nuttx/arch/x86/include/i486/limits.h
index ac0755ef9..ae8a779d4 100755
--- a/nuttx/arch/x86/include/i486/limits.h
+++ b/nuttx/arch/x86/include/i486/limits.h
@@ -45,37 +45,42 @@
****************************************************************************/
#define CHAR_BIT 8
-#define SCHAR_MIN 0x80
-#define SCHAR_MAX 0x7f
-#define UCHAR_MAX 0xff
+#define SCHAR_MIN (-128)
+#define SCHAR_MAX 127
+#define UCHAR_MAX 255
/* These could be different on machines where char is unsigned */
+#ifdef __CHAR_UNSIGNED__
+#define CHAR_MIN 0
+#define CHAR_MAX UCHAR_MAX
+#else
#define CHAR_MIN SCHAR_MIN
#define CHAR_MAX SCHAR_MAX
+#endif
-#define SHRT_MIN 0x8000
-#define SHRT_MAX 0x7fff
-#define USHRT_MAX 0xffff
+#define SHRT_MIN (-32768)
+#define SHRT_MAX 32767
+#define USHRT_MAX 65535
-#define INT_MIN 0x80000000
-#define INT_MAX 0x7fffffff
-#define UINT_MAX 0xffffffff
+#define INT_MIN (-2147483648)
+#define INT_MAX 2147483647
+#define UINT_MAX 4294967295
/* These change on 32-bit and 64-bit platforms */
-#define LONG_MAX 0x80000000
-#define LONG_MIN 0x7fffffff
-#define ULONG_MAX 0xffffffff
+#define LONG_MIN (-2147483648L)
+#define LONG_MAX 2147483647L
+#define ULONG_MAX 4294967295UL
-#define LLONG_MAX 0x8000000000000000
-#define LLONG_MIN 0x7fffffffffffffff
-#define ULLONG_MAX 0xffffffffffffffff
+#define LLONG_MIN (-9223372036854775808LL)
+#define LLONG_MAX 9223372036854775807LL
+#define ULLONG_MAX 18446744073709551615ULL
/* A pointer is 4 bytes */
-#define PTR_MIN 0x80000000
-#define PTR_MAX 0x7fffffff
-#define UPTR_MAX 0xffffffff
+#define PTR_MIN (-2147483648)
+#define PTR_MAX 2147483647
+#define UPTR_MAX 4294967295
#endif /* __ARCH_X86_INCLUDE_I486_LIMITS_H */