]> xenbits.xensource.com Git - libvirt.git/commitdiff
src: optionally include xlocale.h header
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 27 Jan 2020 10:59:19 +0000 (10:59 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 4 Feb 2020 14:00:45 +0000 (14:00 +0000)
On macOS some definitions are in xlocale.h, instead of in
locale.h. GNULIB hides this difference by making the latter
include the former.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
configure.ac
src/util/virgettext.c
src/util/virstring.c
tests/vshtabletest.c

index 141c0cc5d83fb55ec1b5c79e09bca1a0f7c0e649..9fc24211739d9ed0de7198c175ad859a9b560cd4 100644 (file)
@@ -399,6 +399,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>]])
index 7c12a5c1429bff2c18c00b8fca1eef3fa6513d8e..8de8edb23919a98f6c8cea169cad07c57e7c4b72 100644 (file)
@@ -21,6 +21,9 @@
 #include <config.h>
 
 #include <locale.h>
+#ifdef HAVE_XLOCALE_H
+# include <xlocale.h>
+#endif
 
 #include "configmake.h"
 #include "internal.h"
index fe5c026d2c12ef187193fc80d45bbb5ef3e97fd2..e9e792f3bf0e85f5f531b50982da09d39040715f 100644 (file)
@@ -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"
index 96563ab8be3d801ba2d03e74bdd95831cf1699fa..15369d8eb2a51890e4ab7734e29fee5163218b23 100644 (file)
@@ -19,6 +19,9 @@
 #include <config.h>
 
 #include <locale.h>
+#ifdef HAVE_XLOCALE_H
+# include <xlocale.h>
+#endif
 #include <wchar.h>
 #include <wctype.h>