]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: detect DLLs on windows with <stacktrace>
authorBjörn Schäpers <bjoern@hazardy.de>
Fri, 17 May 2024 10:45:28 +0000 (11:45 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 17 May 2024 13:45:19 +0000 (14:45 +0100)
libstdc++-v3/ChangeLog:

* acinclude.m4 (GLIBCXX_ENABLE_BACKTACE): Add check for
tlhelp32.h, matching libbacktrace.
* config.h.in: Regenerate.
* configure: Regenerate.

Signed-off-by: Björn Schäpers <bjoern@hazardy.de>
libstdc++-v3/acinclude.m4
libstdc++-v3/config.h.in
libstdc++-v3/configure

index 51a08bcc8b1d07d8ab9144caf80ba0406ae12fca..e04aae25360d141fb2c17abe31131dbc141add5a 100644 (file)
@@ -5481,6 +5481,11 @@ AC_DEFUN([GLIBCXX_ENABLE_BACKTRACE], [
     BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_DL_ITERATE_PHDR=1"
   fi
   AC_CHECK_HEADERS(windows.h)
+  AC_CHECK_HEADERS(tlhelp32.h, [], [],
+  [#ifdef HAVE_WINDOWS_H
+  #  include <windows.h>
+  #endif
+  ])
 
   # Check for the fcntl function.
   if test -n "${with_target_subdir}"; then
index 906e0143099e7f54cfc6867d881a79ea494bfb44..486ba450749950597e374339cb8e6ae05812148b 100644 (file)
 /* Define to 1 if you have the `timespec_get' function. */
 #undef HAVE_TIMESPEC_GET
 
+/* Define to 1 if you have the <tlhelp32.h> header file. */
+#undef HAVE_TLHELP32_H
+
 /* Define to 1 if the target supports thread-local storage. */
 #undef HAVE_TLS
 
index 21abaeb07788142ecbb8a252dfe0b714c7c308c9..5179cc507f1290ef5164425c0a013bd711381ff9 100755 (executable)
@@ -53865,6 +53865,22 @@ _ACEOF
 
 fi
 
+done
+
+  for ac_header in tlhelp32.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "tlhelp32.h" "ac_cv_header_tlhelp32_h" "#ifdef HAVE_WINDOWS_H
+  #  include <windows.h>
+  #endif
+
+"
+if test "x$ac_cv_header_tlhelp32_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_TLHELP32_H 1
+_ACEOF
+
+fi
+
 done