diff options
author | Tor Lillqvist <tml@novell.com> | 2005-09-28 18:39:48 +0800 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2005-09-28 18:39:48 +0800 |
commit | 7670176dd23a4aee7875ea6c20f480d5f3c5a4e4 (patch) | |
tree | 72fd501bfb79f87c5bebf51780b0854a7f0139a4 | |
parent | c8bc7fc32c0cec40ca5f547e5b01d02985f37510 (diff) | |
download | gsoc2013-evolution-7670176dd23a4aee7875ea6c20f480d5f3c5a4e4.tar gsoc2013-evolution-7670176dd23a4aee7875ea6c20f480d5f3c5a4e4.tar.gz gsoc2013-evolution-7670176dd23a4aee7875ea6c20f480d5f3c5a4e4.tar.bz2 gsoc2013-evolution-7670176dd23a4aee7875ea6c20f480d5f3c5a4e4.tar.lz gsoc2013-evolution-7670176dd23a4aee7875ea6c20f480d5f3c5a4e4.tar.xz gsoc2013-evolution-7670176dd23a4aee7875ea6c20f480d5f3c5a4e4.tar.zst gsoc2013-evolution-7670176dd23a4aee7875ea6c20f480d5f3c5a4e4.zip |
Define localtime_r() for Win32 using localtime() (which is thread-safe in
2005-09-28 Tor Lillqvist <tml@novell.com>
* em-format-html-display.c: Define localtime_r() for Win32 using
localtime() (which is thread-safe in Microsoft's C library).
svn path=/trunk/; revision=30398
-rw-r--r-- | mail/ChangeLog | 3 | ||||
-rw-r--r-- | mail/em-format-html-display.c | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index c415ac891a..8628b2deea 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -7,6 +7,9 @@ to literal ASCII strings, so just casefolding ASCII is enough. Also better for portability. + * em-format-html-display.c: Define localtime_r() for Win32 using + localtime() (which is thread-safe in Microsoft's C library). + 2005-09-28 Parthasarathi Susarla <sparthasarathi@novell.com> See bug ** 317329 diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index 0e054f1dca..d6719d361a 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -92,6 +92,16 @@ #include "e-attachment.h" #include "e-attachment-bar.h" +#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 EFHD_TABLE_OPEN "<table>" |