diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-15 10:12:04 +0100 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-15 05:14:00 -0400 |
commit | 968a6f3c0ac4690a6fc74e8d84058bce91019c2e (patch) | |
tree | 25874de7e90c34224c842e6b716ca9e82fe01028 /src/stream.cc | |
parent | 76b1ed68509d11308d50710f0542cef8fa437329 (diff) | |
download | fork-ledger-968a6f3c0ac4690a6fc74e8d84058bce91019c2e.tar.gz fork-ledger-968a6f3c0ac4690a6fc74e8d84058bce91019c2e.tar.bz2 fork-ledger-968a6f3c0ac4690a6fc74e8d84058bce91019c2e.zip |
Changes for building with Visual Studio 2008
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 |