[glib] Need to include xlocale.h on Darwin for strtod_l
- From: Kristian Rietveld <kristian src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Need to include xlocale.h on Darwin for strtod_l
- Date: Wed, 9 Nov 2011 07:34:14 +0000 (UTC)
commit f218353e04ca61dbf5e4d7a3a024fe414dbfa46a
Author: Kristian Rietveld <kris loopnest org>
Date: Wed Nov 9 08:32:33 2011 +0100
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(+), 0 deletions(-)
---
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 <sys/types.h>
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 <errno.h>
#include <ctype.h> /* For tolower() */
+#ifdef HAVE_XLOCALE_H
+/* Needed on BSD/OS X for e.g. strtod_l */
+#include <xlocale.h>
+#endif
+
#ifdef G_OS_WIN32
#include <windows.h>
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]