Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4680 | right-hear | 1 | /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ |
2 | /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ |
||
3 | #ifndef __dj_include_limits_h_ |
||
4 | #define __dj_include_limits_h_ |
||
5 | |||
6 | #ifdef __cplusplus |
||
7 | extern "C" { |
||
8 | #endif |
||
9 | |||
10 | #define CHAR_BIT 8 |
||
11 | #define CHAR_MAX 127 |
||
12 | #define CHAR_MIN (-128) |
||
13 | #define INT_MAX 2147483647 |
||
14 | #define INT_MIN (-2147483647-1) |
||
15 | #define LONG_MAX 2147483647L |
||
16 | #define LONG_MIN (-2147483647L-1L) |
||
17 | #define MB_LEN_MAX 5 |
||
18 | #define SCHAR_MAX 127 |
||
19 | #define SCHAR_MIN (-128) |
||
20 | #define SHRT_MAX 32767 |
||
21 | #define SHRT_MIN (-32768) |
||
22 | #define UCHAR_MAX 255 |
||
23 | #define UINT_MAX 4294967295U |
||
24 | #define ULONG_MAX 4294967295UL |
||
25 | #define USHRT_MAX 65535 |
||
26 | #define WCHAR_MIN 0 |
||
27 | #define WCHAR_MAX 127 |
||
28 | //#define WINT_MIN 0 |
||
29 | //#define WINT_MAX 32767 |
||
30 | |||
31 | #ifndef __dj_ENFORCE_ANSI_FREESTANDING |
||
32 | |||
33 | #ifndef __STRICT_ANSI__ |
||
34 | |||
35 | #define _POSIX_ARG_MAX 16384 /* but only for exec's to other djgpp programs */ |
||
36 | #define _POSIX_CHILD_MAX 7 /* limited by memory; 7 for 386MAX */ |
||
37 | #define _POSIX_LINK_MAX 1 /* POSIX says 8, but DOS says 1 */ |
||
38 | #define _POSIX_MAX_CANON 126 /* POSIX says 255, but DOS says 126 */ |
||
39 | #define _POSIX_MAX_INPUT 126 /* POSIX says 255, but DOS says 126 */ |
||
40 | #define _POSIX_NAME_MAX 12 /* 8.3 */ |
||
41 | #define _POSIX_NGROUPS_MAX 0 |
||
42 | #define _POSIX_OPEN_MAX 20 /* can be bigger in DOS, but defaults to 20 */ |
||
43 | #define _POSIX_PATH_MAX 256 /* 80 for canonical paths */ |
||
44 | #define _POSIX_PIPE_BUF 512 /* but there aren't any pipes */ |
||
45 | #define _POSIX_SSIZE_MAX 2147483647 |
||
46 | #define _POSIX_STREAM_MAX 20 /* can be bigger in DOS */ |
||
47 | #define _POSIX_TZNAME_MAX 5 |
||
48 | |||
49 | #define NGROUPS_MAX 0 |
||
50 | |||
51 | #define ARG_MAX 4096 |
||
52 | #define CHILD_MAX 6 |
||
53 | /* #define OPEN_MAX 20 - DOS can change this */ |
||
54 | /* #define STREAM_MAX 20 - DOS can change this */ |
||
55 | #define TZNAME_MAX 3 |
||
56 | |||
57 | #define LINK_MAX 1 |
||
58 | #define MAX_CANON 126 |
||
59 | #define MAX_INPUT 126 |
||
60 | #define NAME_MAX 12 /* 8.3 */ |
||
61 | #define PATH_MAX 512 /* for future expansion */ |
||
62 | #define PIPE_BUF 512 /* but there aren't any pipes */ |
||
63 | |||
64 | #define SSIZE_MAX 2147483647 |
||
65 | |||
66 | #ifndef _POSIX_SOURCE |
||
67 | |||
68 | /* constants used in Solaris */ |
||
69 | #define LLONG_MIN (-9223372036854775807LL-1LL) |
||
70 | #define LLONG_MAX 9223372036854775807LL |
||
71 | #define ULLONG_MAX 18446744073709551615ULL |
||
72 | /* gnuc ones */ |
||
73 | #define LONG_LONG_MIN LLONG_MIN |
||
74 | #define LONG_LONG_MAX LLONG_MAX |
||
75 | #define ULONG_LONG_MAX ULLONG_MAX |
||
76 | |||
77 | #endif /* !_POSIX_SOURCE */ |
||
78 | #endif /* !__STRICT_ANSI__ */ |
||
79 | #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ |
||
80 | |||
81 | #ifndef __dj_ENFORCE_FUNCTION_CALLS |
||
82 | #endif /* !__dj_ENFORCE_FUNCTION_CALLS */ |
||
83 | |||
84 | #ifdef __cplusplus |
||
85 | } |
||
86 | #endif |
||
87 | |||
88 | #endif /* !__dj_include_limits_h_ */ |