ia64/xen-unstable

view extras/mini-os/include/posix/limits.h @ 19843:d5c97cd22d6f

minios: add few missing constants in limits.h

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 25 14:30:00 2009 +0100 (2009-06-25)
parents 707e10c9a487
children
line source
1 #ifndef _POSIX_LIMITS_H
2 #define _POSIX_LIMITS_H
4 #include <mini-os/arch_limits.h>
6 #define CHAR_BIT 8
8 #define SCHAR_MAX 0x7f
9 #define SCHAR_MIN (-SCHAR_MAX-1)
10 #define UCHAR_MAX 0xff
12 #ifdef __CHAR_UNSIGNED__
13 # define CHAR_MIN 0
14 # define CHAR_MAX UCHAR_MAX
15 #else
16 # define CHAR_MIN SCHAR_MIN
17 # define CHAR_MAX SCHAR_MAX
18 #endif
20 #define INT_MAX 0x7fffffff
21 #define INT_MIN (-INT_MAX-1)
22 #define UINT_MAX 0xffffffff
24 #define SHRT_MIN (-0x8000)
25 #define SHRT_MAX 0x7fff
26 #define USHRT_MAX 0xffff
28 #if defined(__x86_64__) || defined(__ia64__)
29 # define LONG_MAX 0x7fffffffffffffffL
30 # define ULONG_MAX 0xffffffffffffffffUL
31 #else
32 # define LONG_MAX 0x7fffffffL
33 # define ULONG_MAX 0xffffffffUL
34 #endif
35 #define LONG_MIN (-LONG_MAX-1L)
37 #define LLONG_MAX 0x7fffffffffffffffLL
38 #define LLONG_MIN (-LLONG_MAX-1LL)
39 #define ULLONG_MAX 0xffffffffffffffffULL
41 #define LONG_LONG_MIN LLONG_MIN
42 #define LONG_LONG_MAX LLONG_MAX
43 #define ULONG_LONG_MAX ULLONG_MAX
45 #define PATH_MAX __PAGE_SIZE
46 #define PAGE_SIZE __PAGE_SIZE
48 #endif /* _POSIX_LIMITS_H */