summaryrefslogtreecommitdiffstats
path: root/loc2c-test.c
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-08-10 13:01:30 -0700
committerJosh Stone <jistone@redhat.com>2009-08-10 13:01:30 -0700
commit6a38401c78a02b9bd14e50966ecdd54a003597b7 (patch)
tree756865ad341d322f3e47bae5d398ebb23ba48209 /loc2c-test.c
parent23d106b9c554c2b32dfb8c94dc963834f65ef7df (diff)
downloadsystemtap-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 'loc2c-test.c')
-rw-r--r--loc2c-test.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/loc2c-test.c b/loc2c-test.c
index 79cb3296..3c260385 100644
--- a/loc2c-test.c
+++ b/loc2c-test.c
@@ -21,6 +21,11 @@
#include <stdarg.h>
#include "loc2c.h"
+#if !defined(_ELFUTILS_PREREQ)
+// make a dummy PREREQ check for elfutils < 0.138
+#define _ELFUTILS_PREREQ(major, minor) (0 >= 1)
+#endif
+
#define _(msg) msg
static void __attribute__ ((noreturn))
@@ -519,7 +524,6 @@ main (int argc, char **argv)
{
Dwarf_Op *cfa_ops = NULL;
-#ifdef _ELFUTILS_PREREQ
#if _ELFUTILS_PREREQ(0,142)
size_t cfa_nops;
Dwarf_Addr bias;
@@ -546,7 +550,6 @@ main (int argc, char **argv)
}
}
#endif
-#endif
handle_variable (scopes, n, out, cubias, &vardie, pc, cfa_ops,
&argv[argi]);