summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPrzemyslaw Skibinski <inikep@gmail.com>2016-12-21 09:39:27 (GMT)
committerPrzemyslaw Skibinski <inikep@gmail.com>2016-12-21 09:39:27 (GMT)
commit3c6ce9c66526f0f6e3c200ddb64db2c66be5e031 (patch)
tree60e7e672b3a024c3d71489f3f9dcc562484c56f5 /tests
parent64cbc4e1dc17492d89915a9d774dc15ee438ccfe (diff)
downloadlz4-3c6ce9c66526f0f6e3c200ddb64db2c66be5e031.zip
lz4-3c6ce9c66526f0f6e3c200ddb64db2c66be5e031.tar.gz
lz4-3c6ce9c66526f0f6e3c200ddb64db2c66be5e031.tar.bz2
fixed gcc 4.4 support
Diffstat (limited to 'tests')
-rw-r--r--tests/fuzzer.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/fuzzer.c b/tests/fuzzer.c
index 18ba7c8..10e9139 100644
--- a/tests/fuzzer.c
+++ b/tests/fuzzer.c
@@ -47,6 +47,14 @@
/*-************************************
+* Basic Types
+**************************************/
+#if !defined(__cplusplus) && !(defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */)
+typedef size_t uintptr_t; /* true on most systems, except OpenVMS-64 (which doesn't need address overflow test) */
+#endif
+
+
+/*-************************************
* Constants
**************************************/
#define NB_ATTEMPTS (1<<16)
@@ -980,7 +988,7 @@ int main(int argc, const char** argv)
int nbTests = NB_ATTEMPTS;
int testNb = 0;
int proba = FUZ_COMPRESSIBILITY_DEFAULT;
- int pause = 0;
+ int use_pause = 0;
const char* programName = argv[0];
U32 duration = 0;
@@ -992,7 +1000,7 @@ int main(int argc, const char** argv)
// Decode command (note : aggregated commands are allowed)
if (argument[0]=='-') {
- if (!strcmp(argument, "--no-prompt")) { pause=0; seedset=1; g_displayLevel=1; continue; }
+ if (!strcmp(argument, "--no-prompt")) { use_pause=0; seedset=1; g_displayLevel=1; continue; }
argument++;
while (*argument!=0) {
@@ -1008,7 +1016,7 @@ int main(int argc, const char** argv)
case 'p': /* pause at the end */
argument++;
- pause=1;
+ use_pause=1;
break;
case 'i':
@@ -1098,7 +1106,7 @@ int main(int argc, const char** argv)
if (nbTests<=0) nbTests=1;
{ int const result = FUZ_test(seed, nbTests, testNb, ((double)proba) / 100, duration);
- if (pause) {
+ if (use_pause) {
DISPLAY("press enter ... \n");
(void)getchar();
}