limits.h revision 293800
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. 13203964Simp * 3. Neither the name of the University nor the names of its contributors 141539Srgrimes * may be used to endorse or promote products derived from this software 151539Srgrimes * without specific prior written permission. 161539Srgrimes * 171539Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 181539Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 191539Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 201539Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 211539Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 221539Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 231539Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 241539Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 251539Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 261539Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 271539Srgrimes * SUCH DAMAGE. 281539Srgrimes * 291539Srgrimes * @(#)limits.h 8.2 (Berkeley) 1/4/94 3050473Speter * $FreeBSD: stable/10/include/limits.h 293800 2016-01-13 01:32:04Z kevlo $ 311539Srgrimes */ 321539Srgrimes 331539Srgrimes#ifndef _LIMITS_H_ 341539Srgrimes#define _LIMITS_H_ 35103762Sbde 36103727Swollman#include <sys/cdefs.h> 371539Srgrimes 38103727Swollman#if __POSIX_VISIBLE 391539Srgrimes#define _POSIX_ARG_MAX 4096 401539Srgrimes#define _POSIX_LINK_MAX 8 411539Srgrimes#define _POSIX_MAX_CANON 255 421539Srgrimes#define _POSIX_MAX_INPUT 255 431539Srgrimes#define _POSIX_NAME_MAX 14 44219256Sjilles#define _POSIX_PIPE_BUF 512 45219256Sjilles#define _POSIX_SSIZE_MAX 32767 46219256Sjilles#define _POSIX_STREAM_MAX 8 47219256Sjilles 48219256Sjilles#if __POSIX_VISIBLE >= 200112 49219256Sjilles#define _POSIX_CHILD_MAX 25 50106055Swollman#define _POSIX_NGROUPS_MAX 8 51106055Swollman#define _POSIX_OPEN_MAX 20 52106055Swollman#define _POSIX_PATH_MAX 256 53106055Swollman#define _POSIX_TZNAME_MAX 6 54219256Sjilles#else 55219256Sjilles#define _POSIX_CHILD_MAX 6 56219256Sjilles#define _POSIX_NGROUPS_MAX 0 57219256Sjilles#define _POSIX_OPEN_MAX 16 58219256Sjilles#define _POSIX_PATH_MAX 255 59219256Sjilles#define _POSIX_TZNAME_MAX 3 60219256Sjilles#endif 611539Srgrimes 62293800Skevlo#if __POSIX_VISIBLE >= 200112 63106055Swollman#define BC_BASE_MAX 99 /* max ibase/obase values in bc(1) */ 64106055Swollman#define BC_DIM_MAX 2048 /* max array elements in bc(1) */ 65106055Swollman#define BC_SCALE_MAX 99 /* max scale value in bc(1) */ 66106055Swollman#define BC_STRING_MAX 1000 /* max const string length in bc(1) */ 67293800Skevlo#define CHARCLASS_NAME_MAX 14 /* max character class name size */ 68293800Skevlo#define COLL_WEIGHTS_MAX 10 /* max weights for order keyword */ 69106055Swollman#define EXPR_NEST_MAX 32 /* max expressions nested in expr(1) */ 70106055Swollman#define LINE_MAX 2048 /* max bytes in an input line */ 71106055Swollman#define RE_DUP_MAX 255 /* max RE's in interval notation */ 72106055Swollman 731539Srgrimes#define _POSIX2_BC_BASE_MAX 99 741539Srgrimes#define _POSIX2_BC_DIM_MAX 2048 751539Srgrimes#define _POSIX2_BC_SCALE_MAX 99 761539Srgrimes#define _POSIX2_BC_STRING_MAX 1000 77293800Skevlo#define _POSIX2_CHARCLASS_NAME_MAX 14 78293800Skevlo#define _POSIX2_COLL_WEIGHTS_MAX 2 791539Srgrimes#define _POSIX2_EQUIV_CLASS_MAX 2 801539Srgrimes#define _POSIX2_EXPR_NEST_MAX 32 811539Srgrimes#define _POSIX2_LINE_MAX 2048 821539Srgrimes#define _POSIX2_RE_DUP_MAX 255 83103727Swollman#endif 84293800Skevlo#endif 8534030Sdufault 86103727Swollman#if __POSIX_VISIBLE >= 199309 87211980Sjilles#define _POSIX_AIO_LISTIO_MAX 2 88103762Sbde#define _POSIX_AIO_MAX 1 89103762Sbde#define _POSIX_DELAYTIMER_MAX 32 90103762Sbde#define _POSIX_MQ_OPEN_MAX 8 91103762Sbde#define _POSIX_MQ_PRIO_MAX 32 92106055Swollman#define _POSIX_RTSIG_MAX 8 93103762Sbde#define _POSIX_SEM_NSEMS_MAX 256 94103762Sbde#define _POSIX_SEM_VALUE_MAX 32767 95103762Sbde#define _POSIX_SIGQUEUE_MAX 32 96103762Sbde#define _POSIX_TIMER_MAX 32 97219256Sjilles 98219256Sjilles#define _POSIX_CLOCKRES_MIN 20000000 99103727Swollman#endif 10034030Sdufault 101106055Swollman#if __POSIX_VISIBLE >= 199506 102106055Swollman#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 103106055Swollman#define _POSIX_THREAD_KEYS_MAX 128 104106055Swollman#define _POSIX_THREAD_THREADS_MAX 64 105106055Swollman#endif 106106055Swollman 107103727Swollman#if __POSIX_VISIBLE >= 200112 108103727Swollman#define _POSIX_HOST_NAME_MAX 255 109106055Swollman#define _POSIX_LOGIN_NAME_MAX 9 110106055Swollman#define _POSIX_SS_REPL_MAX 4 111106055Swollman#define _POSIX_SYMLINK_MAX 255 112106055Swollman#define _POSIX_SYMLOOP_MAX 8 113106055Swollman#define _POSIX_TRACE_EVENT_NAME_MAX 30 114106055Swollman#define _POSIX_TRACE_NAME_MAX 8 115106055Swollman#define _POSIX_TRACE_SYS_MAX 8 116106055Swollman#define _POSIX_TRACE_USER_EVENT_MAX 32 117106055Swollman#define _POSIX_TTY_NAME_MAX 9 118106055Swollman 119106055Swollman#define _POSIX_RE_DUP_MAX _POSIX2_RE_DUP_MAX 12034030Sdufault#endif 12134030Sdufault 122219271Sjilles#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809 123219271Sjilles#define NL_ARGMAX 99 /* max # of position args for printf */ 124219271Sjilles#define NL_MSGMAX 32767 125219271Sjilles#define NL_SETMAX 255 126219271Sjilles#define NL_TEXTMAX 2048 127219271Sjilles#endif 128219271Sjilles 129103727Swollman#if __XSI_VISIBLE 130103727Swollman#define _XOPEN_IOV_MAX 16 131106055Swollman#define _XOPEN_NAME_MAX 255 132106055Swollman#define _XOPEN_PATH_MAX 1024 133103762Sbde#define PASS_MAX 128 /* _PASSWORD_LEN from <pwd.h> */ 13421759Sache 135103762Sbde#define NL_LANGMAX 31 /* max LANG name length */ 136103762Sbde#define NL_NMAX 1 137103762Sbde#endif 13821759Sache 139108175Stjr#define MB_LEN_MAX 6 /* 31-bit UTF-8 */ 140108175Stjr 141114216Skan#include <sys/limits.h> 142103762Sbde 143103727Swollman#if __POSIX_VISIBLE 1441539Srgrimes#include <sys/syslimits.h> 14532032Ssteve#endif 1461539Srgrimes 1471539Srgrimes#endif /* !_LIMITS_H_ */ 148