Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/atf remove -std=gnu++98
details: https://anonhg.NetBSD.org/src/rev/65ef6eb2fd27
branches: trunk
changeset: 970043:65ef6eb2fd27
user: christos <christos%NetBSD.org@localhost>
date: Mon Mar 09 20:34:52 2020 +0000
description:
remove -std=gnu++98
diffstat:
external/bsd/atf/Makefile.inc | 4 +--
external/bsd/atf/dist/atf-c++/check.cpp | 4 +-
external/bsd/atf/dist/atf-c++/check.hpp | 4 +-
external/bsd/atf/dist/atf-c++/check_test.cpp | 22 +++++++++---------
external/bsd/atf/dist/atf-c++/detail/process_test.cpp | 8 +++---
external/bsd/atf/dist/atf-c++/tests.hpp | 2 +-
external/bsd/atf/dist/atf-sh/atf-check.cpp | 8 +++---
external/bsd/atf/dist/tools/atf-report.cpp | 2 +-
external/bsd/atf/dist/tools/atffile_test.cpp | 12 +++++-----
external/bsd/atf/dist/tools/fs.hpp | 2 +-
external/bsd/atf/dist/tools/io.hpp | 2 +-
external/bsd/atf/dist/tools/parser.hpp | 4 +-
external/bsd/atf/dist/tools/process_test.cpp | 8 +++---
external/bsd/atf/dist/tools/timers.hpp | 2 +-
14 files changed, 41 insertions(+), 43 deletions(-)
diffs (truncated from 367 to 300 lines):
diff -r e5cdec1c3f5a -r 65ef6eb2fd27 external/bsd/atf/Makefile.inc
--- a/external/bsd/atf/Makefile.inc Mon Mar 09 20:33:16 2020 +0000
+++ b/external/bsd/atf/Makefile.inc Mon Mar 09 20:34:52 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.6 2018/02/04 01:41:05 mrg Exp $
+# $NetBSD: Makefile.inc,v 1.7 2020/03/09 20:34:52 christos Exp $
.include <bsd.own.mk>
@@ -41,8 +41,6 @@
CPPFLAGS+= -I${TOPDIR}/lib/libatf-c # For atf-c/defs.hpp.
CPPFLAGS+= -I${SRCDIR}
-CXXFLAGS+= -std=gnu++98
-
.if defined(USE_ATF_LIBTOOLS)
LIBTOOLSOBJDIR!= cd ${TOPDIR}/lib/tools; ${PRINTOBJDIR}
CPPFLAGS+= -I${LIBTOOLSOBJDIR}
diff -r e5cdec1c3f5a -r 65ef6eb2fd27 external/bsd/atf/dist/atf-c++/check.cpp
--- a/external/bsd/atf/dist/atf-c++/check.cpp Mon Mar 09 20:33:16 2020 +0000
+++ b/external/bsd/atf/dist/atf-c++/check.cpp Mon Mar 09 20:34:52 2020 +0000
@@ -145,7 +145,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;
@@ -154,5 +154,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 -r e5cdec1c3f5a -r 65ef6eb2fd27 external/bsd/atf/dist/atf-c++/check.hpp
--- a/external/bsd/atf/dist/atf-c++/check.hpp Mon Mar 09 20:33:16 2020 +0000
+++ b/external/bsd/atf/dist/atf-c++/check.hpp Mon Mar 09 20:34:52 2020 +0000
@@ -75,7 +75,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:
//!
@@ -124,7 +124,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 -r e5cdec1c3f5a -r 65ef6eb2fd27 external/bsd/atf/dist/atf-c++/check_test.cpp
--- a/external/bsd/atf/dist/atf-c++/check_test.cpp Mon Mar 09 20:33:16 2020 +0000
+++ b/external/bsd/atf/dist/atf-c++/check_test.cpp Mon Mar 09 20:34:52 2020 +0000
@@ -57,7 +57,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;
@@ -70,7 +70,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;
@@ -253,11 +253,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()));
@@ -277,7 +277,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());
@@ -285,7 +285,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());
@@ -293,7 +293,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());
@@ -326,12 +326,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);
@@ -377,7 +377,7 @@
argv.push_back(atf::config::get("atf_workdir") + "/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 -r e5cdec1c3f5a -r 65ef6eb2fd27 external/bsd/atf/dist/atf-c++/detail/process_test.cpp
--- a/external/bsd/atf/dist/atf-c++/detail/process_test.cpp Mon Mar 09 20:33:16 2020 +0000
+++ b/external/bsd/atf/dist/atf-c++/detail/process_test.cpp Mon Mar 09 20:34:52 2020 +0000
@@ -199,8 +199,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());
@@ -229,8 +229,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 -r e5cdec1c3f5a -r 65ef6eb2fd27 external/bsd/atf/dist/atf-c++/tests.hpp
--- a/external/bsd/atf/dist/atf-c++/tests.hpp Mon Mar 09 20:33:16 2020 +0000
+++ b/external/bsd/atf/dist/atf-c++/tests.hpp Mon Mar 09 20:34:52 2020 +0000
@@ -77,7 +77,7 @@
tc(const tc&);
tc& operator=(const tc&);
- std::auto_ptr< tc_impl > pimpl;
+ std::unique_ptr< tc_impl > pimpl;
protected:
virtual void head(void);
diff -r e5cdec1c3f5a -r 65ef6eb2fd27 external/bsd/atf/dist/atf-sh/atf-check.cpp
--- a/external/bsd/atf/dist/atf-sh/atf-check.cpp Mon Mar 09 20:33:16 2020 +0000
+++ b/external/bsd/atf/dist/atf-sh/atf-check.cpp Mon Mar 09 20:34:52 2020 +0000
@@ -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:
@@ -328,7 +328,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
@@ -344,7 +344,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);
@@ -815,7 +815,7 @@
int status = EXIT_FAILURE;
- 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 (m_status_checks.empty())
diff -r e5cdec1c3f5a -r 65ef6eb2fd27 external/bsd/atf/dist/tools/atf-report.cpp
--- a/external/bsd/atf/dist/tools/atf-report.cpp Mon Mar 09 20:33:16 2020 +0000
+++ b/external/bsd/atf/dist/tools/atf-report.cpp Mon Mar 09 20:34:52 2020 +0000
@@ -47,7 +47,7 @@
#include "text.hpp"
#include "ui.hpp"
-typedef std::auto_ptr< std::ostream > ostream_ptr;
+typedef std::unique_ptr< std::ostream > ostream_ptr;
static ostream_ptr
open_outfile(const tools::fs::path& path)
diff -r e5cdec1c3f5a -r 65ef6eb2fd27 external/bsd/atf/dist/tools/atffile_test.cpp
--- a/external/bsd/atf/dist/tools/atffile_test.cpp Mon Mar 09 20:33:16 2020 +0000
+++ b/external/bsd/atf/dist/tools/atffile_test.cpp Mon Mar 09 20:34:52 2020 +0000
@@ -53,10 +53,10 @@
typedef std::map< std::string, std::string > vars_map;
static
-std::auto_ptr< std::ofstream >
+std::unique_ptr< std::ofstream >
new_atffile(void)
{
- std::auto_ptr< std::ofstream > os(new std::ofstream("Atffile"));
+ std::unique_ptr< std::ofstream > os(new std::ofstream("Atffile"));
ATF_REQUIRE(*os);
(*os) << "Content-Type: application/X-atf-atffile; version=\"1\"\n\n";
@@ -519,7 +519,7 @@
ATF_TEST_CASE_WITHOUT_HEAD(read_ok_simple);
ATF_TEST_CASE_BODY(read_ok_simple) {
- std::auto_ptr< std::ofstream > os = new_atffile();
+ std::unique_ptr< std::ofstream > os = new_atffile();
(*os) << "prop: test-suite = foo\n";
(*os) << "tp: tp-1\n";
(*os) << "conf: var1 = value1\n";
@@ -549,7 +549,7 @@
ATF_TEST_CASE_WITHOUT_HEAD(read_ok_some_globs);
ATF_TEST_CASE_BODY(read_ok_some_globs) {
- std::auto_ptr< std::ofstream > os = new_atffile();
+ std::unique_ptr< std::ofstream > os = new_atffile();
(*os) << "prop: test-suite = foo\n";
(*os) << "tp: foo\n";
(*os) << "tp-glob: *K*\n";
@@ -576,7 +576,7 @@
ATF_TEST_CASE_WITHOUT_HEAD(read_missing_test_suite);
ATF_TEST_CASE_BODY(read_missing_test_suite) {
- std::auto_ptr< std::ofstream > os = new_atffile();
+ std::unique_ptr< std::ofstream > os = new_atffile();
(*os).close();
try {
@@ -589,7 +589,7 @@
ATF_TEST_CASE_WITHOUT_HEAD(read_missing_test_program);
ATF_TEST_CASE_BODY(read_missing_test_program) {
- std::auto_ptr< std::ofstream > os = new_atffile();
+ std::unique_ptr< std::ofstream > os = new_atffile();
(*os) << "tp: foo\n";
(*os) << "tp: bar\n";
(*os) << "tp: baz\n";
diff -r e5cdec1c3f5a -r 65ef6eb2fd27 external/bsd/atf/dist/tools/fs.hpp
--- a/external/bsd/atf/dist/tools/fs.hpp Mon Mar 09 20:33:16 2020 +0000
+++ b/external/bsd/atf/dist/tools/fs.hpp Mon Mar 09 20:34:52 2020 +0000
@@ -326,7 +326,7 @@
// ------------------------------------------------------------------------
class temp_dir {
- std::auto_ptr< tools::fs::path > m_path;
+ std::unique_ptr< tools::fs::path > m_path;
public:
temp_dir(const tools::fs::path&);
diff -r e5cdec1c3f5a -r 65ef6eb2fd27 external/bsd/atf/dist/tools/io.hpp
--- a/external/bsd/atf/dist/tools/io.hpp Mon Mar 09 20:33:16 2020 +0000
+++ b/external/bsd/atf/dist/tools/io.hpp Mon Mar 09 20:34:52 2020 +0000
Home |
Main Index |
Thread Index |
Old Index