BSD Porting fixes, conditional compilation and use of gettimeofday()

This commit is contained in:
David Pello
2016-05-14 20:30:19 +02:00
committed by wmayer
parent b5dfc41759
commit 5f0073b9e0
8 changed files with 43 additions and 9 deletions

View File

@@ -20,7 +20,9 @@
#endif
#include <time.h>
#if defined(FC_OS_WIN32)
#include <sys/timeb.h>
#endif
#include <Base/Exception.h>
#include <Base/Interpreter.h>

View File

@@ -22,7 +22,7 @@ using namespace Wm4;
#include <sys/stat.h>
// support for GetTime
#ifdef __APPLE__
#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 ()
{
#ifdef __APPLE__
#if !defined(WIN32)
if (!gs_bInitializedTime)
{
gs_bInitializedTime = true;

View File

@@ -21,7 +21,9 @@
#endif
#include <time.h>
#if defined(FC_OS_WIN32)
#include <sys/timeb.h>
#endif
#include <Base/Exception.h>
#include <Base/Interpreter.h>