untwine: apply hobu/untwine#59 and hobu/untwine@c7f94c1593

(refs #42904)
This commit is contained in:
Juergen E. Fischer 2021-04-22 22:23:14 +02:00
parent 0ca75275f8
commit 7243cb6f14
2 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
#include <iostream>
#include <algorithm>
#include "QgisUntwine.hpp"

View File

@ -49,10 +49,10 @@ MapContext mapFile(const std::string& filename, bool readOnly,
return ctx;
}
#ifndef WIN32
#ifndef _WIN32
ctx.m_fd = ::open(filename.c_str(), readOnly ? O_RDONLY : O_RDWR);
#else
ctx.m_fd = ::_open(filename.c_str(), readOnly ? O_RDONLY : O_RDWR);
ctx.m_fd = ::_open(filename.c_str(), readOnly ? _O_RDONLY : _O_RDWR);
#endif
if (ctx.m_fd == -1)