X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fmain.cc;h=b93f75708c1f7b12e6d45c430e0201af70420bee;hb=74d60e0cbacf53e996e9a72b644e30ed7efa3835;hp=83e95cd65a7bc10c9bab62c0b7611d70a354d957;hpb=14e8f64f26c4222e67fff149d7fe9eee5a672b5b;p=awesomized%2Flibmemcached diff --git a/libtest/main.cc b/libtest/main.cc index 83e95cd6..b93f7570 100644 --- a/libtest/main.cc +++ b/libtest/main.cc @@ -2,7 +2,7 @@ * * Data Differential YATL (i.e. libtest) library * - * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -43,6 +43,9 @@ #include #include #include +#ifdef HAVE_STRINGS_H +# include +#endif #include #include #include @@ -57,6 +60,12 @@ #pragma GCC diagnostic ignored "-Wold-style-cast" #endif +#if __cplusplus >= 201103L +# define UNIQUE_PTR std::unique_ptr +#else +# define UNIQUE_PTR std::auto_ptr +#endif + using namespace libtest; static void stats_print(libtest::Framework *frame) @@ -294,7 +303,7 @@ int main(int argc, char *argv[]) return EXIT_FAILURE; } - std::auto_ptr frame(new libtest::Framework(signal, binary_name, collection_to_run, wildcard)); + UNIQUE_PTR frame(new libtest::Framework(signal, binary_name, collection_to_run, wildcard)); // Run create(), bail on error. {