* kernel32.cc (_KERNEL32_): Define. Explain why.
(CreateFileMappingW): Drop undocumented flProtect flags.
This commit is contained in:
parent
ca7f6a04b3
commit
ca4d966d1b
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue