diff options
Diffstat (limited to 'atf-run')
| -rw-r--r-- | atf-run/fs.cpp | 3 | ||||
| -rw-r--r-- | atf-run/io.cpp | 6 | ||||
| -rw-r--r-- | atf-run/io.hpp | 18 | ||||
| -rw-r--r-- | atf-run/timer.hpp | 4 |
4 files changed, 13 insertions, 18 deletions
diff --git a/atf-run/fs.cpp b/atf-run/fs.cpp index b8931e588730..e84a90da73a3 100644 --- a/atf-run/fs.cpp +++ b/atf-run/fs.cpp @@ -44,6 +44,7 @@ extern "C" { #include <cstdlib> #include <cstring> +#include "atf-c++/detail/auto_array.hpp" #include "atf-c++/detail/process.hpp" #include "atf-c++/detail/sanity.hpp" @@ -200,7 +201,7 @@ retry_unmount: impl::temp_dir::temp_dir(const atf::fs::path& p) { - atf::utils::auto_array< char > buf(new char[p.str().length() + 1]); + atf::auto_array< char > buf(new char[p.str().length() + 1]); std::strcpy(buf.get(), p.c_str()); if (::mkdtemp(buf.get()) == NULL) throw system_error(IMPL_NAME "::temp_dir::temp_dir(" + diff --git a/atf-run/io.cpp b/atf-run/io.cpp index 9be78d01261f..c99ee34ef211 100644 --- a/atf-run/io.cpp +++ b/atf-run/io.cpp @@ -41,9 +41,9 @@ extern "C" { #include "../atf-c/error.h" } +#include "../atf-c++/detail/auto_array.hpp" #include "../atf-c++/detail/exceptions.hpp" #include "../atf-c++/detail/sanity.hpp" -#include "../atf-c++/utils.hpp" #include "io.hpp" @@ -290,7 +290,7 @@ size_t impl::muxer::read_one(const size_t index, const int fd, std::string& accum, const bool report_errors) { - atf::utils::auto_array< char > buffer(new char[m_bufsize]); + atf::auto_array< char > buffer(new char[m_bufsize]); const size_t nbytes = safe_read(fd, buffer.get(), m_bufsize - 1, report_errors); INV(nbytes < m_bufsize); @@ -319,7 +319,7 @@ impl::muxer::read_one(const size_t index, const int fd, std::string& accum, void impl::muxer::mux(volatile const bool& terminate) { - atf::utils::auto_array< struct pollfd > poll_fds(new struct pollfd[m_nfds]); + atf::auto_array< struct pollfd > poll_fds(new struct pollfd[m_nfds]); for (size_t i = 0; i < m_nfds; i++) { poll_fds[i].fd = m_fds[i]; poll_fds[i].events = POLLIN; diff --git a/atf-run/io.hpp b/atf-run/io.hpp index e021cf309657..b8ff59a808d9 100644 --- a/atf-run/io.hpp +++ b/atf-run/io.hpp @@ -36,7 +36,8 @@ #include "fs.hpp" -#include "../atf-c++/utils.hpp" +#include "../atf-c++/detail/auto_array.hpp" +#include "../atf-c++/noncopyable.hpp" namespace atf { namespace atf_run { @@ -253,8 +254,7 @@ private: //! However, it is not copyable to avoid introducing inconsistences with //! the on-disk file and the in-memory buffers. //! -class systembuf : - public std::streambuf, atf::utils::noncopyable +class systembuf : public std::streambuf, atf::noncopyable { public: typedef int handle_type; @@ -374,15 +374,9 @@ protected: //! this happens, the buffer eventually empties and the system blocks //! until the writer generates some data. //! -class pistream : - public std::istream, utils::noncopyable +class pistream : public std::istream, noncopyable { //! - //! \brief The file handle managed by this stream. - //! - int m_fd; - - //! //! \brief The systembuf object used to manage this stream's data. //! systembuf m_systembuf; @@ -406,12 +400,12 @@ public: // The "muxer" class. // ------------------------------------------------------------------------ -class muxer : utils::noncopyable { +class muxer : noncopyable { const int* m_fds; const size_t m_nfds; const size_t m_bufsize; - atf::utils::auto_array< std::string > m_buffers; + atf::auto_array< std::string > m_buffers; protected: virtual void line_callback(const size_t, const std::string&) = 0; diff --git a/atf-run/timer.hpp b/atf-run/timer.hpp index d903b91a882f..8eb722840976 100644 --- a/atf-run/timer.hpp +++ b/atf-run/timer.hpp @@ -36,7 +36,7 @@ extern "C" { #include <memory> -#include "atf-c++/utils.hpp" +#include "atf-c++/noncopyable.hpp" namespace atf { namespace atf_run { @@ -47,7 +47,7 @@ class signal_programmer; // The "timer" class. // ------------------------------------------------------------------------ -class timer : utils::noncopyable { +class timer : noncopyable { struct impl; std::auto_ptr< impl > m_pimpl; |
