diff --git a/Core/Libraries/Source/WWVegas/WWDebug/wwdebug.cpp b/Core/Libraries/Source/WWVegas/WWDebug/wwdebug.cpp index e034378863..8991b8fc75 100644 --- a/Core/Libraries/Source/WWVegas/WWDebug/wwdebug.cpp +++ b/Core/Libraries/Source/WWVegas/WWDebug/wwdebug.cpp @@ -43,7 +43,6 @@ #include "wwdebug.h" -#include //#include "win.h" can use this if allowed to see wwlib #include #include @@ -53,6 +52,11 @@ #include #include "Except.h" +#ifdef _WIN32 +#include +#else +#include +#endif static PrintFunc _CurMessageHandler = NULL; static AssertPrintFunc _CurAssertHandler = NULL; @@ -79,7 +83,11 @@ void Convert_System_Error_To_String(int id, char* buffer, int buf_len) int Get_Last_System_Error() { +#ifdef _WIN32 return GetLastError(); +#else + return errno; +#endif } /*********************************************************************************************** diff --git a/Core/Libraries/Source/WWVegas/WWDebug/wwmemlog.cpp b/Core/Libraries/Source/WWVegas/WWDebug/wwmemlog.cpp index 7a77319e2a..e946a8188b 100644 --- a/Core/Libraries/Source/WWVegas/WWDebug/wwmemlog.cpp +++ b/Core/Libraries/Source/WWVegas/WWDebug/wwmemlog.cpp @@ -43,7 +43,6 @@ #include "wwdebug.h" #include "Vector.H" #include "FastAllocator.h" -#include #define USE_FAST_ALLOCATOR @@ -70,7 +69,8 @@ ** Enable one of the following #defines to specify which thread-sychronization ** method to use. */ -#ifndef _UNIX +#ifdef _WIN32 +#include #define MEMLOG_USE_MUTEX 0 #define MEMLOG_USE_CRITICALSECTION 1 #define MEMLOG_USE_FASTCRITICALSECTION 0 @@ -289,6 +289,10 @@ WWINLINE void * Get_Mem_Log_Mutex(void) return _MemLogCriticalSectionHandle; #endif + +#if DISABLE_MEMLOG + return NULL; +#endif } WWINLINE void Lock_Mem_Log_Mutex(void) diff --git a/Core/Libraries/Source/WWVegas/WWDebug/wwprofile.cpp b/Core/Libraries/Source/WWVegas/WWDebug/wwprofile.cpp index 1eb6f39f3d..d41742e0ca 100644 --- a/Core/Libraries/Source/WWVegas/WWDebug/wwprofile.cpp +++ b/Core/Libraries/Source/WWVegas/WWDebug/wwprofile.cpp @@ -53,7 +53,6 @@ #include "wwprofile.h" #include "FastAllocator.h" #include "wwdebug.h" -#include //#include "systimer.h" #include "systimer.h" #include "RAWFILE.H"