Fixes for Visual C++ 6.0
authorSam Lantinga <slouken@libsdl.org>
Tue, 07 Feb 2006 18:36:54 +0000
changeset 13457f32b9bede06
parent 1344 2eed9997bd24
child 1346 1b5fbaf1d2c6
Fixes for Visual C++ 6.0
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
     1.1 Binary file VisualC.zip has changed
     2.1 --- a/include/SDL_types.h	Tue Feb 07 17:49:40 2006 +0000
     2.2 +++ b/include/SDL_types.h	Tue Feb 07 18:36:54 2006 +0000
     2.3 @@ -27,7 +27,9 @@
     2.4  
     2.5  #include <sys/types.h>
     2.6  #ifdef _MSC_VER
     2.7 -#include <crtdefs.h>	/* For size_t */
     2.8 +/* FIXME!! */
     2.9 +typedef unsigned int size_t;
    2.10 +typedef size_t uintptr_t;
    2.11  #endif
    2.12  
    2.13  /* The number of elements in an array */
     3.1 --- a/include/SDL_windows.h	Tue Feb 07 17:49:40 2006 +0000
     3.2 +++ b/include/SDL_windows.h	Tue Feb 07 18:36:54 2006 +0000
     3.3 @@ -24,6 +24,7 @@
     3.4  #define _SDL_windows_h
     3.5  
     3.6  #include "SDL_config.h"
     3.7 +#include "SDL_types.h"
     3.8  
     3.9  /* This includes only the windows headers needed by SDL, with no C runtime */
    3.10  #define WIN32_LEAN_AND_MEAN
     4.1 --- a/src/stdlib/SDL_stdlib.c	Tue Feb 07 17:49:40 2006 +0000
     4.2 +++ b/src/stdlib/SDL_stdlib.c	Tue Feb 07 18:36:54 2006 +0000
     4.3 @@ -31,6 +31,10 @@
     4.4  #if defined(_MSC_VER)
     4.5  
     4.6  /* Float to long (FIXME!) */
     4.7 +long _ftol()
     4.8 +{
     4.9 +	return 0;
    4.10 +}
    4.11  long _ftol2_sse()
    4.12  {
    4.13  	return 0;
     5.1 --- a/src/video/e_pow.h	Tue Feb 07 17:49:40 2006 +0000
     5.2 +++ b/src/video/e_pow.h	Tue Feb 07 18:36:54 2006 +0000
     5.3 @@ -130,7 +130,7 @@
     5.4  		k = (iy>>20)-0x3ff;	   /* exponent */
     5.5  		if(k>20) {
     5.6  		    j = ly>>(52-k);
     5.7 -		    if((j<<(52-k))==ly) yisint = 2-(j&1);
     5.8 +		    if((u_int32_t)(j<<(52-k))==ly) yisint = 2-(j&1);
     5.9  		} else if(ly==0) {
    5.10  		    j = iy>>(20-k);
    5.11  		    if((j<<(20-k))==iy) yisint = 2-(j&1);
     6.1 --- a/src/video/e_sqrt.h	Tue Feb 07 17:49:40 2006 +0000
     6.2 +++ b/src/video/e_sqrt.h	Tue Feb 07 18:36:54 2006 +0000
     6.3 @@ -202,7 +202,7 @@
     6.4  	    t  = s0;
     6.5  	    if((t<ix0)||((t==ix0)&&(t1<=ix1))) {
     6.6  		s1  = t1+r;
     6.7 -		if(((t1&sign)==sign)&&(s1&sign)==0) s0 += 1;
     6.8 +		if(((int32_t)(t1&sign)==sign)&&(s1&sign)==0) s0 += 1;
     6.9  		ix0 -= t;
    6.10  		if (ix1 < t1) ix0 -= 1;
    6.11  		ix1 -= t1;