typeof() and auto_ptr() needed some #ifdef love so that the code
compiles with
CXXFLAGS="-std=c++11 -O2 -g -Wextra -Wall -Werror"
and CXXFLAGS="-O2 -g -Wextra -Wall -Werror"
#include <stdint.h>
}
+#if __cplusplus >= 201103L /* -std=c++11 */
+#define typeof(x) decltype(x)
+#endif
// The individual probes' info read from the stap module.
struct dynprobe_location {
#include "../runtime/dyninst/stapdyn.h"
}
+#if __cplusplus >= 201103L /* -std=c++11 */
+#define typeof(x) decltype(x)
+#endif
// The mutator drives all instrumentation.
class mutator {
if (!check_dyninst_sebools(pid != 0))
return 1;
+#if __cplusplus >= 201103L /* -std=c++11 */
+ unique_ptr<mutator> session(new mutator(module, modoptions));
+#else
auto_ptr<mutator> session(new mutator(module, modoptions));
+#endif
if (!session.get() || !session->load())
{
staperror() << "Failed to create the mutator!" << endl;