summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-05-08 01:11:22 +0900
committerYukihiro Matsumoto <[email protected]>2012-05-08 01:11:22 +0900
commitaae293a0026b72c433cc9a27c26512c639f3286d (patch)
treebf8060e1f4b6388d7f15092edccd50daa00f0bf0 /src
parentde262d5ba863ffd9bc9e2dfdfc59739b1654ab02 (diff)
downloadmruby-aae293a0026b72c433cc9a27c26512c639f3286d.tar.gz
mruby-aae293a0026b72c433cc9a27c26512c639f3286d.zip
rename macros NO_USE_ -> NO_
Diffstat (limited to 'src')
-rw-r--r--src/time.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/time.c b/src/time.c
index bd6b87424..a0e992d87 100644
--- a/src/time.c
+++ b/src/time.c
@@ -17,17 +17,17 @@
/* gettimeofday(2) */
/* C99 does not have gettimeofday that is required to retrieve microseconds */
/* uncomment following macro on platforms without gettimeofday(2) */
-/* #define NO_USE_GETTIMEOFDAY */
+/* #define NO_GETTIMEOFDAY */
/* gmtime(3) */
/* C99 does not have reentrant gmtime_r() so it might cause troubles under */
/* multi-threading environment. undef following macro on platforms that */
/* does not have gmtime_r() and localtime_r(). */
-/* #define NO_USE_GMTIME_R */
+/* #define NO_GMTIME_R */
#ifdef _WIN32
/* unfortunately Win32 platform do not provide gmtime_r/localtime_r */
-#define NO_USE_GMTIME_R
+#define NO_GMTIME_R
#endif
/* timegm(3) */
@@ -37,10 +37,10 @@
/** end of Time class configuration */
-#ifndef NO_USE_GETTIMEOFDAY
+#ifndef NO_GETTIMEOFDAY
#include <sys/time.h>
#endif
-#ifndef NO_USE_GMTIME_R
+#ifndef NO_GMTIME_R
#define gmtime_r(t,r) gmtime(t)
#define localtime_r(t,r) (tzset(),localtime(t))
#endif
@@ -138,7 +138,7 @@ mrb_time_update_datetime(struct mrb_time *self)
aid = localtime_r(&self->sec, &self->datetime);
}
if(!aid) return NULL;
-#ifndef NO_USE_GMTIME_R
+#ifndef NO_GMTIME_R
self->datetime = *aid; // copy data
#endif
@@ -179,7 +179,7 @@ current_time(mrb_state *mrb)
struct mrb_time *tm;
tm = mrb_malloc(mrb, sizeof(*tm));
-#ifdef NO_USE_GETTIMEOFDAY
+#ifdef NO_GETTIMEOFDAY
tm->sec = time(NULL);
tm->usec = 0;
#else