diff options
author | Josh Stone <jistone@redhat.com> | 2009-08-10 13:01:30 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-08-10 13:01:30 -0700 |
commit | 6a38401c78a02b9bd14e50966ecdd54a003597b7 (patch) | |
tree | 756865ad341d322f3e47bae5d398ebb23ba48209 /dwarf_wrappers.h | |
parent | 23d106b9c554c2b32dfb8c94dc963834f65ef7df (diff) | |
download | systemtap-steved-6a38401c78a02b9bd14e50966ecdd54a003597b7.tar.gz systemtap-steved-6a38401c78a02b9bd14e50966ecdd54a003597b7.tar.xz systemtap-steved-6a38401c78a02b9bd14e50966ecdd54a003597b7.zip |
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.
Diffstat (limited to 'dwarf_wrappers.h')
-rw-r--r-- | dwarf_wrappers.h | 13 |
1 files changed, 13 insertions, 0 deletions
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 <elfutils/libdw.h> +#ifdef HAVE_ELFUTILS_VERSION_H +#include <elfutils/version.h> +#endif +} #include <string> +#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); |