bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gettext] [PATCH] intl/localename: control langinfo.h inclusion


From: Mike Frysinger
Subject: [bug-gettext] [PATCH] intl/localename: control langinfo.h inclusion
Date: Mon, 12 Oct 2015 18:00:43 -0400

From: Mike Frysinger <address@hidden>

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/localename.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gettext-runtime/intl/localename.c 
b/gettext-runtime/intl/localename.c
index f8cf3f2..c27be86 100644
--- a/gettext-runtime/intl/localename.c
+++ b/gettext-runtime/intl/localename.c
@@ -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
-- 
2.5.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]