]> Savannah Git Hosting - gnulib.git/commitdiff
localename: control langinfo.h inclusion
authorMike Frysinger <vapier@chromium.org>
Thu, 15 Oct 2015 08:04:07 +0000 (17:04 +0900)
committerDaiki Ueno <ueno@gnu.org>
Thu, 15 Oct 2015 08:08:35 +0000 (17:08 +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.

* 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

ChangeLog
lib/localename.c

index 39517086d8731bbbbe36edb561e91b05ea4b6450..c9bc573cab7cda82a27eee286ee42aaed602af25 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2015-10-15  Mike Frysinger  <vapier@chromium.org>
+
+       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  <eggert@cs.ucla.edu>
 
        binary-io, math, pthread, sys_socket, u64, unistd: port to strict C
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