From b6e8e8c1ae63ebef6a2c8074b8a2ccfb7408c4ea Mon Sep 17 00:00:00 2001 From: Luis Ibanez Date: Fri, 21 Dec 2007 16:46:48 -0500 Subject: [PATCH 1/2] BUG: Fix bug#5590. When converting a relative path between two full paths on different windows drive letters do not create a ../../d:/foo/bar path and just return the full path to the destination. --- GCC_XML/KWSys/SystemTools.cxx | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/GCC_XML/KWSys/SystemTools.cxx b/GCC_XML/KWSys/SystemTools.cxx index 3548a14..2b255a9 100644 --- a/GCC_XML/KWSys/SystemTools.cxx +++ b/GCC_XML/KWSys/SystemTools.cxx @@ -2747,22 +2747,15 @@ kwsys_stl::string SystemTools::RelativePath(const char* local, const char* remot sameCount++; } -#if 0 - // NOTE: We did this at one time to prevent relative paths to the - // compiler from looking like "../../../../../../../usr/bin/gcc". - // Now however relative paths are only computed for destinations - // inside the build tree so this is not a problem. This is now a - // general-purpose method and should not have this hack. I'm - // leaving it in place in case removing it causes a problem so it is - // easy to restore: - // - // If there is nothing in common but the root directory, then just - // return the full path. - if(sameCount <= 1) + // If there is nothing in common at all then just return the full + // path. This is the case only on windows when the paths have + // different drive letters. On unix two full paths always at least + // have the root "/" in common so we will return a relative path + // that passes through the root directory. + if(sameCount == 0) { return remote; } -#endif // for each entry that is not common in the local path // add a ../ to the finalpath array, this gets us out of the local From dc2f8f54f9d1ec21e7a909352e5f17cdc98a79ba Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 23 Jan 2008 17:03:59 -0500 Subject: [PATCH 2/2] BUG: Rename NEW to SWIG-NEW to avoid problems with case-insensitive filesystems and the C++ header. This addresses bug #5992. --- SWIG/{NEW => SWIG-NEW} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename SWIG/{NEW => SWIG-NEW} (100%) diff --git a/SWIG/NEW b/SWIG/SWIG-NEW similarity index 100% rename from SWIG/NEW rename to SWIG/SWIG-NEW