diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/IcePack/Parser.cpp | 7 | ||||
-rw-r--r-- | cpp/src/IcePack/Scanner.l | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/cpp/src/IcePack/Parser.cpp b/cpp/src/IcePack/Parser.cpp index af3acfb8c39..6f5d9d27d7d 100644 --- a/cpp/src/IcePack/Parser.cpp +++ b/cpp/src/IcePack/Parser.cpp @@ -146,7 +146,8 @@ IcePack::Parser::getInput(char* buf, int& result, int maxSize) } else { - result = std::min(maxSize, static_cast<int>(_commands.length())); + // COMPILERBUG: Stupid Visual C++ defined min and max as macros + result = _MIN(maxSize, static_cast<int>(_commands.length())); strncpy(buf, _commands.c_str(), result); _commands.erase(0, result); if (_commands.empty()) @@ -202,7 +203,7 @@ IcePack::Parser::getInput(char* buf, int& result, int maxSize) } } - result = strlen(line); + result = line.length(); if (result > maxSize) { error("input line too long"); @@ -348,7 +349,7 @@ IcePack::Parser::parse(FILE* file, bool debug) parser = this; _errors = 0; - _commands.clear(); + _commands.empty(); yyin = file; assert(yyin); diff --git a/cpp/src/IcePack/Scanner.l b/cpp/src/IcePack/Scanner.l index 5e0ca4ee348..9fe7335714c 100644 --- a/cpp/src/IcePack/Scanner.l +++ b/cpp/src/IcePack/Scanner.l @@ -18,9 +18,6 @@ using namespace std; using namespace Ice; using namespace IcePack; -#include <readline/readline.h> -#include <readline/history.h> - #define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize) %} |