diff options
Diffstat (limited to '')
-rw-r--r-- | src/OSSupport/File.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/OSSupport/File.cpp b/src/OSSupport/File.cpp index 8c24fa541..ff6fb5898 100644 --- a/src/OSSupport/File.cpp +++ b/src/OSSupport/File.cpp @@ -7,6 +7,9 @@ #include "File.h" #include <fstream> +#ifdef _WIN32 + #include <share.h> // for _SH_DENYWRITE +#endif // _WIN32 @@ -78,7 +81,7 @@ bool cFile::Open(const AString & iFileName, eMode iMode) m_File = _fsopen((FILE_IO_PREFIX + iFileName).c_str(), Mode, _SH_DENYWR); #else m_File = fopen((FILE_IO_PREFIX + iFileName).c_str(), Mode); -#endif // _WIN32 +#endif // _WIN32 if ((m_File == NULL) && (iMode == fmReadWrite)) { @@ -91,7 +94,7 @@ bool cFile::Open(const AString & iFileName, eMode iMode) m_File = _fsopen((FILE_IO_PREFIX + iFileName).c_str(), "wb+", _SH_DENYWR); #else m_File = fopen((FILE_IO_PREFIX + iFileName).c_str(), "wb+"); -#endif // _WIN32 +#endif // _WIN32 } return (m_File != NULL); |