summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/kernel32.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2012-06-28 20:06:23 +0000
committerCorinna Vinschen <corinna@vinschen.de>2012-06-28 20:06:23 +0000
commitca4d966d1babcb9bbbfc7d687ee8e099b907fabe (patch)
treeaac97320e26f4c7545d0458b78301facb950032c /winsup/cygwin/kernel32.cc
parentca7f6a04b3d6e407fdee0f07cc0d1d2d3739ef44 (diff)
downloadcygnal-ca4d966d1babcb9bbbfc7d687ee8e099b907fabe.tar.gz
cygnal-ca4d966d1babcb9bbbfc7d687ee8e099b907fabe.tar.bz2
cygnal-ca4d966d1babcb9bbbfc7d687ee8e099b907fabe.zip
* kernel32.cc (_KERNEL32_): Define. Explain why.
(CreateFileMappingW): Drop undocumented flProtect flags.
Diffstat (limited to 'winsup/cygwin/kernel32.cc')
-rw-r--r--winsup/cygwin/kernel32.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/winsup/cygwin/kernel32.cc b/winsup/cygwin/kernel32.cc
index fd25358aa..2f049951c 100644
--- a/winsup/cygwin/kernel32.cc
+++ b/winsup/cygwin/kernel32.cc
@@ -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;