From f248238cf43bd751db29e6f151d6da7645337ff5 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 5 Nov 2015 21:19:37 +0000 Subject: Fix features.h for -Wundef (bug 19212). features.h is not clean with -Wundef (for the installed header, of course this only appears with -Wsystem-headers). In ISO C standards modes, you get a series of warnings / errors relating to _POSIX_C_SOURCE and _XOPEN_SOURCE not being defined when tested in standards mode and uses #undef _GNU_SOURCE to avoid the default _GNU_SOURCE from libc-symbols.h. This patch changes the relevant #if conditionals to avoid these warnings / errors. Tested for x86_64 and x86 (testsuite, and that installed shared libraries are unchanged by the patch). [BZ #19212] * include/features.h [(_XOPEN_SOURCE - 0) >= 500]: Change conditional to [defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500]. [_POSIX_C_SOURCE >= 1]: Change conditional to [defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 1]. [(_POSIX_C_SOURCE - 0) >= 199309L]: Change conditional to [defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199309L]. [(_POSIX_C_SOURCE - 0) >= 199506L]: Change conditional to [defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199506L]. [(_POSIX_C_SOURCE - 0) >= 200112L]: Change conditional to [defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200112L]. [(_POSIX_C_SOURCE - 0) >= 200809L]: Change conditional to [defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200809L]. --- ChangeLog | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index bc2bc6935e..3ee9f19cf8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,20 @@ 2015-11-05 Joseph Myers + [BZ #19212] + * include/features.h [(_XOPEN_SOURCE - 0) >= 500]: Change + conditional to [defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= + 500]. + [_POSIX_C_SOURCE >= 1]: Change conditional to [defined + _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 1]. + [(_POSIX_C_SOURCE - 0) >= 199309L]: Change conditional to [defined + _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199309L]. + [(_POSIX_C_SOURCE - 0) >= 199506L]: Change conditional to [defined + _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199506L]. + [(_POSIX_C_SOURCE - 0) >= 200112L]: Change conditional to [defined + _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200112L]. + [(_POSIX_C_SOURCE - 0) >= 200809L]: Change conditional to [defined + _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200809L]. + [BZ #19209] * math/bits/math-finite.h (ldexp): Remove declaration. (ldexpf): Likewise. -- cgit 1.4.1