software/libbase: improve limits.h
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Fri, 25 May 2012 20:29:37 +0000 (22:29 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Fri, 25 May 2012 20:29:37 +0000 (22:29 +0200)
software/include/base/limits.h

index 3f40c3c34420a396ed31d63035b136c08ed49362..58196178c0d0ed37dd1831c941323a31dde53cce 100644 (file)
@@ -1,7 +1,12 @@
 #ifndef __LIMITS_H
 #define __LIMITS_H
 
-#define INT_MIN ((((unsigned long)-1) >> 1) + 1)
-#define INT_MAX (((unsigned long)-1) >> 1)
+#define INT_MIN 0x7fffffff
+#define INT_MAX 0x80000000
+
+#define SHRT_MIN 0x8000
+#define SHRT_MAX 0x7fff
+
+#define UCHAR_MAX 0xff
 
 #endif /* __LIMITS_H */