fixed compatibility issues

This commit is contained in:
inikep
2016-05-05 13:10:57 +02:00
parent 9c22e57bfb
commit 0bd0faec32
3 changed files with 12 additions and 14 deletions
+2 -1
View File
@@ -330,6 +330,7 @@ static int BMK_benchMem(const void* srcBuffer, size_t srcSize,
} /* Bench */
/* clean up */
free(blockTable);
free(compressedBuffer);
free(resultBuffer);
ZSTD_freeCCtx(refCtx);
@@ -525,7 +526,7 @@ int BMK_benchFiles(const char** fileNamesTable, unsigned nbFiles,
unsigned i;
nbFiles = UTIL_createFileList(fileNamesTable, nbFiles, MAX_LIST_SIZE, &filenameTable, &buf);
if (filenameTable) {
for (i=0; i<nbFiles; i++) printf ("%d %s\n", i, filenameTable[i]);
for (i=0; i<nbFiles; i++) DISPLAYLEVEL(3, "%d %s\n", i, filenameTable[i]);
BMK_benchFileTable(filenameTable, nbFiles, dictFileName, cLevel, cLevelLast);
UTIL_freeFileList(filenameTable, buf);
}
+1 -3
View File
@@ -41,7 +41,7 @@
/* *************************************
* Compiler Options
***************************************/
#define _POSIX_SOURCE 1 /* enable fileno() within <stdio.h> on unix */
#define _POSIX_SOURCE 1 /* enable %llu on Windows */
/*-*************************************
@@ -72,11 +72,9 @@
# include <fcntl.h> /* _O_BINARY */
# include <io.h> /* _setmode, _isatty */
# define SET_BINARY_MODE(file) { int unused = _setmode(_fileno(file), _O_BINARY); (void)unused; }
# define IS_CONSOLE(stdStream) _isatty(_fileno(stdStream))
#else
# include <unistd.h> /* isatty */
# define SET_BINARY_MODE(file)
# define IS_CONSOLE(stdStream) isatty(fileno(stdStream))
#endif