mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-21 00:30:05 +08:00
* cppfiles.c (search_from): Special case the empty string.
From-SVN: r40236
This commit is contained in:
parent
7868b4a252
commit
04c8d9b90a
@ -1,3 +1,7 @@
|
||||
2001-03-04 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* cppfiles.c (search_from): Special case the empty string.
|
||||
|
||||
2001-03-04 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* cppfiles.c (_cpp_execute_include): Don't make a null-terminated
|
||||
|
@ -804,7 +804,11 @@ search_from (pfile, inc)
|
||||
if (CPP_OPTION (pfile, ignore_srcdir))
|
||||
return CPP_OPTION (pfile, quote_include);
|
||||
|
||||
dlen = basename (inc->name) - inc->name;
|
||||
/* basename () on Solaris returns "." for an empty string. */
|
||||
dlen = 0;
|
||||
if (inc->name[0] != '\0')
|
||||
dlen = basename (inc->name) - inc->name;
|
||||
|
||||
if (dlen)
|
||||
{
|
||||
/* We don't guarantee NAME is null-terminated. This saves
|
||||
|
Loading…
Reference in New Issue
Block a user