*: check defined(_WIN32) instead of defined(WIN32)
Only _WIN32 is defined by the compiler, and WIN32 is not standardized and may be missing. Closes #169
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
#include <assert.h>
|
||||
#include <time.h>
|
||||
|
||||
#if !defined(__GLIBC__) && !defined(WIN32)
|
||||
#if !defined(__GLIBC__) && !defined(_WIN32)
|
||||
|
||||
/**
|
||||
* Determine the time zone offset in a portable way.
|
||||
@@ -59,7 +59,7 @@ ParseTimePoint(const char *s, const char *format)
|
||||
assert(s != nullptr);
|
||||
assert(format != nullptr);
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
/* TODO: emulate strptime()? */
|
||||
(void)s;
|
||||
(void)format;
|
||||
@@ -80,5 +80,5 @@ ParseTimePoint(const char *s, const char *format)
|
||||
|
||||
return std::chrono::system_clock::from_time_t(t);
|
||||
|
||||
#endif /* !WIN32 */
|
||||
#endif /* !_WIN32 */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user