[libchamplain] Build fixes for windows
- From: Fridrich Strba <strba src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] Build fixes for windows
- Date: Tue, 20 Apr 2010 15:09:51 +0000 (UTC)
commit 7bef303bd3dfd2390e3fac972e97de8dbe393e70
Author: Fridrich Å trba <fridrich strba bluewin ch>
Date: Tue Apr 20 16:37:19 2010 +0200
Build fixes for windows
champlain/Makefile.am | 1 +
champlain/champlain-file-cache.c | 10 ++++++++++
champlain/champlain-tile.c | 4 ++++
3 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/champlain/Makefile.am b/champlain/Makefile.am
index fb0f386..f6d37a5 100644
--- a/champlain/Makefile.am
+++ b/champlain/Makefile.am
@@ -106,6 +106,7 @@ libchamplain_0_5_la_LIBADD = $(DEPS_LIBS) $(SOUP_LIBS) ../tidy/libtidy-1.0.la
libchamplain_includedir = $(includedir)/libchamplain-0.5/champlain
libchamplain_0_5_la_LDFLAGS = -version-info $(LIBRARY_VERSION) \
+ -no-undefined \
-export-symbols-regex \
^champlain_.*
diff --git a/champlain/champlain-file-cache.c b/champlain/champlain-file-cache.c
index b107a07..8afbce9 100644
--- a/champlain/champlain-file-cache.c
+++ b/champlain/champlain-file-cache.c
@@ -220,6 +220,16 @@ create_cache_dir (const gchar *dir_name)
return TRUE;
}
+#ifdef G_OS_WIN32
+#include <io.h>
+static char *mkdtemp(char *template)
+{
+ if (!_mktemp(template) || mkdir(template))
+ return NULL;
+ return template;
+}
+#endif
+
static void
init_cache (ChamplainFileCache *file_cache)
{
diff --git a/champlain/champlain-tile.c b/champlain/champlain-tile.c
index 893756b..02c7ad6 100644
--- a/champlain/champlain-tile.c
+++ b/champlain/champlain-tile.c
@@ -636,7 +636,11 @@ champlain_tile_get_modified_time_string (ChamplainTile *self)
struct tm *other_time = gmtime (&priv->modified_time->tv_sec);
char value [100];
+#ifdef G_OS_WIN32
+ strftime (value, 100, "%a, %d %b %Y %H:%M:%S %Z", other_time);
+#else
strftime (value, 100, "%a, %d %b %Y %T %Z", other_time);
+#endif
return g_strdup (value);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]