mirror of https://github.com/OpenTTD/OpenTTD.git
Fix aa5a8fe28: [MinGW] Wrong define tested (WIN32 vs _WIN32)
This commit is contained in:
parent
d485b50813
commit
c2db408d5d
|
@ -17,7 +17,7 @@ struct LocalTimeToStruct {
|
||||||
static inline std::tm ToTimeStruct(std::time_t time_since_epoch)
|
static inline std::tm ToTimeStruct(std::time_t time_since_epoch)
|
||||||
{
|
{
|
||||||
std::tm time = {};
|
std::tm time = {};
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
/* Windows has swapped the parameters around for localtime_s. */
|
/* Windows has swapped the parameters around for localtime_s. */
|
||||||
localtime_s(&time, &time_since_epoch);
|
localtime_s(&time, &time_since_epoch);
|
||||||
#else
|
#else
|
||||||
|
@ -32,7 +32,7 @@ struct UTCTimeToStruct {
|
||||||
static inline std::tm ToTimeStruct(std::time_t time_since_epoch)
|
static inline std::tm ToTimeStruct(std::time_t time_since_epoch)
|
||||||
{
|
{
|
||||||
std::tm time = {};
|
std::tm time = {};
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
/* Windows has swapped the parameters around for gmtime_s. */
|
/* Windows has swapped the parameters around for gmtime_s. */
|
||||||
gmtime_s(&time, &time_since_epoch);
|
gmtime_s(&time, &time_since_epoch);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue