Commit 3d0d525c authored by Deucе's avatar Deucе 👌🏾
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
Pipeline #2745 passed with stage
in 9 minutes and 46 seconds
......@@ -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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment