Use limits.h in Mini-OS for UINT_MAX, INT_MAX, and CHAR_BITS.
PATCH 1/1 Use limits.h in Mini-OS for UINT_MAX, INT_MAX, and CHAR_BITS.
In Mini-OS, including the ANSI Standard header file limits.h causes warnings about redefinitions of UINT_MAX, INT_MAX, and CHAR_BITS. This patch eliminates the warnings by obtaining the definitions from limits.h.
John
Use limits.h in Mini-OS for UINT_MAX, INT_MAX, and CHAR_BITS.
Signed-off-by "John D. Ramsdell" <[email protected]>
extras/mini-os/include/types.h +1 -2
@@ -67,6 +67,5 @@typedef s64 int64_t ; -#define INT_MAX ((int)(~0U>>1)) -#define UINT_MAX (~0U) +#include <limits.h> #endif /* _TYPES_H_ */
extras/mini-os/lib/math.c +0 -1
@@ -81,7 +81,6 @@* These are used for shifting, and also below for halfword extraction * and assembly. */ -#define CHAR_BIT 8/* number of bits in a char */ #define QUAD_BITS (sizeof(s64) * CHAR_BIT)#define LONG_BITS (sizeof(long) * CHAR_BIT)#define HALF_BITS (sizeof(long) * CHAR_BIT / 2)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel