summaryrefslogtreecommitdiffstats
path: root/winsup/utils/strace.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2012-07-11 16:41:51 +0000
committerCorinna Vinschen <corinna@vinschen.de>2012-07-11 16:41:51 +0000
commit6e1e3bb8e55374b16c2d57297066b088c0cda9a0 (patch)
treefea006876e83f178829de7768aff65fe0305b47b /winsup/utils/strace.cc
parent4a4f6f949ce7758575552fb781988c4e3c7951d4 (diff)
downloadcygnal-6e1e3bb8e55374b16c2d57297066b088c0cda9a0.tar.gz
cygnal-6e1e3bb8e55374b16c2d57297066b088c0cda9a0.tar.bz2
cygnal-6e1e3bb8e55374b16c2d57297066b088c0cda9a0.zip
* 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.
Diffstat (limited to 'winsup/utils/strace.cc')
-rw-r--r--winsup/utils/strace.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc
index f8662582d..f9d2eb323 100644
--- a/winsup/utils/strace.cc
+++ b/winsup/utils/strace.cc
@@ -11,6 +11,12 @@ 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>
+#ifndef __MINGW64_VERSION_MAJOR
+#include "ddk/ntapi.h"
+#else
+#include <winternl.h>
+#endif
#define cygwin_internal cygwin_internal_dontuse
#include <stdio.h>
#include <fcntl.h>
@@ -19,7 +25,6 @@ details. */
#include <string.h>
#include <stdlib.h>
#include <time.h>
-#include <windows.h>
#include <signal.h>
#include <errno.h>
#include "cygwin/include/sys/strace.h"
@@ -28,10 +33,11 @@ details. */
#include "path.h"
#undef cygwin_internal
#include "loadlib.h"
-#include "ddk/ntapi.h"
/* we *know* we're being built with GCC */
+#ifndef alloca
#define alloca __builtin_alloca
+#endif
static const char *pgm;
static int forkdebug = 1;