The manual
ginnOS
The reference: libc, the libraries and the kernel
Toggle main menu visibility
Loading...
Searching...
No Matches
limits.h
Go to the documentation of this file.
1
#pragma once
2
3
/**
4
* @file limits.h
5
* @brief sizes of the integer types and system limits.
6
*/
7
8
#define CHAR_BIT 8
9
#define SCHAR_MIN (-128)
10
#define SCHAR_MAX 127
11
#define UCHAR_MAX 255
12
#define CHAR_MIN SCHAR_MIN
13
#define CHAR_MAX SCHAR_MAX
14
#define SHRT_MIN (-32768)
15
#define SHRT_MAX 32767
16
#define USHRT_MAX 65535
17
#define INT_MIN (-2147483647 - 1)
18
#define INT_MAX 2147483647
19
#define UINT_MAX 4294967295u
20
#define LONG_MIN (-__LONG_MAX__ - 1L)
21
#define LONG_MAX __LONG_MAX__
22
#define ULONG_MAX (__LONG_MAX__ * 2UL + 1UL)
23
#define LLONG_MIN (-9223372036854775807LL - 1)
24
#define LLONG_MAX 9223372036854775807LL
25
#define ULLONG_MAX 18446744073709551615uLL
26
27
// longest path, NUL included (the kernel's PATH_MAX)
28
#define PATH_MAX 256
29
30
// largest pipe write that is never split (the kernel's PIPE_BUF)
31
#define PIPE_BUF 4096
32
33
#define MB_LEN_MAX 4
// the longest UTF-8 character
34
35
// regular expressions (regex.h)
36
#define RE_DUP_MAX 255
// the most a {m,n} can repeat
37
#define CHARCLASS_NAME_MAX 14
// the longest name in [[:name:]]
38
39
#define NAME_MAX 255
// the longest name in a folder (ext2)
40
#define HOST_NAME_MAX 64
41
#define NZERO 20
// the nice value a process starts with, from 0 (sys/resource.h)
42
#define SSIZE_MAX __PTRDIFF_MAX__
43
#define ARG_MAX 131072
// bytes of arguments and environment (the kernel's)
44
#define LINE_MAX 2048
45
46
// the least values POSIX allows (programs use them as fallbacks)
47
#define _POSIX_ARG_MAX 4096
48
#define _POSIX_NAME_MAX 14
49
#define _POSIX_PATH_MAX 256
50
#define _POSIX_HOST_NAME_MAX 255
51
#define _POSIX2_LINE_MAX 2048
52
53
// threads (pthread.h)
54
#define PTHREAD_KEYS_MAX 128
55
#define PTHREAD_DESTRUCTOR_ITERATIONS 4
56
#define PTHREAD_STACK_MIN 16384
src
libc
include
limits.h
Generated by
1.18.0