Patched stdlib changes to compile on Windows.
parent
b72c8bcaf8
commit
31caa22d30
|
@ -152,7 +152,9 @@ SDL_AtomicSet(SDL_atomic_t *a, int v)
|
||||||
void*
|
void*
|
||||||
SDL_AtomicSetPtr(void **a, void *v)
|
SDL_AtomicSetPtr(void **a, void *v)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_MSC_ATOMICS
|
#if defined(HAVE_MSC_ATOMICS) && (_M_IX86)
|
||||||
|
return (void *) _InterlockedExchange((long *)a, (long) v);
|
||||||
|
#elif defined(HAVE_MSC_ATOMICS) && (!_M_IX86)
|
||||||
return _InterlockedExchangePointer(a, v);
|
return _InterlockedExchangePointer(a, v);
|
||||||
#elif defined(HAVE_GCC_ATOMICS)
|
#elif defined(HAVE_GCC_ATOMICS)
|
||||||
return __sync_lock_test_and_set(a, v);
|
return __sync_lock_test_and_set(a, v);
|
||||||
|
|
|
@ -26,13 +26,12 @@
|
||||||
|
|
||||||
#include "SDL_stdinc.h"
|
#include "SDL_stdinc.h"
|
||||||
|
|
||||||
#if !defined(SDL_setenv) && defined(__WIN32__)
|
#if defined(__WIN32__) && (!defined(HAVE_SETENV) || !defined(HAVE_GETENV))
|
||||||
/* Note this isn't thread-safe! */
|
/* Note this isn't thread-safe! */
|
||||||
static char *SDL_envmem = NULL; /* Ugh, memory leak */
|
static char *SDL_envmem = NULL; /* Ugh, memory leak */
|
||||||
static size_t SDL_envmemlen = 0;
|
static size_t SDL_envmemlen = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Put a variable into the environment */
|
/* Put a variable into the environment */
|
||||||
#if defined(HAVE_SETENV)
|
#if defined(HAVE_SETENV)
|
||||||
int
|
int
|
||||||
|
|
|
@ -986,7 +986,7 @@ SDL_vsscanf(const char *text, const char *fmt, va_list ap)
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
int
|
int
|
||||||
SDL_vsscanf(const char *text, const char *fmt, ...)
|
SDL_vsscanf(const char *text, const char *fmt, va_list ap)
|
||||||
{
|
{
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue