From 469c1a1b2ef323030531b0ca05e6f9337c0bbbe6 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 29 Sep 2009 17:09:20 -0400 Subject: build fix: use boost shared_ptr if libstdc++ to old to have * configure.ac: Look for tr1/memory and boost/shared_ptr.hpp * setupdwfl.h (shared_ptr): Define conditionally based on above. * systemtap.spec (with_boost): New parameter, default-off. --- setupdwfl.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'setupdwfl.h') diff --git a/setupdwfl.h b/setupdwfl.h index 743ce668..0c3cc63e 100644 --- a/setupdwfl.h +++ b/setupdwfl.h @@ -16,7 +16,15 @@ #include #include +#if defined(HAVE_TR1_MEMORY) #include +using std::tr1::shared_ptr; +#elif defined(HAVE_BOOST_SHARED_PTR_HPP) +#include +using boost::shared_ptr; +#else +#error "No shared_ptr implementation found; get boost or modern g++" +#endif extern "C" { #include @@ -29,7 +37,7 @@ public: ~StapDwfl() { if (dwfl) dwfl_end (dwfl); } Dwfl *dwfl; }; -typedef std::tr1::shared_ptr DwflPtr; +typedef shared_ptr DwflPtr; DwflPtr setup_dwfl_kernel(const std::string &name, unsigned *found, -- cgit