Commit aae293a0 authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

rename macros NO_USE_ -> NO_

parent de262d5b
...@@ -17,17 +17,17 @@ ...@@ -17,17 +17,17 @@
/* gettimeofday(2) */ /* gettimeofday(2) */
/* C99 does not have gettimeofday that is required to retrieve microseconds */ /* C99 does not have gettimeofday that is required to retrieve microseconds */
/* uncomment following macro on platforms without gettimeofday(2) */ /* uncomment following macro on platforms without gettimeofday(2) */
/* #define NO_USE_GETTIMEOFDAY */ /* #define NO_GETTIMEOFDAY */
/* gmtime(3) */ /* gmtime(3) */
/* C99 does not have reentrant gmtime_r() so it might cause troubles under */ /* C99 does not have reentrant gmtime_r() so it might cause troubles under */
/* multi-threading environment. undef following macro on platforms that */ /* multi-threading environment. undef following macro on platforms that */
/* does not have gmtime_r() and localtime_r(). */ /* does not have gmtime_r() and localtime_r(). */
/* #define NO_USE_GMTIME_R */ /* #define NO_GMTIME_R */
#ifdef _WIN32 #ifdef _WIN32
/* unfortunately Win32 platform do not provide gmtime_r/localtime_r */ /* unfortunately Win32 platform do not provide gmtime_r/localtime_r */
#define NO_USE_GMTIME_R #define NO_GMTIME_R
#endif #endif
/* timegm(3) */ /* timegm(3) */
...@@ -37,10 +37,10 @@ ...@@ -37,10 +37,10 @@
/** end of Time class configuration */ /** end of Time class configuration */
#ifndef NO_USE_GETTIMEOFDAY #ifndef NO_GETTIMEOFDAY
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#ifndef NO_USE_GMTIME_R #ifndef 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_USE_GMTIME_R #ifndef NO_GMTIME_R
self->datetime = *aid; // copy data self->datetime = *aid; // copy data
#endif #endif
...@@ -179,7 +179,7 @@ current_time(mrb_state *mrb) ...@@ -179,7 +179,7 @@ current_time(mrb_state *mrb)
struct mrb_time *tm; struct mrb_time *tm;
tm = mrb_malloc(mrb, sizeof(*tm)); tm = mrb_malloc(mrb, sizeof(*tm));
#ifdef NO_USE_GETTIMEOFDAY #ifdef NO_GETTIMEOFDAY
tm->sec = time(NULL); tm->sec = time(NULL);
tm->usec = 0; tm->usec = 0;
#else #else
......
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