src: optionally include xlocale.h header

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>
This commit is contained in:
Daniel P. Berrangé 2020-01-27 10:59:19 +00:00
parent 262551f774
commit b9103e62e4
4 changed files with 10 additions and 0 deletions

View 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>]])

View 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"

View 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"

View 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>