diff --git a/cli/filelister.cpp b/cli/filelister.cpp index 3ef3854ba..4ae936805 100644 --- a/cli/filelister.cpp +++ b/cli/filelister.cpp @@ -135,7 +135,14 @@ static HANDLE MyFindFirstFile(std::string path, LPWIN32_FIND_DATA findData) static BOOL MyFileExists(std::string path) { +#ifdef __BORLANDC__ + DWORD fa = GetFileAttributes(path.c_str()); + BOOL result = FALSE; + if (fa != INVALID_FILE_ATTRIBUTES && !(fa & FILE_ATTRIBUTE_DIRECTORY)) + result = TRUE; +#else BOOL result = PathFileExists(path.c_str()); +#endif return result; } diff --git a/cli/pathmatch.cpp b/cli/pathmatch.cpp index 870cbfdea..527a48947 100644 --- a/cli/pathmatch.cpp +++ b/cli/pathmatch.cpp @@ -17,6 +17,7 @@ */ #include +#include // Borland: tolower #include "pathmatch.h" PathMatch::PathMatch(const std::vector &masks) diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index f153c06f9..e85debd99 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -288,7 +288,7 @@ static bool isFallThroughComment(std::string comment) // convert comment to lower case without whitespace std::transform(comment.begin(), comment.end(), comment.begin(), tolowerWrapper); for (std::string::iterator i = comment.begin(); i != comment.end();) { - if (::isspace(static_cast(*i))) + if (std::isspace(static_cast(*i))) i = comment.erase(i); else ++i; diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index ca482c15a..1450e335e 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -33,6 +33,11 @@ #include #include +// Define ULLONG_MAX and LLONG_MAX for Borland +#ifdef __BORLANDC__ +#define ULLONG_MAX ULONG_MAX +#define LLONG_MAX LONG_MAX +#endif //---------------------------------------------------------------------------