[evolution/wip/gsettings] Fix windows build of backup-restore plugin



commit 5d79bdce74e9426b36bfc1a1d0ec3058ac5a1d3f
Author: Fridrich Å trba <fridrich strba bluewin ch>
Date:   Fri Nov 12 10:11:24 2010 +0100

    Fix windows build of backup-restore plugin

 plugins/backup-restore/backup-restore.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/plugins/backup-restore/backup-restore.c b/plugins/backup-restore/backup-restore.c
index 1c6e0d0..21b8436 100644
--- a/plugins/backup-restore/backup-restore.c
+++ b/plugins/backup-restore/backup-restore.c
@@ -39,6 +39,14 @@
 #include "shell/e-shell-utils.h"
 #include "shell/e-shell-window.h"
 
+#ifdef G_OS_WIN32
+#ifdef localtime_r
+#undef localtime_r
+#endif
+/* The localtime() in Microsoft's C library *is* thread-safe */
+#define localtime_r(timep, result)  (localtime (timep) ? memcpy ((result), localtime (timep), sizeof (*(result))) : 0)
+#endif
+
 gboolean	e_plugin_ui_init		(GtkUIManager *ui_manager,
 						 EShellWindow *shell_window);
 



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