* 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.
This commit is contained in:
parent
a90b8a20ed
commit
25f3ea84f8
|
@ -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>
|
2012-06-26 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* winsup.h (GetLastError): Drop redundant definition.
|
* winsup.h (GetLastError): Drop redundant definition.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* advapi32.cc: Win32 replacement functions.
|
/* advapi32.cc: Win32 replacement functions.
|
||||||
|
|
||||||
Copyright 2011 Red Hat, Inc.
|
Copyright 2011, 2012 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
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
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||||
details. */
|
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 "winsup.h"
|
||||||
#include <winioctl.h>
|
#include <winioctl.h>
|
||||||
#include "shared_info.h"
|
#include "shared_info.h"
|
||||||
|
@ -89,7 +93,7 @@ ImpersonateLoggedOnUser (HANDLE tok)
|
||||||
DEFAULT_NTSTATUS_TO_BOOL_RETURN
|
DEFAULT_NTSTATUS_TO_BOOL_RETURN
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL
|
BOOL WINAPI
|
||||||
ImpersonateNamedPipeClient (HANDLE pipe)
|
ImpersonateNamedPipeClient (HANDLE pipe)
|
||||||
{
|
{
|
||||||
IO_STATUS_BLOCK io;
|
IO_STATUS_BLOCK io;
|
||||||
|
|
|
@ -27,7 +27,9 @@
|
||||||
#undef STATUS_INVALID_HANDLE
|
#undef STATUS_INVALID_HANDLE
|
||||||
#endif
|
#endif
|
||||||
#define STATUS_INVALID_HANDLE ((NTSTATUS) 0xc0000008)
|
#define STATUS_INVALID_HANDLE ((NTSTATUS) 0xc0000008)
|
||||||
|
#ifndef STATUS_INVALID_PARAMETER
|
||||||
#define STATUS_INVALID_PARAMETER ((NTSTATUS) 0xc000000d)
|
#define STATUS_INVALID_PARAMETER ((NTSTATUS) 0xc000000d)
|
||||||
|
#endif
|
||||||
#define STATUS_NO_SUCH_FILE ((NTSTATUS) 0xc000000f)
|
#define STATUS_NO_SUCH_FILE ((NTSTATUS) 0xc000000f)
|
||||||
#define STATUS_INVALID_DEVICE_REQUEST ((NTSTATUS) 0xc0000010)
|
#define STATUS_INVALID_DEVICE_REQUEST ((NTSTATUS) 0xc0000010)
|
||||||
#define STATUS_END_OF_FILE ((NTSTATUS) 0xc0000011)
|
#define STATUS_END_OF_FILE ((NTSTATUS) 0xc0000011)
|
||||||
|
@ -61,8 +63,12 @@
|
||||||
#define STATUS_PROCESS_IS_TERMINATING ((NTSTATUS) 0xc000010a)
|
#define STATUS_PROCESS_IS_TERMINATING ((NTSTATUS) 0xc000010a)
|
||||||
#define STATUS_CANNOT_DELETE ((NTSTATUS) 0xc0000121)
|
#define STATUS_CANNOT_DELETE ((NTSTATUS) 0xc0000121)
|
||||||
#define STATUS_INVALID_LEVEL ((NTSTATUS) 0xc0000148)
|
#define STATUS_INVALID_LEVEL ((NTSTATUS) 0xc0000148)
|
||||||
|
#ifndef STATUS_DLL_NOT_FOUND
|
||||||
#define STATUS_DLL_NOT_FOUND ((NTSTATUS) 0xc0000135)
|
#define STATUS_DLL_NOT_FOUND ((NTSTATUS) 0xc0000135)
|
||||||
|
#endif
|
||||||
|
#ifndef STATUS_ENTRYPOINT_NOT_FOUND
|
||||||
#define STATUS_ENTRYPOINT_NOT_FOUND ((NTSTATUS) 0xc0000139)
|
#define STATUS_ENTRYPOINT_NOT_FOUND ((NTSTATUS) 0xc0000139)
|
||||||
|
#endif
|
||||||
#define STATUS_NOT_FOUND ((NTSTATUS) 0xc0000225)
|
#define STATUS_NOT_FOUND ((NTSTATUS) 0xc0000225)
|
||||||
#define STATUS_BAD_DLL_ENTRYPOINT ((NTSTATUS) 0xc0000251)
|
#define STATUS_BAD_DLL_ENTRYPOINT ((NTSTATUS) 0xc0000251)
|
||||||
#define STATUS_ILLEGAL_DLL_RELOCATION ((NTSTATUS) 0xc0000269)
|
#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);
|
typedef VOID NTAPI (*PIO_APC_ROUTINE)(PVOID, PIO_STATUS_BLOCK, ULONG);
|
||||||
|
|
||||||
|
#ifndef __MINGW64_VERSION_MAJOR
|
||||||
typedef enum _EVENT_TYPE
|
typedef enum _EVENT_TYPE
|
||||||
{
|
{
|
||||||
NotificationEvent = 0,
|
NotificationEvent = 0,
|
||||||
SynchronizationEvent
|
SynchronizationEvent
|
||||||
} EVENT_TYPE, *PEVENT_TYPE;
|
} EVENT_TYPE, *PEVENT_TYPE;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct _EVENT_BASIC_INFORMATION
|
typedef struct _EVENT_BASIC_INFORMATION
|
||||||
{
|
{
|
||||||
|
@ -1093,11 +1101,21 @@ typedef struct _KEY_VALUE_PARTIAL_INFORMATION
|
||||||
UCHAR Data[1];
|
UCHAR Data[1];
|
||||||
} KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
|
} KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
|
||||||
|
|
||||||
|
#ifndef __MINGW64_VERSION_MAJOR
|
||||||
typedef enum _TIMER_TYPE
|
typedef enum _TIMER_TYPE
|
||||||
{
|
{
|
||||||
NotificationTimer,
|
NotificationTimer,
|
||||||
SynchronisationTimer
|
SynchronisationTimer
|
||||||
} TIMER_TYPE, *PTIMER_TYPE;
|
} 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);
|
typedef VOID (APIENTRY *PTIMER_APC_ROUTINE)(PVOID, ULONG, ULONG);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* winlean.h - Standard "lean" windows include
|
/* 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.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ details. */
|
||||||
#define _WINVER_H
|
#define _WINVER_H
|
||||||
#define _WINNETWK_H
|
#define _WINNETWK_H
|
||||||
#define _WINSVC_H
|
#define _WINSVC_H
|
||||||
|
#define __STRALIGN_H_
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <wincrypt.h>
|
#include <wincrypt.h>
|
||||||
#include <lmcons.h>
|
#include <lmcons.h>
|
||||||
|
@ -27,6 +28,7 @@ details. */
|
||||||
#undef _WINVER_H
|
#undef _WINVER_H
|
||||||
#undef _WINNETWK_H
|
#undef _WINNETWK_H
|
||||||
#undef _WINSVC_H
|
#undef _WINSVC_H
|
||||||
|
#undef __STRALIGN_H_
|
||||||
/* When Terminal Services are installed, the GetWindowsDirectory function
|
/* When Terminal Services are installed, the GetWindowsDirectory function
|
||||||
does not return the system installation dir, but a user specific directory
|
does not return the system installation dir, but a user specific directory
|
||||||
instead. That's not what we have in mind when calling GetWindowsDirectory
|
instead. That's not what we have in mind when calling GetWindowsDirectory
|
||||||
|
|
Loading…
Reference in New Issue