mirror of
https://github.com/facebook/zstd.git
synced 2025-07-30 22:23:13 +03:00
Fix displayLevel redefinition issues
This commit is contained in:
@ -285,6 +285,10 @@ UTIL_STATIC void *UTIL_realloc(void *ptr, size_t size)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int g_utilDisplayLevel;
|
||||||
|
#define UTIL_DISPLAY(...) fprintf(stderr, __VA_ARGS__)
|
||||||
|
#define UTIL_DISPLAYLEVEL(l, ...) { if (g_utilDisplayLevel>=l) { UTIL_DISPLAY(__VA_ARGS__); } }
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# define UTIL_HAS_CREATEFILELIST
|
# define UTIL_HAS_CREATEFILELIST
|
||||||
|
|
||||||
@ -352,10 +356,6 @@ UTIL_STATIC int UTIL_prepareFileList(const char *dirName, char** bufStart, size_
|
|||||||
# include <dirent.h> /* opendir, readdir */
|
# include <dirent.h> /* opendir, readdir */
|
||||||
# include <string.h> /* strerror, memcpy */
|
# include <string.h> /* strerror, memcpy */
|
||||||
|
|
||||||
static int g_displayLevel;
|
|
||||||
#define UTIL_DISPLAY(...) fprintf(stderr, __VA_ARGS__)
|
|
||||||
#define UTIL_DISPLAYLEVEL(l, ...) { if (g_displayLevel>=l) { UTIL_DISPLAY(__VA_ARGS__); } }
|
|
||||||
|
|
||||||
UTIL_STATIC int UTIL_prepareFileList(const char *dirName, char** bufStart, size_t* pos, char** bufEnd, int followLinks)
|
UTIL_STATIC int UTIL_prepareFileList(const char *dirName, char** bufStart, size_t* pos, char** bufEnd, int followLinks)
|
||||||
{
|
{
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
|
@ -583,6 +583,7 @@ int main(int argCount, const char* argv[])
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
g_utilDisplayLevel = g_displayLevel;
|
||||||
if (!followLinks) {
|
if (!followLinks) {
|
||||||
unsigned u;
|
unsigned u;
|
||||||
for (u=0, fileNamesNb=0; u<filenameIdx; u++) {
|
for (u=0, fileNamesNb=0; u<filenameIdx; u++) {
|
||||||
|
Reference in New Issue
Block a user