From c44e741bd99189101b73464527064ec3a70d0218 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 23 Sep 2017 12:38:47 -0700 Subject: [PATCH] Fixed bug 3842 - fix SDL_thread.h for emx Ozkan Sezer EMX declares _beginthread() / _endthread() in stdlib.h, not process.h. The attached patch updates the OS/2 case of SDL_thread.h for it. (It also tidies the unreadable whitespace in win32 case.) --- include/SDL_thread.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/include/SDL_thread.h b/include/SDL_thread.h index cf1ce492fad86..d0f6575cd5ac7 100644 --- a/include/SDL_thread.h +++ b/include/SDL_thread.h @@ -90,14 +90,11 @@ typedef int (SDLCALL * SDL_ThreadFunction) (void *data); * library! */ #define SDL_PASSED_BEGINTHREAD_ENDTHREAD -#include /* This has _beginthread() and _endthread() defined! */ - -typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned, - unsigned (__stdcall * - func) (void - *), - void *arg, unsigned, - unsigned *threadID); +#include /* _beginthreadex() and _endthreadex() */ + +typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread) + (void *, unsigned, unsigned (__stdcall *func)(void *), + void * /*arg*/, unsigned, unsigned * /* threadID */); typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code); /** @@ -124,7 +121,11 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data, * into a dll with Watcom's runtime statically linked. */ #define SDL_PASSED_BEGINTHREAD_ENDTHREAD +#ifndef __EMX__ #include +#else +#include +#endif typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/); typedef void (*pfnSDL_CurrentEndThread)(void); extern DECLSPEC SDL_Thread *SDLCALL