This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: Fix problem with trailing slashes in include paths on mingw


> #ifdef HAVE_DOS_BASED_FILE_SYSTEM
> /* Canonicalize all path separators to forward slashes.  */
> 
> // backward-to-forward slash converter here
> 
> /* When running under MS Windows 2000 or XP, Cygwin's stat() fails
>    when the pathname has trailing slashes (either variety), except
>    for drive root directories (X:/).  Removing those slashes is
>    harmless in other contexts, so we do it unconditionally.  */

Note that DJGPP is slash-agnostic.  All the test cases given work just
fine for DJGPP, and it doesn't care if there are trailing slashes or
not, of either type.

Note that it is critical that you do NOT remove the last trailing
slash after a bare drive letter; the paths "C:" and "C:\" mean two
different directories.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]