equal
deleted
inserted
replaced
43 /* The SDL thread structure, defined in SDL_thread.c */ |
43 /* The SDL thread structure, defined in SDL_thread.c */ |
44 struct SDL_Thread; |
44 struct SDL_Thread; |
45 typedef struct SDL_Thread SDL_Thread; |
45 typedef struct SDL_Thread SDL_Thread; |
46 |
46 |
47 /* Create a thread */ |
47 /* Create a thread */ |
48 #if defined(__WIN32__) || defined(__OS2__) |
48 #if (defined(__WIN32__) && !defined(HAVE_LIBC)) || defined(__OS2__) |
49 /* |
49 /* |
50 We compile SDL into a DLL on OS/2. This means, that it's the DLL which |
50 We compile SDL into a DLL on OS/2. This means, that it's the DLL which |
51 creates a new thread for the calling process with the SDL_CreateThread() |
51 creates a new thread for the calling process with the SDL_CreateThread() |
52 API. There is a problem with this, that only the RTL of the SDL.DLL will |
52 API. There is a problem with this, that only the RTL of the SDL.DLL will |
53 be initialized for those threads, and not the RTL of the calling application! |
53 be initialized for those threads, and not the RTL of the calling application! |
57 then the RTL of SDL.DLL will be used to create the new thread, and if it's |
57 then the RTL of SDL.DLL will be used to create the new thread, and if it's |
58 the application, then the RTL of the application will be used. |
58 the application, then the RTL of the application will be used. |
59 So, in short: |
59 So, in short: |
60 Always use the _beginthread() and _endthread() of the calling runtime library! |
60 Always use the _beginthread() and _endthread() of the calling runtime library! |
61 */ |
61 */ |
|
62 #define SDL_PASSED_BEGINTHREAD_ENDTHREAD |
62 #ifndef _WIN32_WCE |
63 #ifndef _WIN32_WCE |
63 #include <process.h> // This has _beginthread() and _endthread() defined! |
64 #include <process.h> /* This has _beginthread() and _endthread() defined! */ |
64 #endif |
|
65 #ifdef __EMX__ |
|
66 #include <stdlib.h> // This has _beginthread() and _endthread() defined, if -Zmt flag is used! |
|
67 #endif |
65 #endif |
68 |
66 |
69 #ifdef __OS2__ |
67 #ifdef __OS2__ |
70 typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void *arg); |
68 typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void *arg); |
71 typedef void (*pfnSDL_CurrentEndThread)(void); |
69 typedef void (*pfnSDL_CurrentEndThread)(void); |