Page MenuHomeFreeBSD

D49789.diff
No OneTemporary

D49789.diff

diff --git a/contrib/atf/atf-c++/check.hpp b/contrib/atf/atf-c++/check.hpp
--- a/contrib/atf/atf-c++/check.hpp
+++ b/contrib/atf/atf-c++/check.hpp
@@ -71,7 +71,7 @@
check_result(const atf_check_result_t* result);
friend check_result test_constructor(const char* const*);
- friend std::auto_ptr< check_result > exec(const atf::process::argv_array&);
+ friend std::unique_ptr< check_result > exec(const atf::process::argv_array&);
public:
//!
@@ -120,7 +120,7 @@
const atf::process::argv_array&);
bool build_cxx_o(const std::string&, const std::string&,
const atf::process::argv_array&);
-std::auto_ptr< check_result > exec(const atf::process::argv_array&);
+std::unique_ptr< check_result > exec(const atf::process::argv_array&);
// Useful for testing only.
check_result test_constructor(void);
diff --git a/contrib/atf/atf-c++/check.cpp b/contrib/atf/atf-c++/check.cpp
--- a/contrib/atf/atf-c++/check.cpp
+++ b/contrib/atf/atf-c++/check.cpp
@@ -141,7 +141,7 @@
return success;
}
-std::auto_ptr< impl::check_result >
+std::unique_ptr< impl::check_result >
impl::exec(const atf::process::argv_array& argva)
{
atf_check_result_t result;
@@ -150,5 +150,5 @@
if (atf_is_error(err))
throw_atf_error(err);
- return std::auto_ptr< impl::check_result >(new impl::check_result(&result));
+ return std::unique_ptr< impl::check_result >(new impl::check_result(&result));
}
diff --git a/contrib/atf/atf-c++/check_test.cpp b/contrib/atf/atf-c++/check_test.cpp
--- a/contrib/atf/atf-c++/check_test.cpp
+++ b/contrib/atf/atf-c++/check_test.cpp
@@ -52,7 +52,7 @@
// ------------------------------------------------------------------------
static
-std::auto_ptr< atf::check::check_result >
+std::unique_ptr< atf::check::check_result >
do_exec(const atf::tests::tc* tc, const char* helper_name)
{
std::vector< std::string > argv;
@@ -65,7 +65,7 @@
}
static
-std::auto_ptr< atf::check::check_result >
+std::unique_ptr< atf::check::check_result >
do_exec(const atf::tests::tc* tc, const char* helper_name, const char *carg2)
{
std::vector< std::string > argv;
@@ -248,11 +248,11 @@
}
ATF_TEST_CASE_BODY(exec_cleanup)
{
- std::auto_ptr< atf::fs::path > out;
- std::auto_ptr< atf::fs::path > err;
+ std::unique_ptr< atf::fs::path > out;
+ std::unique_ptr< atf::fs::path > err;
{
- std::auto_ptr< atf::check::check_result > r =
+ std::unique_ptr< atf::check::check_result > r =
do_exec(this, "exit-success");
out.reset(new atf::fs::path(r->stdout_path()));
err.reset(new atf::fs::path(r->stderr_path()));
@@ -272,7 +272,7 @@
ATF_TEST_CASE_BODY(exec_exitstatus)
{
{
- std::auto_ptr< atf::check::check_result > r =
+ std::unique_ptr< atf::check::check_result > r =
do_exec(this, "exit-success");
ATF_REQUIRE(r->exited());
ATF_REQUIRE(!r->signaled());
@@ -280,7 +280,7 @@
}
{
- std::auto_ptr< atf::check::check_result > r =
+ std::unique_ptr< atf::check::check_result > r =
do_exec(this, "exit-failure");
ATF_REQUIRE(r->exited());
ATF_REQUIRE(!r->signaled());
@@ -288,7 +288,7 @@
}
{
- std::auto_ptr< atf::check::check_result > r =
+ std::unique_ptr< atf::check::check_result > r =
do_exec(this, "exit-signal");
ATF_REQUIRE(!r->exited());
ATF_REQUIRE(r->signaled());
@@ -321,12 +321,12 @@
}
ATF_TEST_CASE_BODY(exec_stdout_stderr)
{
- std::auto_ptr< atf::check::check_result > r1 =
+ std::unique_ptr< atf::check::check_result > r1 =
do_exec(this, "stdout-stderr", "result1");
ATF_REQUIRE(r1->exited());
ATF_REQUIRE_EQ(r1->exitcode(), EXIT_SUCCESS);
- std::auto_ptr< atf::check::check_result > r2 =
+ std::unique_ptr< atf::check::check_result > r2 =
do_exec(this, "stdout-stderr", "result2");
ATF_REQUIRE(r2->exited());
ATF_REQUIRE_EQ(r2->exitcode(), EXIT_SUCCESS);
@@ -372,7 +372,7 @@
argv.push_back("/foo/bar/non-existent");
atf::process::argv_array argva(argv);
- std::auto_ptr< atf::check::check_result > r = atf::check::exec(argva);
+ std::unique_ptr< atf::check::check_result > r = atf::check::exec(argva);
ATF_REQUIRE(r->exited());
ATF_REQUIRE_EQ(r->exitcode(), 127);
}
diff --git a/contrib/atf/atf-c++/detail/process_test.cpp b/contrib/atf/atf-c++/detail/process_test.cpp
--- a/contrib/atf/atf-c++/detail/process_test.cpp
+++ b/contrib/atf/atf-c++/detail/process_test.cpp
@@ -196,8 +196,8 @@
const char* const carray1[] = { "arg1", NULL };
const char* const carray2[] = { "arg1", "arg2", NULL };
- std::auto_ptr< argv_array > argv1(new argv_array(carray1));
- std::auto_ptr< argv_array > argv2(new argv_array(carray2));
+ std::unique_ptr< argv_array > argv1(new argv_array(carray1));
+ std::unique_ptr< argv_array > argv2(new argv_array(carray2));
*argv2 = *argv1;
ATF_REQUIRE_EQ(argv2->size(), argv1->size());
@@ -226,8 +226,8 @@
const char* const carray[] = { "arg0", NULL };
- std::auto_ptr< argv_array > argv1(new argv_array(carray));
- std::auto_ptr< argv_array > argv2(new argv_array(*argv1));
+ std::unique_ptr< argv_array > argv1(new argv_array(carray));
+ std::unique_ptr< argv_array > argv2(new argv_array(*argv1));
ATF_REQUIRE_EQ(argv2->size(), argv1->size());
ATF_REQUIRE(std::strcmp((*argv2)[0], (*argv1)[0]) == 0);
diff --git a/contrib/atf/atf-sh/atf-check.cpp b/contrib/atf/atf-sh/atf-check.cpp
--- a/contrib/atf/atf-sh/atf-check.cpp
+++ b/contrib/atf/atf-sh/atf-check.cpp
@@ -108,7 +108,7 @@
};
class temp_file : public std::ostream {
- std::auto_ptr< atf::fs::path > m_path;
+ std::unique_ptr< atf::fs::path > m_path;
int m_fd;
public:
@@ -414,7 +414,7 @@
}
static
-std::auto_ptr< atf::check::check_result >
+std::unique_ptr< atf::check::check_result >
execute(const char* const* argv)
{
// TODO: This should go to stderr... but fixing it now may be hard as test
@@ -430,7 +430,7 @@
}
static
-std::auto_ptr< atf::check::check_result >
+std::unique_ptr< atf::check::check_result >
execute_with_shell(char* const* argv)
{
const std::string cmd = flatten_argv(argv);
@@ -916,7 +916,7 @@
m_stderr_checks.push_back(output_check(oc_empty, false, ""));
do {
- std::auto_ptr< atf::check::check_result > r =
+ std::unique_ptr< atf::check::check_result > r =
m_xflag ? execute_with_shell(m_argv) : execute(m_argv);
if ((run_status_checks(m_status_checks, *r) == false) ||
diff --git a/lib/atf/Makefile.inc b/lib/atf/Makefile.inc
--- a/lib/atf/Makefile.inc
+++ b/lib/atf/Makefile.inc
@@ -27,6 +27,3 @@
CFLAGS+= -DHAVE_CONFIG_H
WARNS?= 3
-
-# Permit use of auto_ptr for compilers defaulting to C++17 or later
-CXXSTD= c++11
diff --git a/lib/atf/libatf-c++/Makefile b/lib/atf/libatf-c++/Makefile
--- a/lib/atf/libatf-c++/Makefile
+++ b/lib/atf/libatf-c++/Makefile
@@ -48,9 +48,6 @@
CFLAGS+= -DHAVE_CONFIG_H
-# Silence warnings about usage of deprecated std::auto_ptr
-CXXWARNFLAGS+= -Wno-deprecated-declarations
-
SRCS= application.cpp \
build.cpp \
check.cpp \
diff --git a/libexec/atf/atf-check/Makefile b/libexec/atf/atf-check/Makefile
--- a/libexec/atf/atf-check/Makefile
+++ b/libexec/atf/atf-check/Makefile
@@ -38,10 +38,6 @@
CFLAGS+= -I${ATF}
CFLAGS+= -DATF_SHELL='"/bin/sh"'
-# Silence warnings about usage of deprecated std::auto_ptr
-CXXWARNFLAGS+= -Wno-deprecated-declarations
-CXXSTD= c++11
-
LIBADD= atf_cxx
HAS_TESTS=
diff --git a/libexec/atf/atf-sh/Makefile b/libexec/atf/atf-sh/Makefile
--- a/libexec/atf/atf-sh/Makefile
+++ b/libexec/atf/atf-sh/Makefile
@@ -65,9 +65,6 @@
CFLAGS+= -DATF_SHELL='"/bin/sh"'
CFLAGS+= -I${ATF}
-# Silence warnings about usage of deprecated std::auto_ptr
-CXXWARNFLAGS+= -Wno-deprecated-declarations
-
LIBADD= atf_cxx
FILESGROUPS= SUBR
diff --git a/share/mk/atf.test.mk b/share/mk/atf.test.mk
--- a/share/mk/atf.test.mk
+++ b/share/mk/atf.test.mk
@@ -55,8 +55,6 @@
.endif
TEST_INTERFACE.${_T}= atf
.endfor
-# Silence warnings about usage of deprecated std::auto_ptr
-CXXWARNFLAGS+= -Wno-deprecated-declarations
.endif
.if !empty(ATF_TESTS_SH)

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 8, 3:35 AM (11 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31072088
Default Alt Text
D49789.diff (8 KB)

Event Timeline