diff options
author | kh1 <karsten.heimrich@nokia.com> | 2012-08-21 12:05:11 +0200 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@nokia.com> | 2012-08-22 09:59:49 +0200 |
commit | 27c1445c9f82434a39ada4c5fbf188d1ab09e5ba (patch) | |
tree | 594d1c024ab8fc9a595e4ec5f8625b9222672563 /src/libs/kdtools/kdsavefile.cpp | |
parent | b22a0e8e6d1b3114fc37acad7e96b6b3564a8e19 (diff) |
Revert "Fixes required for errorless MinGW-w64 compilation are done."
This reverts commit 9cad5d54cf0d78e92b4ee831299d83b657f42f2e as it
breaks compressing the meta folder (Windows 7, VS 2010).
Change-Id: I24d4ec37941487fc3cc998706d33cd5d8b9f011a
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Diffstat (limited to 'src/libs/kdtools/kdsavefile.cpp')
-rw-r--r-- | src/libs/kdtools/kdsavefile.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libs/kdtools/kdsavefile.cpp b/src/libs/kdtools/kdsavefile.cpp index 5a81ad424..94ed1aa36 100644 --- a/src/libs/kdtools/kdsavefile.cpp +++ b/src/libs/kdtools/kdsavefile.cpp @@ -28,8 +28,7 @@ #include <QtCore/QTemporaryFile> #ifdef Q_OS_WIN - #include <io.h> - #include <share.h> // PQR for MinGW-w64: Required for _SH_DENYRW +# include <io.h> #endif #include <memory> #include <sys/stat.h> @@ -93,11 +92,9 @@ static QString makeAbsolute(const QString &path) static int myOpen(const QString &path, int flags, int mode) { #ifdef Q_OS_WIN - // PQR for MinGW-w64: _wsopen_s doesn't exist in MSVCRT.dll, let's use _wsopen. - return _wsopen(reinterpret_cast<const wchar_t *>(path.utf16()), flags, _SH_DENYRW, mode); - //int fd; - //_wsopen_s(&fd, reinterpret_cast<const wchar_t *>(path.utf16()), flags, _SH_DENYRW, mode); - //return fd; + int fd; + _wsopen_s(&fd, reinterpret_cast<const wchar_t *>(path.utf16()), flags, _SH_DENYRW, mode); + return fd; #else return open(QFile::encodeName(path).constData(), flags, mode); #endif |