From 6af6a8dab00d30f1d7b193a04b8fc3a133508cc3 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 15 Sep 2008 22:52:12 +0000 Subject: [PATCH] time_t is 64 bits in all the newer Microsoft C libraries, not just 64-bit 2008-09-16 Tor Lillqvist * glib/gtimer.c (g_time_val_to_iso8601): time_t is 64 bits in all the newer Microsoft C libraries, not just 64-bit ones. So to avoid crash if compiled with newer MSVSes, use a separate time_t variable in all cases on Windows. svn path=/trunk/; revision=7496 --- ChangeLog | 5 +++++ glib/gtimer.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 52014f744..0c0caaa0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-09-16 Tor Lillqvist + * glib/gtimer.c (g_time_val_to_iso8601): time_t is 64 bits in all + the newer Microsoft C libraries, not just 64-bit ones. So to avoid + crash if compiled with newer MSVSes, use a separate time_t + variable in all cases on Windows. + * glib/gbacktrace.h: Define G_BREAKPOINT() also for 64-bit MSVC, using the __debugbreak() intrinsic. diff --git a/glib/gtimer.c b/glib/gtimer.c index bfc559add..3e9a1a6fa 100644 --- a/glib/gtimer.c +++ b/glib/gtimer.c @@ -422,7 +422,7 @@ g_time_val_to_iso8601 (GTimeVal *time_) g_return_val_if_fail (time_->tv_usec >= 0 && time_->tv_usec < G_USEC_PER_SEC, NULL); -#ifdef _WIN64 +#ifdef _WIN32 { time_t secs = time_->tv_sec; tm = gmtime (&secs);