limits.h revision 34319
11556Srgrimes/*-
21556Srgrimes * Copyright (c) 1988, 1993
31556Srgrimes *	The Regents of the University of California.  All rights reserved.
41556Srgrimes *
51556Srgrimes * Redistribution and use in source and binary forms, with or without
61556Srgrimes * modification, are permitted provided that the following conditions
71556Srgrimes * are met:
81556Srgrimes * 1. Redistributions of source code must retain the above copyright
91556Srgrimes *    notice, this list of conditions and the following disclaimer.
101556Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111556Srgrimes *    notice, this list of conditions and the following disclaimer in the
121556Srgrimes *    documentation and/or other materials provided with the distribution.
131556Srgrimes * 3. All advertising materials mentioning features or use of this software
141556Srgrimes *    must display the following acknowledgement:
151556Srgrimes *	This product includes software developed by the University of
161556Srgrimes *	California, Berkeley and its contributors.
171556Srgrimes * 4. Neither the name of the University nor the names of its contributors
181556Srgrimes *    may be used to endorse or promote products derived from this software
191556Srgrimes *    without specific prior written permission.
201556Srgrimes *
211556Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
221556Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
231556Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
241556Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
251556Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
261556Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
271556Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
281556Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
291556Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
301556Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
311556Srgrimes * SUCH DAMAGE.
321556Srgrimes *
331556Srgrimes *	@(#)limits.h	8.2 (Berkeley) 1/4/94
3436150Scharnier *	$Id: limits.h,v 1.6 1998/03/04 10:23:24 dufault Exp $
3536150Scharnier */
3636150Scharnier
371556Srgrimes#ifndef _LIMITS_H_
3899110Sobrien#define	_LIMITS_H_
3999110Sobrien#include <sys/_posix.h>
401556Srgrimes
4117987Speter#ifndef _ANSI_SOURCE
4217987Speter#define	_POSIX_ARG_MAX		4096
4317987Speter#define	_POSIX_CHILD_MAX	6
4420425Ssteve#define	_POSIX_LINK_MAX		8
4517987Speter#define	_POSIX_MAX_CANON	255
4617987Speter#define	_POSIX_MAX_INPUT	255
47100661Stjr#define	_POSIX_NAME_MAX		14
4817987Speter#define	_POSIX_NGROUPS_MAX	0
491556Srgrimes#define	_POSIX_OPEN_MAX		16
501556Srgrimes#define	_POSIX_PATH_MAX		255
511556Srgrimes#define	_POSIX_PIPE_BUF		512
521556Srgrimes#define	_POSIX_SSIZE_MAX	32767
531556Srgrimes#define	_POSIX_STREAM_MAX	8
541556Srgrimes#define	_POSIX_TZNAME_MAX	3
551556Srgrimes
561556Srgrimes#define	_POSIX2_BC_BASE_MAX	99
571556Srgrimes#define	_POSIX2_BC_DIM_MAX	2048
581556Srgrimes#define	_POSIX2_BC_SCALE_MAX	99
591556Srgrimes#define	_POSIX2_BC_STRING_MAX	1000
601556Srgrimes#define	_POSIX2_EQUIV_CLASS_MAX	2
6120425Ssteve#define	_POSIX2_EXPR_NEST_MAX	32
6217987Speter#define	_POSIX2_LINE_MAX	2048
631556Srgrimes#define	_POSIX2_RE_DUP_MAX	255
6417987Speter
6520425Ssteve
66223060Sjilles#ifdef _POSIX4_VISIBLE
671556Srgrimes
68213811Sobrien#define _POSIX_AIO_LISTIO_MAX	16
69213811Sobrien#define _POSIX_AIO_MAX		1
70213811Sobrien#define _POSIX_DELAYTIMER_MAX	32
71213811Sobrien#define _POSIX_MQ_OPEN_MAX	8
72213811Sobrien#define _POSIX_MQ_PRIO_MAX	32
73213811Sobrien#define _POSIX_RTSIG_MAX	0
74213811Sobrien#define _POSIX_SEM_NSEMS_MAX	256
75213811Sobrien#define _POSIX_SEM_VALUE_MAX	32767
761556Srgrimes#define _POSIX_SIGQUEUE_MAX	32
77213760Sobrien#define _POSIX_TIMER_MAX	32
78213760Sobrien
79213760Sobrien#endif
801556Srgrimes
811556Srgrimes#ifdef _POSIX4_VISIBLE_HISTORICALLY
8297092Stjr#define	AIO_LISTIO_MAX		16
8317987Speter#endif
84201053Sjilles
85200956Sjilles#endif /* !_ANSI_SOURCE */
861556Srgrimes
871556Srgrimes#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) || defined(_XOPEN_SOURCE)
88222154Sjilles#define PASS_MAX		128	/* _PASSWORD_LEN from <pwd.h> */
89222154Sjilles
90222292Sjilles#define NL_ARGMAX		99	/* max # of position args for printf */
911556Srgrimes#define NL_LANGMAX		31	/* max LANG name length */
92100663Stjr#define NL_MSGMAX		32767
93100664Stjr#define NL_NMAX			1
94222154Sjilles#define NL_SETMAX		255
9597092Stjr#define NL_TEXTMAX		2048
96222154Sjilles#endif
97222154Sjilles
98222154Sjilles#include <machine/limits.h>
9997092Stjr#if !defined(_ANSI_SOURCE)
10097092Stjr#include <sys/syslimits.h>
10197092Stjr#endif
10297092Stjr
10397092Stjr#endif /* !_LIMITS_H_ */
10497092Stjr