summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-05-17 02:39:28 +0900
committerYukihiro Matsumoto <[email protected]>2012-05-17 02:39:28 +0900
commitb706b4cba4181e2eb0df7e394a8cb2abc0d4cd11 (patch)
tree58b57a10ac475de474526eb8e0208bd80a3dc38c /src
parent357aac680e321890c6c9c641adaf3c87c1c4c76e (diff)
downloadmruby-b706b4cba4181e2eb0df7e394a8cb2abc0d4cd11.tar.gz
mruby-b706b4cba4181e2eb0df7e394a8cb2abc0d4cd11.zip
gmtime_r emulated by gmtime_s should return struct tm*; close #146
Diffstat (limited to 'src')
-rw-r--r--src/time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/time.c b/src/time.c
index 5e75152e6..b0a74d0d1 100644
--- a/src/time.c
+++ b/src/time.c
@@ -28,8 +28,8 @@
#ifdef _WIN32
/* Win32 platform do not provide gmtime_r/localtime_r; emulate them using gmtime_s/localtime_s */
#if _MVC_VER
-#define gmtime_r(tp, tm) ((gmtime_s((tm), (tp)) == 0) ? (tp) : NULL)
-#define localtime_r(tp, tm) ((localtime_s((tm), (tp)) == 0) ? (tp) : NULL)
+#define gmtime_r(tp, tm) ((gmtime_s((tm), (tp)) == 0) ? (tm) : NULL)
+#define localtime_r(tp, tm) ((localtime_s((tm), (tp)) == 0) ? (tm) : NULL)
#else
#define NO_GMTIME_R
#endif