aboutsummaryrefslogtreecommitdiff
path: root/libsylph/utils.h
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2014-04-18 06:26:43 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2014-04-18 06:26:43 +0000
commit26b2f9567dc0bd7b70e6cc66eee800a1e0d89b73 (patch)
tree3eb93151b98eabb35e7c52b7ea6e6a79648227bd /libsylph/utils.h
parentd6433225cb188bace23a80686df3be09edaa6036 (diff)
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
Diffstat (limited to 'libsylph/utils.h')
-rw-r--r--libsylph/utils.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/libsylph/utils.h b/libsylph/utils.h
index 79ece425..f93f4ce8 100644
--- a/libsylph/utils.h
+++ b/libsylph/utils.h
@@ -95,6 +95,14 @@ gint syl_link (const gchar *src,
#define HAVE_U32_TYPEDEF
#endif
+#if defined(G_OS_WIN32) && !defined(_WIN64) && defined(HAVE_64BIT_TIME_T)
+ /* for backward binary compatibility. Use only in struct definition and
+ pointer arguments. */
+ typedef gint32 stime_t;
+#else
+ typedef time_t stime_t;
+#endif
+
#ifndef BIG_ENDIAN_HOST
#if (G_BYTE_ORDER == G_BIG_ENDIAN)
#define BIG_ENDIAN_HOST 1
@@ -514,11 +522,11 @@ gint play_sound (const gchar *file,
gboolean async);
/* time functions */
-time_t remote_tzoffset_sec (const gchar *zone);
-time_t tzoffset_sec (time_t *now);
+stime_t remote_tzoffset_sec (const gchar *zone);
+stime_t tzoffset_sec (stime_t *now);
gchar *tzoffset_buf (gchar *buf,
- time_t *now);
-gchar *tzoffset (time_t *now);
+ stime_t *now);
+gchar *tzoffset (stime_t *now);
void get_rfc822_date (gchar *buf,
gint len);