aboutsummaryrefslogtreecommitdiffstats
path: root/include/limits.h
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2011-03-03 22:34:13 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2011-03-03 22:34:13 +0000
commit54574e2ab2c3caa59fc2171e7590112b6de1df1e (patch)
tree39252456cad38feb73b55b93cdfe951c33948e3d /include/limits.h
parent5fb8c8d60cc54a79afdaab3ae997fd881c009862 (diff)
downloadsrc-54574e2ab2c3caa59fc2171e7590112b6de1df1e.tar.gz
src-54574e2ab2c3caa59fc2171e7590112b6de1df1e.zip
Fix some _POSIX minimum/maximum values in limits.h:
* Some values changed in POSIX.1-2001; provide the former value if a program requests compliance to an earlier version of POSIX. [1] * Add missing _POSIX_CLOCKRES_MIN constant. This is a maximum value but otherwise works the same as the minimum values. PR: standards/104743 Submitted by: bde [1] (not exact #ifdefs, but the values) MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=219256
Diffstat (limited to 'include/limits.h')
-rw-r--r--include/limits.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/include/limits.h b/include/limits.h
index 9828ab67b989..b30c5048d323 100644
--- a/include/limits.h
+++ b/include/limits.h
@@ -37,18 +37,27 @@
#if __POSIX_VISIBLE
#define _POSIX_ARG_MAX 4096
-#define _POSIX_CHILD_MAX 25
#define _POSIX_LINK_MAX 8
#define _POSIX_MAX_CANON 255
#define _POSIX_MAX_INPUT 255
#define _POSIX_NAME_MAX 14
-#define _POSIX_NGROUPS_MAX 8
-#define _POSIX_OPEN_MAX 20
-#define _POSIX_PATH_MAX 256
#define _POSIX_PIPE_BUF 512
#define _POSIX_SSIZE_MAX 32767
#define _POSIX_STREAM_MAX 8
+
+#if __POSIX_VISIBLE >= 200112
+#define _POSIX_CHILD_MAX 25
+#define _POSIX_NGROUPS_MAX 8
+#define _POSIX_OPEN_MAX 20
+#define _POSIX_PATH_MAX 256
#define _POSIX_TZNAME_MAX 6
+#else
+#define _POSIX_CHILD_MAX 6
+#define _POSIX_NGROUPS_MAX 0
+#define _POSIX_OPEN_MAX 16
+#define _POSIX_PATH_MAX 255
+#define _POSIX_TZNAME_MAX 3
+#endif
#define BC_BASE_MAX 99 /* max ibase/obase values in bc(1) */
#define BC_DIM_MAX 2048 /* max array elements in bc(1) */
@@ -80,6 +89,8 @@
#define _POSIX_SEM_VALUE_MAX 32767
#define _POSIX_SIGQUEUE_MAX 32
#define _POSIX_TIMER_MAX 32
+
+#define _POSIX_CLOCKRES_MIN 20000000
#endif
#if __POSIX_VISIBLE >= 199506