Module Name: src
Committed By: jmmv
Date: Tue Feb 11 16:31:38 UTC 2014
Modified Files:
src/external/bsd/atf/dist/tools: application.cpp atf-config.cpp
atf-report.cpp atffile.cpp auto_array_test.cpp config_file.cpp
process.cpp reader.cpp reader_test.cpp requirements.cpp
signals_test.cpp test-program.cpp timers.cpp
src/external/bsd/atf/lib/tools: Makefile
Removed Files:
src/external/bsd/atf/dist/tools: defs.hpp.in
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/atf/dist/tools/application.cpp \
src/external/bsd/atf/dist/tools/atffile.cpp \
src/external/bsd/atf/dist/tools/auto_array_test.cpp \
src/external/bsd/atf/dist/tools/config_file.cpp \
src/external/bsd/atf/dist/tools/process.cpp \
src/external/bsd/atf/dist/tools/reader.cpp \
src/external/bsd/atf/dist/tools/reader_test.cpp \
src/external/bsd/atf/dist/tools/requirements.cpp \
src/external/bsd/atf/dist/tools/signals_test.cpp \
src/external/bsd/atf/dist/tools/test-program.cpp \
src/external/bsd/atf/dist/tools/timers.cpp
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/tools/atf-config.cpp \
src/external/bsd/atf/dist/tools/atf-report.cpp
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/atf/dist/tools/defs.hpp.in
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/lib/tools/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/atf/dist/tools/application.cpp
diff -u src/external/bsd/atf/dist/tools/application.cpp:1.1.1.1 src/external/bsd/atf/dist/tools/application.cpp:1.2
--- src/external/bsd/atf/dist/tools/application.cpp:1.1.1.1 Sat Feb 8 19:11:32 2014
+++ src/external/bsd/atf/dist/tools/application.cpp Tue Feb 11 16:31:38 2014
@@ -43,7 +43,6 @@ extern "C" {
#include <iostream>
#include "application.hpp"
-#include "defs.hpp"
#include "ui.hpp"
#if !defined(HAVE_VSNPRINTF_IN_STD)
@@ -148,8 +147,8 @@ impl::app::specific_options(void)
}
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__)))
{
}
Index: src/external/bsd/atf/dist/tools/atffile.cpp
diff -u src/external/bsd/atf/dist/tools/atffile.cpp:1.1.1.1 src/external/bsd/atf/dist/tools/atffile.cpp:1.2
--- src/external/bsd/atf/dist/tools/atffile.cpp:1.1.1.1 Sat Feb 8 19:11:32 2014
+++ src/external/bsd/atf/dist/tools/atffile.cpp Tue Feb 11 16:31:38 2014
@@ -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 @@ detail::atf_atffile_reader::~atf_atffile
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__)))
{
}
Index: src/external/bsd/atf/dist/tools/auto_array_test.cpp
diff -u src/external/bsd/atf/dist/tools/auto_array_test.cpp:1.1.1.1 src/external/bsd/atf/dist/tools/auto_array_test.cpp:1.2
--- src/external/bsd/atf/dist/tools/auto_array_test.cpp:1.1.1.1 Sat Feb 8 19:11:33 2014
+++ src/external/bsd/atf/dist/tools/auto_array_test.cpp Tue Feb 11 16:31:38 2014
@@ -36,7 +36,6 @@ extern "C" {
#include <atf-c++.hpp>
#include "auto_array.hpp"
-#include "defs.hpp"
// ------------------------------------------------------------------------
// Tests for the "auto_array" class.
@@ -55,7 +54,7 @@ public:
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 @@ public:
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[]");
}
Index: src/external/bsd/atf/dist/tools/config_file.cpp
diff -u src/external/bsd/atf/dist/tools/config_file.cpp:1.1.1.1 src/external/bsd/atf/dist/tools/config_file.cpp:1.2
--- src/external/bsd/atf/dist/tools/config_file.cpp:1.1.1.1 Sat Feb 8 19:11:33 2014
+++ src/external/bsd/atf/dist/tools/config_file.cpp Tue Feb 11 16:31:38 2014
@@ -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 @@ detail::atf_config_reader::~atf_config_r
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__)))
{
}
Index: src/external/bsd/atf/dist/tools/process.cpp
diff -u src/external/bsd/atf/dist/tools/process.cpp:1.1.1.1 src/external/bsd/atf/dist/tools/process.cpp:1.2
--- src/external/bsd/atf/dist/tools/process.cpp:1.1.1.1 Sat Feb 8 19:11:33 2014
+++ src/external/bsd/atf/dist/tools/process.cpp Tue Feb 11 16:31:38 2014
@@ -41,7 +41,6 @@ extern "C" {
#include <cstring>
#include <iostream>
-#include "defs.hpp"
#include "exceptions.hpp"
#include "text.hpp"
#include "process.hpp"
@@ -274,7 +273,7 @@ impl::stream_connect::connect_parent(voi
}
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 @@ impl::stream_inherit::connect_parent(voi
}
void
-impl::stream_inherit::connect_child(const int fd ATF_DEFS_ATTRIBUTE_UNUSED)
+impl::stream_inherit::connect_child(const int fd __attribute__((__unused__)))
{
}
Index: src/external/bsd/atf/dist/tools/reader.cpp
diff -u src/external/bsd/atf/dist/tools/reader.cpp:1.1.1.1 src/external/bsd/atf/dist/tools/reader.cpp:1.2
--- src/external/bsd/atf/dist/tools/reader.cpp:1.1.1.1 Sat Feb 8 19:11:33 2014
+++ src/external/bsd/atf/dist/tools/reader.cpp Tue Feb 11 16:31:38 2014
@@ -37,7 +37,6 @@ extern "C" {
#include <sstream>
#include <utility>
-#include "defs.hpp"
#include "parser.hpp"
#include "reader.hpp"
#include "text.hpp"
@@ -150,53 +149,53 @@ impl::atf_tps_reader::~atf_tps_reader(vo
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
impl::atf_tps_reader::got_tc_end(
- const std::string& state ATF_DEFS_ATTRIBUTE_UNUSED,
- struct timeval* tv ATF_DEFS_ATTRIBUTE_UNUSED,
- const std::string& reason ATF_DEFS_ATTRIBUTE_UNUSED)
+ const std::string& state __attribute__((__unused__)),
+ struct timeval* tv __attribute__((__unused__)),
+ const std::string& reason __attribute__((__unused__)))
{
}
Index: src/external/bsd/atf/dist/tools/reader_test.cpp
diff -u src/external/bsd/atf/dist/tools/reader_test.cpp:1.1.1.1 src/external/bsd/atf/dist/tools/reader_test.cpp:1.2
--- src/external/bsd/atf/dist/tools/reader_test.cpp:1.1.1.1 Sat Feb 8 19:11:33 2014
+++ src/external/bsd/atf/dist/tools/reader_test.cpp Tue Feb 11 16:31:38 2014
@@ -63,7 +63,7 @@ class tps_reader : protected impl::atf_t
}
void
- got_tp_end(struct timeval* tv ATF_DEFS_ATTRIBUTE_UNUSED,
+ got_tp_end(struct timeval* tv __attribute__((__unused__)),
const std::string& reason)
{
m_calls.push_back("got_tp_end(" + reason + ")");
@@ -77,7 +77,7 @@ class tps_reader : protected impl::atf_t
void
got_tc_end(const std::string& state,
- struct timeval* tv ATF_DEFS_ATTRIBUTE_UNUSED,
+ struct timeval* tv __attribute__((__unused__)),
const std::string& reason)
{
const std::string r = state + (reason.empty() ? "" : ", " + reason);
Index: src/external/bsd/atf/dist/tools/requirements.cpp
diff -u src/external/bsd/atf/dist/tools/requirements.cpp:1.1.1.1 src/external/bsd/atf/dist/tools/requirements.cpp:1.2
--- src/external/bsd/atf/dist/tools/requirements.cpp:1.1.1.1 Sat Feb 8 19:11:33 2014
+++ src/external/bsd/atf/dist/tools/requirements.cpp Tue Feb 11 16:31:38 2014
@@ -39,7 +39,6 @@ extern "C" {
#include <stdexcept>
#include "config.hpp"
-#include "defs.hpp"
#include "env.hpp"
#include "fs.hpp"
#include "requirements.hpp"
@@ -192,7 +191,7 @@ check_memory_netbsd(const int64_t needed
#else
static
std::string
-check_memory_unknown(const int64_t needed ATF_DEFS_ATTRIBUTE_UNUSED)
+check_memory_unknown(const int64_t needed __attribute__((__unused__)))
{
return "";
}
Index: src/external/bsd/atf/dist/tools/signals_test.cpp
diff -u src/external/bsd/atf/dist/tools/signals_test.cpp:1.1.1.1 src/external/bsd/atf/dist/tools/signals_test.cpp:1.2
--- src/external/bsd/atf/dist/tools/signals_test.cpp:1.1.1.1 Sat Feb 8 19:11:33 2014
+++ src/external/bsd/atf/dist/tools/signals_test.cpp Tue Feb 11 16:31:38 2014
@@ -39,7 +39,6 @@ extern "C" {
#include <atf-c++.hpp>
-#include "defs.hpp"
#include "exceptions.hpp"
#include "process.hpp"
#include "signals.hpp"
@@ -53,7 +52,7 @@ namespace sigusr1 {
static
void
- handler(int signo ATF_DEFS_ATTRIBUTE_UNUSED)
+ handler(int signo __attribute__((__unused__)))
{
happened = true;
}
@@ -77,7 +76,7 @@ namespace sigusr1_2 {
static
void
- handler(int signo ATF_DEFS_ATTRIBUTE_UNUSED)
+ handler(int signo __attribute__((__unused__)))
{
happened = true;
}
@@ -223,7 +222,7 @@ ATF_TEST_CASE_BODY(signal_programmer_pre
static
void
-reset_child(void *v ATF_DEFS_ATTRIBUTE_UNUSED)
+reset_child(void *v __attribute__((__unused__)))
{
sigusr1::program();
Index: src/external/bsd/atf/dist/tools/test-program.cpp
diff -u src/external/bsd/atf/dist/tools/test-program.cpp:1.1.1.1 src/external/bsd/atf/dist/tools/test-program.cpp:1.2
--- src/external/bsd/atf/dist/tools/test-program.cpp:1.1.1.1 Sat Feb 8 19:11:33 2014
+++ src/external/bsd/atf/dist/tools/test-program.cpp Tue Feb 11 16:31:38 2014
@@ -45,7 +45,6 @@ extern "C" {
#include <iostream>
#include "config_file.hpp"
-#include "defs.hpp"
#include "env.hpp"
#include "fs.hpp"
#include "io.hpp"
@@ -417,8 +416,8 @@ detail::atf_tp_reader::~atf_tp_reader(vo
void
detail::atf_tp_reader::got_tc(
- const std::string& ident ATF_DEFS_ATTRIBUTE_UNUSED,
- const std::map< std::string, std::string >& md ATF_DEFS_ATTRIBUTE_UNUSED)
+ const std::string& ident __attribute__((__unused__)),
+ const std::map< std::string, std::string >& md __attribute__((__unused__)))
{
}
@@ -695,7 +694,7 @@ namespace {
static volatile bool terminate_poll;
static void
-sigchld_handler(const int signo ATF_DEFS_ATTRIBUTE_UNUSED)
+sigchld_handler(const int signo __attribute__((__unused__)))
{
terminate_poll = true;
}
Index: src/external/bsd/atf/dist/tools/timers.cpp
diff -u src/external/bsd/atf/dist/tools/timers.cpp:1.1.1.1 src/external/bsd/atf/dist/tools/timers.cpp:1.2
--- src/external/bsd/atf/dist/tools/timers.cpp:1.1.1.1 Sat Feb 8 19:11:33 2014
+++ src/external/bsd/atf/dist/tools/timers.cpp Tue Feb 11 16:31:38 2014
@@ -40,7 +40,6 @@ extern "C" {
#include <csignal>
#include <ctime>
-#include "defs.hpp"
#include "exceptions.hpp"
#include "signals.hpp"
#include "timers.hpp"
@@ -59,8 +58,8 @@ static impl::timer* compat_handle;
#if defined(HAVE_TIMER_T)
static
void
-handler(const int signo ATF_DEFS_ATTRIBUTE_UNUSED, siginfo_t* si,
- void* uc ATF_DEFS_ATTRIBUTE_UNUSED)
+handler(const int signo __attribute__((__unused__)), siginfo_t* si,
+ void* uc __attribute__((__unused__)))
{
impl::timer* timer = static_cast< impl::timer* >(si->si_value.sival_ptr);
timer->set_fired();
@@ -69,9 +68,9 @@ handler(const int signo ATF_DEFS_ATTRIBU
#else
static
void
-handler(const int signo ATF_DEFS_ATTRIBUTE_UNUSED,
- siginfo_t* si ATF_DEFS_ATTRIBUTE_UNUSED,
- void* uc ATF_DEFS_ATTRIBUTE_UNUSED)
+handler(const int signo __attribute__((__unused__)),
+ siginfo_t* si __attribute__((__unused__)),
+ void* uc __attribute__((__unused__)))
{
compat_handle->set_fired();
compat_handle->timeout_callback();
Index: src/external/bsd/atf/dist/tools/atf-config.cpp
diff -u src/external/bsd/atf/dist/tools/atf-config.cpp:1.3 src/external/bsd/atf/dist/tools/atf-config.cpp:1.4
--- src/external/bsd/atf/dist/tools/atf-config.cpp:1.3 Sat Feb 8 19:13:44 2014
+++ src/external/bsd/atf/dist/tools/atf-config.cpp Tue Feb 11 16:31:38 2014
@@ -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 @@ atf_config::atf_config(void) :
}
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':
Index: src/external/bsd/atf/dist/tools/atf-report.cpp
diff -u src/external/bsd/atf/dist/tools/atf-report.cpp:1.3 src/external/bsd/atf/dist/tools/atf-report.cpp:1.4
--- src/external/bsd/atf/dist/tools/atf-report.cpp:1.3 Sat Feb 8 19:13:44 2014
+++ src/external/bsd/atf/dist/tools/atf-report.cpp Tue Feb 11 16:31:38 2014
@@ -42,7 +42,6 @@ extern "C" {
#include <vector>
#include "application.hpp"
-#include "defs.hpp"
#include "fs.hpp"
#include "reader.hpp"
#include "text.hpp"
@@ -133,7 +132,7 @@ public:
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 @@ class xml_writer : public writer {
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";
}
Index: src/external/bsd/atf/lib/tools/Makefile
diff -u src/external/bsd/atf/lib/tools/Makefile:1.2 src/external/bsd/atf/lib/tools/Makefile:1.3
--- src/external/bsd/atf/lib/tools/Makefile:1.2 Tue Feb 11 16:11:28 2014
+++ src/external/bsd/atf/lib/tools/Makefile Tue Feb 11 16:31:38 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2014/02/11 16:11:28 jmmv Exp $
+# $NetBSD: Makefile,v 1.3 2014/02/11 16:31:38 jmmv Exp $
NOLINT= # defined
@@ -56,15 +56,4 @@ SRCS= application.cpp \
ui.cpp \
user.cpp
-CLEANFILES+= defs.hpp
-
-beforedepend: defs.hpp
-defs.hpp: defs.hpp.in
- ${TOOL_SED} \
- -e 's|@ATTRIBUTE_FORMAT_PRINTF@|__attribute__((__format__(__printf__, a, b)))|g' \
- -e 's|@ATTRIBUTE_NORETURN@|__attribute__((__noreturn__))|g' \
- -e 's|@ATTRIBUTE_UNUSED@|__attribute__((__unused__))|g' \
- <${.ALLSRC} >${.TARGET}.tmp
- mv ${.TARGET}.tmp ${.TARGET}
-
.include <bsd.lib.mk>