diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 3c370a5e1..9f4020aac 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2012-06-28 Corinna Vinschen + + * kernel32.cc (_KERNEL32_): Define. Explain why. + (CreateFileMappingW): Drop undocumented flProtect flags. + 2012-06-28 Corinna Vinschen * fhandler_serial.cc: Fix includes for IOCTL codes to support Mingw64. 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;