Fix errors when compiling headers with MinGW

This commit is contained in:
rdb 2022-05-10 14:11:51 +02:00
parent fbea0056f5
commit 42a19860d5
9 changed files with 15 additions and 15 deletions

View File

@ -49,7 +49,7 @@ typedef ReMutexPosixImpl ReMutexImpl;
// Also define what a true OS-provided lock will be, even if we don't have // Also define what a true OS-provided lock will be, even if we don't have
// threading enabled in the build. Sometimes we need to interface with an // threading enabled in the build. Sometimes we need to interface with an
// external program or something that wants real locks. // external program or something that wants real locks.
#if defined(WIN32_VC) #if defined(WIN32_VC) || (defined(_WIN32) && !defined(HAVE_POSIX_THREADS))
#include "mutexWin32Impl.h" #include "mutexWin32Impl.h"
typedef MutexWin32Impl TrueMutexImpl; typedef MutexWin32Impl TrueMutexImpl;

View File

@ -13,7 +13,7 @@
#include "selectThreadImpl.h" #include "selectThreadImpl.h"
#ifdef WIN32_VC #ifdef _WIN32
#include "mutexWin32Impl.h" #include "mutexWin32Impl.h"
@ -25,4 +25,4 @@ MutexWin32Impl() {
InitializeCriticalSectionAndSpinCount(&_lock, 4000); InitializeCriticalSectionAndSpinCount(&_lock, 4000);
} }
#endif // WIN32_VC #endif // _WIN32

View File

@ -17,7 +17,7 @@
#include "dtoolbase.h" #include "dtoolbase.h"
#include "selectThreadImpl.h" #include "selectThreadImpl.h"
#ifdef WIN32_VC #ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1 #define WIN32_LEAN_AND_MEAN 1
#endif #endif
@ -47,6 +47,6 @@ private:
#include "mutexWin32Impl.I" #include "mutexWin32Impl.I"
#endif // WIN32_VC #endif // _WIN32
#endif #endif

View File

@ -47,7 +47,7 @@
#undef TVOLATILE #undef TVOLATILE
#define TVOLATILE #define TVOLATILE
#elif defined(WIN32_VC) #elif defined(WIN32_VC) || (defined(_WIN32) && !defined(HAVE_POSIX_THREADS))
// In Windows, use the native threading library. // In Windows, use the native threading library.
#define THREAD_WIN32_IMPL 1 #define THREAD_WIN32_IMPL 1

View File

@ -13,8 +13,8 @@
#include "selectThreadImpl.h" #include "selectThreadImpl.h"
#if defined(WIN32_VC) || defined(WIN64_VC) #ifdef _WIN32
#include "conditionVarFullWin32Impl.h" #include "conditionVarFullWin32Impl.h"
#endif // WIN32_VC #endif // _WIN32

View File

@ -17,7 +17,7 @@
#include "pandabase.h" #include "pandabase.h"
#include "selectThreadImpl.h" #include "selectThreadImpl.h"
#if defined(WIN32_VC) #ifdef _WIN32
#include "mutexWin32Impl.h" #include "mutexWin32Impl.h"
#include "pnotify.h" #include "pnotify.h"
@ -58,6 +58,6 @@ private:
#include "conditionVarFullWin32Impl.I" #include "conditionVarFullWin32Impl.I"
#endif // WIN32_VC #endif // _WIN32
#endif #endif

View File

@ -50,7 +50,7 @@ typedef ConditionVarPosixImpl ConditionVarFullImpl;
#endif #endif
#if defined(WIN32_VC) #if defined(WIN32_VC) || (defined(_WIN32) && !defined(HAVE_POSIX_THREADS))
#include "conditionVarWin32Impl.h" #include "conditionVarWin32Impl.h"
typedef ConditionVarWin32Impl TrueConditionVarImpl; typedef ConditionVarWin32Impl TrueConditionVarImpl;

View File

@ -13,8 +13,8 @@
#include "selectThreadImpl.h" #include "selectThreadImpl.h"
#if defined(WIN32_VC) || defined(WIN64_VC) #ifdef _WIN32
#include "conditionVarWin32Impl.h" #include "conditionVarWin32Impl.h"
#endif // WIN32_VC #endif // _WIN32

View File

@ -17,7 +17,7 @@
#include "pandabase.h" #include "pandabase.h"
#include "selectThreadImpl.h" #include "selectThreadImpl.h"
#if defined(WIN32_VC) #ifdef _WIN32
#include "mutexWin32Impl.h" #include "mutexWin32Impl.h"
#include "pnotify.h" #include "pnotify.h"
@ -50,6 +50,6 @@ private:
#include "conditionVarWin32Impl.I" #include "conditionVarWin32Impl.I"
#endif // WIN32_VC #endif // _WIN32
#endif #endif