* Makefile.in (cygcheck.exe): Link against psapi.dll.
* bloda.cc: Change include section to work with Mingw64 headers. Include psapi.h. Use SystemProcessInformation instead of SystemProcessesAndThreadsInformation throughout and add define for w32api headers. Ditto for PSYSTEM_PROCESS_INFORMATION vs. PSYSTEM_PROCESSES. (system_module_list): New type to replace SYSTEM_MODULE_INFORMATION. Change usage throughout accordingly. (get_module_list): Fetch module list using PSAPI functions EnumDeviceDrivers and GetDeviceDriverBaseNameA. * cygcheck.cc (max): Define as __max if not defined already. (alloca): Only define if not defined already. (handle_unique_object_name): Use explicit sharing flags rather than FILE_SHARE_VALID_FLAGS which officially is only available in DDK headers. (PRODUCT_ULTIMATE_E): Only define if not defined already. * dump_setup.cc: Change include section to work with Mingw64 headers. (NtQueryAttributesFile): Drop NTOSAPI aka DECLSPEC_IMPORT. * strace.cc: Change include section to work with Mingw64 headers. (alloca): Only define if not defined already.
This commit is contained in:
@ -8,7 +8,6 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
@ -17,9 +16,18 @@ details. */
|
||||
#include <io.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#define WIN32_NO_STATUS /* Disable status codes in winnt.h since we include
|
||||
ntstatus.h for extended status codes below. */
|
||||
#include <windows.h>
|
||||
#undef WIN32_NO_STATUS
|
||||
#ifndef __MINGW64_VERSION_MAJOR
|
||||
# include <ddk/ntapi.h>
|
||||
# include <ddk/winddk.h>
|
||||
#else
|
||||
# include <winternl.h>
|
||||
# include <ntstatus.h>
|
||||
#endif
|
||||
#include "path.h"
|
||||
#include <ddk/ntapi.h>
|
||||
#include <ddk/winddk.h>
|
||||
#if 0
|
||||
#include "zlib.h"
|
||||
#endif
|
||||
@ -265,8 +273,8 @@ transform_chars (PWCHAR path, PWCHAR path_end)
|
||||
*path = tfx_chars[*path];
|
||||
}
|
||||
|
||||
extern "C" NTOSAPI NTAPI NTSTATUS NtQueryAttributesFile(
|
||||
POBJECT_ATTRIBUTES, PFILE_BASIC_INFORMATION);
|
||||
extern "C" NTAPI NTSTATUS NtQueryAttributesFile (POBJECT_ATTRIBUTES,
|
||||
PFILE_BASIC_INFORMATION);
|
||||
|
||||
/* This function checks for file existance and fills the stat structure
|
||||
with only the required mode info. We're using a native NT function
|
||||
|
Reference in New Issue
Block a user