diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-09-21 23:06:58 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-09-23 11:52:24 +0200 |
| commit | 6fba38bd59450e167e664153a31f41e97a500ffc (patch) | |
| tree | 9c52eb309ba192eb9bc19ea5b88ec97f4f304178 | |
| parent | 6d1a7e90ec3244b8e532e03c5209d5e8448f422e (diff) | |
Support new boost versions (DoM #2867).v1.8.109
| -rw-r--r-- | src/filesystem.cc | 6 | ||||
| -rw-r--r-- | src/filesystem.h | 4 | ||||
| -rw-r--r-- | wscript | 9 |
3 files changed, 18 insertions, 1 deletions
diff --git a/src/filesystem.cc b/src/filesystem.cc index 83c55ab0..bdd15039 100644 --- a/src/filesystem.cc +++ b/src/filesystem.cc @@ -107,7 +107,11 @@ dcp::filesystem::copy_file(boost::filesystem::path const& from, boost::filesyste void +#ifdef LIBDCP_HAVE_COPY_OPTIONS +dcp::filesystem::copy_file(boost::filesystem::path const& from, boost::filesystem::path const& to, boost::filesystem::copy_options option) +#else dcp::filesystem::copy_file(boost::filesystem::path const& from, boost::filesystem::path const& to, boost::filesystem::copy_option option) +#endif { boost::filesystem::copy_file(dcp::filesystem::fix_long_path(from), dcp::filesystem::fix_long_path(to), option); } @@ -247,7 +251,7 @@ dcp::filesystem::create_symlink(boost::filesystem::path const& from, boost::file std::string dcp::filesystem::extension(boost::filesystem::path const& path) { - return boost::filesystem::extension(dcp::filesystem::fix_long_path(path)); + return dcp::filesystem::fix_long_path(path).extension().string(); } diff --git a/src/filesystem.h b/src/filesystem.h index 30da1c3b..1d434200 100644 --- a/src/filesystem.h +++ b/src/filesystem.h @@ -50,7 +50,11 @@ boost::filesystem::path weakly_canonical(boost::filesystem::path const& path); void copy(boost::filesystem::path const& from, boost::filesystem::path const& to); void copy_file(boost::filesystem::path const& from, boost::filesystem::path const& to); void copy_file(boost::filesystem::path const& from, boost::filesystem::path const& to, boost::system::error_code& ec); +#ifdef LIBDCP_HAVE_COPY_OPTIONS +void copy_file(boost::filesystem::path const& from, boost::filesystem::path const& to, boost::filesystem::copy_options ec); +#else void copy_file(boost::filesystem::path const& from, boost::filesystem::path const& to, boost::filesystem::copy_option ec); +#endif bool create_directory(boost::filesystem::path const& path); bool create_directory(boost::filesystem::path const& path, boost::system::error_code& ec); bool create_directories(boost::filesystem::path const& path); @@ -228,6 +228,15 @@ def configure(conf): define_name='LIBDCP_HAVE_WEAKLY_CANONICAL') conf.check_cxx(fragment=""" + #include <boost/filesystem.hpp>\n + int main() { auto x = boost::filesystem::copy_options(); }\n + """, + mandatory=False, + msg='Checking for boost::filesystem::copy_options', + uselib='BOOST_FILESYSTEM', + define_name='LIBDCP_HAVE_COPY_OPTIONS') + + conf.check_cxx(fragment=""" #include <boost/date_time.hpp>\n int main() { boost::gregorian::day_clock::local_day(); }\n """, |
