[Patch] [mingw32] fix regresion with trailing backslashes in -I include dir
Zack Weinberg
zack@codesourcery.com
Sat May 29 13:45:00 GMT 2004
Danny Smith <dannysmith@clear.net.nz> writes:
> Hello,
>
> On mingw32, with a command-line -I include option ending with a
> backslash gcc fails to recognise an existing directory. For example,
> '-I..\include\' reports a non-existent directory while '-I..\include' works.
> This is a regression from 3.3.3 and is observed on both 3.4 and and
> trunk.
>
> Trailing forward slashes cause no problems.
>
> For some strange reason, the stat function in MS runtime accepts
> POSIX-style '/' but not DOS-style '\\' as final character for a
> directory name
...
> * c-incpath.c (add_path): Canonicalize paths to use '/' if
> HAVE_DOS_BASED_FILESYSTEM.
This is OK, but please add a comment explaining what you just
discovered, so someone doesn't take it back out again.
zw
More information about the Gcc-patches
mailing list