aboutsummaryrefslogtreecommitdiff
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
parentca7f6a04b3d6e407fdee0f07cc0d1d2d3739ef44 (diff)
downloadnewlib-ca4d966d1babcb9bbbfc7d687ee8e099b907fabe.zip
newlib-ca4d966d1babcb9bbbfc7d687ee8e099b907fabe.tar.gz
newlib-ca4d966d1babcb9bbbfc7d687ee8e099b907fabe.tar.bz2
* kernel32.cc (_KERNEL32_): Define. Explain why.
(CreateFileMappingW): Drop undocumented flProtect flags.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/kernel32.cc10
2 files changed, 12 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 3c370a5..9f4020a 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
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.
* fhandler_tape.cc: Ditto.
* flock.cc (allow_others_to_sync): Use PISECURITY_DESCRIPTOR since
diff --git a/winsup/cygwin/kernel32.cc b/winsup/cygwin/kernel32.cc
index fd25358..2f04995 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;