ia64/xen-unstable

changeset 17980:d37afe995ad3

stubdom: gcc-4.3 support

It seems we need to provide limits.h in the gcc-4.3 case.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jul 04 18:00:04 2008 +0100 (2008-07-04)
parents 10d5ec48f84c
children 8a04b4b24d27
files extras/mini-os/include/posix/limits.h
line diff
     1.1 --- a/extras/mini-os/include/posix/limits.h	Fri Jul 04 17:58:40 2008 +0100
     1.2 +++ b/extras/mini-os/include/posix/limits.h	Fri Jul 04 18:00:04 2008 +0100
     1.3 @@ -1,9 +1,45 @@
     1.4  #ifndef _POSIX_LIMITS_H
     1.5  #define _POSIX_LIMITS_H
     1.6  
     1.7 -#include_next <limits.h>
     1.8  #include <arch_limits.h>
     1.9  
    1.10 +#define CHAR_BIT        8
    1.11 +
    1.12 +#define SCHAR_MAX       0x7f
    1.13 +#define SCHAR_MIN       (-SCHAR_MAX-1)
    1.14 +#define UCHAR_MAX       0xff
    1.15 +
    1.16 +#ifdef __CHAR_UNSIGNED__
    1.17 +# define CHAR_MIN       0
    1.18 +# define CHAR_MAX       UCHAR_MAX
    1.19 +#else
    1.20 +# define CHAR_MIN       SCHAR_MIN
    1.21 +# define CHAR_MAX       SCHAR_MAX
    1.22 +#endif
    1.23 +
    1.24 +#define INT_MAX         0x7fffffff
    1.25 +#define INT_MIN         (-INT_MAX-1)
    1.26 +#define UINT_MAX        0xffffffff
    1.27 +
    1.28 +#define SHRT_MAX        0x7fff
    1.29 +
    1.30 +#if defined(__x86_64__) || defined(__ia64__)
    1.31 +# define LONG_MAX       0x7fffffffffffffffL
    1.32 +# define ULONG_MAX      0xffffffffffffffffUL
    1.33 +#else
    1.34 +# define LONG_MAX       0x7fffffffL
    1.35 +# define ULONG_MAX      0xffffffffUL
    1.36 +#endif
    1.37 +#define LONG_MIN        (-LONG_MAX-1L)
    1.38 +
    1.39 +#define LLONG_MAX       0x7fffffffffffffffLL
    1.40 +#define LLONG_MIN       (-LLONG_MAX-1LL)
    1.41 +#define ULLONG_MAX      0xffffffffffffffffULL
    1.42 +
    1.43 +#define LONG_LONG_MIN   LLONG_MIN
    1.44 +#define LONG_LONG_MAX   LLONG_MAX
    1.45 +#define ULONG_LONG_MAX  ULLONG_MAX
    1.46 +
    1.47  #define PATH_MAX __PAGE_SIZE
    1.48  
    1.49  #endif /* _POSIX_LIMITS_H */