From fdc7da582624011e373f37156462c021270db46d Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 25 May 2012 22:29:37 +0200 Subject: [PATCH] software/libbase: improve limits.h --- software/include/base/limits.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/software/include/base/limits.h b/software/include/base/limits.h index 3f40c3c3..58196178 100644 --- a/software/include/base/limits.h +++ b/software/include/base/limits.h @@ -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 */ -- 2.30.2