diff options
author | Kevin Lo <kevlo@FreeBSD.org> | 2016-01-09 14:53:23 +0000 |
---|---|---|
committer | Kevin Lo <kevlo@FreeBSD.org> | 2016-01-09 14:53:23 +0000 |
commit | ab707ec6681d72550f820bfc8039d3e4a595e0d0 (patch) | |
tree | c5bd458d3babc3fac2bd33ed5c6024c03d838768 /include/limits.h | |
parent | 5dba456c143612532ca3338dfc9edb3aed9a7934 (diff) |
- Add the definition of CHARCLASS_NAME_MAX, as per POSIX.1-2001.
- Avoid namespace pollution and move definitions of _POSIX2_CHARCLASS_NAME_MAX
and _POSIX2_COLL_WEIGHTS_MAX into the .2001 section.
With input from bde.
Submitted by bde
Notes
Notes:
svn path=/head/; revision=293491
Diffstat (limited to 'include/limits.h')
-rw-r--r-- | include/limits.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/limits.h b/include/limits.h index 3910928315fc..a1e1b9820821 100644 --- a/include/limits.h +++ b/include/limits.h @@ -59,10 +59,12 @@ #define _POSIX_TZNAME_MAX 3 #endif +#if __POSIX_VISIBLE >= 200112 #define BC_BASE_MAX 99 /* max ibase/obase values in bc(1) */ #define BC_DIM_MAX 2048 /* max array elements in bc(1) */ #define BC_SCALE_MAX 99 /* max scale value in bc(1) */ #define BC_STRING_MAX 1000 /* max const string length in bc(1) */ +#define CHARCLASS_NAME_MAX 14 /* max character class name size */ #define COLL_WEIGHTS_MAX 10 /* max weights for order keyword */ #define EXPR_NEST_MAX 32 /* max expressions nested in expr(1) */ #define LINE_MAX 2048 /* max bytes in an input line */ @@ -72,11 +74,14 @@ #define _POSIX2_BC_DIM_MAX 2048 #define _POSIX2_BC_SCALE_MAX 99 #define _POSIX2_BC_STRING_MAX 1000 +#define _POSIX2_CHARCLASS_NAME_MAX 14 +#define _POSIX2_COLL_WEIGHTS_MAX 2 #define _POSIX2_EQUIV_CLASS_MAX 2 #define _POSIX2_EXPR_NEST_MAX 32 #define _POSIX2_LINE_MAX 2048 #define _POSIX2_RE_DUP_MAX 255 #endif +#endif #if __POSIX_VISIBLE >= 199309 #define _POSIX_AIO_LISTIO_MAX 2 @@ -110,8 +115,6 @@ #define _POSIX_TRACE_SYS_MAX 8 #define _POSIX_TRACE_USER_EVENT_MAX 32 #define _POSIX_TTY_NAME_MAX 9 -#define _POSIX2_CHARCLASS_NAME_MAX 14 -#define _POSIX2_COLL_WEIGHTS_MAX 2 #define _POSIX_RE_DUP_MAX _POSIX2_RE_DUP_MAX #endif |