-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlimits.d
181 lines (174 loc) · 3.14 KB
/
limits.d
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
/**
* D header file for C99.
*
* $(C_HEADER_DESCRIPTION pubs.opengroup.org/onlinepubs/009695399/basedefs/_limits.h.html, _limits.h)
*
* Copyright: Copyright Sean Kelly 2005 - 2009.
* License: Distributed under the
* $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
* (See accompanying file LICENSE)
* Authors: Sean Kelly
* Source: $(DRUNTIMESRC core/stdc/_limits.d)
* Standards: ISO/IEC 9899:1999 (E)
*/
version (OSX)
version = Darwin;
else version (iOS)
version = Darwin;
else version (TVOS)
version = Darwin;
else version (WatchOS)
version = Darwin;
private import config;
extern (C):
@trusted: // Constants only.
nothrow:
@nogc:
//
// Numerical limits
//
///
enum CHAR_BIT = 8;
///
enum SCHAR_MIN = byte.min;
///
enum SCHAR_MAX = byte.max;
///
enum UCHAR_MAX = ubyte.max;
///
enum CHAR_MIN = char.min;
///
enum CHAR_MAX = char.max;
///
enum MB_LEN_MAX = 2;
///
enum SHRT_MIN = short.min;
///
enum SHRT_MAX = short.max;
///
enum USHRT_MAX = ushort.max;
///
enum INT_MIN = int.min;
///
enum INT_MAX = int.max;
///
enum UINT_MAX = uint.max;
///
enum LONG_MIN = c_long.min;
///
enum LONG_MAX = c_long.max;
///
enum ULONG_MAX = c_ulong.max;
///
enum LLONG_MIN = long.min;
///
enum LLONG_MAX = long.max;
///
enum ULLONG_MAX = ulong.max;
//
// File system limits
//
version (Darwin)
{
///
enum MAX_CANON = 1024;
///
enum MAX_INPUT = 1024;
///
enum NAME_MAX = 255;
///
enum PATH_MAX = 1024;
///
enum PIPE_BUF = 512;
}
version (DragonFlyBSD)
{
///
enum MAX_CANON = 255;
///
enum MAX_INPUT = 255;
///
enum NAME_MAX = 255;
///
enum PATH_MAX = 1024;
///
enum PIPE_BUF = 512;
}
else version (FreeBSD)
{
///
enum MAX_CANON = 255;
///
enum MAX_INPUT = 255;
///
enum NAME_MAX = 255;
///
enum PATH_MAX = 1024;
///
enum PIPE_BUF = 512;
}
else version (linux)
{
///
enum MAX_CANON = 255;
///
enum MAX_INPUT = 255;
///
enum NAME_MAX = 255;
///
enum PATH_MAX = 4096;
///
enum PIPE_BUF = 4096;
}
else version (NetBSD)
{
///
enum MAX_CANON = 255;
///
enum MAX_INPUT = 255;
///
enum NAME_MAX = 511;
///
enum PATH_MAX = 1024;
///
enum PIPE_BUF = 512;
}
else version (OpenBSD)
{
///
enum MAX_CANON = 255;
///
enum MAX_INPUT = 255;
///
enum NAME_MAX = 255;
///
enum PATH_MAX = 1024;
///
enum PIPE_BUF = 512;
}
else version (Solaris)
{
///
enum MAX_CANON = 256;
///
enum MAX_INPUT = 512;
///
enum NAME_MAX = 255;
///
enum PATH_MAX = 1024;
///
enum PIPE_BUF = 5120;
}
else version (Windows)
{
///
enum MAX_CANON = 256;
///
enum MAX_INPUT = 256;
///
enum NAME_MAX = 256;
///
enum PATH_MAX = 260;
///
enum PIPE_BUF = 5120;
}