diff options
author | Thorsten Schöning <6223655+ams-tschoening@users.noreply.github.com> | 2019-02-13 18:10:04 +0100 |
---|---|---|
committer | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2019-03-11 21:58:55 +0100 |
commit | 71b7ed9f4f2c88fbdd0eb5a4796beb948fd8188c (patch) | |
tree | b72e7ebb92f7055e52e51245df5f246222369f21 | |
parent | 86287acfd9ff3a697536f3f231cc3f8477c04e36 (diff) | |
download | qpdf-71b7ed9f4f2c88fbdd0eb5a4796beb948fd8188c.tar.zst |
"_setmode" and "_stricmp" are not available on Borland C++Builder, neither the classic one nor newer ones based on CLANG.
-rw-r--r-- | libqpdf/QUtil.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libqpdf/QUtil.cc b/libqpdf/QUtil.cc index 58646ade..7ea3f5e7 100644 --- a/libqpdf/QUtil.cc +++ b/libqpdf/QUtil.cc @@ -529,7 +529,9 @@ QUtil::hex_decode(std::string const& input) void QUtil::binary_stdout() { -#ifdef _WIN32 +#if defined(_WIN32) && defined(__BORLANDC__) + setmode(_fileno(stdout), _O_BINARY); +#elif defined(_WIN32) _setmode(_fileno(stdout), _O_BINARY); #endif } @@ -537,7 +539,9 @@ QUtil::binary_stdout() void QUtil::binary_stdin() { -#ifdef _WIN32 +#if defined(_WIN32) && defined(__BORLANDC__) + setmode(_fileno(stdin), _O_BINARY); +#elif defined(_WIN32) _setmode(_fileno(stdin), _O_BINARY); #endif } @@ -918,7 +922,9 @@ QUtil::read_lines_from_file(std::istream& in) int QUtil::strcasecmp(char const *s1, char const *s2) { -#ifdef _WIN32 +#if defined(_WIN32) && defined(__BORLANDC__) + return stricmp(s1, s2); +#elif defined(_WIN32) return _stricmp(s1, s2); #else return ::strcasecmp(s1, s2); |