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 defs.hpp.
details: https://anonhg.NetBSD.org/src/rev/0fb72468d590
branches: trunk
changeset: 326670:0fb72468d590
user: jmmv <jmmv%NetBSD.org@localhost>
date: Tue Feb 11 16:31:38 2014 +0000
description:
Remove defs.hpp.
Because we now own the 'tools' subdirectory in the tree, we can yank some
of the upstream autoconf-related complexity. Start doing so by removing
defs.hpp and using the real compiler attributes where necessary.
diffstat:
external/bsd/atf/dist/tools/application.cpp | 5 +--
external/bsd/atf/dist/tools/atf-config.cpp | 3 +-
external/bsd/atf/dist/tools/atf-report.cpp | 5 +--
external/bsd/atf/dist/tools/atffile.cpp | 13 ++++----
external/bsd/atf/dist/tools/auto_array_test.cpp | 5 +--
external/bsd/atf/dist/tools/config_file.cpp | 5 +--
external/bsd/atf/dist/tools/defs.hpp.in | 37 -------------------------
external/bsd/atf/dist/tools/process.cpp | 5 +--
external/bsd/atf/dist/tools/reader.cpp | 27 ++++++++---------
external/bsd/atf/dist/tools/reader_test.cpp | 4 +-
external/bsd/atf/dist/tools/requirements.cpp | 3 +-
external/bsd/atf/dist/tools/signals_test.cpp | 7 ++--
external/bsd/atf/dist/tools/test-program.cpp | 7 ++--
external/bsd/atf/dist/tools/timers.cpp | 11 +++----
external/bsd/atf/lib/tools/Makefile | 13 +--------
15 files changed, 45 insertions(+), 105 deletions(-)
diffs (truncated from 480 to 300 lines):
diff -r 94bdf758e22a -r 0fb72468d590 external/bsd/atf/dist/tools/application.cpp
--- a/external/bsd/atf/dist/tools/application.cpp Tue Feb 11 16:15:06 2014 +0000
+++ b/external/bsd/atf/dist/tools/application.cpp Tue Feb 11 16:31:38 2014 +0000
@@ -43,7 +43,6 @@
#include <iostream>
#include "application.hpp"
-#include "defs.hpp"
#include "ui.hpp"
#if !defined(HAVE_VSNPRINTF_IN_STD)
@@ -148,8 +147,8 @@
}
void
-impl::app::process_option(int ch ATF_DEFS_ATTRIBUTE_UNUSED,
- const char* arg ATF_DEFS_ATTRIBUTE_UNUSED)
+impl::app::process_option(int ch __attribute__((__unused__)),
+ const char* arg __attribute__((__unused__)))
{
}
diff -r 94bdf758e22a -r 0fb72468d590 external/bsd/atf/dist/tools/atf-config.cpp
--- a/external/bsd/atf/dist/tools/atf-config.cpp Tue Feb 11 16:15:06 2014 +0000
+++ b/external/bsd/atf/dist/tools/atf-config.cpp Tue Feb 11 16:31:38 2014 +0000
@@ -34,7 +34,6 @@
#include "application.hpp"
#include "config.hpp"
-#include "defs.hpp"
class atf_config : public tools::application::app {
static const char* m_description;
@@ -66,7 +65,7 @@
}
void
-atf_config::process_option(int ch, const char* arg ATF_DEFS_ATTRIBUTE_UNUSED)
+atf_config::process_option(int ch, const char* arg __attribute__((__unused__)))
{
switch (ch) {
case 't':
diff -r 94bdf758e22a -r 0fb72468d590 external/bsd/atf/dist/tools/atf-report.cpp
--- a/external/bsd/atf/dist/tools/atf-report.cpp Tue Feb 11 16:15:06 2014 +0000
+++ b/external/bsd/atf/dist/tools/atf-report.cpp Tue Feb 11 16:31:38 2014 +0000
@@ -42,7 +42,6 @@
#include <vector>
#include "application.hpp"
-#include "defs.hpp"
#include "fs.hpp"
#include "reader.hpp"
#include "text.hpp"
@@ -133,7 +132,7 @@
virtual
void
write_tp_start(const std::string& name,
- size_t ntcs ATF_DEFS_ATTRIBUTE_UNUSED)
+ size_t ntcs __attribute__((__unused__)))
{
m_tpname = name;
m_failed = false;
@@ -420,7 +419,7 @@
void
write_tp_start(const std::string& tp,
- size_t ntcs ATF_DEFS_ATTRIBUTE_UNUSED)
+ size_t ntcs __attribute__((__unused__)))
{
(*m_os) << "<tp id=\"" << attrval(tp) << "\">\n";
}
diff -r 94bdf758e22a -r 0fb72468d590 external/bsd/atf/dist/tools/atffile.cpp
--- a/external/bsd/atf/dist/tools/atffile.cpp Tue Feb 11 16:15:06 2014 +0000
+++ b/external/bsd/atf/dist/tools/atffile.cpp Tue Feb 11 16:31:38 2014 +0000
@@ -32,7 +32,6 @@
#include <fstream>
#include "atffile.hpp"
-#include "defs.hpp"
#include "exceptions.hpp"
#include "expand.hpp"
#include "parser.hpp"
@@ -98,22 +97,22 @@
void
detail::atf_atffile_reader::got_conf(
- const std::string& name ATF_DEFS_ATTRIBUTE_UNUSED,
- const std::string& val ATF_DEFS_ATTRIBUTE_UNUSED)
+ const std::string& name __attribute__((__unused__)),
+ const std::string& val __attribute__((__unused__)))
{
}
void
detail::atf_atffile_reader::got_prop(
- const std::string& name ATF_DEFS_ATTRIBUTE_UNUSED,
- const std::string& val ATF_DEFS_ATTRIBUTE_UNUSED)
+ const std::string& name __attribute__((__unused__)),
+ const std::string& val __attribute__((__unused__)))
{
}
void
detail::atf_atffile_reader::got_tp(
- const std::string& name ATF_DEFS_ATTRIBUTE_UNUSED,
- bool isglob ATF_DEFS_ATTRIBUTE_UNUSED)
+ const std::string& name __attribute__((__unused__)),
+ bool isglob __attribute__((__unused__)))
{
}
diff -r 94bdf758e22a -r 0fb72468d590 external/bsd/atf/dist/tools/auto_array_test.cpp
--- a/external/bsd/atf/dist/tools/auto_array_test.cpp Tue Feb 11 16:15:06 2014 +0000
+++ b/external/bsd/atf/dist/tools/auto_array_test.cpp Tue Feb 11 16:31:38 2014 +0000
@@ -36,7 +36,6 @@
#include <atf-c++.hpp>
#include "auto_array.hpp"
-#include "defs.hpp"
// ------------------------------------------------------------------------
// Tests for the "auto_array" class.
@@ -55,7 +54,7 @@
return tools::auto_array< test_array >(ta);
}
- void* operator new(size_t size ATF_DEFS_ATTRIBUTE_UNUSED)
+ void* operator new(size_t size __attribute__((__unused__)))
{
ATF_FAIL("New called but should have been new[]");
return new int(5);
@@ -69,7 +68,7 @@
return mem;
}
- void operator delete(void* mem ATF_DEFS_ATTRIBUTE_UNUSED)
+ void operator delete(void* mem __attribute__((__unused__)))
{
ATF_FAIL("Delete called but should have been delete[]");
}
diff -r 94bdf758e22a -r 0fb72468d590 external/bsd/atf/dist/tools/config_file.cpp
--- a/external/bsd/atf/dist/tools/config_file.cpp Tue Feb 11 16:15:06 2014 +0000
+++ b/external/bsd/atf/dist/tools/config_file.cpp Tue Feb 11 16:31:38 2014 +0000
@@ -33,7 +33,6 @@
#include "config.hpp"
#include "config_file.hpp"
-#include "defs.hpp"
#include "env.hpp"
#include "fs.hpp"
#include "parser.hpp"
@@ -138,8 +137,8 @@
void
detail::atf_config_reader::got_var(
- const std::string& var ATF_DEFS_ATTRIBUTE_UNUSED,
- const std::string& val ATF_DEFS_ATTRIBUTE_UNUSED)
+ const std::string& var __attribute__((__unused__)),
+ const std::string& val __attribute__((__unused__)))
{
}
diff -r 94bdf758e22a -r 0fb72468d590 external/bsd/atf/dist/tools/defs.hpp.in
--- a/external/bsd/atf/dist/tools/defs.hpp.in Tue Feb 11 16:15:06 2014 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-//
-// Automated Testing Framework (atf)
-//
-// Copyright (c) 2008 The NetBSD Foundation, Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-//
-// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
-// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
-// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-
-#if !defined(TOOLS_DEFS_HPP)
-#define TOOLS_DEFS_HPP
-
-#define ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(a, b) @ATTRIBUTE_FORMAT_PRINTF@
-#define ATF_DEFS_ATTRIBUTE_NORETURN @ATTRIBUTE_NORETURN@
-#define ATF_DEFS_ATTRIBUTE_UNUSED @ATTRIBUTE_UNUSED@
-
-#endif /* !defined(TOOLS_DEFS_HPP) */
diff -r 94bdf758e22a -r 0fb72468d590 external/bsd/atf/dist/tools/process.cpp
--- a/external/bsd/atf/dist/tools/process.cpp Tue Feb 11 16:15:06 2014 +0000
+++ b/external/bsd/atf/dist/tools/process.cpp Tue Feb 11 16:31:38 2014 +0000
@@ -41,7 +41,6 @@
#include <cstring>
#include <iostream>
-#include "defs.hpp"
#include "exceptions.hpp"
#include "text.hpp"
#include "process.hpp"
@@ -274,7 +273,7 @@
}
void
-impl::stream_connect::connect_child(const int fd ATF_DEFS_ATTRIBUTE_UNUSED)
+impl::stream_connect::connect_child(const int fd __attribute__((__unused__)))
{
safe_dup(m_tgt_fd, m_src_fd);
}
@@ -295,7 +294,7 @@
}
void
-impl::stream_inherit::connect_child(const int fd ATF_DEFS_ATTRIBUTE_UNUSED)
+impl::stream_inherit::connect_child(const int fd __attribute__((__unused__)))
{
}
diff -r 94bdf758e22a -r 0fb72468d590 external/bsd/atf/dist/tools/reader.cpp
--- a/external/bsd/atf/dist/tools/reader.cpp Tue Feb 11 16:15:06 2014 +0000
+++ b/external/bsd/atf/dist/tools/reader.cpp Tue Feb 11 16:31:38 2014 +0000
@@ -37,7 +37,6 @@
#include <sstream>
#include <utility>
-#include "defs.hpp"
#include "parser.hpp"
#include "reader.hpp"
#include "text.hpp"
@@ -150,53 +149,53 @@
void
impl::atf_tps_reader::got_info(
- const std::string& what ATF_DEFS_ATTRIBUTE_UNUSED,
- const std::string& val ATF_DEFS_ATTRIBUTE_UNUSED)
+ const std::string& what __attribute__((__unused__)),
+ const std::string& val __attribute__((__unused__)))
{
}
void
-impl::atf_tps_reader::got_ntps(size_t ntps ATF_DEFS_ATTRIBUTE_UNUSED)
+impl::atf_tps_reader::got_ntps(size_t ntps __attribute__((__unused__)))
{
}
void
impl::atf_tps_reader::got_tp_start(
- const std::string& tp ATF_DEFS_ATTRIBUTE_UNUSED,
- size_t ntcs ATF_DEFS_ATTRIBUTE_UNUSED)
+ const std::string& tp __attribute__((__unused__)),
+ size_t ntcs __attribute__((__unused__)))
{
}
void
impl::atf_tps_reader::got_tp_end(
- struct timeval* tv ATF_DEFS_ATTRIBUTE_UNUSED,
- const std::string& reason ATF_DEFS_ATTRIBUTE_UNUSED)
+ struct timeval* tv __attribute__((__unused__)),
+ const std::string& reason __attribute__((__unused__)))
{
}
void
impl::atf_tps_reader::got_tc_start(
- const std::string& tcname ATF_DEFS_ATTRIBUTE_UNUSED)
+ const std::string& tcname __attribute__((__unused__)))
{
}
void
impl::atf_tps_reader::got_tc_stdout_line(
- const std::string& line ATF_DEFS_ATTRIBUTE_UNUSED)
+ const std::string& line __attribute__((__unused__)))
{
}
void
impl::atf_tps_reader::got_tc_stderr_line(
- const std::string& line ATF_DEFS_ATTRIBUTE_UNUSED)
+ const std::string& line __attribute__((__unused__)))
{
}
void
Home |
Main Index |
Thread Index |
Old Index