diff options
Diffstat (limited to 'cpp/src/IceGrid/Client.cpp')
-rw-r--r-- | cpp/src/IceGrid/Client.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/cpp/src/IceGrid/Client.cpp b/cpp/src/IceGrid/Client.cpp index c0c58603453..8dafd14f4ed 100644 --- a/cpp/src/IceGrid/Client.cpp +++ b/cpp/src/IceGrid/Client.cpp @@ -31,6 +31,8 @@ # include <termios.h> #else # include <conio.h> +# include <fcntl.h> +# include <io.h> #endif using namespace std; @@ -256,14 +258,17 @@ interruptCallback(int /*signal*/) int wmain(int argc, wchar_t* argv[]) - +{ + // + // Enable binary input mode for stdin to avoid automatic conversions. + // + _setmode(_fileno(stdin), _O_BINARY); #else int main(int argc, char* argv[]) - -#endif { +#endif Client app; StringSeq args = argsToStringSeq(argc, argv); return app.main(args); |