mirror of
https://git.savannah.gnu.org/git/make.git
synced 2024-12-29 08:09:02 +00:00
(lookup_file) [HAVE_DOS_PATHS]: Treat '\\' like we do with '/'.
This commit is contained in:
parent
f4d9937274
commit
deace771d6
1 changed files with 12 additions and 2 deletions
14
file.c
14
file.c
|
@ -103,10 +103,20 @@ lookup_file (const char *name)
|
|||
while (name[0] == '[' && name[1] == ']' && name[2] != '\0')
|
||||
name += 2;
|
||||
#endif
|
||||
while (name[0] == '.' && name[1] == '/' && name[2] != '\0')
|
||||
while (name[0] == '.'
|
||||
#ifdef HAVE_DOS_PATHS
|
||||
&& (name[1] == '/' || name[1] == '\\')
|
||||
#else
|
||||
&& name[1] == '/'
|
||||
#endif
|
||||
&& name[2] != '\0')
|
||||
{
|
||||
name += 2;
|
||||
while (*name == '/')
|
||||
while (*name == '/'
|
||||
#ifdef HAVE_DOS_PATHS
|
||||
|| *name == '\\'
|
||||
#endif
|
||||
)
|
||||
/* Skip following slashes: ".//foo" is "foo", not "/foo". */
|
||||
++name;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue