From f218353e04ca61dbf5e4d7a3a024fe414dbfa46a Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Wed, 9 Nov 2011 08:32:33 +0100 Subject: [PATCH] Need to include xlocale.h on Darwin for strtod_l This fixes the build of gstrfuncs.c on Darwin. --- configure.ac | 2 ++ glib/gstrfuncs.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index 378a5cf..eeb74e8 100644 --- a/configure.ac +++ b/configure.ac @@ -913,6 +913,8 @@ AC_CHECK_HEADERS([sys/mount.h sys/sysctl.h], [], [], #endif ]) +AC_CHECK_HEADERS([xlocale.h]) + # check for structure fields AC_CHECK_MEMBERS([struct stat.st_mtimensec, struct stat.st_mtim.tv_nsec, struct stat.st_atimensec, struct stat.st_atim.tv_nsec, struct stat.st_ctimensec, struct stat.st_ctim.tv_nsec]) AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct statfs.f_fstypename, struct statfs.f_bavail],,, [#include diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c index 01ca718..8495697 100644 --- a/glib/gstrfuncs.c +++ b/glib/gstrfuncs.c @@ -39,6 +39,11 @@ #include #include /* For tolower() */ +#ifdef HAVE_XLOCALE_H +/* Needed on BSD/OS X for e.g. strtod_l */ +#include +#endif + #ifdef G_OS_WIN32 #include #endif -- 2.7.4