[evolution-data-server] Bug #604858 - Reverting earlier patch due to build break



commit 7519d65d9aa1e16ec4ed95d3e6e5226281ddf4cf
Author: Milan Crha <mcrha redhat com>
Date:   Fri Dec 18 11:56:54 2009 +0100

    Bug #604858 - Reverting earlier patch due to build break

 configure.ac                  |    2 +-
 libedataserver/e-time-utils.c |   13 +++++++++----
 2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ae9f70a..f6e449c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -269,7 +269,7 @@ AC_FUNC_ALLOCA
 dnl ******************************
 dnl Checks for functions
 dnl ******************************
-AC_CHECK_FUNCS(fsync strptime strtok_r nl_langinfo)
+AC_CHECK_FUNCS(fsync strptime strtok_r)
 
 dnl ***********************************
 dnl Check for base dependencies early.
diff --git a/libedataserver/e-time-utils.c b/libedataserver/e-time-utils.c
index 7fd2cc2..73759c5 100644
--- a/libedataserver/e-time-utils.c
+++ b/libedataserver/e-time-utils.c
@@ -9,14 +9,19 @@
  */
 
 #include <config.h>
-#define _XOPEN_SOURCE
+
+#ifdef __linux__
+/* We need this to get a prototype for strptime. */
+#define _GNU_SOURCE
+#endif /* __linux__ */
 
 #include <time.h>
 #include <sys/time.h>
 
-#ifdef HAVE_NL_LANGINFO
+#ifdef __linux__
 #include <langinfo.h>
-#endif /* HAVE_NL_LANGINFO */
+#undef _GNU_SOURCE
+#endif /* __linux__ */
 
 #include <string.h>
 #include <ctype.h>
@@ -2023,7 +2028,7 @@ e_time_get_d_fmt_with_4digit_year (void)
 {
 	gchar *p;
 	gchar *res = NULL;
-#if defined(HAVE_NL_LANGINFO)
+#if defined(__linux__)
 	res = g_strdup (nl_langinfo (D_FMT) );
 #elif defined(G_OS_WIN32)
   #define GET_LOCALE_INFO(str, len) GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_SLONGDATE, str, len)



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