Skip to content
Snippets Groups Projects
Commit 3d0d525c authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Use MinGW32 types for pthread_t and pthread_mutex_t

uintptr_t should be the same as a DWORD on Win32,
and CRITICAL_SECTION can be stored in an inptr_t as well.

This should work fine, and allow more build environments to be happy.
This is generally caused by new C++ standards having thread support
in the standard library, so wrappers getting pushed deeper in.

At some pointer, this should be redone with standard threads, but
now is not the time.
parent b4bc9c97
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2745 passed
......@@ -64,7 +64,7 @@ extern "C" {
#include <errno.h> /* EAGAIN and EBUSY */
/* POSIX threads */
typedef DWORD pthread_t;
typedef uintptr_t pthread_t;
#define pthread_self() GetCurrentThreadId()
#define pthread_equal(t1,t2) ((t1)==(t2))
......@@ -75,7 +75,7 @@ extern "C" {
#else /* Implemented as Win32 Critical Sections */
typedef CRITICAL_SECTION pthread_mutex_t;
typedef intptr_t pthread_mutex_t;
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment