diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-06-30 20:21:11 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-06-30 20:21:11 +0000 |
commit | 3220111555bf497ba7869bcaaa7c7e44f126fc5d (patch) | |
tree | 8ddb136f852455b1ba9430c6dc08c6b2b13b6da9 /sys | |
parent | 9c052f54ffb5f0dab460bfdaf0d03887ab06f0b4 (diff) |
Further standards compliance fixes: export LONG_BIT, WORD_BIT, and
NL_{ARG,LANG,MSG,SET,TEXT}MAX with newer POSIX.
Hide {FLT,DBL}_{DIG,MAX,MIN} and {PASS,TMP,NL_N}_MAX with newer XPG.
Make _POSIX_NGROUPS_MAX and _POSIX_OPEN_MAX conditional on the POSIX
version, like _POSIX_TZNAME_MAX already is.
Add some more _POSIX_* and _XOPEN_* 'specified' limits.
ok kettenis@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/limits.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/sys/sys/limits.h b/sys/sys/limits.h index 9a2140fa042..1faba69f6c7 100644 --- a/sys/sys/limits.h +++ b/sys/sys/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.9 2012/06/26 16:12:42 deraadt Exp $ */ +/* $OpenBSD: limits.h,v 1.10 2012/06/30 20:21:10 guenther Exp $ */ /* * Copyright (c) 2002 Marc Espie. * @@ -84,16 +84,19 @@ # define GID_MAX UINT_MAX /* max value for a gid_t */ #endif -#if __XPG_VISIBLE +#if __XPG_VISIBLE || __POSIX_VISIBLE >= 200809 # ifdef __LP64__ # define LONG_BIT 64 # else # define LONG_BIT 32 # endif # define WORD_BIT 32 +#endif +#if __XPG_VISIBLE < 600 # include <machine/_float.h> +/* XSI defines marked LEGACY in XPG5 and removed in IEEE Std 1003.1-2001 */ # ifndef FLT_DIG # define FLT_DIG __FLT_DIG # endif @@ -107,13 +110,16 @@ # define DBL_MAX __DBL_MAX # endif -# ifndef FLT_MIN -# define FLT_MIN __FLT_MIN -# endif -# ifndef DBL_MIN -# define DBL_MIN __DBL_MIN +/* XSI defines marked LEGACY in XPG4v2 and removed in XPG5 */ +# if __XPG_VISIBLE < 500 +# ifndef FLT_MIN +# define FLT_MIN __FLT_MIN +# endif +# ifndef DBL_MIN +# define DBL_MIN __DBL_MIN +# endif # endif -#endif /* __XPG_VISIBLE */ +#endif /* __XPG_VISIBLE < 600 */ #endif |