Fixed a bunch of 64-bit compatibility problems

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401460
This commit is contained in:
Sam Lantinga 2006-03-01 09:43:47 +00:00
parent e539f5ab85
commit a9ee23bb9f
18 changed files with 117 additions and 48 deletions

View file

@ -33,12 +33,12 @@
/* Note this isn't thread-safe! */
static char *SDL_envmem = NULL; /* Ugh, memory leak */
static DWORD SDL_envmemlen = 0;
static size_t SDL_envmemlen = 0;
/* Put a variable of the form "name=value" into the environment */
int SDL_putenv(const char *variable)
{
DWORD bufferlen;
size_t bufferlen;
char *value;
const char *sep;
@ -67,7 +67,7 @@ int SDL_putenv(const char *variable)
/* Retrieve a variable named "name" from the environment */
char *SDL_getenv(const char *name)
{
DWORD bufferlen;
size_t bufferlen;
bufferlen = GetEnvironmentVariable(name, SDL_envmem, SDL_envmemlen);
if ( bufferlen == 0 ) {