aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Schäpers <bjoern@hazardy.de>2024-05-17 11:45:28 +0100
committerJonathan Wakely <jwakely@redhat.com>2024-05-17 14:45:19 +0100
commitd4635b504c73b653b815d2c2543c86c91b00e373 (patch)
tree4768b922777de4f05bdfb18d9e5bbcedd11f6af9
parent5aaf47cb1987bbc5508c4b9b7dad5ea7d69af2c2 (diff)
downloadgcc-d4635b504c73b653b815d2c2543c86c91b00e373.zip
gcc-d4635b504c73b653b815d2c2543c86c91b00e373.tar.gz
gcc-d4635b504c73b653b815d2c2543c86c91b00e373.tar.bz2
libstdc++: detect DLLs on windows with <stacktrace>
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>
-rw-r--r--libstdc++-v3/acinclude.m45
-rw-r--r--libstdc++-v3/config.h.in3
-rwxr-xr-xlibstdc++-v3/configure16
3 files changed, 24 insertions, 0 deletions
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 51a08bc..e04aae2 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -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
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index 906e014..486ba45 100644
--- a/libstdc++-v3/config.h.in
+++ b/libstdc++-v3/config.h.in
@@ -490,6 +490,9 @@
/* 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
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 21abaeb..5179cc5 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -53867,6 +53867,22 @@ 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
+
# Check for the fcntl function.
if test -n "${with_target_subdir}"; then