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
|
* 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 */
|
# include <unistd.h> /* isatty */
|
||||||
# define IS_CONSOLE(stdStream) isatty(fileno(stdStream))
|
# define IS_CONSOLE(stdStream) isatty(fileno(stdStream))
|
||||||
#elif defined(MSDOS) || defined(OS2) || defined(__CYGWIN__)
|
#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)
|
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);
|
UTIL_DISPLAYLEVEL(1, "Directory %s ignored (compiled without _WIN32 or _POSIX_C_SOURCE)\n", dirName);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -761,8 +761,11 @@ int main(int argCount, const char* argv[])
|
|||||||
nbWorkers = UTIL_countPhysicalCores();
|
nbWorkers = UTIL_countPhysicalCores();
|
||||||
DISPLAYLEVEL(3, "Note: %d physical core(s) detected \n", nbWorkers);
|
DISPLAYLEVEL(3, "Note: %d physical core(s) detected \n", nbWorkers);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
(void)singleThread;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef UTIL_HAS_CREATEFILELIST
|
||||||
g_utilDisplayLevel = g_displayLevel;
|
g_utilDisplayLevel = g_displayLevel;
|
||||||
if (!followLinks) {
|
if (!followLinks) {
|
||||||
unsigned u;
|
unsigned u;
|
||||||
@ -775,7 +778,6 @@ int main(int argCount, const char* argv[])
|
|||||||
}
|
}
|
||||||
filenameIdx = fileNamesNb;
|
filenameIdx = fileNamesNb;
|
||||||
}
|
}
|
||||||
#ifdef UTIL_HAS_CREATEFILELIST
|
|
||||||
if (recursive) { /* at this stage, filenameTable is a list of paths, which can contain both files and directories */
|
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);
|
extendedFileList = UTIL_createFileList(filenameTable, filenameIdx, &fileNamesBuf, &fileNamesNb, followLinks);
|
||||||
if (extendedFileList) {
|
if (extendedFileList) {
|
||||||
@ -786,6 +788,8 @@ int main(int argCount, const char* argv[])
|
|||||||
filenameIdx = fileNamesNb;
|
filenameIdx = fileNamesNb;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
(void)followLinks;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (operation == zom_list) {
|
if (operation == zom_list) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user