It would be even better if I actually remembered to attach the patch...

On 8 June 2011 22:20, Konstantinos Margaritis <mar...@genesi-usa.com> wrote:
> tags 624942 patch
> tags 629486 -patch
> thanks
>
> Oops, sorry patch sent to the wrong bug number.
>
> My apologies.
>
> Konstantinos
>
> On 8 June 2011 20:28, Konstantinos Margaritis <mar...@genesi-usa.com> wrote:
>> tags 629486 patch
>> thanks
>>
>> The attached patch fixes the build error. Basically Boost 1.46 changed
>> the API for the Filesystem module, as can be seen here:
>>
>> http://www.boost.org/doc/libs/1_46_1/libs/filesystem/v3/doc/deprecated.html
>>
>> The patch allows the build to succeed on both Filesystem API versions.
>>
>> Regards
>>
>> Konstantinos
>>
>
diff -ruN xsd-3.3.0.1/xsd-srcdir/libxsd-frontend/xsd-frontend/parser.cxx xsd-3.3.0.1.armhf//xsd-srcdir/libxsd-frontend/xsd-frontend/parser.cxx
--- xsd-3.3.0.1/xsd-srcdir/libxsd-frontend/xsd-frontend/parser.cxx	2010-04-27 19:31:24.000000000 +0000
+++ xsd-3.3.0.1.armhf//xsd-srcdir/libxsd-frontend/xsd-frontend/parser.cxx	2011-06-07 22:44:07.419986515 +0000
@@ -1274,7 +1274,11 @@
     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 @@
       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 @@
     Path path, rel_path, abs_path;
     try
     {
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
       try
       {
         path = Path (loc);
@@ -2386,6 +2397,10 @@
         //
         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 @@
     Path path, rel_path, abs_path;
     try
     {
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
       try
       {
         path = Path (loc);
@@ -2489,6 +2505,10 @@
         //
         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 @@
         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 @@
           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 @@
 
       // 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 @@
       {
         Path path;
 
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
         try
         {
           path = Path (path_str);
@@ -4840,6 +4874,10 @@
           //
           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 -ruN xsd-3.3.0.1/xsd-srcdir/libxsd-frontend/xsd-frontend/semantic-graph/elements.cxx xsd-3.3.0.1.armhf//xsd-srcdir/libxsd-frontend/xsd-frontend/semantic-graph/elements.cxx
--- xsd-3.3.0.1/xsd-srcdir/libxsd-frontend/xsd-frontend/semantic-graph/elements.cxx	2010-04-27 19:31:24.000000000 +0000
+++ xsd-3.3.0.1.armhf//xsd-srcdir/libxsd-frontend/xsd-frontend/semantic-graph/elements.cxx	2011-06-07 19:42:03.919987860 +0000
@@ -342,5 +342,9 @@
 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 -ruN xsd-3.3.0.1/xsd-srcdir/libxsd-frontend/xsd-frontend/transformations/anonymous.cxx xsd-3.3.0.1.armhf//xsd-srcdir/libxsd-frontend/xsd-frontend/transformations/anonymous.cxx
--- xsd-3.3.0.1/xsd-srcdir/libxsd-frontend/xsd-frontend/transformations/anonymous.cxx	2010-04-27 19:31:24.000000000 +0000
+++ xsd-3.3.0.1.armhf//xsd-srcdir/libxsd-frontend/xsd-frontend/transformations/anonymous.cxx	2011-06-07 21:52:00.489986901 +0000
@@ -275,7 +275,11 @@
             }
             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 @@
                 }
                 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 @@
             }
             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 @@
         }
         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 -ruN xsd-3.3.0.1/xsd-srcdir/libxsd-frontend/xsd-frontend/transformations/schema-per-type.cxx xsd-3.3.0.1.armhf//xsd-srcdir/libxsd-frontend/xsd-frontend/transformations/schema-per-type.cxx
--- xsd-3.3.0.1/xsd-srcdir/libxsd-frontend/xsd-frontend/transformations/schema-per-type.cxx	2010-04-27 19:31:24.000000000 +0000
+++ xsd-3.3.0.1.armhf//xsd-srcdir/libxsd-frontend/xsd-frontend/transformations/schema-per-type.cxx	2011-06-07 21:59:02.199986850 +0000
@@ -167,7 +167,11 @@
 
             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 @@
         //
         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 @@
         {
           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 @@
 
         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 -ruN xsd-3.3.0.1/xsd-srcdir/xsd/xsd/cxx/elements.cxx xsd-3.3.0.1.armhf//xsd-srcdir/xsd/xsd/cxx/elements.cxx
--- xsd-3.3.0.1/xsd-srcdir/xsd/xsd/cxx/elements.cxx	2010-04-28 06:58:09.000000000 +0000
+++ xsd-3.3.0.1.armhf//xsd-srcdir/xsd/xsd/cxx/elements.cxx	2011-06-07 19:59:29.719987732 +0000
@@ -326,7 +326,11 @@
         }
         catch (SemanticGraph::InvalidPath const&)
         {
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
           pair = path.native_file_string ();
+#else
+          pair = path.string ();
+#endif
         }
       }
 
diff -ruN xsd-3.3.0.1/xsd-srcdir/xsd/xsd/cxx/parser/elements.cxx xsd-3.3.0.1.armhf//xsd-srcdir/xsd/xsd/cxx/parser/elements.cxx
--- xsd-3.3.0.1/xsd-srcdir/xsd/xsd/cxx/parser/elements.cxx	2010-04-28 06:58:09.000000000 +0000
+++ xsd-3.3.0.1.armhf//xsd-srcdir/xsd/xsd/cxx/parser/elements.cxx	2011-06-07 20:02:15.659987711 +0000
@@ -244,7 +244,11 @@
       }
       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 -ruN xsd-3.3.0.1/xsd-srcdir/xsd/xsd/cxx/parser/generator.cxx xsd-3.3.0.1.armhf//xsd-srcdir/xsd/xsd/cxx/parser/generator.cxx
--- xsd-3.3.0.1/xsd-srcdir/xsd/xsd/cxx/parser/generator.cxx	2010-04-28 06:58:09.000000000 +0000
+++ xsd-3.3.0.1.armhf//xsd-srcdir/xsd/xsd/cxx/parser/generator.cxx	2011-06-07 20:38:35.129987442 +0000
@@ -552,7 +552,11 @@
     {
       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 @@
       {
         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 @@
 
       // 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 @@
         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 @@
 
       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 @@
       {
         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 @@
         }
 
         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 @@
         }
 
         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 @@
         }
 
         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 @@
       }
 
       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 @@
         }
 
         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 @@
         }
 
         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 @@
       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 -ruN xsd-3.3.0.1/xsd-srcdir/xsd/xsd/cxx/tree/elements.cxx xsd-3.3.0.1.armhf//xsd-srcdir/xsd/xsd/cxx/tree/elements.cxx
--- xsd-3.3.0.1/xsd-srcdir/xsd/xsd/cxx/tree/elements.cxx	2010-04-28 06:58:09.000000000 +0000
+++ xsd-3.3.0.1.armhf//xsd-srcdir/xsd/xsd/cxx/tree/elements.cxx	2011-06-07 20:49:27.539987362 +0000
@@ -1312,7 +1312,11 @@
       }
       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 -ruN xsd-3.3.0.1/xsd-srcdir/xsd/xsd/cxx/tree/generator.cxx xsd-3.3.0.1.armhf//xsd-srcdir/xsd/xsd/cxx/tree/generator.cxx
--- xsd-3.3.0.1/xsd-srcdir/xsd/xsd/cxx/tree/generator.cxx	2010-04-28 06:58:09.000000000 +0000
+++ xsd-3.3.0.1.armhf//xsd-srcdir/xsd/xsd/cxx/tree/generator.cxx	2011-06-07 21:22:51.169987117 +0000
@@ -773,7 +773,11 @@
     {
       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 @@
       {
         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 @@
 
       // 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 @@
       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 @@
             }
 
             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 @@
       {
         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 @@
         }
 
         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 @@
       }
 
       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 @@
         }
 
         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 @@
           }
 
           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 @@
       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 -ruN xsd-3.3.0.1/xsd-srcdir/xsd/xsd/xsd.cxx xsd-3.3.0.1.armhf//xsd-srcdir/xsd/xsd/xsd.cxx
--- xsd-3.3.0.1/xsd-srcdir/xsd/xsd/xsd.cxx	2010-04-28 06:58:09.000000000 +0000
+++ xsd-3.3.0.1.armhf//xsd-srcdir/xsd/xsd/xsd.cxx	2011-06-07 19:55:38.539987759 +0000
@@ -636,7 +636,11 @@
 
         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 @@
               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 @@
               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 @@
       {
         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 @@
       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 -ruN xsd-3.3.0.1/xsd-srcdir/xsd/xsd/xsd.hxx xsd-3.3.0.1.armhf//xsd-srcdir/xsd/xsd/xsd.hxx
--- xsd-3.3.0.1/xsd-srcdir/xsd/xsd/xsd.hxx	2010-04-28 06:58:09.000000000 +0000
+++ xsd-3.3.0.1.armhf//xsd-srcdir/xsd/xsd/xsd.hxx	2011-06-07 19:43:28.609987850 +0000
@@ -38,7 +38,11 @@
   {
     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
     }
   }
 

Reply via email to