Commit 03bf1c28 by Mumit Khan Committed by Jeff Law

gcc.c (lookup_compiler): Make multiple passes for case insensitive filesystems.

        * gcc.c (lookup_compiler): Make multiple passes for case
        insensitive filesystems.

From-SVN: r33393
parent dfb99c83
Mon Apr 24 17:34:18 2000 Mumit Khan <khan@xraylith.wisc.edu>
* gcc.c (lookup_compiler): Make multiple passes for case
insensitive filesystems.
2000-04-24 Neil Booth <NeilB@earthling.net> 2000-04-24 Neil Booth <NeilB@earthling.net>
* cpphash.c: replace HSPACE_BEFORE with PREV_WHITESPACE. * cpphash.c: replace HSPACE_BEFORE with PREV_WHITESPACE.
......
...@@ -5638,17 +5638,33 @@ lookup_compiler (name, length, language) ...@@ -5638,17 +5638,33 @@ lookup_compiler (name, length, language)
(!strcmp (cp->suffix, "-") && !strcmp (name, "-")) (!strcmp (cp->suffix, "-") && !strcmp (name, "-"))
|| (strlen (cp->suffix) < length || (strlen (cp->suffix) < length
/* See if the suffix matches the end of NAME. */ /* See if the suffix matches the end of NAME. */
#ifdef OS2 && !strcmp (cp->suffix,
name + length - strlen (cp->suffix))
))
break;
}
#if defined (OS2) ||defined (HAVE_DOS_BASED_FILE_SYSTEM)
/* look again, but case-insensitively this time. */
if (cp < compilers)
for (cp = compilers + n_compilers - 1; cp >= compilers; cp--)
{
if (/* The suffix `-' matches only the file name `-'. */
(!strcmp (cp->suffix, "-") && !strcmp (name, "-"))
|| (strlen (cp->suffix) < length
/* See if the suffix matches the end of NAME. */
&& ((!strcmp (cp->suffix, && ((!strcmp (cp->suffix,
name + length - strlen (cp->suffix)) name + length - strlen (cp->suffix))
|| !strpbrk (cp->suffix, "ABCDEFGHIJKLMNOPQRSTUVWXYZ")) || !strpbrk (cp->suffix, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"))
&& !strcasecmp (cp->suffix, && !strcasecmp (cp->suffix,
name + length - strlen (cp->suffix))) name + length - strlen (cp->suffix)))
#else
&& !strcmp (cp->suffix,
name + length - strlen (cp->suffix))
#endif
)) ))
break;
}
#endif
if (cp >= compilers)
{ {
if (cp->spec[0][0] == '@') if (cp->spec[0][0] == '@')
{ {
...@@ -5670,7 +5686,6 @@ lookup_compiler (name, length, language) ...@@ -5670,7 +5686,6 @@ lookup_compiler (name, length, language)
/* A non-alias entry: return it. */ /* A non-alias entry: return it. */
return cp; return cp;
} }
}
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment