Changes by Kazuhiro Fujieda <fujieda@jaist.ac.jp>

* assert.cc (__assert): Reduce dependency on newlib.
        * exec.cc: Eliminate unnecessary inclusion of ctype.h.
        * glob.c: Ditto.
        * hinfo.cc: Ditto.
        * init.cc: Ditto.
        * strace.cc: Ditto.
        * tty.cc: Ditto.
        * grp.cc (parse_grp): Eliminate atoi.
        * passwd.cc (grab_int): Ditto.
        * grp.cc (getgroups): Eliminate str{n,}casecmp.
        * path.cc (get_raw_device_number): Ditto.
        * path.cc (sort_by_native_name): Ditto.
        * spawn.cc (iscmd): Ditto.
        * uinfo.cc (internal_getlogin): Ditto.
This commit is contained in:
Corinna Vinschen
2000-07-01 17:30:35 +00:00
parent 51b2ec5d03
commit ebbd4e8fb3
13 changed files with 31 additions and 21 deletions

View File

@ -169,7 +169,7 @@ iscmd (const char *argv0, const char *what)
n = strlen (argv0) - strlen (what);
if (n >= 2 && argv0[1] != ':')
return 0;
return n >= 0 && strcasecmp (argv0 + n, what) == 0 &&
return n >= 0 && strcasematch (argv0 + n, what) &&
(n == 0 || isdirsep (argv0[n - 1]));
}