From 8db222e36ae777e6aec8c61c616838a86258e99f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Mon, 1 Feb 2021 21:16:56 -0300 Subject: libdwfl: use GNU strerror_r only when available. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some C libraries don't provide the GNU version of strerror_r, only the XSI-compliant one. We use the GNU version when available, since it fits the code better, and otherwise use the XSI-compliant one. https://sourceware.org/bugzilla/show_bug.cgi?id=21010 Signed-off-by: Érico Rolim --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 346ab800..47db8472 100644 --- a/configure.ac +++ b/configure.ac @@ -428,6 +428,11 @@ AC_CHECK_DECLS([mempcpy],[],[], AC_CHECK_FUNCS([process_vm_readv]) +old_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -D_GNU_SOURCE" +AC_FUNC_STRERROR_R() +CFLAGS="$old_CFLAGS" + AC_CHECK_LIB([stdc++], [__cxa_demangle], [dnl AC_DEFINE([USE_DEMANGLE], [1], [Defined if demangling is enabled])]) AM_CONDITIONAL(DEMANGLE, test "x$ac_cv_lib_stdcpp___cxa_demangle" = "xyes") -- cgit v1.2.1