PKUOS - Pintos
Pintos source browser for PKU Operating System course
limits.h
Go to the documentation of this file.
1#ifndef __LIB_LIMITS_H
2#define __LIB_LIMITS_H
3
4#define CHAR_BIT 8
5
6#define SCHAR_MAX 127
7#define SCHAR_MIN (-SCHAR_MAX - 1)
8#define UCHAR_MAX 255
9
10#ifdef __CHAR_UNSIGNED__
11#define CHAR_MIN 0
12#define CHAR_MAX UCHAR_MAX
13#else
14#define CHAR_MIN SCHAR_MIN
15#define CHAR_MAX SCHAR_MAX
16#endif
17
18#define SHRT_MAX 32767
19#define SHRT_MIN (-SHRT_MAX - 1)
20#define USHRT_MAX 65535
21
22#define INT_MAX 2147483647
23#define INT_MIN (-INT_MAX - 1)
24#define UINT_MAX 4294967295U
25
26#define LONG_MAX 2147483647L
27#define LONG_MIN (-LONG_MAX - 1)
28#define ULONG_MAX 4294967295UL
29
30#define LLONG_MAX 9223372036854775807LL
31#define LLONG_MIN (-LLONG_MAX - 1)
32#define ULLONG_MAX 18446744073709551615ULL
33
34#endif /**< lib/limits.h */