# HG changeset patch # User Sam Lantinga # Date 1254650120 0 # Node ID 9de326b3099cd89f7af44ddbad5d3ae035e748ca # Parent 9ac6f0782dd65ddc098b1a6cc0408eaba13ac2d1 Fixed bug #817 Daniele Forghieri 2009-09-30 15:48:24 PDT Some tests doesn't use the correct include statement (and there are some missing declaration) and some test use C++ variable after statement, preventing compile wicth Open Watcom The patch attached fixes this diff -r 9ac6f0782dd6 -r 9de326b3099c test/testatomic.c --- a/test/testatomic.c Sun Oct 04 09:51:04 2009 +0000 +++ b/test/testatomic.c Sun Oct 04 09:55:20 2009 +0000 @@ -1,3 +1,4 @@ +#include #include "SDL.h" /* Make sure we have good macros for printing 32 and 64 bit values */ @@ -17,7 +18,7 @@ after calling each function. */ -char * +char * tf(SDL_bool tf) { static char *t = "true"; @@ -30,7 +31,7 @@ return f; } - + int main(int argc, char *argv[]) { diff -r 9ac6f0782dd6 -r 9de326b3099c test/testaudioinfo.c --- a/test/testaudioinfo.c Sun Oct 04 09:51:04 2009 +0000 +++ b/test/testaudioinfo.c Sun Oct 04 09:55:20 2009 +0000 @@ -1,3 +1,4 @@ +#include #include "SDL.h" static void diff -r 9ac6f0782dd6 -r 9de326b3099c test/testhaptic.c --- a/test/testhaptic.c Sun Oct 04 09:51:04 2009 +0000 +++ b/test/testhaptic.c Sun Oct 04 09:55:20 2009 +0000 @@ -14,6 +14,7 @@ /* * includes */ +#include #include "SDL.h" #include "SDL_haptic.h" diff -r 9ac6f0782dd6 -r 9de326b3099c test/testime.c --- a/test/testime.c Sun Oct 04 09:51:04 2009 +0000 +++ b/test/testime.c Sun Oct 04 09:55:20 2009 +0000 @@ -1,5 +1,5 @@ /* A simple program to test the Input Method support in the SDL library (1.3+) */ - + #include #include #include @@ -8,7 +8,7 @@ #ifdef HAVE_SDL_TTF #include "SDL_ttf.h" #endif - + #define DEFAULT_PTSIZE 30 #define DEFAULT_FONT "/System/Library/Fonts/华文细黑.ttf" #define MAX_TEXT_LENGTH 256 @@ -210,13 +210,13 @@ int main(int argc, char *argv[]) { + SDL_Event event; + int done = 0; + InitVideo(argc, argv); InitInput(); Redraw(); - SDL_Event event; - int done = 0; - while (! done && SDL_WaitEvent(&event)) { switch (event.type) diff -r 9ac6f0782dd6 -r 9de326b3099c test/testloadso.c --- a/test/testloadso.c Sun Oct 04 09:51:04 2009 +0000 +++ b/test/testloadso.c Sun Oct 04 09:55:20 2009 +0000 @@ -1,9 +1,10 @@ -/* Test program to test dynamic loading with the loadso subsystem. +/* Test program to test dynamic loading with the loadso subsystem. */ #include #include +#include #include "SDL.h" diff -r 9ac6f0782dd6 -r 9de326b3099c test/testsprite.c --- a/test/testsprite.c Sun Oct 04 09:51:04 2009 +0000 +++ b/test/testsprite.c Sun Oct 04 09:55:20 2009 +0000 @@ -2,6 +2,8 @@ #include #include +#include +#include #include #include diff -r 9ac6f0782dd6 -r 9de326b3099c test/testwm2.c --- a/test/testwm2.c Sun Oct 04 09:51:04 2009 +0000 +++ b/test/testwm2.c Sun Oct 04 09:55:20 2009 +0000 @@ -52,6 +52,8 @@ } } quit(0); + // keep the compiler happy ... + return(0); } /* vi: set ts=4 sw=4 expandtab: */