From 6a38401c78a02b9bd14e50966ecdd54a003597b7 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 10 Aug 2009 13:01:30 -0700 Subject: Simplify _ELFUTILS_PREREQ checking We were jumping through a few hoops to deal with elfutils < 0.138 that did not have the _ELFUTILS_PREREQ macro. I've added an always-false dummy macro to take its place when it doesn't exit. All of the other "#ifdef _ELFUTILS_PREREQ" ugliness can now go away. --- dwarf_wrappers.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'dwarf_wrappers.h') diff --git a/dwarf_wrappers.h b/dwarf_wrappers.h index 959ece92..9233fc1d 100644 --- a/dwarf_wrappers.h +++ b/dwarf_wrappers.h @@ -8,10 +8,23 @@ #ifndef DWARF_WRAPPERS_H #define DWARF_WRAPPERS_H 1 + +#include "config.h" + +extern "C" { #include +#ifdef HAVE_ELFUTILS_VERSION_H +#include +#endif +} #include +#if !defined(_ELFUTILS_PREREQ) +// make a dummy PREREQ check for elfutils < 0.138 +#define _ELFUTILS_PREREQ(major, minor) (0 >= 1) +#endif + // NB: "rc == 0" means OK in this case void dwfl_assert(const std::string& desc, int rc); -- cgit