-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
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 );
#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
}
else
{
-#ifdef WNT
+#ifdef WIN32
CloseHandle(_mapObj);
CloseHandle(_file);
#else
{
if ( _map != NULL )
{
-#ifdef WNT
+#ifdef WIN32
UnmapViewOfFile(_map);
CloseHandle(_mapObj);
CloseHandle(_file);