diff options
Diffstat (limited to 'lib/Output.cc')
-rw-r--r-- | lib/Output.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Output.cc b/lib/Output.cc index e8b7680..ed3e852 100644 --- a/lib/Output.cc +++ b/lib/Output.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: Output.cc,v 1.19 2003-12-04 04:09:02 pixel Exp $ */ +/* $Id: Output.cc,v 1.20 2003-12-26 23:51:33 pixel Exp $ */ #include <stdio.h> #include <string.h> @@ -59,10 +59,14 @@ Output::Output(String no, int create, int trunc) throw (GeneralException) : } int Output::wrapopen(const String & n, int create, int trunc) { + hFile = 0; #ifndef _WIN32 return open(n.to_charp(), (create ? O_CREAT : 0) | (trunc ? O_TRUNC : 0) | O_WRONLY, 00666); #else +#ifdef NO_HFILE + return _creat(n.to_charp(), _S_IREAD | _S_IWRITE); +#else DWORD dwCreationDisposition; switch ((create ? 1 : 0) | (trunc ? 2 : 0)) { case 0: // no creation, no trunc @@ -88,6 +92,7 @@ int Output::wrapopen(const String & n, int create, int trunc) { 0); return _open_osfhandle((INT_PTR) hFile, O_WRONLY | O_BINARY); #endif +#endif } Output::Output(const Output & o) : Handle(o), n(o.n) { |