diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2014-04-18 09:29:38 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2014-04-18 09:29:38 +0000 |
commit | d696272192e69a7c7c48fd8686886d3c00b1d40c (patch) | |
tree | 47c08cd3cc9487450ae7f5f3f9f75ee4d390cc05 /libsylph/procheader.c | |
parent | f7544bcd10599ba3204bd483b398df342f15e7d1 (diff) |
made workaround for 64-bit time_t on win32.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3391 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/procheader.c')
-rw-r--r-- | libsylph/procheader.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libsylph/procheader.c b/libsylph/procheader.c index 6c942e70..1dcffa29 100644 --- a/libsylph/procheader.c +++ b/libsylph/procheader.c @@ -885,8 +885,9 @@ stime_t procheader_date_parse(gchar *dest, const gchar *src, gint len) GDateMonth dmonth = G_DATE_BAD_MONTH; struct tm t; gchar *p; - time_t timer; + time_t timer_; time_t tz_offset; + stime_t timer; if (procheader_scan_date_string(src, weekday, &day, month, &year, &hh, &mm, &ss, zone) < 0) { @@ -926,11 +927,11 @@ stime_t procheader_date_parse(gchar *dest, const gchar *src, gint len) t.tm_yday = 0; t.tm_isdst = -1; - timer = mktime(&t); - if (timer == -1) { + timer_ = mktime(&t); + if (timer_ == -1) { if (year >= 2038) { g_warning("mktime: date overflow: %s", src); - timer = G_MAXINT - 12 * 3600; + timer_ = G_MAXINT - 12 * 3600; } else { g_warning("mktime: can't convert date: %s", src); if (dest) @@ -939,6 +940,7 @@ stime_t procheader_date_parse(gchar *dest, const gchar *src, gint len) } } + timer = timer_; if (timer < G_MAXINT - 12 * 3600) { tz_offset = remote_tzoffset_sec(zone); if (tz_offset != -1) |