* 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:
@@ -30,7 +30,13 @@
|
||||
#undef cygwin_internal
|
||||
#include "loadlib.h"
|
||||
|
||||
#ifndef max
|
||||
#define max __max
|
||||
#endif
|
||||
|
||||
#ifndef alloca
|
||||
#define alloca __builtin_alloca
|
||||
#endif
|
||||
|
||||
int verbose = 0;
|
||||
int registry = 0;
|
||||
@@ -1314,7 +1320,7 @@ handle_unique_object_name (int opt, char *path)
|
||||
if (opt == CO_SHOW_UON)
|
||||
{
|
||||
access = GENERIC_READ;
|
||||
share = FILE_SHARE_VALID_FLAGS;
|
||||
share = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE;
|
||||
protect = PAGE_READONLY;
|
||||
mapping = FILE_MAP_READ;
|
||||
}
|
||||
@@ -1447,7 +1453,9 @@ dump_sysinfo ()
|
||||
&prod))
|
||||
{
|
||||
#define PRODUCT_UNLICENSED 0xabcdabcd
|
||||
#ifndef PRODUCT_ULTIMATE_E
|
||||
#define PRODUCT_ULTIMATE_E 0x00000047
|
||||
#endif
|
||||
const char *products[] =
|
||||
{
|
||||
/* 0x00000000 */ "",
|
||||
|
Reference in New Issue
Block a user