diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-15 06:28:30 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-15 06:28:30 -0400 |
commit | be91f38ab4ccdba6006106d45fd7061db2110470 (patch) | |
tree | 25874de7e90c34224c842e6b716ca9e82fe01028 /src/stream.cc | |
parent | f3bedb88b24ae8b2047ad86e57b161265c2812f5 (diff) | |
parent | 968a6f3c0ac4690a6fc74e8d84058bce91019c2e (diff) | |
download | fork-ledger-be91f38ab4ccdba6006106d45fd7061db2110470.tar.gz fork-ledger-be91f38ab4ccdba6006106d45fd7061db2110470.tar.bz2 fork-ledger-be91f38ab4ccdba6006106d45fd7061db2110470.zip |
Merge branch 'next'
Diffstat (limited to 'src/stream.cc')
-rw-r--r-- | src/stream.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stream.cc b/src/stream.cc index 79faa05a..001e7760 100644 --- a/src/stream.cc +++ b/src/stream.cc @@ -63,6 +63,7 @@ namespace { */ int do_fork(std::ostream ** os, const path& pager_path) { +#ifndef WIN32 int pfd[2]; int status = pipe(pfd); @@ -104,6 +105,9 @@ namespace { *os = new fdstream(pfd[1]); } return pfd[1]; +#else + return 0; +#endif } } @@ -120,6 +124,7 @@ void output_stream_t::initialize(const optional<path>& output_file, void output_stream_t::close() { +#ifndef WIN32 if (os != &std::cout) { checked_delete(os); os = &std::cout; @@ -134,6 +139,7 @@ void output_stream_t::close() if (! WIFEXITED(status) || WEXITSTATUS(status) != 0) throw std::logic_error(_("Error in the pager")); } +#endif } } // namespace ledger |