limits.h

Go to the documentation of this file.
00001 /*-
00002  * © Portions copyright (c) 2005 Nokia Corporation.  All rights reserved.
00003  * Copyright (c) 1988, 1993
00004  *      The Regents of the University of California.  All rights reserved.
00005  *
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted provided that the following conditions
00008  * are met:
00009  * 1. Redistributions of source code must retain the above copyright
00010  *    notice, this list of conditions and the following disclaimer.
00011  * 2. Redistributions in binary form must reproduce the above copyright
00012  *    notice, this list of conditions and the following disclaimer in the
00013  *    documentation and/or other materials provided with the distribution.
00014  * 3. All advertising materials mentioning features or use of this software
00015  *    must display the following acknowledgement:
00016  *      This product includes software developed by the University of
00017  *      California, Berkeley and its contributors.
00018  * 4. Neither the name of the University nor the names of its contributors
00019  *    may be used to endorse or promote products derived from this software
00020  *    without specific prior written permission.
00021  *
00022  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00023  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00024  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00025  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00026  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00027  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00028  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00029  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00030  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00031  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00032  * SUCH DAMAGE.
00033  *
00034  *      @(#)limits.h    8.2 (Berkeley) 1/4/94
00035  * $FreeBSD: src/include/limits.h,v 1.16 2003/04/29 13:35:58 kan Exp $
00036  */
00037 
00038 #ifndef _LIMITS_H_
00039 #define _LIMITS_H_
00040 
00041 #include <sys/cdefs.h>
00042 
00043 #if __POSIX_VISIBLE
00044 #define _POSIX_ARG_MAX          4096
00045 #define _POSIX_CHILD_MAX        25
00046 #define _POSIX_LINK_MAX         8
00047 #define _POSIX_MAX_CANON        255
00048 #define _POSIX_MAX_INPUT        255
00049 #ifdef __SYMBIAN32__
00050 #define _POSIX_NAME_MAX   255
00051 #else   
00052 #define _POSIX_NAME_MAX         14
00053 #endif 
00054 #define _POSIX_NGROUPS_MAX      8
00055 #define _POSIX_OPEN_MAX         20
00056 #define _POSIX_PATH_MAX         256
00057 #define _POSIX_PIPE_BUF         512
00058 #define _POSIX_SSIZE_MAX        32767
00059 #define _POSIX_STREAM_MAX       8
00060 #define _POSIX_TZNAME_MAX       6
00061 
00062 #define BC_BASE_MAX                99   /* max ibase/obase values in bc(1) */
00063 #define BC_DIM_MAX               2048   /* max array elements in bc(1) */
00064 #define BC_SCALE_MAX               99   /* max scale value in bc(1) */
00065 #define BC_STRING_MAX            1000   /* max const string length in bc(1) */
00066 #define COLL_WEIGHTS_MAX            0   /* max weights for order keyword */
00067 #define EXPR_NEST_MAX              32   /* max expressions nested in expr(1) */
00068 #define LINE_MAX                 2048   /* max bytes in an input line */
00069 #define RE_DUP_MAX                255   /* max RE's in interval notation */
00070 
00071 #define _POSIX2_BC_BASE_MAX     99
00072 #define _POSIX2_BC_DIM_MAX      2048
00073 #define _POSIX2_BC_SCALE_MAX    99
00074 #define _POSIX2_BC_STRING_MAX   1000
00075 #define _POSIX2_EQUIV_CLASS_MAX 2
00076 #define _POSIX2_EXPR_NEST_MAX   32
00077 #define _POSIX2_LINE_MAX        2048
00078 #define _POSIX2_RE_DUP_MAX      255
00079 #endif
00080 
00081 #if __POSIX_VISIBLE >= 199309
00082 #define _POSIX_AIO_LISTIO_MAX   16
00083 #define _POSIX_AIO_MAX          1
00084 #define _POSIX_DELAYTIMER_MAX   32
00085 #define _POSIX_MQ_OPEN_MAX      8
00086 #define _POSIX_MQ_PRIO_MAX      32
00087 #define _POSIX_RTSIG_MAX        8
00088 #define _POSIX_SEM_NSEMS_MAX    256
00089 #define _POSIX_SEM_VALUE_MAX    32767
00090 #define _POSIX_SIGQUEUE_MAX     32
00091 #define _POSIX_TIMER_MAX        32
00092 #endif
00093 
00094 #if __POSIX_VISIBLE >= 199506
00095 #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
00096 #define _POSIX_THREAD_KEYS_MAX  128
00097 #define _POSIX_THREAD_THREADS_MAX 64
00098 #endif
00099 
00100 #if __POSIX_VISIBLE >= 200112
00101 #define _POSIX_HOST_NAME_MAX    255
00102 #define _POSIX_LOGIN_NAME_MAX   9
00103 #define _POSIX_SS_REPL_MAX      4
00104 #define _POSIX_SYMLINK_MAX      255
00105 #define _POSIX_SYMLOOP_MAX      8
00106 #define _POSIX_TRACE_EVENT_NAME_MAX 30
00107 #define _POSIX_TRACE_NAME_MAX   8
00108 #define _POSIX_TRACE_SYS_MAX    8
00109 #define _POSIX_TRACE_USER_EVENT_MAX 32
00110 #define _POSIX_TTY_NAME_MAX     9
00111 #define _POSIX2_CHARCLASS_NAME_MAX 14
00112 #define _POSIX2_COLL_WEIGHTS_MAX 2
00113 
00114 #define _POSIX_RE_DUP_MAX       _POSIX2_RE_DUP_MAX
00115 #endif
00116 
00117 #if __XSI_VISIBLE
00118 #define _XOPEN_IOV_MAX          16
00119 #define _XOPEN_NAME_MAX         255
00120 #define _XOPEN_PATH_MAX         1024
00121 #define PASS_MAX                128     /* _PASSWORD_LEN from <pwd.h> */
00122 
00123 #define NL_ARGMAX               99      /* max # of position args for printf */
00124 #define NL_LANGMAX              31      /* max LANG name length */
00125 #define NL_MSGMAX               32767
00126 #define NL_NMAX                 1
00127 #define NL_SETMAX               255
00128 #define NL_TEXTMAX              2048
00129 #endif
00130 
00131 #define MB_LEN_MAX              6       /* 31-bit UTF-8 */
00132 
00133 #include <sys/limits.h>
00134 
00135 #if __POSIX_VISIBLE
00136 #ifndef __SYMBIAN32__
00137 #include <sys/syslimits.h>
00138 #endif
00139 #endif
00140 
00141 #ifdef __SYMBIAN32__
00142 /* Thread limits */
00143 #define PTHREAD_KEYS_MAX                  128
00144 #define PTHREAD_DESTRUCTOR_ITERATIONS     4
00145 //__SYMBIAN32__
00146 #endif
00147 #endif /* !_LIMITS_H_ */

Copyright © Nokia Corporation 2001-2008
Back to top