Commit 56488666 by Zack Weinberg Committed by Zack Weinberg

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
parent 07fd50ea
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));
strcpy ((char *)ih->name, name);
ih->foundhere = path;
if (path == ABSOLUTE_PATH)
ih->nshort = ih->name;
{
ih = (IHASH *) xmalloc (sizeof (IHASH) + strlen (name));
ih->nshort = ih->name;
}
else
ih->nshort = strstr (ih->name, fname);
{
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;
ih->control_macro = NULL;
ih->hash = dummy.hash;
......
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