diff options
author | Jay Berkenbilt <ejb@ql.org> | 2009-07-13 02:08:55 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2009-07-13 02:08:55 +0200 |
commit | 2ad107fb7acc6384b9eddb9b9071b012933696c8 (patch) | |
tree | 54498f9c868269dd3a29519eb9ffab232989ea73 | |
parent | 5d1f0bee0c77b12d44583c9fef2594f8d57c7d04 (diff) | |
download | qpdf-2ad107fb7acc6384b9eddb9b9071b012933696c8.tar.zst |
binary stdout on windows
git-svn-id: svn+q:///qpdf/trunk@680 71b93d88-0707-0410-a8cf-f5a4172ac649
-rw-r--r-- | zlib-flate/zlib-flate.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/zlib-flate/zlib-flate.cc b/zlib-flate/zlib-flate.cc index 988fb497..f46a82dd 100644 --- a/zlib-flate/zlib-flate.cc +++ b/zlib-flate/zlib-flate.cc @@ -1,4 +1,3 @@ - #include <qpdf/Pl_Flate.hh> #include <qpdf/Pl_StdioFile.hh> @@ -6,6 +5,7 @@ #include <string.h> #include <iostream> #include <stdlib.h> +#include <fcntl.h> #ifdef _WIN32 # include <io.h> #else @@ -63,6 +63,9 @@ int main(int argc, char* argv[]) usage(); } +#ifdef _WIN32 + _setmode(_fileno(stdout), _O_BINARY); +#endif Pl_StdioFile* out = new Pl_StdioFile("stdout", stdout); Pl_Flate* flate = new Pl_Flate("flate", out, action); |