From: Mike Frysinger Date: Thu, 15 Oct 2015 08:04:07 +0000 (+0900) Subject: localename: control langinfo.h inclusion X-Git-Tag: v1.0~6928 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=63881a60d67422cd7b83eae5ecabdc6b67ea7192;p=gnulib.git localename: control langinfo.h inclusion This header is only used to work around buggy behavior in old versions of glibc, so do not include it all the time. Otherwise we get build failures on systems that do not provide langinfo.h. * lib/localename.c: Wrap langinfo.h include with same ifdefs used in the source later on. The patch was originally submitted to gettext as: https://lists.gnu.org/archive/html/bug-gettext/2015-10/msg00011.html --- diff --git a/ChangeLog b/ChangeLog index 39517086d8..c9bc573cab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2015-10-15 Mike Frysinger + + localename: control langinfo.h inclusion + This header is only used to work around buggy behavior in old + versions of glibc, so do not include it all the time. Otherwise + we get build failures on systems that do not provide langinfo.h. + * lib/localename.c: Wrap langinfo.h include with same ifdefs used + in the source later on. + The patch was originally submitted to gettext as: + https://lists.gnu.org/archive/html/bug-gettext/2015-10/msg00011.html + 2015-10-13 Paul Eggert binary-io, math, pthread, sys_socket, u64, unistd: port to strict C diff --git a/lib/localename.c b/lib/localename.c index f8cf3f2362..c27be86985 100644 --- a/lib/localename.c +++ b/lib/localename.c @@ -38,7 +38,9 @@ # if defined __APPLE__ && defined __MACH__ # include # endif -# include +# if __GLIBC__ >= 2 && !defined __UCLIBC__ +# include +# endif # if !defined IN_LIBINTL # include "glthread/lock.h" # endif