summaryrefslogtreecommitdiffstats
path: root/usr/include/limits.h
blob: 464420a5518c394613f77a86c1f276eeff9fd831 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * limits.h
 */

#ifndef _LIMITS_H
#define _LIMITS_H

/* No multibyte characters seen */
#define MB_LEN_MAX 1

#define OPEN_MAX        256

#define CHAR_BIT	8
#define SHRT_BIT	16
#define INT_BIT		32
#define LONGLONG_BIT	64

#define SCHAR_MIN	(-128)
#define SCHAR_MAX	127
#define UCHAR_MAX	255

#ifdef __CHAR_UNSIGNED__
# define CHAR_MIN 0
# define CHAR_MAX UCHAR_MAX
#else
# define CHAR_MIN SCHAR_MIN
# define CHAR_MAX SCHAR_MAX
#endif

#define SHRT_MIN	(-32768)
#define SHRT_MAX	32767
#define USHRT_MAX	65535

#define INT_MIN		(-2147483647-1)
#define INT_MAX		2147483647
#define UINT_MAX	4294967295U

#define LLONG_MIN	(-9223372036854775807LL-1)
#define LLONG_MAX	9223372036854775807LL
#define ULLONG_MAX	18446744073709551615ULL

#include <bitsize/limits.h>
#include <linux/limits.h>

#define SSIZE_MAX	LONG_MAX

#endif				/* _LIMITS_H */