mirror of https://github.com/encounter/SDL.git
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.)
This commit is contained in:
parent
14ed0d24c8
commit
c44e741bd9
|
@ -90,14 +90,11 @@ typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
|
||||||
* library!
|
* library!
|
||||||
*/
|
*/
|
||||||
#define SDL_PASSED_BEGINTHREAD_ENDTHREAD
|
#define SDL_PASSED_BEGINTHREAD_ENDTHREAD
|
||||||
#include <process.h> /* This has _beginthread() and _endthread() defined! */
|
#include <process.h> /* _beginthreadex() and _endthreadex() */
|
||||||
|
|
||||||
typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned,
|
typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread)
|
||||||
unsigned (__stdcall *
|
(void *, unsigned, unsigned (__stdcall *func)(void *),
|
||||||
func) (void
|
void * /*arg*/, unsigned, unsigned * /* threadID */);
|
||||||
*),
|
|
||||||
void *arg, unsigned,
|
|
||||||
unsigned *threadID);
|
|
||||||
typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
|
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.
|
* into a dll with Watcom's runtime statically linked.
|
||||||
*/
|
*/
|
||||||
#define SDL_PASSED_BEGINTHREAD_ENDTHREAD
|
#define SDL_PASSED_BEGINTHREAD_ENDTHREAD
|
||||||
|
#ifndef __EMX__
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
|
#else
|
||||||
|
#include <stdlib.h>
|
||||||
|
#endif
|
||||||
typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/);
|
typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/);
|
||||||
typedef void (*pfnSDL_CurrentEndThread)(void);
|
typedef void (*pfnSDL_CurrentEndThread)(void);
|
||||||
extern DECLSPEC SDL_Thread *SDLCALL
|
extern DECLSPEC SDL_Thread *SDLCALL
|
||||||
|
|
Loading…
Reference in New Issue