[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 4/6] xen/build: Use the system limits.h header
The C spec identifies limits.h as freestanding, and available for use in non-hosted environments, such as Xen. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- CC: George Dunlap <George.Dunlap@xxxxxxxxxxxxx> CC: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> CC: Jan Beulich <JBeulich@xxxxxxxx> CC: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> CC: Stefano Stabellini <sstabellini@xxxxxxxxxx> CC: Tim Deegan <tim@xxxxxxx> CC: Wei Liu <wei.liu2@xxxxxxxxxx> --- xen/common/lib.c | 1 - xen/include/xen/types.h | 8 +------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/xen/common/lib.c b/xen/common/lib.c index ae0bbb3..b7df417 100644 --- a/xen/common/lib.c +++ b/xen/common/lib.c @@ -102,7 +102,6 @@ union uu { * 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) diff --git a/xen/include/xen/types.h b/xen/include/xen/types.h index 1ff534d..a222c6e 100644 --- a/xen/include/xen/types.h +++ b/xen/include/xen/types.h @@ -2,6 +2,7 @@ #define __TYPES_H__ /* Use the C freestanding headers. */ +#include <limits.h> #include <stdarg.h> #include <stdint.h> @@ -16,13 +17,6 @@ #define NULL ((void*)0) #endif -#define INT_MAX ((int)(~0U>>1)) -#define INT_MIN (-INT_MAX - 1) -#define UINT_MAX (~0U) -#define LONG_MAX ((long)(~0UL>>1)) -#define LONG_MIN (-LONG_MAX - 1) -#define ULONG_MAX (~0UL) - /* bsd */ typedef unsigned char u_char; typedef unsigned short u_short; -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |