include/SDL_thread.h
changeset 11543 53b03749a7ff
parent 11356 0347c3e08f85
child 11811 5d94cb6b24d3
     1.1 --- a/include/SDL_thread.h	Sat Sep 23 12:37:09 2017 -0700
     1.2 +++ b/include/SDL_thread.h	Sat Sep 23 12:38:47 2017 -0700
     1.3 @@ -90,14 +90,11 @@
     1.4   *  library!
     1.5   */
     1.6  #define SDL_PASSED_BEGINTHREAD_ENDTHREAD
     1.7 -#include <process.h>            /* This has _beginthread() and _endthread() defined! */
     1.8 +#include <process.h> /* _beginthreadex() and _endthreadex() */
     1.9  
    1.10 -typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned,
    1.11 -                                                        unsigned (__stdcall *
    1.12 -                                                                  func) (void
    1.13 -                                                                         *),
    1.14 -                                                        void *arg, unsigned,
    1.15 -                                                        unsigned *threadID);
    1.16 +typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread)
    1.17 +                   (void *, unsigned, unsigned (__stdcall *func)(void *),
    1.18 +                    void * /*arg*/, unsigned, unsigned * /* threadID */);
    1.19  typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
    1.20  
    1.21  /**
    1.22 @@ -124,7 +121,11 @@
    1.23   * into a dll with Watcom's runtime statically linked.
    1.24   */
    1.25  #define SDL_PASSED_BEGINTHREAD_ENDTHREAD
    1.26 +#ifndef __EMX__
    1.27  #include <process.h>
    1.28 +#else
    1.29 +#include <stdlib.h>
    1.30 +#endif
    1.31  typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/);
    1.32  typedef void (*pfnSDL_CurrentEndThread)(void);
    1.33  extern DECLSPEC SDL_Thread *SDLCALL