1.1 --- a/src/test/SDL_test_fuzzer.c Sun May 12 14:25:38 2013 +0200
1.2 +++ b/src/test/SDL_test_fuzzer.c Sun May 12 15:00:00 2013 -0700
1.3 @@ -283,7 +283,11 @@
1.4 SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain)
1.5 {
1.6 /* max value for Uint32 */
1.7 - const Uint64 maxValue = ULONG_MAX;
1.8 + #if ((ULONG_MAX) == (UINT_MAX))
1.9 + const Uint64 maxValue = ULONG_MAX;
1.10 + #else
1.11 + const Uint64 maxValue = UINT_MAX;
1.12 + #endif
1.13 return (Uint32)SDLTest_GenerateUnsignedBoundaryValues(maxValue,
1.14 (Uint64) boundary1, (Uint64) boundary2,
1.15 validDomain);
1.16 @@ -413,8 +417,13 @@
1.17 SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain)
1.18 {
1.19 /* min & max values for Sint32 */
1.20 - const Sint64 maxValue = LONG_MAX;
1.21 - const Sint64 minValue = LONG_MIN;
1.22 + #if ((ULONG_MAX) == (UINT_MAX))
1.23 + const Sint64 maxValue = LONG_MAX;
1.24 + const Sint64 minValue = LONG_MIN;
1.25 + #else
1.26 + const Sint64 maxValue = INT_MAX;
1.27 + const Sint64 minValue = INT_MIN;
1.28 + #endif
1.29 return (Sint32)SDLTest_GenerateSignedBoundaryValues(minValue, maxValue,
1.30 (Sint64) boundary1, (Sint64) boundary2,
1.31 validDomain);