diff options
author | Joseph Myers <joseph@codesourcery.com> | 2016-04-08 22:52:51 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2016-04-08 22:52:51 +0000 |
commit | eb64b6d4571caea5fe39f6427565f849b09c23b6 (patch) | |
tree | e1316cbbe409b02749aa46fc312ff1ed02f9f00c /include/bits/xopen_lim.h | |
parent | ed80f206f42906ec7d2634595fb5ef8338c7c943 (diff) | |
download | glibc-eb64b6d4571caea5fe39f6427565f849b09c23b6.zip glibc-eb64b6d4571caea5fe39f6427565f849b09c23b6.tar.gz glibc-eb64b6d4571caea5fe39f6427565f849b09c23b6.tar.bz2 |
Fix limits.h NL_NMAX namespace (bug 19929).
bits/xopen_lim.h (included by limits.h if __USE_XOPEN) defines
NL_NMAX, but this constant was removed in the 2008 edition of POSIX so
should not be defined in that case. This patch duly disables that
define for __USE_XOPEN2K8. It remains enabled for __USE_GNU to avoid
affecting sysconf (_SC_NL_NMAX), the implementation of which uses
"#ifdef NL_NMAX".
Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).
[BZ #19929]
* include/bits/xopen_lim.h (NL_NMAX): Do not define if
[__USE_XOPEN2K8 && !__USE_GNU].
* conform/Makefile (test-xfail-XOPEN2K8/limits.h/conform): Remove
variable.
Diffstat (limited to 'include/bits/xopen_lim.h')
-rw-r--r-- | include/bits/xopen_lim.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/bits/xopen_lim.h b/include/bits/xopen_lim.h index 26b4fba..7515ddd 100644 --- a/include/bits/xopen_lim.h +++ b/include/bits/xopen_lim.h @@ -77,7 +77,9 @@ /* Maximum number of bytes in N-to-1 collation mapping. We have no limit. */ -#define NL_NMAX INT_MAX +#if defined __USE_GNU || !defined __USE_XOPEN2K8 +# define NL_NMAX INT_MAX +#endif /* Maximum set number. We have no limit. */ #define NL_SETMAX INT_MAX |