Subversion Repositories tendra.SVN

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 89
Line 2... Line 2...
2
#define __HACKED_LIMITS_INCLUDED
2
#define __HACKED_LIMITS_INCLUDED
3
 
3
 
4
#include_next <limits.h>
4
/*#include_next <limits.h>*/
-
 
5
 
-
 
6
#define	_POSIX_ARG_MAX		4096
-
 
7
#define	_POSIX_LINK_MAX		8
-
 
8
#define	_POSIX_MAX_CANON	255
-
 
9
#define	_POSIX_MAX_INPUT	255
-
 
10
#define	_POSIX_NAME_MAX		14
-
 
11
#define	_POSIX_PIPE_BUF		512
-
 
12
#define	_POSIX_SSIZE_MAX	32767
-
 
13
#define	_POSIX_STREAM_MAX	8
-
 
14
#define	_POSIX_TZNAME_MAX	3
-
 
15
 
-
 
16
 
-
 
17
/*
-
 
18
 * According to ANSI (section 2.2.4.2), the values below must be usable by
-
 
19
 * #if preprocessing directives.  Additionally, the expression must have the
-
 
20
 * same type as would an expression that is an object of the corresponding
-
 
21
 * type converted according to the integral promotions.  The subtraction for
-
 
22
 * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
-
 
23
 * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
-
 
24
 */
-
 
25
 
-
 
26
 
-
 
27
 
-
 
28
 
-
 
29
#define	__USHRT_MAX	0xffff		/* max value for an unsigned short */
-
 
30
#define	__SHRT_MAX	0x7fff		/* max value for a short */
-
 
31
#define	__SHRT_MIN	(-0x7fff - 1)	/* min value for a short */
-
 
32
 
-
 
33
#define	__UINT_MAX	0xffffffff	/* max value for an unsigned int */
-
 
34
#define	__INT_MAX	0x7fffffff	/* max value for an int */
-
 
35
#define	__INT_MIN	(-0x7fffffff - 1)	/* min value for an int */
-
 
36
 
-
 
37
#ifdef	__LP64__
-
 
38
#define	__ULONG_MAX	0xffffffffffffffff	/* max for an unsigned long */
-
 
39
#define	__LONG_MAX	0x7fffffffffffffff	/* max for a long */
-
 
40
#define	__LONG_MIN	(-0x7fffffffffffffff - 1) /* min for a long */
-
 
41
#else
-
 
42
#define	__ULONG_MAX	0xffffffffUL
-
 
43
#define	__LONG_MAX	0x7fffffffL
-
 
44
#define	__LONG_MIN	(-0x7fffffffL - 1)
-
 
45
#endif
-
 
46
 
-
 
47
			/* max value for an unsigned long long */
-
 
48
#define	__ULLONG_MAX	0xffffffffffffffffULL
-
 
49
#define	__LLONG_MAX	0x7fffffffffffffffLL	/* max value for a long long */
-
 
50
#define	__LLONG_MIN	(-0x7fffffffffffffffLL - 1)  /* min for a long long */
-
 
51
 
-
 
52
#ifdef	__LP64__
-
 
53
#define	__SSIZE_MAX	__LONG_MAX	/* max value for a ssize_t */
-
 
54
#define	__SIZE_T_MAX	__ULONG_MAX	/* max value for a size_t */
-
 
55
#define	__OFF_MAX	__LONG_MAX	/* max value for an off_t */
-
 
56
#define	__OFF_MIN	__LONG_MIN	/* min value for an off_t */
-
 
57
/* Quads and longs are the same on the amd64.  Ensure they stay in sync. */
-
 
58
#define	__UQUAD_MAX	__ULONG_MAX	/* max value for a uquad_t */
-
 
59
#define	__QUAD_MAX	__LONG_MAX	/* max value for a quad_t */
-
 
60
#define	__QUAD_MIN	__LONG_MIN	/* min value for a quad_t */
-
 
61
#define	__LONG_BIT	64
-
 
62
#else
-
 
63
#define	__SSIZE_MAX	__INT_MAX
-
 
64
#define	__SIZE_T_MAX	__UINT_MAX
-
 
65
#define	__OFF_MAX	__LLONG_MAX
-
 
66
#define	__OFF_MIN	__LLONG_MIN
-
 
67
#define	__UQUAD_MAX	__ULLONG_MAX
-
 
68
#define	__QUAD_MAX	__LLONG_MAX
-
 
69
#define	__QUAD_MIN	__LLONG_MIN
-
 
70
#define	__LONG_BIT	32
-
 
71
#endif
-
 
72
 
-
 
73
#define	__WORD_BIT	32
-
 
74
#define	SSIZE_MAX	__SSIZE_MAX	/* max value for an ssize_t */
-
 
75
 
-
 
76
/* Minimum signal stack size. */
-
 
77
#define	__MINSIGSTKSZ	(512 * 4)
-
 
78
 
-
 
79
 
5
 
80
 
6
#ifndef NL_ARGMAX
81
#ifndef NL_ARGMAX
7
#define NL_ARGMAX	99
82
#define NL_ARGMAX	99
8
#endif
83
#endif
9
 
84
 
Line 27... Line 102...
27
#define NL_TEXTMAX	2048
102
#define NL_TEXTMAX	2048
28
#endif
103
#endif
29
 
104
 
30
#ifndef NZERO
105
#ifndef NZERO
31
#define NZERO		0
106
#define NZERO		0
32
#endif
107
#endif
33
 
108
 
34
#ifndef WORD_BIT
109
#ifndef WORD_BIT
35
#define WORD_BIT	32
110
#define WORD_BIT	32
36
#endif
111
#endif
37
 
112
 
38
#ifndef LONG_BIT
113
#ifndef LONG_BIT
39
#define LONG_BIT	32
114
#define LONG_BIT	32
40
#endif
115
#endif
-
 
116
 
-
 
117
#define	CHAR_BIT	8		/* number of bits in a char */
-
 
118
#define	SCHAR_MAX	0x7f		/* max value for a signed char */
-
 
119
#define	SCHAR_MIN	(-0x7f - 1)	/* min value for a signed char */
-
 
120
#define	UCHAR_MAX	0xff		/* max value for an unsigned char */
-
 
121
#define	MB_LEN_MAX	6		/* 31-bit UTF-8 */
-
 
122
 
-
 
123
#ifdef __CHAR_UNSIGNED__
-
 
124
#define	CHAR_MAX	UCHAR_MAX	/* max value for a char */
-
 
125
#define	CHAR_MIN	0		/* min value for a char */
-
 
126
#else
-
 
127
#define	CHAR_MAX	SCHAR_MAX
-
 
128
#define	CHAR_MIN	SCHAR_MIN
-
 
129
#endif
-
 
130
 
-
 
131
#define	USHRT_MAX	__USHRT_MAX	/* max value for an unsigned short */
-
 
132
#define	SHRT_MAX	__SHRT_MAX	/* max value for a short */
-
 
133
#define	SHRT_MIN	__SHRT_MIN	/* min value for a short */
-
 
134
 
-
 
135
#define	UINT_MAX	__UINT_MAX	/* max value for an unsigned int */
-
 
136
#define	INT_MAX		__INT_MAX	/* max value for an int */
-
 
137
#define	INT_MIN		__INT_MIN	/* min value for an int */
-
 
138
 
-
 
139
#define	ULONG_MAX	__ULONG_MAX	/* max for an unsigned long */
-
 
140
#define	LONG_MAX	__LONG_MAX	/* max for a long */
-
 
141
#define	LONG_MIN	__LONG_MIN	/* min for a long */
-
 
142
 
-
 
143
#define	NGROUPS_MAX	 	 1023
-
 
144
 
-
 
145
 
-
 
146
 
-
 
147
 
41
 
148
 
42
#endif
149
#endif