Skip to content
Snippets Groups Projects
Commit 4c481b36 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 ea5b359b
No related branches found
No related tags found
No related merge requests found
......@@ -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.
Finish editing this message first!
Please register or to comment