+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
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