FreeBSD prior to 4.4-RELEASE and older versions of 5.0-CURRENT do

not have setprogname(3) and getprogname(3), and we need to build
lint(1) as a cross-tool to bootstrap.  Versions from lib/libc/gen
can't be compiled either.

PR:		bin/36747
This commit is contained in:
Ruslan Ermilov 2002-04-07 16:53:47 +00:00
parent cea1dfbfb8
commit ff9ed61c93
2 changed files with 6 additions and 10 deletions

View File

@ -35,6 +35,7 @@
#if defined(__RCSID) && !defined(lint)
__RCSID("$NetBSD: main1.c,v 1.11 2002/01/29 02:43:38 tv Exp $");
#endif
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <stdio.h>
@ -123,8 +124,6 @@ main(int argc, char *argv[])
int c;
char *ptr;
setprogname(argv[0]);
ERR_ZERO(&msgset);
while ((c = getopt(argc, argv, "abcdeghmprstuvwyzFX:")) != -1) {
switch (c) {
@ -209,8 +208,7 @@ static void
usage(void)
{
(void)fprintf(stderr,
"Usage: %s [-abcdeghmprstuvwyzF] [-X <id>[,<id>]... src dest\n",
getprogname());
"Usage: lint1 [-abcdeghmprstuvwyzF] [-X <id>[,<id>]... src dest\n");
exit(1);
}

View File

@ -283,14 +283,14 @@ usage(void)
{
(void)fprintf(stderr,
"Usage: %s [-abceghprvwxzHF] [-s|-t] [-i|-nu] [-Dname[=def]]"
" [-Uname] [-X <id>[,<id>]...\n", getprogname());
"Usage: lint [-abceghprvwxzHF] [-s|-t] [-i|-nu] [-Dname[=def]]"
" [-Uname] [-X <id>[,<id>]...\n");
(void)fprintf(stderr,
"\t[-Idirectory] [-Ldirectory] [-llibrary] [-ooutputfile]"
" file...\n");
(void)fprintf(stderr,
" %s [-abceghprvwzHF] [-s|-t] -Clibrary [-Dname[=def]]\n"
" [-X <id>[,<id>]...\n", getprogname());
" lint [-abceghprvwzHF] [-s|-t] -Clibrary [-Dname[=def]]\n"
" [-X <id>[,<id>]...\n");
(void)fprintf(stderr, "\t[-Idirectory] [-Uname] [-Bpath] file"
" ...\n");
terminate(-1);
@ -304,8 +304,6 @@ main(int argc, char *argv[])
char flgbuf[3], *tmp, *s;
size_t len;
setprogname(argv[0]);
if ((tmp = getenv("TMPDIR")) == NULL || (len = strlen(tmp)) == 0) {
tmpdir = xstrdup(_PATH_TMP);
} else {