Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2012-06-27 17:19:11 +0400
committerCorinna Vinschen <corinna@vinschen.de>2012-06-27 17:19:11 +0400
commit25f3ea84f8170ef2f5cb4aba11f547723f360760 (patch)
treec38d060e69aa687e39cb5499e79354af7b91393c
parenta90b8a20ed988808488962636b9c6c8665cb9413 (diff)
* advapi32.cc (_ADVAPI32_): Define. Explain why.
(ImpersonateNamedPipeClient): Add missing WINAPI. * ntdll.h (STATUS_INVALID_PARAMETER): Only define if it isn't already. (STATUS_DLL_NOT_FOUND): Ditto. (STATUS_ENTRYPOINT_NOT_FOUND): Ditto. (enum _EVENT_TYPE): Guard against redefinition since it's already defined in Mingw64's ntdef.h. (enum _TIMER_TYPE): Ditto. (enum _SECTION_INHERIT): Define if using Mingw64 headers since it's missing in Mingw64's ntdef.h. * winlean.h (__STRALIGN_H_): Define before including windows.h.
-rw-r--r--winsup/cygwin/ChangeLog14
-rw-r--r--winsup/cygwin/advapi32.cc8
-rw-r--r--winsup/cygwin/ntdll.h18
-rw-r--r--winsup/cygwin/winlean.h4
4 files changed, 41 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index cacf5a4cb..2b2e5b25b 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,17 @@
+2012-06-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * advapi32.cc (_ADVAPI32_): Define. Explain why.
+ (ImpersonateNamedPipeClient): Add missing WINAPI.
+ * ntdll.h (STATUS_INVALID_PARAMETER): Only define if it isn't already.
+ (STATUS_DLL_NOT_FOUND): Ditto.
+ (STATUS_ENTRYPOINT_NOT_FOUND): Ditto.
+ (enum _EVENT_TYPE): Guard against redefinition since it's already
+ defined in Mingw64's ntdef.h.
+ (enum _TIMER_TYPE): Ditto.
+ (enum _SECTION_INHERIT): Define if using Mingw64 headers since it's
+ missing in Mingw64's ntdef.h.
+ * winlean.h (__STRALIGN_H_): Define before including windows.h.
+
2012-06-26 Corinna Vinschen <corinna@vinschen.de>
* winsup.h (GetLastError): Drop redundant definition.
diff --git a/winsup/cygwin/advapi32.cc b/winsup/cygwin/advapi32.cc
index 47913a031..07a11a513 100644
--- a/winsup/cygwin/advapi32.cc
+++ b/winsup/cygwin/advapi32.cc
@@ -1,6 +1,6 @@
/* advapi32.cc: Win32 replacement functions.
- Copyright 2011 Red Hat, Inc.
+ Copyright 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 (or, FWIW, the
+ Microsoft headers) to omit declspec(dllimport) from advapi declarations. */
+#define _ADVAPI32_
+
#include "winsup.h"
#include <winioctl.h>
#include "shared_info.h"
@@ -89,7 +93,7 @@ ImpersonateLoggedOnUser (HANDLE tok)
DEFAULT_NTSTATUS_TO_BOOL_RETURN
}
-BOOL
+BOOL WINAPI
ImpersonateNamedPipeClient (HANDLE pipe)
{
IO_STATUS_BLOCK io;
diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h
index 0e09cf41e..920bdcf48 100644
--- a/winsup/cygwin/ntdll.h
+++ b/winsup/cygwin/ntdll.h
@@ -27,7 +27,9 @@
#undef STATUS_INVALID_HANDLE
#endif
#define STATUS_INVALID_HANDLE ((NTSTATUS) 0xc0000008)
+#ifndef STATUS_INVALID_PARAMETER
#define STATUS_INVALID_PARAMETER ((NTSTATUS) 0xc000000d)
+#endif
#define STATUS_NO_SUCH_FILE ((NTSTATUS) 0xc000000f)
#define STATUS_INVALID_DEVICE_REQUEST ((NTSTATUS) 0xc0000010)
#define STATUS_END_OF_FILE ((NTSTATUS) 0xc0000011)
@@ -61,8 +63,12 @@
#define STATUS_PROCESS_IS_TERMINATING ((NTSTATUS) 0xc000010a)
#define STATUS_CANNOT_DELETE ((NTSTATUS) 0xc0000121)
#define STATUS_INVALID_LEVEL ((NTSTATUS) 0xc0000148)
+#ifndef STATUS_DLL_NOT_FOUND
#define STATUS_DLL_NOT_FOUND ((NTSTATUS) 0xc0000135)
+#endif
+#ifndef STATUS_ENTRYPOINT_NOT_FOUND
#define STATUS_ENTRYPOINT_NOT_FOUND ((NTSTATUS) 0xc0000139)
+#endif
#define STATUS_NOT_FOUND ((NTSTATUS) 0xc0000225)
#define STATUS_BAD_DLL_ENTRYPOINT ((NTSTATUS) 0xc0000251)
#define STATUS_ILLEGAL_DLL_RELOCATION ((NTSTATUS) 0xc0000269)
@@ -1022,11 +1028,13 @@ typedef struct _FILE_MAILSLOT_SET_INFORMATION
typedef VOID NTAPI (*PIO_APC_ROUTINE)(PVOID, PIO_STATUS_BLOCK, ULONG);
+#ifndef __MINGW64_VERSION_MAJOR
typedef enum _EVENT_TYPE
{
NotificationEvent = 0,
SynchronizationEvent
} EVENT_TYPE, *PEVENT_TYPE;
+#endif
typedef struct _EVENT_BASIC_INFORMATION
{
@@ -1093,11 +1101,21 @@ typedef struct _KEY_VALUE_PARTIAL_INFORMATION
UCHAR Data[1];
} KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
+#ifndef __MINGW64_VERSION_MAJOR
typedef enum _TIMER_TYPE
{
NotificationTimer,
SynchronisationTimer
} TIMER_TYPE, *PTIMER_TYPE;
+#endif
+
+#ifdef __MINGW64_VERSION_MAJOR
+typedef enum _SECTION_INHERIT
+{
+ ViewShare = 1,
+ ViewUnmap = 2
+} SECTION_INHERIT;
+#endif
typedef VOID (APIENTRY *PTIMER_APC_ROUTINE)(PVOID, ULONG, ULONG);
diff --git a/winsup/cygwin/winlean.h b/winsup/cygwin/winlean.h
index d2d7f7a56..e5eeeb2ac 100644
--- a/winsup/cygwin/winlean.h
+++ b/winsup/cygwin/winlean.h
@@ -1,6 +1,6 @@
/* winlean.h - Standard "lean" windows include
- Copyright 2010, 2011 Red Hat, Inc.
+ Copyright 2010, 2011, 2012 Red Hat, Inc.
This file is part of Cygwin.
@@ -17,6 +17,7 @@ details. */
#define _WINVER_H
#define _WINNETWK_H
#define _WINSVC_H
+#define __STRALIGN_H_
#include <windows.h>
#include <wincrypt.h>
#include <lmcons.h>
@@ -27,6 +28,7 @@ details. */
#undef _WINVER_H
#undef _WINNETWK_H
#undef _WINSVC_H
+#undef __STRALIGN_H_
/* When Terminal Services are installed, the GetWindowsDirectory function
does not return the system installation dir, but a user specific directory
instead. That's not what we have in mind when calling GetWindowsDirectory