fix: macro WIN32 is deprecated, but is implicit defined by some certain environment including visual studio

This commit is contained in:
liukaiwen
2023-03-22 13:15:48 +08:00
committed by wwmayer
parent 66047f7daa
commit de63e13adb

View File

@@ -22,7 +22,7 @@ using namespace Wm4;
#include <sys/stat.h>
// support for GetTime
#if !defined(WIN32)
#if !defined(_WIN32)
#include <sys/time.h>
static timeval gs_kInitial;
static bool gs_bInitializedTime = false;
@@ -103,7 +103,7 @@ void System::EndianCopy (int iSize, int iQuantity, const void* pvSrc,
//----------------------------------------------------------------------------
double System::GetTime ()
{
#if !defined(WIN32)
#if !defined(_WIN32)
if (!gs_bInitializedTime)
{
gs_bInitializedTime = true;