summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Output.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Output.cc b/lib/Output.cc
index 82940f6..b4ed359 100644
--- a/lib/Output.cc
+++ b/lib/Output.cc
@@ -21,12 +21,12 @@
#endif
Output::Output(String no, int create, int trunc) throw (GeneralException) :
- Handle(no.strlen() ? open(no.to_charp(), O_WRONLY | (O_CREAT * (create ? 1 : 0)) | (O_TRUNC * (trunc ? 1 : 0))
+ Handle(no.strlen() ? open(no.to_charp(), (create ? O_CREAT : 0) | (trunc ? O_TRUNC : 0)
#ifdef _WIN32
-| O_BINARY
+| O_RDWR | O_BINARY
#endif
#if defined __linux__ || defined __CYGWIN32__
-, 00666
+| O_WRONLY, 00666
#endif
) : dup(1)),
n(no) {