On Tue, Sep 12, 2006 at 06:01:12PM +0200, Lars Gullik Bjønnes wrote:
> Enrico Forestieri <[EMAIL PROTECTED]> writes:
> 
> | #   define BOOST_FS_FUNC(BOOST_FS_TYPE) inline BOOST_FS_TYPE
> | #   define BOOST_INLINE_FS_FUNC(BOOST_FS_TYPE) inline BOOST_FS_TYPE
> |     typedef boost::filesystem::path Path;
> | #   define BOOST_FS_TYPENAME
> | # endif
> | 
> | The problem occurs when BOOST_FILESYSTEM_NARROW_ONLY is defined as
> | in this case the "typedef boost::filesystem::path Path;" kicks in.
> 
> I think that should be reported as a bug to the boost people.
> (Polluting the global namespace.)

Yes, I did it.

> | The attached patch solves it by renaming class Path as CurrentPath.
> 
> But is not current path...  perhaps PathChanger...
> but...
> 
> | Please, let me know if there are any objections. The alternative would
> | be deleting "using lyx::support::Path" and substituting "Path" with
> | "lyx::support::Path" in those files where the problem occurs.
> 
> I think I would prefere this.

Here is the patch. Please tell me if I can put it in.

-- 
Enrico
Log:
Avoid a name clash with boost 1.34

        * src/lyx_cb.C (reconfigure):
        * src/buffer.C (runChktex):
        * src/lyxfunc.C (dispatch):
        * src/vc-backend.C (doVCCommand):
        * src/lyx_main.C (reconfigureUserLyXDir):
        Explicitly specify lyx::support::Path.
Index: src/lyx_cb.C
===================================================================
--- src/lyx_cb.C        (revisione 14981)
+++ src/lyx_cb.C        (copia locale)
@@ -67,7 +67,6 @@ using lyx::support::makeAbsPath;
 using lyx::support::makeDisplayPath;
 using lyx::support::onlyFilename;
 using lyx::support::onlyPath;
-using lyx::support::Path;
 using lyx::support::package;
 using lyx::support::removeAutosaveFile;
 using lyx::support::rename;
@@ -443,7 +442,7 @@ void reconfigure(BufferView * bv)
        bv->buffer()->message(_("Running configure..."));
 
        // Run configure in user lyx directory
-       Path p(package().user_support());
+       lyx::support::Path p(package().user_support());
        string const configure_command = package().configure_command();
        Systemcall one;
        one.startscript(Systemcall::Wait, configure_command);
Index: src/buffer.C
===================================================================
--- src/buffer.C        (revisione 14981)
+++ src/buffer.C        (copia locale)
@@ -113,7 +113,6 @@ using lyx::support::makeDisplayPath;
 using lyx::support::makeLatexName;
 using lyx::support::onlyFilename;
 using lyx::support::onlyPath;
-using lyx::support::Path;
 using lyx::support::quoteName;
 using lyx::support::removeAutosaveFile;
 using lyx::support::rename;
@@ -1076,7 +1075,7 @@ int Buffer::runChktex()
        string const path = temppath();
        string const org_path = filePath();
 
-       Path p(path); // path to LaTeX file
+       lyx::support::Path p(path); // path to LaTeX file
        message(_("Running chktex..."));
 
        // Generate the LaTeX file if neccessary
Index: src/lyxfunc.C
===================================================================
--- src/lyxfunc.C       (revisione 14981)
+++ src/lyxfunc.C       (copia locale)
@@ -118,7 +118,6 @@ using lyx::support::isStrInt;
 using lyx::support::makeAbsPath;
 using lyx::support::makeDisplayPath;
 using lyx::support::package;
-using lyx::support::Path;
 using lyx::support::quoteName;
 using lyx::support::rtrim;
 using lyx::support::split;
@@ -931,7 +930,7 @@ void LyXFunc::dispatch(FuncRequest const
 
                        // Push directory path.
                        string const path = buffer->temppath();
-                       Path p(path);
+                       lyx::support::Path p(path);
 
                        // there are three cases here:
                        // 1. we print to a file
@@ -1346,7 +1345,7 @@ void LyXFunc::dispatch(FuncRequest const
                }
 
                case LFUN_PREFERENCES_SAVE: {
-                       Path p(package().user_support());
+                       lyx::support::Path p(package().user_support());
                        lyxrc.write("preferences", false);
                        break;
                }
Index: src/vc-backend.C
===================================================================
--- src/vc-backend.C    (revisione 14981)
+++ src/vc-backend.C    (copia locale)
@@ -30,7 +30,6 @@ using lyx::support::addPath;
 using lyx::support::contains;
 using lyx::support::onlyFilename;
 using lyx::support::onlyPath;
-using lyx::support::Path;
 using lyx::support::quoteName;
 using lyx::support::rtrim;
 using lyx::support::split;
@@ -57,7 +56,7 @@ int VCS::doVCCommand(string const & cmd,
 {
        lyxerr[Debug::LYXVC] << "doVCCommand: " << cmd << endl;
        Systemcall one;
-       Path p(path);
+       lyx::support::Path p(path);
        int const ret = one.startscript(Systemcall::Wait, cmd);
        return ret;
 }
Index: src/lyx_main.C
===================================================================
--- src/lyx_main.C      (revisione 14981)
+++ src/lyx_main.C      (copia locale)
@@ -71,7 +71,6 @@ using lyx::support::getEnv;
 using lyx::support::i18nLibFileSearch;
 using lyx::support::libFileSearch;
 using lyx::support::package;
-using lyx::support::Path;
 using lyx::support::prependEnvPath;
 using lyx::support::rtrim;
 using lyx::support::Systemcall;
@@ -133,7 +132,7 @@ void reconfigureUserLyXDir()
        string const configure_command = package().configure_command();
 
        lyxerr << lyx::to_utf8(_("LyX: reconfiguring user directory")) << endl;
-       Path p(package().user_support());
+       lyx::support::Path p(package().user_support());
        Systemcall one;
        one.startscript(Systemcall::Wait, configure_command);
        lyxerr << "LyX: " << lyx::to_utf8(_("Done!")) << endl;

Reply via email to