From 26b2f9567dc0bd7b70e6cc66eee800a1e0d89b73 Mon Sep 17 00:00:00 2001 From: hiro Date: Fri, 18 Apr 2014 06:26:43 +0000 Subject: wrapped time_t as stime_t. stime_t will be 32-bit on win32 for backward compatibility. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3386 ee746299-78ed-0310-b773-934348b2243d --- libsylph/procheader.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libsylph/procheader.c') diff --git a/libsylph/procheader.c b/libsylph/procheader.c index 93ef99e7..96cca15c 100644 --- a/libsylph/procheader.c +++ b/libsylph/procheader.c @@ -873,7 +873,7 @@ static gint procheader_scan_date_string(const gchar *str, return -1; } -time_t procheader_date_parse(gchar *dest, const gchar *src, gint len) +stime_t procheader_date_parse(gchar *dest, const gchar *src, gint len) { static gchar monthstr[] = "JanFebMarAprMayJunJulAugSepOctNovDec"; gchar weekday[11]; @@ -951,14 +951,15 @@ time_t procheader_date_parse(gchar *dest, const gchar *src, gint len) return timer; } -void procheader_date_get_localtime(gchar *dest, gint len, const time_t timer) +void procheader_date_get_localtime(gchar *dest, gint len, const stime_t timer) { + time_t timer_ = timer; struct tm *lt; gchar *default_format = "%y/%m/%d(%a) %H:%M"; gchar *buf; gchar tmp[BUFFSIZE]; - lt = localtime(&timer); + lt = localtime(&timer_); if (!lt) { g_warning("can't get localtime of %ld\n", timer); dest[0] = '\0'; -- cgit v1.2.3