summaryrefslogtreecommitdiff
path: root/src/stream.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-15 10:12:04 +0100
committerJohn Wiegley <johnw@newartisans.com>2010-06-15 05:14:00 -0400
commit968a6f3c0ac4690a6fc74e8d84058bce91019c2e (patch)
tree25874de7e90c34224c842e6b716ca9e82fe01028 /src/stream.cc
parent76b1ed68509d11308d50710f0542cef8fa437329 (diff)
downloadfork-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.cc6
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