Currently there is no API for applications to detect whether elfutils
libraries are built with thread safety support enabled (via the
--enable-thread-safety configure option).
Add macro _ELFUTILS_THREAD_SAFE to version.h. This macro is set to 1
if thread safety support is enabled. If thread safety support is not
enabled then this macro is left undefined.
Signed-off-by: Aaron Merey <amerey@redhat.com>
+Version 0.196
+
+version.h: New macro _ELFUTILS_THREAD_SAFE added to <elfutils/version.h>.
+ Defined to 1 when the elfutils libraries are built with thread
+ safety support enabled. Otherwise it is left undefined.
+
Version 0.195 "Handwritten"
CONTRIBUTING: elfutils has adopted a policy on the use of Large Language
#define _ELFUTILS_VERSION @eu_version@
+/* _ELFUTILS_THREAD_SAFE is defined to 1 when the elfutils libraries
+ are built with thread safety support enabled. Otherwise it is left
+ undefined. */
+@eu_thread_safe@
+
#define _ELFUTILS_PREREQ(major, minor) \
(_ELFUTILS_VERSION >= ((major) * 1000 + (minor)))
AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
+AS_IF([test "$use_locks" = yes],
+ [eu_thread_safe="#define _ELFUTILS_THREAD_SAFE 1"],
+ [eu_thread_safe="/* _ELFUTILS_THREAD_SAFE is not defined. */"])
+AC_SUBST([eu_thread_safe])
+
# Provided by gnulib's m4/std-gnu11.m4 for autoconf pre 2.70
AC_PROG_CC
AS_IF([test "x$ac_cv_prog_cc_c11" = "xno"],