Skip to content

[CORE][CMAKE] Fix Linux compilation of WWDebug #699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Core/Libraries/Source/WWVegas/WWDebug/wwdebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@


#include "wwdebug.h"
#include <windows.h>
//#include "win.h" can use this if allowed to see wwlib
#include <stdlib.h>
#include <stdarg.h>
Expand All @@ -53,6 +52,11 @@
#include <signal.h>
#include "Except.h"

#ifdef _WIN32
#include <windows.h>
#else
#include <errno.h>
#endif

static PrintFunc _CurMessageHandler = NULL;
static AssertPrintFunc _CurAssertHandler = NULL;
Expand All @@ -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
}

/***********************************************************************************************
Expand Down
8 changes: 6 additions & 2 deletions Core/Libraries/Source/WWVegas/WWDebug/wwmemlog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include "wwdebug.h"
#include "Vector.H"
#include "FastAllocator.h"
#include <windows.h>

#define USE_FAST_ALLOCATOR

Expand All @@ -70,7 +69,8 @@
** Enable one of the following #defines to specify which thread-sychronization
** method to use.
*/
#ifndef _UNIX
#ifdef _WIN32
#include <windows.h>
#define MEMLOG_USE_MUTEX 0
#define MEMLOG_USE_CRITICALSECTION 1
#define MEMLOG_USE_FASTCRITICALSECTION 0
Expand Down Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion Core/Libraries/Source/WWVegas/WWDebug/wwprofile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#include "wwprofile.h"
#include "FastAllocator.h"
#include "wwdebug.h"
#include <windows.h>
//#include "systimer.h"
#include "systimer.h"
#include "RAWFILE.H"
Expand Down