Projects
Kolab:3.4:Updates
xsd
boost1.46-buildfix.patch
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File boost1.46-buildfix.patch of Package xsd (Revision 5)
Currently displaying revision
5
,
Show latest
diff --git a/libxsd-frontend/xsd-frontend/parser.cxx b/libxsd-frontend/xsd-frontend/parser.cxx index 0238a7b..0df56dd 100644 --- a/libxsd-frontend/xsd-frontend/parser.cxx +++ b/libxsd-frontend/xsd-frontend/parser.cxx @@ -1274,7 +1274,11 @@ namespace XSDFrontend operator () (SemanticGraph::Path const& x, SemanticGraph::Path const& y) const { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 return x.native_file_string () < y.native_file_string (); +#else + return x.string () < y.string (); +#endif } }; @@ -1627,9 +1631,15 @@ namespace XSDFrontend friend Boolean operator< (SchemaId const& x, SchemaId const& y) { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 return x.path_.native_file_string () < y.path_.native_file_string () || (x.path_.native_file_string () == y.path_.native_file_string () && x.ns_ < y.ns_); +#else + return x.path_.string () < y.path_.string () + || (x.path_.string () == y.path_.string () + && x.ns_ < y.ns_); +#endif } private: @@ -2376,6 +2386,7 @@ namespace XSDFrontend Path path, rel_path, abs_path; try { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 try { path = Path (loc); @@ -2386,6 +2397,10 @@ namespace XSDFrontend // path = Path (loc, boost::filesystem::native); } +#else + // The new ABI does not have a fallback native representation + path = Path (loc.c_str()); +#endif if (path.is_complete ()) { @@ -2479,6 +2494,7 @@ namespace XSDFrontend Path path, rel_path, abs_path; try { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 try { path = Path (loc); @@ -2489,6 +2505,10 @@ namespace XSDFrontend // path = Path (loc, boost::filesystem::native); } +#else + // The new ABI does not have a fallback native representation + path = Path (loc.c_str()); +#endif if (path.is_complete ()) { @@ -4674,9 +4694,14 @@ namespace XSDFrontend return true; +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 XSDFrontend::SemanticGraph::Path abs_path ( XML::transcode_to_narrow (e.getLocation ()->getURI ()), boost::filesystem::native); +#else + XSDFrontend::SemanticGraph::Path abs_path ( + XML::transcode_to_narrow (e.getLocation ()->getURI ()).c_str()); +#endif XSDFrontend::SemanticGraph::Path rel_path (ctx_.file (abs_path)); @@ -4729,8 +4754,12 @@ namespace XSDFrontend base_ (base), ctx_ (ctx) { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 setSystemId (XML::XMLChString ( String (abs_.native_file_string ())).c_str ()); +#else + setSystemId (XML::XMLChString (String (abs_.string ())).c_str ()); +#endif } virtual Xerces::BinInputStream* @@ -4803,8 +4832,12 @@ namespace XSDFrontend // base_uri should be a valid path by now. // +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 Path base (XML::transcode_to_narrow (base_uri), boost::filesystem::native); +#else + Path base (XML::transcode_to_narrow (base_uri).c_str()); +#endif if (prv_id == 0) { @@ -4830,6 +4863,7 @@ namespace XSDFrontend { Path path; +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 try { path = Path (path_str); @@ -4840,6 +4874,10 @@ namespace XSDFrontend // path = Path (path_str, boost::filesystem::native); } +#else + // The new ABI does not have a fallback native representation + path = Path (path_str.c_str()); +#endif Path base_dir (base.branch_path ()); diff --git a/libxsd-frontend/xsd-frontend/semantic-graph/elements.cxx b/libxsd-frontend/xsd-frontend/semantic-graph/elements.cxx index 9027282..6a2addf 100644 --- a/libxsd-frontend/xsd-frontend/semantic-graph/elements.cxx +++ b/libxsd-frontend/xsd-frontend/semantic-graph/elements.cxx @@ -342,5 +342,9 @@ namespace XSDFrontend std::wostream& operator<< (std::wostream& os, XSDFrontend::SemanticGraph::Path const& path) { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 return os << path.native_file_string ().c_str (); +#else + return os << path.string ().c_str (); +#endif } diff --git a/libxsd-frontend/xsd-frontend/transformations/anonymous.cxx b/libxsd-frontend/xsd-frontend/transformations/anonymous.cxx index 65d8e76..118fd5d 100644 --- a/libxsd-frontend/xsd-frontend/transformations/anonymous.cxx +++ b/libxsd-frontend/xsd-frontend/transformations/anonymous.cxx @@ -275,7 +275,11 @@ namespace XSDFrontend } catch (SemanticGraph::InvalidPath const&) { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 file_str = file.native_file_string (); +#else + file_str = file.string (); +#endif } String name ( @@ -358,7 +362,11 @@ namespace XSDFrontend } catch (SemanticGraph::InvalidPath const&) { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 file_str = file.native_file_string (); +#else + file_str = file.string (); +#endif } } @@ -441,7 +449,11 @@ namespace XSDFrontend } catch (SemanticGraph::InvalidPath const&) { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 file_str = file.native_file_string (); +#else + file_str = file.string (); +#endif } String name ( @@ -639,7 +651,11 @@ namespace XSDFrontend } catch (SemanticGraph::InvalidPath const&) { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 file_str = file.native_file_string (); +#else + file_str = file.string (); +#endif } String name ( diff --git a/libxsd-frontend/xsd-frontend/transformations/schema-per-type.cxx b/libxsd-frontend/xsd-frontend/transformations/schema-per-type.cxx index 2cc6457..9ac8445 100644 --- a/libxsd-frontend/xsd-frontend/transformations/schema-per-type.cxx +++ b/libxsd-frontend/xsd-frontend/transformations/schema-per-type.cxx @@ -167,7 +167,11 @@ namespace XSDFrontend try { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 path = Path (file_name); +#else + path = Path (file_name.c_str()); +#endif } catch (InvalidPath const&) { @@ -349,6 +353,7 @@ namespace XSDFrontend // NarrowString abs_path; +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 // Try to use the portable representation of the path. If that // fails, fall back to the native representation. // @@ -360,9 +365,17 @@ namespace XSDFrontend { abs_path = path.native_file_string (); } +#else + // The new ABI does not have a fallback native representation + abs_path = path.string (); +#endif NarrowString tf (trans_.translate_schema (abs_path)); +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 NarrowString file (tf ? tf : path.leaf ()); +#else + NarrowString file (tf ? tf : path.filename ().string()); +#endif Size p (file.rfind ('.')); NarrowString ext ( @@ -389,7 +402,11 @@ namespace XSDFrontend try { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 (*i)->context ().set ("renamed", SemanticGraph::Path (new_name)); +#else + (*i)->context ().set ("renamed", SemanticGraph::Path (new_name.c_str())); +#endif } catch (SemanticGraph::InvalidPath const&) { diff --git a/xsd/xsd/cxx/elements.cxx b/xsd/xsd/cxx/elements.cxx index 4d28311..d2600dc 100644 --- a/xsd/xsd/cxx/elements.cxx +++ b/xsd/xsd/cxx/elements.cxx @@ -326,7 +326,11 @@ namespace CXX } catch (SemanticGraph::InvalidPath const&) { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 pair = path.native_file_string (); +#else + pair = path.string (); +#endif } } diff --git a/xsd/xsd/cxx/parser/elements.cxx b/xsd/xsd/cxx/parser/elements.cxx index 9c2dac3..b3458c7 100644 --- a/xsd/xsd/cxx/parser/elements.cxx +++ b/xsd/xsd/cxx/parser/elements.cxx @@ -244,7 +244,11 @@ namespace CXX } catch (SemanticGraph::InvalidPath const&) { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 path_str = path.native_file_string (); +#else + path_str = path.string (); +#endif } String inc_path; diff --git a/xsd/xsd/cxx/parser/generator.cxx b/xsd/xsd/cxx/parser/generator.cxx index 617ff4f..b3aee76 100644 --- a/xsd/xsd/cxx/parser/generator.cxx +++ b/xsd/xsd/cxx/parser/generator.cxx @@ -552,7 +552,11 @@ namespace CXX { try { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 Path fs_path (path, boost::filesystem::native); +#else + Path fs_path (path.c_str()); +#endif ifs.open (fs_path, std::ios_base::in | std::ios_base::binary); if (!ifs.is_open ()) @@ -638,7 +642,11 @@ namespace CXX { if (NarrowString name = ops.value<CLI::extern_xml_schema> ()) { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 if (file_path.native_file_string () != name) +#else + if (file_path.string () != name) +#endif generate_xml_schema = false; } } @@ -815,7 +823,11 @@ namespace CXX // Generate code. // +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 NarrowString name (file_path.leaf ()); +#else + NarrowString name (file_path.filename().string()); +#endif NarrowString skel_suffix (ops.value <CLI::skel_file_suffix> ()); NarrowString impl_suffix (ops.value <CLI::impl_file_suffix> ()); @@ -921,9 +933,15 @@ namespace CXX cxx_driver_name = cxx_driver_expr.merge (name); } +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 Path hxx_path (hxx_name, boost::filesystem::native); Path ixx_path (ixx_name, boost::filesystem::native); Path cxx_path (cxx_name, boost::filesystem::native); +#else + Path hxx_path (hxx_name.c_str()); + Path ixx_path (ixx_name.c_str()); + Path cxx_path (cxx_name.c_str()); +#endif Path hxx_impl_path; Path cxx_impl_path; @@ -931,9 +949,15 @@ namespace CXX if (impl || driver) { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 hxx_impl_path = Path (hxx_impl_name, boost::filesystem::native); cxx_impl_path = Path (cxx_impl_name, boost::filesystem::native); cxx_driver_path = Path (cxx_driver_name, boost::filesystem::native); +#else + hxx_impl_path = Path (hxx_impl_name.c_str()); + cxx_impl_path = Path (cxx_impl_name.c_str()); + cxx_driver_path = Path (cxx_driver_name.c_str()); +#endif } Path out_dir; @@ -942,7 +966,11 @@ namespace CXX { try { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 out_dir = Path (dir, boost::filesystem::native); +#else + out_dir = Path (dir.c_str()); +#endif } catch (InvalidPath const&) { @@ -1010,7 +1038,11 @@ namespace CXX } unlinks.add (hxx_impl_path); +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 file_list.push_back (hxx_impl_path.native_file_string ()); +#else + file_list.push_back (hxx_impl_path.string ()); +#endif if (!ops.value<CLI::force_overwrite> ()) { @@ -1036,7 +1068,11 @@ namespace CXX } unlinks.add (cxx_impl_path); +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 file_list.push_back (cxx_impl_path.native_file_string ()); +#else + file_list.push_back (cxx_impl_path.string ()); +#endif } if (driver) @@ -1065,7 +1101,11 @@ namespace CXX } unlinks.add (cxx_driver_path); +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 file_list.push_back (cxx_driver_path.native_file_string ()); +#else + file_list.push_back (cxx_driver_path.string ()); +#endif } // Open the skel files. @@ -1081,7 +1121,11 @@ namespace CXX } unlinks.add (hxx_path); +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 file_list.push_back (hxx_path.native_file_string ()); +#else + file_list.push_back (hxx_path.string ()); +#endif if (inline_) { @@ -1094,7 +1138,11 @@ namespace CXX } unlinks.add (ixx_path); +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 file_list.push_back (ixx_path.native_file_string ()); +#else + file_list.push_back (ixx_path.string ()); +#endif } @@ -1109,7 +1157,11 @@ namespace CXX } unlinks.add (cxx_path); +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 file_list.push_back (cxx_path.native_file_string ()); +#else + file_list.push_back (cxx_path.string ()); +#endif } // Print copyright and license. @@ -1168,7 +1220,11 @@ namespace CXX NarrowString guard_prefix (ops.value<CLI::guard_prefix> ()); if (!guard_prefix) +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 guard_prefix = file_path.branch_path ().native_directory_string (); +#else + guard_prefix = file_path.branch_path ().string (); +#endif if (guard_prefix) guard_prefix += '_'; diff --git a/xsd/xsd/cxx/tree/elements.cxx b/xsd/xsd/cxx/tree/elements.cxx index d5f03c0..cad5a33 100644 --- a/xsd/xsd/cxx/tree/elements.cxx +++ b/xsd/xsd/cxx/tree/elements.cxx @@ -1312,7 +1312,11 @@ namespace CXX } catch (SemanticGraph::InvalidPath const&) { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 path_str = path.native_file_string (); +#else + path_str = path.string (); +#endif } String inc_path; diff --git a/xsd/xsd/cxx/tree/generator.cxx b/xsd/xsd/cxx/tree/generator.cxx index c13bf1f..fe5286a 100644 --- a/xsd/xsd/cxx/tree/generator.cxx +++ b/xsd/xsd/cxx/tree/generator.cxx @@ -773,7 +773,11 @@ namespace CXX { try { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 Path fs_path (path, boost::filesystem::native); +#else + Path fs_path (path.c_str()); +#endif ifs.open (fs_path, std::ios_base::in | std::ios_base::binary); if (!ifs.is_open ()) @@ -939,7 +943,11 @@ namespace CXX { if (NarrowString name = ops.value<CLI::extern_xml_schema> ()) { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 if (file_path.native_file_string () != name) +#else + if (file_path.string () != name) +#endif generate_xml_schema = false; } } @@ -954,7 +962,11 @@ namespace CXX // Generate code. // +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 NarrowString name (file_path.leaf ()); +#else + NarrowString name (file_path.filename ().string()); +#endif NarrowString hxx_suffix (ops.value <CLI::hxx_suffix> ()); NarrowString ixx_suffix (ops.value <CLI::ixx_suffix> ()); @@ -1013,9 +1025,15 @@ namespace CXX NarrowString ixx_name (inline_ ? ixx_expr.merge (name) : NarrowString ()); NarrowString fwd_name (forward ? fwd_expr.merge (name) : NarrowString ()); +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 Path hxx_path (hxx_name, boost::filesystem::native); Path ixx_path (ixx_name, boost::filesystem::native); Path fwd_path (fwd_name, boost::filesystem::native); +#else + Path hxx_path (hxx_name.c_str()); + Path ixx_path (ixx_name.c_str()); + Path fwd_path (fwd_name.c_str()); +#endif Paths cxx_paths; if (source) @@ -1041,12 +1059,20 @@ namespace CXX } cxx_paths.push_back ( +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 Path (cxx_expr.merge (part_name), boost::filesystem::native)); +#else + Path (cxx_expr.merge (part_name).c_str())); +#endif } } else cxx_paths.push_back ( +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 Path (cxx_expr.merge (name), boost::filesystem::native)); +#else + Path (cxx_expr.merge (name).c_str())); +#endif } Path out_dir; @@ -1055,7 +1081,11 @@ namespace CXX { try { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 out_dir = Path (dir, boost::filesystem::native); +#else + out_dir = Path (dir.c_str()); +#endif } catch (InvalidPath const&) { @@ -1108,7 +1138,11 @@ namespace CXX } unlinks.add (fwd_path); +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 file_list.push_back (fwd_path.native_file_string ()); +#else + file_list.push_back (fwd_path.string ()); +#endif } @@ -1121,7 +1155,11 @@ namespace CXX } unlinks.add (hxx_path); +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 file_list.push_back (hxx_path.native_file_string ()); +#else + file_list.push_back (hxx_path.string ()); +#endif // IXX @@ -1137,7 +1175,11 @@ namespace CXX } unlinks.add (ixx_path); +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 file_list.push_back (ixx_path.native_file_string ()); +#else + file_list.push_back (ixx_path.string ()); +#endif } @@ -1158,7 +1200,11 @@ namespace CXX } unlinks.add (*i); +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 file_list.push_back (i->native_file_string ()); +#else + file_list.push_back (i->string ()); +#endif cxx.push_back (s); } } @@ -1230,7 +1276,11 @@ namespace CXX NarrowString guard_prefix (ops.value<CLI::guard_prefix> ()); if (!guard_prefix) +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 guard_prefix = file_path.branch_path ().native_directory_string (); +#else + guard_prefix = file_path.branch_path ().string (); +#endif if (guard_prefix) guard_prefix += '_'; diff --git a/xsd/xsd/xsd.cxx b/xsd/xsd/xsd.cxx index 1c66a8a..2e2f6ce 100644 --- a/xsd/xsd/xsd.cxx +++ b/xsd/xsd/xsd.cxx @@ -636,7 +636,11 @@ main (Int argc, Char* argv[]) try { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 tu = SemanticGraph::Path (args[i], boost::filesystem::native); +#else + tu = SemanticGraph::Path (args[i]); +#endif } catch (SemanticGraph::InvalidPath const&) { @@ -675,7 +679,11 @@ main (Int argc, Char* argv[]) if (NarrowString name = tree_ops->value<CXX::Tree::CLI::extern_xml_schema> ()) { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 if (tu.native_file_string () != name) +#else + if (tu.string () != name) +#endif gen_xml_schema = false; } } @@ -690,7 +698,11 @@ main (Int argc, Char* argv[]) if (NarrowString name = parser_ops->value<CXX::Parser::CLI::extern_xml_schema> ()) { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 if (tu.native_file_string () != name) +#else + if (tu.string () != name) +#endif gen_xml_schema = false; } } @@ -827,8 +839,13 @@ main (Int argc, Char* argv[]) { try { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 paths.push_back ( SemanticGraph::Path (args[i], boost::filesystem::native)); +#else + paths.push_back ( + SemanticGraph::Path (args[i])); +#endif } catch (SemanticGraph::InvalidPath const&) { @@ -991,9 +1008,17 @@ main (Int argc, Char* argv[]) try { OutputFileStream ofs; +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 SemanticGraph::Path path (fl); +#else + SemanticGraph::Path path (fl.c_str()); +#endif +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 ofs.open (fl, std::ios_base::out); +#else + ofs.open (fl.c_str(), std::ios_base::out); +#endif if (!ofs.is_open ()) { diff --git a/xsd/xsd/xsd.hxx b/xsd/xsd/xsd.hxx index f847392..508c8da 100644 --- a/xsd/xsd/xsd.hxx +++ b/xsd/xsd/xsd.hxx @@ -38,7 +38,11 @@ struct AutoUnlink { if (!canceled_) { +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 std::remove (file_.native_file_string ().c_str ()); +#else + std::remove (file_.string ().c_str ()); +#endif } }
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.