mirror of
https://github.com/facebook/zstd.git
synced 2024-11-25 05:36:43 +08:00
Merge pull request #1208 from facebook/msys2
minor fixes for MSYS2 compilation
This commit is contained in:
commit
5ec2d38870
@ -96,7 +96,10 @@ extern "C" {
|
||||
/*-*********************************************
|
||||
* Detect if isatty() and fileno() are available
|
||||
************************************************/
|
||||
#if (defined(__linux__) && (PLATFORM_POSIX_VERSION >= 1)) || (PLATFORM_POSIX_VERSION >= 200112L) || defined(__DJGPP__)
|
||||
#if (defined(__linux__) && (PLATFORM_POSIX_VERSION >= 1)) \
|
||||
|| (PLATFORM_POSIX_VERSION >= 200112L) \
|
||||
|| defined(__DJGPP__) \
|
||||
|| defined(__MSYS__)
|
||||
# include <unistd.h> /* isatty */
|
||||
# define IS_CONSOLE(stdStream) isatty(fileno(stdStream))
|
||||
#elif defined(MSDOS) || defined(OS2) || defined(__CYGWIN__)
|
||||
|
@ -513,7 +513,7 @@ UTIL_STATIC int UTIL_prepareFileList(const char *dirName, char** bufStart, size_
|
||||
|
||||
UTIL_STATIC int UTIL_prepareFileList(const char *dirName, char** bufStart, size_t* pos, char** bufEnd, int followLinks)
|
||||
{
|
||||
(void)bufStart; (void)bufEnd; (void)pos;
|
||||
(void)bufStart; (void)bufEnd; (void)pos; (void)followLinks;
|
||||
UTIL_DISPLAYLEVEL(1, "Directory %s ignored (compiled without _WIN32 or _POSIX_C_SOURCE)\n", dirName);
|
||||
return 0;
|
||||
}
|
||||
|
@ -761,8 +761,11 @@ int main(int argCount, const char* argv[])
|
||||
nbWorkers = UTIL_countPhysicalCores();
|
||||
DISPLAYLEVEL(3, "Note: %d physical core(s) detected \n", nbWorkers);
|
||||
}
|
||||
#else
|
||||
(void)singleThread;
|
||||
#endif
|
||||
|
||||
#ifdef UTIL_HAS_CREATEFILELIST
|
||||
g_utilDisplayLevel = g_displayLevel;
|
||||
if (!followLinks) {
|
||||
unsigned u;
|
||||
@ -775,7 +778,6 @@ int main(int argCount, const char* argv[])
|
||||
}
|
||||
filenameIdx = fileNamesNb;
|
||||
}
|
||||
#ifdef UTIL_HAS_CREATEFILELIST
|
||||
if (recursive) { /* at this stage, filenameTable is a list of paths, which can contain both files and directories */
|
||||
extendedFileList = UTIL_createFileList(filenameTable, filenameIdx, &fileNamesBuf, &fileNamesNb, followLinks);
|
||||
if (extendedFileList) {
|
||||
@ -786,6 +788,8 @@ int main(int argCount, const char* argv[])
|
||||
filenameIdx = fileNamesNb;
|
||||
}
|
||||
}
|
||||
#else
|
||||
(void)followLinks;
|
||||
#endif
|
||||
|
||||
if (operation == zom_list) {
|
||||
|
Loading…
Reference in New Issue
Block a user