diff --git a/configure.ac b/configure.ac index 787306dd..ea7c8e78 100644 --- a/configure.ac +++ b/configure.ac @@ -101,7 +101,7 @@ NC_DEBUGGING CHECK_RAGEL([ip.cpp]) -NC_BOOST([1.53], [system filesystem thread]) +NC_BOOST([1.53], [system thread]) AC_SUBST(BOOST_CPPFLAGS) AC_SUBST(BOOST_LDFLAGS) diff --git a/exe.cpp b/exe.cpp index 7bfc07ca..30740a98 100644 --- a/exe.cpp +++ b/exe.cpp @@ -31,7 +31,7 @@ #include #include -boost::filesystem::path +std::experimental::filesystem::path util::image_path (void) { static const char PROC_SELF[] = "/proc/self/exe"; @@ -50,7 +50,7 @@ retry: goto retry; } - return boost::filesystem::path (resolved.data (), resolved.data () + written); + return std::experimental::filesystem::path (resolved.data (), resolved.data () + written); } #elif defined(PLATFORM_FREEBSD) @@ -61,7 +61,7 @@ retry: #include #include -boost::filesystem::path +std::experimental::filesystem::path util::image_path (void) { int name[] = { @@ -77,7 +77,7 @@ util::image_path (void) auto err = sysctl (name, elems (name), data, &len, nullptr, 0); errno_error::try_code (err); - return boost::filesystem::path (std::cbegin (data), std::cbegin (data) + len); + return std::experimental::filesystem::path (std::cbegin (data), std::cbegin (data) + len); } #elif defined(PLATFORM_WIN32) @@ -86,7 +86,7 @@ util::image_path (void) #include -boost::filesystem::path +std::experimental::filesystem::path util::image_path (void) { std::vector resolved (256); @@ -100,7 +100,7 @@ retry: goto retry; } - return boost::filesystem::path (resolved.data (), resolved.data () + written); + return std::experimental::filesystem::path (resolved.data (), resolved.data () + written); } #else diff --git a/exe.hpp b/exe.hpp index 1a04e830..0e7c2268 100644 --- a/exe.hpp +++ b/exe.hpp @@ -17,10 +17,10 @@ #ifndef __UTIL_EXE_HPP #define __UTIL_EXE_HPP -#include +#include namespace util { - boost::filesystem::path image_path (void); + std::experimental::filesystem::path image_path (void); } #endif diff --git a/io.cpp b/io.cpp index fcb521f3..3e1ff35d 100644 --- a/io.cpp +++ b/io.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include @@ -201,7 +201,7 @@ scoped_cwd::~scoped_cwd () /////////////////////////////////////////////////////////////////////////////// -path_error::path_error (const boost::filesystem::path &_path): +path_error::path_error (const std::experimental::filesystem::path &_path): runtime_error (format::render ("Unknown path: %!", m_path)), m_path (_path) { ; } diff --git a/io.hpp b/io.hpp index 2c11ca04..83f74726 100644 --- a/io.hpp +++ b/io.hpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #ifdef PLATFORM_WIN32 #include @@ -104,12 +104,12 @@ namespace util { //------------------------------------------------------------------------- class path_error : public std::runtime_error { public: - path_error (const boost::filesystem::path &path); + path_error (const std::experimental::filesystem::path &path); const char* path (void) const noexcept; private: - const boost::filesystem::path m_path; + const std::experimental::filesystem::path m_path; }; class stream_error : public std::exception { diff --git a/io_win32.cpp b/io_win32.cpp index 05f3ab91..c27e2410 100644 --- a/io_win32.cpp +++ b/io_win32.cpp @@ -118,7 +118,7 @@ mapped_file::mapped_file (::util::win32::handle &&src, //----------------------------------------------------------------------------- -mapped_file::mapped_file (const boost::filesystem::path &path, +mapped_file::mapped_file (const std::experimental::filesystem::path &path, int fflags, int mflags): mapped_file ( diff --git a/io_win32.hpp b/io_win32.hpp index c103f6d0..776eaedc 100644 --- a/io_win32.hpp +++ b/io_win32.hpp @@ -22,7 +22,7 @@ #include "./view.hpp" #include -#include +#include #include #include #include @@ -57,7 +57,7 @@ namespace util { mapped_file (::util::win32::handle &&, int fflags = O_RDONLY, int mflags = PROT_READ); - mapped_file (const boost::filesystem::path &path, + mapped_file (const std::experimental::filesystem::path &path, int fflags = O_RDONLY, int mflags = PROT_READ); mapped_file (const util::fd&, diff --git a/json/flat.hpp b/json/flat.hpp index 5e0bb54a..b0b56c8c 100644 --- a/json/flat.hpp +++ b/json/flat.hpp @@ -17,7 +17,7 @@ #ifndef __UTIL_JSON_FLAT_HPP #define __UTIL_JSON_FLAT_HPP -#include +#include #include #include "../view.hpp" diff --git a/json/schema.cpp b/json/schema.cpp index 6821d5b3..63b6ab64 100644 --- a/json/schema.cpp +++ b/json/schema.cpp @@ -528,7 +528,7 @@ json::schema::validate (json::tree::node &data, //----------------------------------------------------------------------------- void json::schema::validate (json::tree::node &data, - const boost::filesystem::path &schema_path) + const std::experimental::filesystem::path &schema_path) { const util::mapped_file schema_data (schema_path.string ().c_str ()); auto schema_object = json::tree::parse (schema_data.as_view ()); diff --git a/json/schema.hpp b/json/schema.hpp index a1f5af6d..ec941fe2 100644 --- a/json/schema.hpp +++ b/json/schema.hpp @@ -20,7 +20,7 @@ #include "./fwd.hpp" #include -#include +#include namespace json { namespace schema { // Validate the json tree using the provide schema object or path. @@ -29,7 +29,7 @@ namespace json { namespace schema { // of validation. If a value is not present but the schema specifies a // default, it will be realised in the data object. void validate (json::tree::node &data, const json::tree::object &schema); - void validate (json::tree::node &data, const boost::filesystem::path &schema); + void validate (json::tree::node &data, const std::experimental::filesystem::path &schema); } } #endif diff --git a/json/tree.cpp b/json/tree.cpp index 7e94a44f..d1f316c1 100644 --- a/json/tree.cpp +++ b/json/tree.cpp @@ -248,7 +248,7 @@ MAP( //----------------------------------------------------------------------------- std::unique_ptr -json::tree::parse (const boost::filesystem::path &src) +json::tree::parse (const std::experimental::filesystem::path &src) { const util::mapped_file data (src.string ().c_str ()); return parse (data.as_view ()); diff --git a/json/tree.hpp b/json/tree.hpp index e4a99ac7..c36d0a2f 100644 --- a/json/tree.hpp +++ b/json/tree.hpp @@ -29,7 +29,7 @@ #include #include -#include +#include namespace json { namespace tree { @@ -48,7 +48,7 @@ namespace json { namespace tree { parse (util::view data); std::unique_ptr - parse (const boost::filesystem::path &); + parse (const std::experimental::filesystem::path &); extern void write (const json::tree::node&, std::ostream&); diff --git a/m4/nc b/m4/nc index 006f6977..597459d7 160000 --- a/m4/nc +++ b/m4/nc @@ -1 +1 @@ -Subproject commit 006f69779160a490786399b1af6a7d1e251cd15c +Subproject commit 597459d7e6dd9d8994740a863231eac49cc9bd56 diff --git a/term.cpp b/term.cpp index a6b923b2..db2f1f4e 100644 --- a/term.cpp +++ b/term.cpp @@ -18,14 +18,14 @@ #include "./string.hpp" -#include +#include #include #include using util::term::csi::graphics; -static const boost::filesystem::path DEFAULT_SEARCH_DIR = "/usr/share/terminfo"; +static const std::experimental::filesystem::path DEFAULT_SEARCH_DIR = "/usr/share/terminfo"; constexpr char util::term::csi::code::CSI; @@ -37,14 +37,14 @@ const graphics graphics::RESET (0); // // throws an exception if not found static -boost::filesystem::path -find_terminfo_path (const boost::filesystem::path &dir, +std::experimental::filesystem::path +find_terminfo_path (const std::experimental::filesystem::path &dir, const std::string &key) { const char letter[2] = { key[0], '\0' }; auto candidate = dir / letter / key; - if (!boost::filesystem::is_directory (candidate)) + if (!std::experimental::filesystem::is_directory (candidate)) throw std::runtime_error ("path not found"); return candidate; @@ -56,7 +56,7 @@ find_terminfo_path (const boost::filesystem::path &dir, // // throws an exception if not found static -boost::filesystem::path +std::experimental::filesystem::path find_terminfo_path (const std::string &key) { // check if the path is explicitly listed. must not fall through. @@ -66,7 +66,7 @@ find_terminfo_path (const std::string &key) // check if we have a path at $HOME. falls through. if (const char *home = getenv ("HOME")) { - boost::filesystem::path HOME (home); + std::experimental::filesystem::path HOME (home); try { return find_terminfo_path (HOME / ".terminfo", key); } catch (...) { } @@ -81,7 +81,7 @@ find_terminfo_path (const std::string &key) return find_terminfo_path ( i.empty () ? DEFAULT_SEARCH_DIR : - boost::filesystem::path (i.cbegin (), i.cend ()), key + std::experimental::filesystem::path (i.cbegin (), i.cend ()), key ); } catch (...) { } } diff --git a/tools/json-clean.cpp b/tools/json-clean.cpp index d65e36be..f595cb22 100644 --- a/tools/json-clean.cpp +++ b/tools/json-clean.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include /////////////////////////////////////////////////////////////////////////////// diff --git a/tools/json-schema.cpp b/tools/json-schema.cpp index ebea7d90..f0ada5ef 100644 --- a/tools/json-schema.cpp +++ b/tools/json-schema.cpp @@ -22,11 +22,11 @@ #include "io.hpp" -#include +#include #include -namespace fs = boost::filesystem; +namespace fs = std::experimental::filesystem; /////////////////////////////////////////////////////////////////////////////// diff --git a/tools/json-validate.cpp b/tools/json-validate.cpp index 7fe9d097..1caff3b6 100644 --- a/tools/json-validate.cpp +++ b/tools/json-validate.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include enum {