Commit 766f176b authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #107 from mattn/fix_ifdef_gmtime_r

fix #ifdef to pass on windows.
parents 8b1a10ce 46d8941d
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#ifndef NO_GETTIMEOFDAY #ifndef NO_GETTIMEOFDAY
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#ifndef NO_GMTIME_R #ifdef NO_GMTIME_R
#define gmtime_r(t,r) gmtime(t) #define gmtime_r(t,r) gmtime(t)
#define localtime_r(t,r) (tzset(),localtime(t)) #define localtime_r(t,r) (tzset(),localtime(t))
#endif #endif
...@@ -138,7 +138,7 @@ mrb_time_update_datetime(struct mrb_time *self) ...@@ -138,7 +138,7 @@ mrb_time_update_datetime(struct mrb_time *self)
aid = localtime_r(&self->sec, &self->datetime); aid = localtime_r(&self->sec, &self->datetime);
} }
if(!aid) return NULL; if(!aid) return NULL;
#ifndef NO_GMTIME_R #ifdef NO_GMTIME_R
self->datetime = *aid; // copy data self->datetime = *aid; // copy data
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment