fix possible UNICODE related build failure due to OCCT cmake flags

This commit is contained in:
wmayer
2018-08-06 12:29:43 +02:00
parent 5e63d3ded9
commit 2e4d2dff03
6 changed files with 13 additions and 12 deletions

View File

@@ -79,8 +79,8 @@ bool SMESH_File::open()
if ( !_map && length > 0 )
{
#ifdef WIN32
_file = CreateFile(_name.data(), GENERIC_READ, FILE_SHARE_READ,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
_file = CreateFileA(_name.data(), GENERIC_READ, FILE_SHARE_READ,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
bool ok = ( _file != INVALID_HANDLE_VALUE );
#else
_file = ::open(_name.data(), O_RDONLY );
@@ -292,7 +292,7 @@ bool SMESH_File::openForWriting()
{
#ifdef WIN32
_file = CreateFile( _name.c_str(), // name of the write
_file = CreateFileA(_name.c_str(), // name of the write
GENERIC_WRITE, // open for writing
0, // do not share
NULL, // default security

View File

@@ -1037,7 +1037,7 @@ std::vector< std::string > SMESH_Gen::GetPluginXMLPaths()
xmlPath += sep + plugin + ".xml";
bool fileOK;
#ifdef WIN32
fileOK = (GetFileAttributes(xmlPath.c_str()) != INVALID_FILE_ATTRIBUTES);
fileOK = (GetFileAttributesA(xmlPath.c_str()) != INVALID_FILE_ATTRIBUTES);
#else
fileOK = (access(xmlPath.c_str(), F_OK) == 0);
#endif