# # # patch "ChangeLog" # from [3b588046694a935d1318e6608a49cda01192efcd] # to [089574fa2e9c08b3aa4a5637ff87e334d7ede66a] # # patch "file_io.cc" # from [c1a8f81e48421f44efef7c5cc3734f8d67509281] # to [fc51aea25a93757f5f9f3e90ac8069c50baaff80] # # patch "paths.cc" # from [0a479f9b68b1dc8e9f09d0bd9047fbcaa2d4e918] # to [3fcc561710618bd984b8ea3396c5e90577bf581d] # # patch "paths.hh" # from [eb255ecee5d83363e230128955317b7b045fa4fe] # to [601092879bde9e640b917cd6515dfa60151ca587] # # patch "vocab.hh" # from [ba15acc6df58e0f9ca7c1fce2dc61425d4b7ccbc] # to [77bc4c6d905688d61e7d32c47ed2c777d2e67d45] # ============================================================ --- ChangeLog 3b588046694a935d1318e6608a49cda01192efcd +++ ChangeLog 089574fa2e9c08b3aa4a5637ff87e334d7ede66a @@ -1,3 +1,12 @@ +2006-12-06 Timothy Brownawell + + Version 1.34 of boost changes some things. In particular fs::path + is now a typedef (breaks the declaration we had in vocab.hh), and + some of our exceptions are different. + + Remove the vocab.hh declaration of fs::path, and #if/#else some things in + file_io.cc to handle the changing names. + 2006-11-28 Christian Ohler Fix automate bug where input would be garbled if a string needed ============================================================ --- file_io.cc c1a8f81e48421f44efef7c5cc3734f8d67509281 +++ file_io.cc fc51aea25a93757f5f9f3e90ac8069c50baaff80 @@ -23,6 +23,24 @@ #include "platform-wrapped.hh" #include "numeric_vocab.hh" + +// Parts of boost::filesystem change in 1.34 . One particular +// difference is that some exceptions are different now. + +#include + +#if BOOST_VERSION < 103400 +# define FS_ERROR fs::filesystem_error +# define FS_ERROR_SYSTEM native_error +#else +# define FS_ERROR fs::filesystem_path_error +# define FS_ERROR_SYSTEM system_error +#endif + + + + + // this file deals with talking to the filesystem, loading and // saving files. @@ -168,7 +186,7 @@ mkdir_p(any_path const & p) { fs::create_directories(mkdir(p)); } - catch (fs::filesystem_error & err) + catch (FS_ERROR & err) { // check for this case first, because in this case, the next line will // print "could not create directory: Success". Which is unhelpful. @@ -176,7 +194,7 @@ mkdir_p(any_path const & p) F("could not create directory '%s'\nit is a file") % p); E(false, F("could not create directory '%s'\n%s") - % err.path1().native_directory_string() % os_strerror(err.native_error())); + % err.path1().native_directory_string() % os_strerror(err.FS_ERROR_SYSTEM())); } require_path_is_directory(p, F("could not create directory '%s'") % p, @@ -204,11 +222,11 @@ do_shallow_deletion_with_sane_error_mess { fs::remove(fp); } - catch (fs::filesystem_error & err) + catch (FS_ERROR & err) { E(false, F("could not remove '%s'\n%s") % err.path1().native_directory_string() - % os_strerror(err.native_error())); + % os_strerror(err.FS_ERROR_SYSTEM())); } } ============================================================ --- paths.cc 0a479f9b68b1dc8e9f09d0bd9047fbcaa2d4e918 +++ paths.cc 3fcc561710618bd984b8ea3396c5e90577bf581d @@ -11,7 +11,6 @@ #include #include -#include #include #include @@ -28,6 +27,7 @@ using std::string; using std::ostringstream; using std::string; + // some structure to ensure we aren't doing anything broken when resolving // filenames. the idea is to make sure // -- we don't depend on the existence of something before it has been set ============================================================ --- paths.hh eb255ecee5d83363e230128955317b7b045fa4fe +++ paths.hh 601092879bde9e640b917cd6515dfa60151ca587 @@ -110,6 +110,10 @@ #include "vocab.hh" +#include + +namespace fs = boost::filesystem; + typedef std::vector split_path; const path_component the_null_component; ============================================================ --- vocab.hh ba15acc6df58e0f9ca7c1fce2dc61425d4b7ccbc +++ vocab.hh 77bc4c6d905688d61e7d32c47ed2c777d2e67d45 @@ -123,8 +123,8 @@ struct keypair // in the filesystem. if you want to *define* or work with any of these you // need to include boost/filesystem/path.hpp. -namespace boost { namespace filesystem { class path; } } -namespace fs = boost::filesystem; +//namespace boost { namespace filesystem { class path; } } +//namespace fs = boost::filesystem; // diff type enum diff_type