Mercurial > sdl-ios-xcode
changeset 1345:7f32b9bede06
Fixes for Visual C++ 6.0
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 07 Feb 2006 18:36:54 +0000 |
parents | 2eed9997bd24 |
children | 1b5fbaf1d2c6 |
files | VisualC.zip include/SDL_types.h include/SDL_windows.h src/stdlib/SDL_stdlib.c src/video/e_pow.h src/video/e_sqrt.h |
diffstat | 6 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/include/SDL_types.h Tue Feb 07 17:49:40 2006 +0000 +++ b/include/SDL_types.h Tue Feb 07 18:36:54 2006 +0000 @@ -27,7 +27,9 @@ #include <sys/types.h> #ifdef _MSC_VER -#include <crtdefs.h> /* For size_t */ +/* FIXME!! */ +typedef unsigned int size_t; +typedef size_t uintptr_t; #endif /* The number of elements in an array */
--- a/include/SDL_windows.h Tue Feb 07 17:49:40 2006 +0000 +++ b/include/SDL_windows.h Tue Feb 07 18:36:54 2006 +0000 @@ -24,6 +24,7 @@ #define _SDL_windows_h #include "SDL_config.h" +#include "SDL_types.h" /* This includes only the windows headers needed by SDL, with no C runtime */ #define WIN32_LEAN_AND_MEAN
--- a/src/stdlib/SDL_stdlib.c Tue Feb 07 17:49:40 2006 +0000 +++ b/src/stdlib/SDL_stdlib.c Tue Feb 07 18:36:54 2006 +0000 @@ -31,6 +31,10 @@ #if defined(_MSC_VER) /* Float to long (FIXME!) */ +long _ftol() +{ + return 0; +} long _ftol2_sse() { return 0;
--- a/src/video/e_pow.h Tue Feb 07 17:49:40 2006 +0000 +++ b/src/video/e_pow.h Tue Feb 07 18:36:54 2006 +0000 @@ -130,7 +130,7 @@ k = (iy>>20)-0x3ff; /* exponent */ if(k>20) { j = ly>>(52-k); - if((j<<(52-k))==ly) yisint = 2-(j&1); + if((u_int32_t)(j<<(52-k))==ly) yisint = 2-(j&1); } else if(ly==0) { j = iy>>(20-k); if((j<<(20-k))==iy) yisint = 2-(j&1);
--- a/src/video/e_sqrt.h Tue Feb 07 17:49:40 2006 +0000 +++ b/src/video/e_sqrt.h Tue Feb 07 18:36:54 2006 +0000 @@ -202,7 +202,7 @@ t = s0; if((t<ix0)||((t==ix0)&&(t1<=ix1))) { s1 = t1+r; - if(((t1&sign)==sign)&&(s1&sign)==0) s0 += 1; + if(((int32_t)(t1&sign)==sign)&&(s1&sign)==0) s0 += 1; ix0 -= t; if (ix1 < t1) ix0 -= 1; ix1 -= t1;