X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHUtils%2FSMESH_File.cxx;h=79bbfbc8aca7e7978fd924a3912ce1a0b9f8c178;hp=da6c5122f0b087deb901b14f1e204a047bf0a7b0;hb=e33e8e2029a4e91779b9c1d5f480979fa7b51d0b;hpb=bd8f1aee7c78f7d2eb82bd4fec5e08c9e3d280ce diff --git a/src/SMESHUtils/SMESH_File.cxx b/src/SMESHUtils/SMESH_File.cxx index da6c5122f..79bbfbc8a 100644 --- a/src/SMESHUtils/SMESH_File.cxx +++ b/src/SMESHUtils/SMESH_File.cxx @@ -74,7 +74,7 @@ bool SMESH_File::open() int length = size(); if ( !_map && length > 0 ) { -#ifdef WNT +#ifdef WIN32 _file = CreateFile(_name.data(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); bool ok = ( _file != INVALID_HANDLE_VALUE ); @@ -84,7 +84,7 @@ bool SMESH_File::open() #endif if ( ok ) { -#ifdef WNT +#ifdef WIN32 _mapObj = CreateFileMapping(_file, NULL, PAGE_READONLY, 0, (DWORD)length, NULL); _map = (void*) MapViewOfFile( _mapObj, FILE_MAP_READ, 0, 0, 0 ); #else @@ -99,7 +99,7 @@ bool SMESH_File::open() } else { -#ifdef WNT +#ifdef WIN32 CloseHandle(_mapObj); CloseHandle(_file); #else @@ -121,7 +121,7 @@ void SMESH_File::close() { if ( _map != NULL ) { -#ifdef WNT +#ifdef WIN32 UnmapViewOfFile(_map); CloseHandle(_mapObj); CloseHandle(_file);