summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Input.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Input.cc b/lib/Input.cc
index 6c7815f..fdff787 100644
--- a/lib/Input.cc
+++ b/lib/Input.cc
@@ -165,11 +165,23 @@ int Input::wrapopen(const String & fname, openresults_t * results) {
}
}
results->name = "";
+#if 0
return open(fname.to_charp(), O_RDONLY
#ifdef _WIN32
| O_BINARY
#endif
);
+#else
+ HANDLE hFile = CreateFile(
+ fname.to_charp(),
+ GENERIC_READ,
+ 0,
+ 0,
+ OPEN_EXISTING,
+ 0,
+ 0);
+ return _open_osfhandle((INT_PTR) hFile, O_RDONLY);
+#endif
}
void Input::SetZ(int l) throw(GeneralException) {