diff options
Diffstat (limited to 'lib/Input.cc')
-rw-r--r-- | lib/Input.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/Input.cc b/lib/Input.cc index 417ddab..c12c609 100644 --- a/lib/Input.cc +++ b/lib/Input.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: Input.cc,v 1.39 2003-12-14 21:13:33 pixel Exp $ */ +/* $Id: Input.cc,v 1.40 2003-12-26 23:51:33 pixel Exp $ */ #include <stdio.h> #include <string.h> @@ -183,16 +183,21 @@ int Input::wrapopen(const String & fname, openresults_t * results) { #ifdef DEBUG printm(M_BARE, _("Trying to open the file in archive, since it seems to be here\n")); #endif -#ifdef _WIN32 -// hFile = t->GetHandle()->GetHFile(); hFile = 0; +#if defined (_WIN32) && !defined (NO_HFILE) +// hFile = t->GetHandle()->GetHFile(); #endif return t->open(fname, results); } } results->name = ""; -#ifndef _WIN32 - return open(fname.to_charp(), O_RDONLY); + hFile = 0; +#if !defined (_WIN32) || defined (NO_HFILE) + return open(fname.to_charp(), O_RDONLY +#ifdef _WIN32 + | O_BINARY +#endif + ); #else hFile = CreateFile(fname.to_charp(), GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0); return _open_osfhandle((INT_PTR) hFile, O_RDONLY | O_BINARY); |