aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2005-09-28 18:46:26 +0800
committerTor Lillqvist <tml@src.gnome.org>2005-09-28 18:46:26 +0800
commitd1062b7afa165532b293581026190a36c27b2616 (patch)
tree25790054c0fa00bdd7e10f510a6a9e043af27f5d /mail/message-list.c
parent5fb5dab62e2929a0be7f58e5c659e9692a1b7ee1 (diff)
downloadgsoc2013-evolution-d1062b7afa165532b293581026190a36c27b2616.tar
gsoc2013-evolution-d1062b7afa165532b293581026190a36c27b2616.tar.gz
gsoc2013-evolution-d1062b7afa165532b293581026190a36c27b2616.tar.bz2
gsoc2013-evolution-d1062b7afa165532b293581026190a36c27b2616.tar.lz
gsoc2013-evolution-d1062b7afa165532b293581026190a36c27b2616.tar.xz
gsoc2013-evolution-d1062b7afa165532b293581026190a36c27b2616.tar.zst
gsoc2013-evolution-d1062b7afa165532b293581026190a36c27b2616.zip
Define localtime_r() for Win32 using localtime() (which is thread-safe in
2005-09-28 Tor Lillqvist <tml@novell.com> * message-list.c: Define localtime_r() for Win32 using localtime() (which is thread-safe in Microsoft's C library). svn path=/trunk/; revision=30400
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index 861d2d2381..35e0727864 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -82,6 +82,16 @@
#include <unistd.h>
#endif
+#ifdef G_OS_WIN32
+/* Undefine the similar macro from <pthread.h>,it doesn't check if
+ * localtime() returns NULL.
+ */
+#undef localtime_r
+
+/* The localtime() in Microsoft's C library is MT-safe */
+#define localtime_r(tp,tmp) (localtime(tp)?(*(tmp)=*localtime(tp),(tmp)):0)
+#endif
+
#define d(x)
#define t(x)