mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-20 04:38:58 +08:00
cppfiles.c (find_include_file): Don't assume nshort is a substring of name.
* cppfiles.c (find_include_file): Don't assume nshort is a substring of name. From-SVN: r32533
This commit is contained in:
parent
07fd50eab4
commit
5648866613
@ -1,3 +1,8 @@
|
||||
2000-03-14 Zack Weinberg <zack@wolery.cumb.org>
|
||||
|
||||
* cppfiles.c (find_include_file): Don't assume nshort is a
|
||||
substring of name.
|
||||
|
||||
Tue Mar 14 08:42:21 2000 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* configure.in (hppa configurations): Add pa32-regs.h to the
|
||||
|
@ -257,13 +257,20 @@ find_include_file (pfile, fname, search_start, ihash, before)
|
||||
if (f == -1)
|
||||
return -1;
|
||||
|
||||
ih = (IHASH *) xmalloc (sizeof (IHASH) + strlen (name));
|
||||
if (path == ABSOLUTE_PATH)
|
||||
{
|
||||
ih = (IHASH *) xmalloc (sizeof (IHASH) + strlen (name));
|
||||
ih->nshort = ih->name;
|
||||
}
|
||||
else
|
||||
{
|
||||
ih = (IHASH *) xmalloc (sizeof (IHASH) + strlen (name)
|
||||
+ strlen (fname) + 1);
|
||||
ih->nshort = ih->name + strlen (fname) + 1;
|
||||
strcpy ((char *)ih->nshort, fname);
|
||||
}
|
||||
strcpy ((char *)ih->name, name);
|
||||
ih->foundhere = path;
|
||||
if (path == ABSOLUTE_PATH)
|
||||
ih->nshort = ih->name;
|
||||
else
|
||||
ih->nshort = strstr (ih->name, fname);
|
||||
ih->control_macro = NULL;
|
||||
ih->hash = dummy.hash;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user