1.1 --- a/src/test/SDL_test_fuzzer.c Sun Nov 20 21:18:55 2016 -0800
1.2 +++ b/src/test/SDL_test_fuzzer.c Sun Nov 20 21:24:09 2016 -0800
1.3 @@ -27,18 +27,20 @@
1.4
1.5 #include "SDL_config.h"
1.6
1.7 +#include <limits.h>
1.8 /* Visual Studio 2008 doesn't have stdint.h */
1.9 #if defined(_MSC_VER) && _MSC_VER <= 1500
1.10 -#define UINT8_MAX ~(Uint8)0
1.11 -#define UINT16_MAX ~(Uint16)0
1.12 -#define UINT32_MAX ~(Uint32)0
1.13 -#define UINT64_MAX ~(Uint64)0
1.14 +#define UINT8_MAX _UI8_MAX
1.15 +#define UINT16_MAX _UI16_MAX
1.16 +#define UINT32_MAX _UI32_MAX
1.17 +#define INT64_MIN _I64_MIN
1.18 +#define INT64_MAX _I64_MAX
1.19 +#define UINT64_MAX _UI64_MAX
1.20 #else
1.21 #include <stdint.h>
1.22 #endif
1.23 #include <stdio.h>
1.24 #include <stdlib.h>
1.25 -#include <limits.h>
1.26 #include <float.h>
1.27
1.28 #include "SDL_test.h"
1.29 @@ -297,7 +299,7 @@
1.30 SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain)
1.31 {
1.32 /* max value for Uint64 */
1.33 - const Uint64 maxValue = ULLONG_MAX;
1.34 + const Uint64 maxValue = UINT64_MAX;
1.35 return SDLTest_GenerateUnsignedBoundaryValues(maxValue,
1.36 (Uint64) boundary1, (Uint64) boundary2,
1.37 validDomain);
1.38 @@ -433,8 +435,8 @@
1.39 SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain)
1.40 {
1.41 /* min & max values for Sint64 */
1.42 - const Sint64 maxValue = LLONG_MAX;
1.43 - const Sint64 minValue = LLONG_MIN;
1.44 + const Sint64 maxValue = INT64_MAX;
1.45 + const Sint64 minValue = INT64_MIN;
1.46 return SDLTest_GenerateSignedBoundaryValues(minValue, maxValue,
1.47 boundary1, boundary2,
1.48 validDomain);