Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed building tests with Visual Studio 2008
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 31, 2012
1 parent 0ae1fc0 commit f7466bf
Show file tree
Hide file tree
Showing 8 changed files with 550 additions and 26 deletions.
71 changes: 69 additions & 2 deletions VisualC/SDL_VS2008.sln

Large diffs are not rendered by default.

469 changes: 469 additions & 0 deletions VisualC/SDLtest/SDLtest_VS2008.vcproj

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions VisualC/tests/testdraw2/testdraw2_VS2008.vcproj
Expand Up @@ -195,10 +195,6 @@
<References>
</References>
<Files>
<File
RelativePath="..\..\..\test\common.c"
>
</File>
<File
RelativePath="..\..\..\test\testdraw2.c"
>
Expand Down
4 changes: 0 additions & 4 deletions VisualC/tests/testgl2/testgl2_VS2008.vcproj
Expand Up @@ -197,10 +197,6 @@
<References>
</References>
<Files>
<File
RelativePath="..\..\..\test\common.c"
>
</File>
<File
RelativePath="..\..\..\test\testgl2.c"
>
Expand Down
8 changes: 2 additions & 6 deletions VisualC/tests/testrendertarget/testrendertarget_VS2008.vcproj
Expand Up @@ -100,7 +100,7 @@
<Tool
Name="VCPostBuildEventTool"
Description="Copy SDL and data files"
CommandLine="copy &quot;$(SolutionDir)\SDL\$(ConfigurationName)\SDL2.dll&quot; &quot;$(TargetDir)\SDL2.dll&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)\..\test\icon.bmp&quot; &quot;$(ProjectDir)\icon.bmp&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)\..\test\sample.bmp&quot; &quot;$(ProjectDir)\sample.bmp&quot;"
CommandLine="copy &quot;$(SolutionDir)\SDL\$(ConfigurationName)\SDL2.dll&quot; &quot;$(TargetDir)\SDL2.dll&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)\..\test\icon.bmp&quot; &quot;$(ProjectDir)\icon.bmp&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)\..\test\sample.bmp&quot; &quot;$(ProjectDir)\sample.bmp&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Expand Down Expand Up @@ -188,17 +188,13 @@
<Tool
Name="VCPostBuildEventTool"
Description="Copy SDL and data files"
CommandLine="copy &quot;$(SolutionDir)\SDL\$(ConfigurationName)\SDL2.dll&quot; &quot;$(TargetDir)\SDL2.dll&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)\..\test\icon.bmp&quot; &quot;$(ProjectDir)\icon.bmp&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)\..\test\sample.bmp&quot; &quot;$(ProjectDir)\sample.bmp&quot;"
CommandLine="copy &quot;$(SolutionDir)\SDL\$(ConfigurationName)\SDL2.dll&quot; &quot;$(TargetDir)\SDL2.dll&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)\..\test\icon.bmp&quot; &quot;$(ProjectDir)\icon.bmp&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)\..\test\sample.bmp&quot; &quot;$(ProjectDir)\sample.bmp&quot;&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="..\..\..\test\common.c"
>
</File>
<File
RelativePath="..\..\..\test\testrendertarget.c"
>
Expand Down
8 changes: 2 additions & 6 deletions VisualC/tests/testscale/testscale_VS2008.vcproj
Expand Up @@ -100,7 +100,7 @@
<Tool
Name="VCPostBuildEventTool"
Description="Copy SDL and data files"
CommandLine="copy &quot;$(SolutionDir)\SDL\$(ConfigurationName)\SDL2.dll&quot; &quot;$(TargetDir)\SDL2.dll&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)\..\test\icon.bmp&quot; &quot;$(ProjectDir)\icon.bmp&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)\..\test\sample.bmp&quot; &quot;$(ProjectDir)\sample.bmp&quot;"
CommandLine="copy &quot;$(SolutionDir)\SDL\$(ConfigurationName)\SDL2.dll&quot; &quot;$(TargetDir)\SDL2.dll&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)\..\test\icon.bmp&quot; &quot;$(ProjectDir)\icon.bmp&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)\..\test\sample.bmp&quot; &quot;$(ProjectDir)\sample.bmp&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Expand Down Expand Up @@ -188,17 +188,13 @@
<Tool
Name="VCPostBuildEventTool"
Description="Copy SDL and data files"
CommandLine="copy &quot;$(SolutionDir)\SDL\$(ConfigurationName)\SDL2.dll&quot; &quot;$(TargetDir)\SDL2.dll&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)\..\test\icon.bmp&quot; &quot;$(ProjectDir)\icon.bmp&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)\..\test\sample.bmp&quot; &quot;$(ProjectDir)\sample.bmp&quot;"
CommandLine="copy &quot;$(SolutionDir)\SDL\$(ConfigurationName)\SDL2.dll&quot; &quot;$(TargetDir)\SDL2.dll&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)\..\test\icon.bmp&quot; &quot;$(ProjectDir)\icon.bmp&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)\..\test\sample.bmp&quot; &quot;$(ProjectDir)\sample.bmp&quot;&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="..\..\..\test\common.c"
>
</File>
<File
RelativePath="..\..\..\test\testscale.c"
>
Expand Down
4 changes: 0 additions & 4 deletions VisualC/tests/testsprite2/testsprite2_VS2008.vcproj
Expand Up @@ -195,10 +195,6 @@
<References>
</References>
<Files>
<File
RelativePath="..\..\..\test\common.c"
>
</File>
<File
RelativePath="..\..\..\test\testsprite2.c"
>
Expand Down
8 changes: 8 additions & 0 deletions src/test/SDL_test_fuzzer.c
Expand Up @@ -27,7 +27,15 @@

#include "SDL_config.h"

/* Visual Studio 2008 doesn't have stdint.h */
#if defined(_MSC_VER) && _MSC_VER <= 1500
#define UINT8_MAX ~(Uint8)0
#define UINT16_MAX ~(Uint16)0
#define UINT32_MAX ~(Uint32)0
#define UINT64_MAX ~(Uint64)0
#else
#include <stdint.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
Expand Down

0 comments on commit f7466bf

Please sign in to comment.