limits.h revision 108175
132032Ssteve/*-
21539Srgrimes * Copyright (c) 1988, 1993
31539Srgrimes *	The Regents of the University of California.  All rights reserved.
41539Srgrimes *
51539Srgrimes * Redistribution and use in source and binary forms, with or without
61539Srgrimes * modification, are permitted provided that the following conditions
71539Srgrimes * are met:
81539Srgrimes * 1. Redistributions of source code must retain the above copyright
91539Srgrimes *    notice, this list of conditions and the following disclaimer.
101539Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111539Srgrimes *    notice, this list of conditions and the following disclaimer in the
121539Srgrimes *    documentation and/or other materials provided with the distribution.
131539Srgrimes * 3. All advertising materials mentioning features or use of this software
141539Srgrimes *    must display the following acknowledgement:
151539Srgrimes *	This product includes software developed by the University of
161539Srgrimes *	California, Berkeley and its contributors.
171539Srgrimes * 4. Neither the name of the University nor the names of its contributors
181539Srgrimes *    may be used to endorse or promote products derived from this software
191539Srgrimes *    without specific prior written permission.
201539Srgrimes *
211539Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
221539Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
231539Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
241539Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
251539Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
261539Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
271539Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
281539Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
291539Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
301539Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
311539Srgrimes * SUCH DAMAGE.
321539Srgrimes *
331539Srgrimes *	@(#)limits.h	8.2 (Berkeley) 1/4/94
3450473Speter * $FreeBSD: head/include/limits.h 108175 2002-12-22 06:38:45Z tjr $
351539Srgrimes */
361539Srgrimes
371539Srgrimes#ifndef _LIMITS_H_
381539Srgrimes#define	_LIMITS_H_
39103762Sbde
40103727Swollman#include <sys/cdefs.h>
411539Srgrimes
42103727Swollman#if __POSIX_VISIBLE
431539Srgrimes#define	_POSIX_ARG_MAX		4096
44106055Swollman#define	_POSIX_CHILD_MAX	25
451539Srgrimes#define	_POSIX_LINK_MAX		8
461539Srgrimes#define	_POSIX_MAX_CANON	255
471539Srgrimes#define	_POSIX_MAX_INPUT	255
481539Srgrimes#define	_POSIX_NAME_MAX		14
49106055Swollman#define	_POSIX_NGROUPS_MAX	8
50106055Swollman#define	_POSIX_OPEN_MAX		20
51106055Swollman#define	_POSIX_PATH_MAX		256
521539Srgrimes#define	_POSIX_PIPE_BUF		512
531539Srgrimes#define	_POSIX_SSIZE_MAX	32767
541539Srgrimes#define	_POSIX_STREAM_MAX	8
55106055Swollman#define	_POSIX_TZNAME_MAX	6
561539Srgrimes
57106055Swollman#define	BC_BASE_MAX		   99	/* max ibase/obase values in bc(1) */
58106055Swollman#define	BC_DIM_MAX		 2048	/* max array elements in bc(1) */
59106055Swollman#define	BC_SCALE_MAX		   99	/* max scale value in bc(1) */
60106055Swollman#define	BC_STRING_MAX		 1000	/* max const string length in bc(1) */
61106055Swollman#define	COLL_WEIGHTS_MAX	    0	/* max weights for order keyword */
62106055Swollman#define	EXPR_NEST_MAX		   32	/* max expressions nested in expr(1) */
63106055Swollman#define	LINE_MAX		 2048	/* max bytes in an input line */
64106055Swollman#define	RE_DUP_MAX		  255	/* max RE's in interval notation */
65106055Swollman
661539Srgrimes#define	_POSIX2_BC_BASE_MAX	99
671539Srgrimes#define	_POSIX2_BC_DIM_MAX	2048
681539Srgrimes#define	_POSIX2_BC_SCALE_MAX	99
691539Srgrimes#define	_POSIX2_BC_STRING_MAX	1000
701539Srgrimes#define	_POSIX2_EQUIV_CLASS_MAX	2
711539Srgrimes#define	_POSIX2_EXPR_NEST_MAX	32
721539Srgrimes#define	_POSIX2_LINE_MAX	2048
731539Srgrimes#define	_POSIX2_RE_DUP_MAX	255
74103727Swollman#endif
7534030Sdufault
76103727Swollman#if __POSIX_VISIBLE >= 199309
77103762Sbde#define	_POSIX_AIO_LISTIO_MAX	16
78103762Sbde#define	_POSIX_AIO_MAX		1
79103762Sbde#define	_POSIX_DELAYTIMER_MAX	32
80103762Sbde#define	_POSIX_MQ_OPEN_MAX	8
81103762Sbde#define	_POSIX_MQ_PRIO_MAX	32
82106055Swollman#define	_POSIX_RTSIG_MAX	8
83103762Sbde#define	_POSIX_SEM_NSEMS_MAX	256
84103762Sbde#define	_POSIX_SEM_VALUE_MAX	32767
85103762Sbde#define	_POSIX_SIGQUEUE_MAX	32
86103762Sbde#define	_POSIX_TIMER_MAX	32
87103727Swollman#endif
8834030Sdufault
89106055Swollman#if __POSIX_VISIBLE >= 199506
90106055Swollman#define	_POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
91106055Swollman#define	_POSIX_THREAD_KEYS_MAX	128
92106055Swollman#define	_POSIX_THREAD_THREADS_MAX 64
93106055Swollman#endif
94106055Swollman
95103727Swollman#if __POSIX_VISIBLE >= 200112
96103727Swollman#define	_POSIX_HOST_NAME_MAX	255
97106055Swollman#define	_POSIX_LOGIN_NAME_MAX	9
98106055Swollman#define	_POSIX_SS_REPL_MAX	4
99106055Swollman#define	_POSIX_SYMLINK_MAX	255
100106055Swollman#define	_POSIX_SYMLOOP_MAX	8
101106055Swollman#define	_POSIX_TRACE_EVENT_NAME_MAX 30
102106055Swollman#define	_POSIX_TRACE_NAME_MAX	8
103106055Swollman#define	_POSIX_TRACE_SYS_MAX	8
104106055Swollman#define	_POSIX_TRACE_USER_EVENT_MAX 32
105106055Swollman#define	_POSIX_TTY_NAME_MAX	9
106106055Swollman#define	_POSIX2_CHARCLASS_NAME_MAX 14
107106055Swollman#define	_POSIX2_COLL_WEIGHTS_MAX 2
108106055Swollman
109106055Swollman#define	_POSIX_RE_DUP_MAX	_POSIX2_RE_DUP_MAX
11034030Sdufault#endif
11134030Sdufault
112103727Swollman#if __XSI_VISIBLE
113103727Swollman#define	_XOPEN_IOV_MAX		16
114106055Swollman#define	_XOPEN_NAME_MAX		255
115106055Swollman#define	_XOPEN_PATH_MAX		1024
116103762Sbde#define	PASS_MAX		128	/* _PASSWORD_LEN from <pwd.h> */
11721759Sache
118103762Sbde#define	NL_ARGMAX		99	/* max # of position args for printf */
119103762Sbde#define	NL_LANGMAX		31	/* max LANG name length */
120103762Sbde#define	NL_MSGMAX		32767
121103762Sbde#define	NL_NMAX			1
122103762Sbde#define	NL_SETMAX		255
123103762Sbde#define	NL_TEXTMAX		2048
124103762Sbde#endif
12521759Sache
126108175Stjr#define	MB_LEN_MAX		6	/* 31-bit UTF-8 */
127108175Stjr
1281539Srgrimes#include <machine/limits.h>
129103762Sbde
130103727Swollman#if __POSIX_VISIBLE
1311539Srgrimes#include <sys/syslimits.h>
13232032Ssteve#endif
1331539Srgrimes
1341539Srgrimes#endif /* !_LIMITS_H_ */
135