[libvirt PATCH v2 53/56] src: optionally include xlocale.h header

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

 



On macOS some definitions are in xlocale.h, instead of in
locale.h. GNULIB hides this difference by making the latter
include the former.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 configure.ac          | 1 +
 src/util/virgettext.c | 3 +++
 src/util/virstring.c  | 3 +++
 tests/vshtabletest.c  | 3 +++
 4 files changed, 10 insertions(+)

diff --git a/configure.ac b/configure.ac
index 005753e8a1..8692c40e86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -400,6 +400,7 @@ AC_CHECK_HEADERS([\
   sys/syscall.h \
   sys/sysctl.h \
   sys/ucred.h \
+  xlocale.h \
   ])
 dnl Check whether endian provides handy macros.
 AC_CHECK_DECLS([htole64], [], [], [[#include <endian.h>]])
diff --git a/src/util/virgettext.c b/src/util/virgettext.c
index 7c12a5c142..8de8edb239 100644
--- a/src/util/virgettext.c
+++ b/src/util/virgettext.c
@@ -21,6 +21,9 @@
 #include <config.h>
 
 #include <locale.h>
+#ifdef HAVE_XLOCALE_H
+# include <xlocale.h>
+#endif
 
 #include "configmake.h"
 #include "internal.h"
diff --git a/src/util/virstring.c b/src/util/virstring.c
index fe5c026d2c..e9e792f3bf 100644
--- a/src/util/virstring.c
+++ b/src/util/virstring.c
@@ -20,6 +20,9 @@
 
 #include <glib/gprintf.h>
 #include <locale.h>
+#ifdef HAVE_XLOCALE_H
+# include <xlocale.h>
+#endif
 
 #include "virstring.h"
 #include "virthread.h"
diff --git a/tests/vshtabletest.c b/tests/vshtabletest.c
index 0feda90b52..55b795f99c 100644
--- a/tests/vshtabletest.c
+++ b/tests/vshtabletest.c
@@ -19,6 +19,9 @@
 #include <config.h>
 
 #include <locale.h>
+#ifdef HAVE_XLOCALE_H
+# include <xlocale.h>
+#endif
 #include <wchar.h>
 #include <wctype.h>
 
-- 
2.24.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux