diff src/thread/SDL_thread.c @ 1330:450721ad5436

It's now possible to build SDL without any C runtime at all on Windows, using Visual C++ 2005
author Sam Lantinga <slouken@libsdl.org>
date Mon, 06 Feb 2006 08:28:51 +0000
parents c9b51268668f
children 3692456e7b0f
line wrap: on
line diff
--- a/src/thread/SDL_thread.c	Sat Feb 04 22:01:44 2006 +0000
+++ b/src/thread/SDL_thread.c	Mon Feb 06 08:28:51 2006 +0000
@@ -22,13 +22,11 @@
 
 /* System independent thread management routines for SDL */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include "SDL_error.h"
 #include "SDL_mutex.h"
 #include "SDL_thread.h"
+#include "SDL_stdlib.h"
+#include "SDL_string.h"
 #include "SDL_thread_c.h"
 #include "SDL_systhread.h"
 
@@ -213,8 +211,9 @@
 	*statusloc = userfunc(userdata);
 }
 
-#ifdef __OS2__
-DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread_Core(int (*fn)(void *), void *data, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread)
+#if defined(_WIN32) || defined(__OS2__)
+#undef SDL_CreateThread
+DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (*fn)(void *), void *data, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread)
 #else
 DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (*fn)(void *), void *data)
 #endif
@@ -253,8 +252,8 @@
 	SDL_AddThread(thread);
 
 	/* Create the thread and go! */
-#ifdef __OS2__
-        ret = SDL_SYS_CreateThread(thread, args, pfnBeginThread, pfnEndThread);
+#if defined(_WIN32) || defined(__OS2__)
+	ret = SDL_SYS_CreateThread(thread, args, pfnBeginThread, pfnEndThread);
 #else
 	ret = SDL_SYS_CreateThread(thread, args);
 #endif