diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-05-15 18:10:53 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-05-15 18:10:53 -0700 |
| commit | f202658d80105755fd56a664c4d4013fa71b21d4 (patch) | |
| tree | 36d1f87c81ed621052e87875728a32e726cb5cb0 /src | |
| parent | 9dafdfcb8ce7fafd3c2d40ab547fd30c383409b4 (diff) | |
| parent | 25d787286b9a8c7a793803b8f0d33f141fbeaafd (diff) | |
| download | mruby-f202658d80105755fd56a664c4d4013fa71b21d4.tar.gz mruby-f202658d80105755fd56a664c4d4013fa71b21d4.zip | |
Merge pull request #137 from mattn/fix_gmtime_r
fix #127 on mingw.
Diffstat (limited to 'src')
| -rw-r--r-- | src/time.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) */ |
