From: Mike Frysinger Date: Mon, 12 Oct 2015 22:00:43 +0000 (-0400) Subject: intl/localename: control langinfo.h inclusion X-Git-Tag: v0.19.7~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afe42f6d0bbb1a8ea0134165c3b8779b2d8c94de;p=thirdparty%2Fgettext.git intl/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. * gettext-runtime/intl/localename.c: Wrap langinfo.h include with same ifdefs used in the source later on. --- diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index 74ff1ac4d..10eed5dee 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,12 @@ +2015-10-14 Mike Frysinger + + intl/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. + * localename.c: Wrap langinfo.h include with same + ifdefs used in the source later on. + 2015-09-11 Daiki Ueno * gettext 0.19.6 released. diff --git a/gettext-runtime/intl/localename.c b/gettext-runtime/intl/localename.c index f8cf3f236..c27be8698 100644 --- a/gettext-runtime/intl/localename.c +++ b/gettext-runtime/intl/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