/* $Copyright:	$
 * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
 * Sequent Computer Systems, Inc.   All rights reserved.
 *  
 * This software is furnished under a license and may be used
 * only in accordance with the terms of that license and with the
 * inclusion of the above copyright notice.   This software may not
 * be provided or otherwise made available to, or used by, any
 * other person.  No title to or ownership of the software is
 * hereby transferred.
 */

/*	Copyright (c) 1984 AT&T	*/
/*	  All Rights Reserved  	*/

/*	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T	*/
/*	The copyright notice above does not evidence any   	*/
/*	actual or intended publication of such source code.	*/

#ident	"$Header: limits.h 1.17 90/06/24 $"

#ifndef	_SYS_LIMITS_H_

/* $Log:	limits.h,v $
*/

/*____________________________________________________________________*
 * This file forms part of the POSIX requirement described in section *
 * 2.9 of 1003.1-1988 which should be refered to before making any    *
 * changes.							      *
 *____________________________________________________________________*/

/* POSIX 1003.1-1988 2.9.2 */
/* Required minimum value definitions */
#define	_POSIX_ARG_MAX		4096	/* max length of args to exec */
#define _POSIX_CHILD_MAX	6	/* max # processes per user id */
#define	_POSIX_LINK_MAX		8	/* max # of links to a single file*/
#define	_POSIX_MAX_CANON	255	/* sizeof canonical input queue */
#define _POSIX_MAX_INPUT	255	/* # of bytes of atomic tty input */
#define	_POSIX_NAME_MAX		14	/* max # of bytes in a file name */
#define _POSIX_NGROUPS_MAX	0	/* max # of supp GIDs per process */
#define	_POSIX_OPEN_MAX		16	/* max # of open files per process*/
#define	_POSIX_PATH_MAX		255	/* max # of bytes in a path name */
#define	_POSIX_PIPE_BUF		512	/* max # bytes automically written*/

/* POSIX 1003.1-1988 2.9.3 */
#define	NGROUPS_MAX		16	/* max # supp GIDs per process */

/* POSIX 1003.1-1988 2.9.4 */
#define	ARG_MAX		12288		/* max bytes in exec arglist */
					/* see NCARGS in sys/param.h */
#define	CHILD_MAX	100		/* max # of processes per user id */
#define	OPEN_MAX	20		/* max # of open files per process*/
					/* this is a configurable value, */
					/* see setdtablesize(2seq) */

/* POSIX 1003.1-1988 2.9.5 */
#define	LINK_MAX	1000		/* max # of links to a single file*/
#define	MAX_CANON	256		/* sizeof canonical input queue */
#define	MAX_INPUT	255		/* # of bytes of atomic tty input*/
#define	NAME_MAX	255		/* max # of bytes in a file name */
#define	PATH_MAX	1023		/* max # of bytes in a path name */
#define	PIPE_BUF	8192		/* max # bytes atomically written*/

/* POSIX 1003.1-1988 2.9.1 */
#define	CHAR_BIT	8		/* # of bits in a "char" */
#define	CHAR_MAX	127		/* max integer value of a "char" */
#define	CHAR_MIN	(-128)		/* min integer value of a "char" */
#define SCHAR_MAX	CHAR_MAX	/* max signed char value */
#define SCHAR_MIN	CHAR_MIN	/* min signed char value */
#define UCHAR_MAX	255		/* max unsigned char value */
#define	SHRT_MAX	32767		/* max decimal value of a "short" */
#define	SHRT_MIN	(-32768)	/* min decimal value of a "short" */
#define	INT_MAX		2147483647	/* max decimal value of an "int" */
#define	INT_MIN		(-2147483648)	/* min decimal value of an "int" */
#define	LONG_MAX	2147483647	/* max decimal value of a "long" */
#define	LONG_MIN	(-2147483648)	/* min decimal value of a "long" */
#define UINT_MAX	4294967295	/* max unsigned integer value */
#define ULONG_MAX	UINT_MAX	/* max unsigned long integer value*/
#define USHRT_MAX	65535		/* max unsigned short value */
#define MB_LEN_MAX	5		/*max # of bytes in multibyte char*/

#ifndef	_POSIX_SOURCE

#define	DBL_DIG		15		/* digits of precision of a "double" */
#define	DBL_MAX		1.79769313486231570e+308 /*max decimal value of a "double"*/
#define	DBL_MIN		4.94065645841246544e-324 /*min decimal value of a "double"*/
#define	FCHR_MAX	1048576		/* max size of a file in bytes */
#define	FLT_DIG		7		/* digits of precision of a "float" */
#define	FLT_MAX		3.40282346638528860e+38 /*max decimal value of a "float" */
#define	FLT_MIN		1.40129846432481707e-45 /*min decimal value of a "float" */
#ifndef HUGE_VAL
#ifndef NO_XPG3_HDR
#define	HUGE_VAL	DBL_MAX		/*error value returned by Math lib*/
#else
#define HUGE_VAL	FLT_MAX		/*error value returned by Math lib*/
#endif	/* NO_XPG3_HDR */
#endif	/* HUGE_VAL */
#define	PASS_MAX	8		/* max # of characters in a password */
#define	PID_MAX		30000		/* max value for a process ID */
#define	PIPE_MAX	8192		/* max # bytes written to a pipe in a write */
#define	STD_BLK		2048		/* # bytes in a physical I/O block */
#define	SYS_NMLN	9		/* # of chars in uname-returned strings */
#define	UID_MAX		60000		/* max value for a user or group ID */
#define	USI_MAX		4294967295	/* max decimal value of an "unsigned" */
#define	WORD_BIT	32		/* # of bits in a "word" or "int" */

/* These are provided for X/OPEN compliance */
#define	LONG_BIT	32		/* number of bits in a long */
#define	MAX_CHAR	MAX_INPUT	/* max size of char input buffer */
#define	SYSPID_MAX	PID_MAX		/* max pid of system processes */
#define	TMP_MAX		17576		/* max # of unique tmpnam names */
 
#ifndef NO_XPG3_HDR
#ifndef NL_ARGMAX
#define NL_ARGMAX	9		/* max value of <digit> in printf */
#define NL_SETMAX	256		/* max set number (gencat) */
#define NL_MSGMAX	32767		/* max message number */
#define NL_NMAX		2		/* max N for N-to-1 mapping */
#define NL_TEXTMAX	1024		/* max bytes in message string */
#define NL_LANGMAX	255		/* max bytes in language name */
#endif	/* NL_ARGMAX */

#ifndef NZERO
#define NZERO		20		/* default process priority */
#endif
#endif	/* NO_XPG3_HDR */

#endif	/*_POSIX_SOURCE*/

#define	_SYS_LIMITS_H_
#endif	/*_SYS_LIMITS_H_*/
