[newlib-cygwin] Cygwin: profiler: Fix linking when building with -DDEBUGGING
Corinna Vinschen
corinna@sourceware.org
Sat Aug 20 20:33:45 GMT 2022
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=1b3a0effd40a0d75887ee9d2909dd4e8c5f20d37
commit 1b3a0effd40a0d75887ee9d2909dd4e8c5f20d37
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Sat Aug 20 21:14:57 2022 +0200
Cygwin: profiler: Fix linking when building with -DDEBUGGING
CloseHandle gets redefined to a macro calling an internal function
in debug.h when building with -DDEBUGGING, but profiler has no access
to that function.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/utils/profiler.cc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/winsup/utils/profiler.cc b/winsup/utils/profiler.cc
index 2be7baf74..985946e5f 100644
--- a/winsup/utils/profiler.cc
+++ b/winsup/utils/profiler.cc
@@ -39,6 +39,11 @@ typedef uint16_t u_int16_t; // Non-standard sized type needed by ancient gmon.h
#undef ExitThread
#endif
+/* Undo this #define from debug.h. */
+#ifdef CloseHandle
+#undef CloseHandle
+#endif
+
#define SCALE_SHIFT 2 // == 4 bytes of address space per bucket
#define MS_VC_EXCEPTION 0x406D1388 // thread name notification from child
More information about the Cygwin-cvs
mailing list