diff options
| author | Ian Dowse <iedowse@FreeBSD.org> | 2002-09-01 12:49:27 +0000 |
|---|---|---|
| committer | Ian Dowse <iedowse@FreeBSD.org> | 2002-09-01 12:49:27 +0000 |
| commit | 83c5a3b5838ba648b7783d7f84f12168304030bd (patch) | |
| tree | 03e08cd265b9e2dbc8a296da6d8f73fbddf117dc /usr.bin | |
| parent | 55131267b615db277dbb30d93f204b2b30ef3bf3 (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/xlint/xlint/xlint.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/xlint/xlint/xlint.c b/usr.bin/xlint/xlint/xlint.c index a694ff425b870..f7d0d9825fee1 100644 --- a/usr.bin/xlint/xlint/xlint.c +++ b/usr.bin/xlint/xlint/xlint.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include <sys/wait.h> #include <sys/stat.h> #include <sys/utsname.h> +#include <err.h> #include <errno.h> #include <fcntl.h> #include <paths.h> @@ -583,7 +584,7 @@ static void fname(const char *name) { const char *bn, *suff; - char **args, *ofn, *pathname, *CC; + char **args, *ofn, *p, *pathname; size_t len; int is_stdin; int fd; @@ -643,10 +644,13 @@ fname(const char *name) if (getenv("CC") == NULL) { pathname = xmalloc(strlen(PATH_USRBIN) + sizeof ("/cc")); (void)sprintf(pathname, "%s/cc", PATH_USRBIN); - } else + appcstrg(&args, pathname); + } else { pathname = strdup(getenv("CC")); + for (p = strtok(pathname, " \t"); p; p = strtok(NULL, " \t")) + appcstrg(&args, p); + } - appcstrg(&args, pathname); applst(&args, cflags); applst(&args, lcflags); appcstrg(&args, name); |
