* kernel32.cc (_KERNEL32_): Define. Explain why.

(CreateFileMappingW): Drop undocumented flProtect flags.
This commit is contained in:
Corinna Vinschen 2012-06-28 20:06:23 +00:00
parent ca7f6a04b3
commit ca4d966d1b
2 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2012-06-28 Corinna Vinschen <corinna@vinschen.de>
* kernel32.cc (_KERNEL32_): Define. Explain why.
(CreateFileMappingW): Drop undocumented flProtect flags.
2012-06-28 Corinna Vinschen <corinna@vinschen.de>
* fhandler_serial.cc: Fix includes for IOCTL codes to support Mingw64.

View File

@ -1,6 +1,6 @@
/* kernel32.cc: Win32 replacement functions.
Copyright 2008, 2010, 2011 Red Hat, Inc.
Copyright 2008, 2010, 2011, 2012 Red Hat, Inc.
This file is part of Cygwin.
@ -8,6 +8,10 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
/* This define is required to tell the mingw64 headers to omit
declspec(dllimport) from all kernel32 function declarations. */
#define _KERNEL32_
#include "winsup.h"
#include "shared_info.h"
#include "ntdll.h"
@ -308,8 +312,8 @@ CreateFileMappingW (HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes,
| PAGE_WRITECOPY | PAGE_EXECUTE
| PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE
| PAGE_EXECUTE_WRITECOPY);
ULONG attribs = flProtect & (SEC_BASED | SEC_NO_CHANGE | SEC_IMAGE | SEC_VLM
| SEC_RESERVE | SEC_COMMIT | SEC_NOCACHE);
ULONG attribs = flProtect & (SEC_COMMIT | SEC_IMAGE | SEC_NOCACHE
| SEC_RESERVE);
LARGE_INTEGER size = {{ LowPart : dwMaximumSizeLow,
HighPart : dwMaximumSizeHigh }};
PLARGE_INTEGER psize = size.QuadPart ? &size : NULL;