diff --git a/include/SDL_thread.h b/include/SDL_thread.h index be0601cc9..513d5dfcb 100644 --- a/include/SDL_thread.h +++ b/include/SDL_thread.h @@ -35,6 +35,17 @@ #include "SDL_atomic.h" #include "SDL_mutex.h" +#if defined(__WIN32__) +#include /* _beginthreadex() and _endthreadex() */ +#endif +#if defined(__OS2__) /* for _beginthread() and _endthread() */ +#ifndef __EMX__ +#include +#else +#include +#endif +#endif + #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus @@ -99,7 +110,6 @@ typedef int (SDLCALL * SDL_ThreadFunction) (void *data); * library! */ #define SDL_PASSED_BEGINTHREAD_ENDTHREAD -#include /* _beginthreadex() and _endthreadex() */ typedef uintptr_t (__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned, unsigned (__stdcall *func)(void *), @@ -148,12 +158,6 @@ SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *), */ #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);