diff --git a/src/time_zone_format.cc b/src/time_zone_format.cc index 025c0bd..71e2381 100644 --- a/src/time_zone_format.cc +++ b/src/time_zone_format.cc @@ -13,12 +13,14 @@ // limitations under the License. #if !defined(HAS_STRPTIME) -# if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__VXWORKS__) +# if defined(_MSC_VER) || defined(__MINGW32__) || defined(__VXWORKS__) +# define HAS_STRPTIME 0 +# else # define HAS_STRPTIME 1 // Assume everyone else has strptime(). # endif #endif -#if defined(HAS_STRPTIME) && HAS_STRPTIME +#if HAS_STRPTIME # if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) && !defined(__OpenBSD__) # define _XOPEN_SOURCE 500 // Exposes definitions for SUSv2 (UNIX 98). # endif @@ -39,7 +41,7 @@ #include #include #include -#if !defined(HAS_STRPTIME) +#if !HAS_STRPTIME #include #include #endif @@ -52,7 +54,7 @@ namespace detail { namespace { -#if !defined(HAS_STRPTIME) +#if !HAS_STRPTIME // Build a strptime() using C++11's std::get_time(). char* strptime(const char* s, const char* fmt, std::tm* tm) { std::istringstream input(s);