]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
intl/localename: control langinfo.h inclusion
authorMike Frysinger <vapier@chromium.org>
Mon, 12 Oct 2015 22:00:43 +0000 (18:00 -0400)
committerDaiki Ueno <ueno@gnu.org>
Wed, 14 Oct 2015 06:03:32 +0000 (15:03 +0900)
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.

gettext-runtime/intl/ChangeLog
gettext-runtime/intl/localename.c

index 74ff1ac4db2096cbc48f55901288d6df07aaee72..10eed5dee87b3e29b19caa01b30086b3495ae129 100644 (file)
@@ -1,3 +1,12 @@
+2015-10-14  Mike Frysinger  <vapier@chromium.org>
+
+       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  <ueno@gnu.org>
 
        * gettext 0.19.6 released.
index f8cf3f2362154bec1d4fb3aff336fcdfd1f8fcfa..c27be8698518933b1ac9b8b0f67052a58f2af65d 100644 (file)
@@ -38,7 +38,9 @@
 # if defined __APPLE__ && defined __MACH__
 #  include <xlocale.h>
 # endif
-# include <langinfo.h>
+# if __GLIBC__ >= 2 && !defined __UCLIBC__
+#  include <langinfo.h>
+# endif
 # if !defined IN_LIBINTL
 #  include "glthread/lock.h"
 # endif