diff options
| -rw-r--r-- | src/math.c | 1 | ||||
| -rw-r--r-- | src/time.c | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/math.c b/src/math.c index 96f803580..cbe773c58 100644 --- a/src/math.c +++ b/src/math.c @@ -11,7 +11,6 @@ mrb_raise(mrb, E_RANGE_ERROR, "Numerical argument is out of domain - " #msg); /* math functions not provided under Microsoft Visual C++ */ -#define _MSC_VER #ifdef _MSC_VER #define asinh(x) log(x + sqrt(pow(x,2.0) + 1)) #define acosh(x) log(x + sqrt(pow(x,2.0) - 1)) diff --git a/src/time.c b/src/time.c index cf2fd3b91..5e75152e6 100644 --- a/src/time.c +++ b/src/time.c @@ -27,8 +27,12 @@ #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) +#else +#define NO_GMTIME_R +#endif #endif /* timegm(3) */ |
