1 |
786 |
skrzyp |
#ifndef CYGONCE_ISO_LIMITS_H
|
2 |
|
|
#define CYGONCE_ISO_LIMITS_H
|
3 |
|
|
/*========================================================================
|
4 |
|
|
//
|
5 |
|
|
// limits.h
|
6 |
|
|
//
|
7 |
|
|
// ISO standard limits
|
8 |
|
|
//
|
9 |
|
|
//========================================================================
|
10 |
|
|
// ####ECOSGPLCOPYRIGHTBEGIN####
|
11 |
|
|
// -------------------------------------------
|
12 |
|
|
// This file is part of eCos, the Embedded Configurable Operating System.
|
13 |
|
|
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
14 |
|
|
//
|
15 |
|
|
// eCos is free software; you can redistribute it and/or modify it under
|
16 |
|
|
// the terms of the GNU General Public License as published by the Free
|
17 |
|
|
// Software Foundation; either version 2 or (at your option) any later
|
18 |
|
|
// version.
|
19 |
|
|
//
|
20 |
|
|
// eCos is distributed in the hope that it will be useful, but WITHOUT
|
21 |
|
|
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
22 |
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
23 |
|
|
// for more details.
|
24 |
|
|
//
|
25 |
|
|
// You should have received a copy of the GNU General Public License
|
26 |
|
|
// along with eCos; if not, write to the Free Software Foundation, Inc.,
|
27 |
|
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
28 |
|
|
//
|
29 |
|
|
// As a special exception, if other files instantiate templates or use
|
30 |
|
|
// macros or inline functions from this file, or you compile this file
|
31 |
|
|
// and link it with other works to produce a work based on this file,
|
32 |
|
|
// this file does not by itself cause the resulting work to be covered by
|
33 |
|
|
// the GNU General Public License. However the source code for this file
|
34 |
|
|
// must still be made available in accordance with section (3) of the GNU
|
35 |
|
|
// General Public License v2.
|
36 |
|
|
//
|
37 |
|
|
// This exception does not invalidate any other reasons why a work based
|
38 |
|
|
// on this file might be covered by the GNU General Public License.
|
39 |
|
|
// -------------------------------------------
|
40 |
|
|
// ####ECOSGPLCOPYRIGHTEND####
|
41 |
|
|
//========================================================================
|
42 |
|
|
//#####DESCRIPTIONBEGIN####
|
43 |
|
|
//
|
44 |
|
|
// Author(s): jlarmour
|
45 |
|
|
// Contributors:
|
46 |
|
|
// Date: 2000-04-14
|
47 |
|
|
// Purpose: This file provides the limits properties
|
48 |
|
|
// required by ISO C and POSIX 1003.1
|
49 |
|
|
// Description: The real contents of this file get set from the
|
50 |
|
|
// configuration (set by the implementation), as well as
|
51 |
|
|
// being partially provided by the compiler.
|
52 |
|
|
//
|
53 |
|
|
// Usage: #include <limits.h>
|
54 |
|
|
//
|
55 |
|
|
//####DESCRIPTIONEND####
|
56 |
|
|
//
|
57 |
|
|
//======================================================================
|
58 |
|
|
*/
|
59 |
|
|
|
60 |
|
|
/* CONFIGURATION */
|
61 |
|
|
|
62 |
|
|
#include <pkgconf/isoinfra.h> /* Configuration header */
|
63 |
|
|
|
64 |
|
|
/* DEFINES */
|
65 |
|
|
|
66 |
|
|
/*-----------------------------------------------------------------------------
|
67 |
|
|
* Minimum values from POSIX.1 tables 2-3, 2-7 and 2-7a.
|
68 |
|
|
|
69 |
|
|
* These are the standard-mandated minimum values.
|
70 |
|
|
* These values do not vary with the implementation - they may
|
71 |
|
|
* simply be defined
|
72 |
|
|
*/
|
73 |
|
|
|
74 |
|
|
/* Minimum number of operations in one list I/O call. */
|
75 |
|
|
#define _POSIX_AIO_LISTIO_MAX 2
|
76 |
|
|
|
77 |
|
|
/* Minimal number of outstanding asynchronous I/O operations. */
|
78 |
|
|
#define _POSIX_AIO_MAX 1
|
79 |
|
|
|
80 |
|
|
/* Maximum length of arguments to `execve', including environment. */
|
81 |
|
|
#define _POSIX_ARG_MAX 4096
|
82 |
|
|
|
83 |
|
|
/* Maximum simultaneous processes per real user ID. */
|
84 |
|
|
#define _POSIX_CHILD_MAX 6
|
85 |
|
|
|
86 |
|
|
/* Minimal number of timer expiration overruns. */
|
87 |
|
|
#define _POSIX_DELAYTIMER_MAX 32
|
88 |
|
|
|
89 |
|
|
/* Maximum link count of a file. */
|
90 |
|
|
#define _POSIX_LINK_MAX 8
|
91 |
|
|
|
92 |
|
|
/* Size of storage required for a login name */
|
93 |
|
|
#define _POSIX_LOGIN_NAME_MAX 9
|
94 |
|
|
|
95 |
|
|
/* Number of bytes in a terminal canonical input queue. */
|
96 |
|
|
#define _POSIX_MAX_CANON 255
|
97 |
|
|
|
98 |
|
|
/* Number of bytes for which space will be
|
99 |
|
|
available in a terminal input queue. */
|
100 |
|
|
#define _POSIX_MAX_INPUT 255
|
101 |
|
|
|
102 |
|
|
/* Maximum number of message queues open for a process. */
|
103 |
|
|
#define _POSIX_MQ_OPEN_MAX 8
|
104 |
|
|
|
105 |
|
|
/* Maximum number of supported message priorities. */
|
106 |
|
|
#define _POSIX_MQ_PRIO_MAX 32
|
107 |
|
|
|
108 |
|
|
/* Number of bytes in a filename. */
|
109 |
|
|
#define _POSIX_NAME_MAX 14
|
110 |
|
|
|
111 |
|
|
/* Number of simultaneous supplementary group IDs per process. */
|
112 |
|
|
#define _POSIX_NGROUPS_MAX 0
|
113 |
|
|
|
114 |
|
|
/* Number of files one process can have open at once. */
|
115 |
|
|
#define _POSIX_OPEN_MAX 16
|
116 |
|
|
|
117 |
|
|
/* Number of bytes in a pathname. */
|
118 |
|
|
#define _POSIX_PATH_MAX 255
|
119 |
|
|
|
120 |
|
|
/* Number of bytes than can be written atomically to a pipe. */
|
121 |
|
|
#define _POSIX_PIPE_BUF 512
|
122 |
|
|
|
123 |
|
|
/* Minimal number of realtime signals reserved for the application. */
|
124 |
|
|
#define _POSIX_RTSIG_MAX 8
|
125 |
|
|
|
126 |
|
|
/* Number of semaphores a process can have. */
|
127 |
|
|
#define _POSIX_SEM_NSEMS_MAX 256
|
128 |
|
|
|
129 |
|
|
/* Maximal value of a semaphore. */
|
130 |
|
|
#define _POSIX_SEM_VALUE_MAX 32767
|
131 |
|
|
|
132 |
|
|
/* Number of pending realtime signals. */
|
133 |
|
|
#define _POSIX_SIGQUEUE_MAX 32
|
134 |
|
|
|
135 |
|
|
/* Largest value of a `ssize_t'. */
|
136 |
|
|
#define _POSIX_SSIZE_MAX 32767
|
137 |
|
|
|
138 |
|
|
/* Number of streams a process can have open at once. */
|
139 |
|
|
#define _POSIX_STREAM_MAX 8
|
140 |
|
|
|
141 |
|
|
/* Controlling the iterations of destructors for thread-specific data. */
|
142 |
|
|
#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
|
143 |
|
|
|
144 |
|
|
/* The number of data keys per process. */
|
145 |
|
|
#define _POSIX_THREAD_KEYS_MAX 128
|
146 |
|
|
|
147 |
|
|
/* The number of threads per process. */
|
148 |
|
|
#define _POSIX_THREAD_THREADS_MAX 64
|
149 |
|
|
|
150 |
|
|
/* Maximum number of characters in a tty name. */
|
151 |
|
|
#define _POSIX_TTY_NAME_MAX 9
|
152 |
|
|
|
153 |
|
|
/* Number of timer for a process. */
|
154 |
|
|
#define _POSIX_TIMER_MAX 32
|
155 |
|
|
|
156 |
|
|
/* Maximum length of a timezone name (element of `tzname'). */
|
157 |
|
|
#define _POSIX_TZNAME_MAX 3
|
158 |
|
|
|
159 |
|
|
/* Maximum clock resolution in nanoseconds. */
|
160 |
|
|
#define _POSIX_CLOCKRES_MIN 20000000
|
161 |
|
|
|
162 |
|
|
|
163 |
|
|
#ifdef CYGBLD_ISO_SSIZE_T_HEADER
|
164 |
|
|
# include CYGBLD_ISO_SSIZE_T_HEADER
|
165 |
|
|
#else
|
166 |
|
|
# ifndef __STRICT_ANSI__
|
167 |
|
|
# define SSIZE_MAX LONG_MAX
|
168 |
|
|
# endif
|
169 |
|
|
#endif
|
170 |
|
|
|
171 |
|
|
/* INCLUDES */
|
172 |
|
|
|
173 |
|
|
#ifdef CYGBLD_ISO_OPEN_MAX_HEADER
|
174 |
|
|
# include CYGBLD_ISO_OPEN_MAX_HEADER
|
175 |
|
|
#else
|
176 |
|
|
# ifndef __STRICT_ANSI__
|
177 |
|
|
# define OPEN_MAX _POSIX_OPEN_MAX
|
178 |
|
|
# endif
|
179 |
|
|
#endif
|
180 |
|
|
|
181 |
|
|
#ifdef CYGBLD_ISO_LINK_MAX_HEADER
|
182 |
|
|
# include CYGBLD_ISO_LINK_MAX_HEADER
|
183 |
|
|
#else
|
184 |
|
|
# ifndef __STRICT_ANSI__
|
185 |
|
|
# define LINK_MAX _POSIX_LINK_MAX
|
186 |
|
|
# endif
|
187 |
|
|
#endif
|
188 |
|
|
|
189 |
|
|
#ifdef CYGBLD_ISO_NAME_MAX_HEADER
|
190 |
|
|
# include CYGBLD_ISO_NAME_MAX_HEADER
|
191 |
|
|
#else
|
192 |
|
|
# ifndef __STRICT_ANSI__
|
193 |
|
|
# define NAME_MAX _POSIX_NAME_MAX
|
194 |
|
|
# endif
|
195 |
|
|
#endif
|
196 |
|
|
|
197 |
|
|
#ifdef CYGBLD_ISO_PATH_MAX_HEADER
|
198 |
|
|
# include CYGBLD_ISO_PATH_MAX_HEADER
|
199 |
|
|
#else
|
200 |
|
|
# ifndef __STRICT_ANSI__
|
201 |
|
|
# define PATH_MAX _POSIX_PATH_MAX
|
202 |
|
|
# endif
|
203 |
|
|
#endif
|
204 |
|
|
|
205 |
|
|
#if CYGINT_ISO_POSIX_LIMITS
|
206 |
|
|
# ifdef CYGBLD_ISO_POSIX_LIMITS_HEADER
|
207 |
|
|
# include CYGBLD_ISO_POSIX_LIMITS_HEADER
|
208 |
|
|
# endif
|
209 |
|
|
#endif
|
210 |
|
|
|
211 |
|
|
#endif /* CYGONCE_ISO_LIMITS_H multiple inclusion protection */
|
212 |
|
|
/* Yes it must be ended here! */
|
213 |
|
|
|
214 |
|
|
/* When using a crosscompiler targeting linux, the next limits.h file
|
215 |
|
|
in the include sequence may be the glibc header - which breaks our
|
216 |
|
|
world. So skip it by defining _LIBC_LIMITS_H_ */
|
217 |
|
|
#define _LIBC_LIMITS_H_
|
218 |
|
|
|
219 |
|
|
/* Secondly only include if we haven't already been included by it. */
|
220 |
|
|
#ifndef _GCC_LIMITS_H_
|
221 |
|
|
# include_next <limits.h>
|
222 |
|
|
#endif
|
223 |
|
|
|
224 |
|
|
/* EOF limits.h */
|