cppfiles.c (search_from): Use lbasename.

* cppfiles.c (search_from): Use lbasename.
	* mkdeps.c (deps_add_default_target): Use lbasename.

From-SVN: r40364
This commit is contained in:
Neil Booth 2001-03-10 10:43:52 +00:00 committed by Neil Booth
parent 2b757d5101
commit 2251fd7866
3 changed files with 7 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
* cppfiles.c (search_from): Use lbasename.
* mkdeps.c (deps_add_default_target): Use lbasename.
2001-03-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2001-03-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* fixinc/server.c (load_data, run_shell): Use xmalloc, xrealloc & * fixinc/server.c (load_data, run_shell): Use xmalloc, xrealloc &

View File

@ -804,11 +804,7 @@ search_from (pfile, inc)
if (CPP_OPTION (pfile, ignore_srcdir)) if (CPP_OPTION (pfile, ignore_srcdir))
return CPP_OPTION (pfile, quote_include); return CPP_OPTION (pfile, quote_include);
/* basename () on Solaris returns "." for an empty string. */ dlen = lbasename (inc->name) - inc->name;
dlen = 0;
if (inc->name[0] != '\0')
dlen = basename (inc->name) - inc->name;
if (dlen) if (dlen)
{ {
/* We don't guarantee NAME is null-terminated. This saves /* We don't guarantee NAME is null-terminated. This saves

View File

@ -191,7 +191,7 @@ deps_add_default_target (d, tgt)
#ifndef OBJECT_SUFFIX #ifndef OBJECT_SUFFIX
# define OBJECT_SUFFIX ".o" # define OBJECT_SUFFIX ".o"
#endif #endif
char *start = basename (tgt); char *start = lbasename (tgt);
char *o = (char *) alloca (strlen (start) + strlen (OBJECT_SUFFIX) + 1); char *o = (char *) alloca (strlen (start) + strlen (OBJECT_SUFFIX) + 1);
char *suffix; char *suffix;