summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1995-11-06 21:54:02 +0000
committerjoerg <joerg@FreeBSD.org>1995-11-06 21:54:02 +0000
commitd6d7d9de0fa03f3517873e8b7fde93f8fae1b0bc (patch)
tree48742a465a7992b929339d68a7b5b297747e6097 /usr.bin
parenta9b815ff73f7fe3a2a7152c150d90f3d4ec87c08 (diff)
downloadFreeBSD-src-d6d7d9de0fa03f3517873e8b7fde93f8fae1b0bc.zip
FreeBSD-src-d6d7d9de0fa03f3517873e8b7fde93f8fae1b0bc.tar.gz
Well, Jochen adopted most of my submissions. So only the different
style of error reporting (i prefer gcc style to be consistent with the compiler) is left, plus a minor nit he's most likely been overlooking. There are still problems with bootstrapping, and you should expect troubles when linting libc...
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/xlint/lint1/err.c8
-rw-r--r--usr.bin/xlint/xlint/Makefile2
-rw-r--r--usr.bin/xlint/xlint/xlint.c7
3 files changed, 12 insertions, 5 deletions
diff --git a/usr.bin/xlint/lint1/err.c b/usr.bin/xlint/lint1/err.c
index 32c80c4..c2be198 100644
--- a/usr.bin/xlint/lint1/err.c
+++ b/usr.bin/xlint/lint1/err.c
@@ -399,7 +399,7 @@ verror(n, ap)
const char *fn;
fn = basename(curr_pos.p_file);
- (void)printf("%s(%d): ", fn, curr_pos.p_line);
+ (void)printf("%s:%d: ", fn, curr_pos.p_line);
(void)vprintf(msgs[n], ap);
(void)printf("\n");
nerr++;
@@ -417,7 +417,7 @@ vwarning(n, ap)
return;
fn = basename(curr_pos.p_file);
- (void)printf("%s(%d): warning: ", fn, curr_pos.p_line);
+ (void)printf("%s:%d: warning: ", fn, curr_pos.p_line);
(void)vprintf(msgs[n], ap);
(void)printf("\n");
}
@@ -460,7 +460,7 @@ lerror(msg, va_alist)
va_start(ap);
#endif
fn = basename(curr_pos.p_file);
- (void)fprintf(stderr, "%s(%d): lint error: ", fn, curr_pos.p_line);
+ (void)fprintf(stderr, "%s:%d: lint error: ", fn, curr_pos.p_line);
(void)vfprintf(stderr, msg, ap);
(void)fprintf(stderr, "\n");
va_end(ap);
@@ -505,7 +505,7 @@ message(n, va_alist)
va_start(ap);
#endif
fn = basename(curr_pos.p_file);
- (void)printf("%s(%d): ", fn, curr_pos.p_line);
+ (void)printf("%s:%d: ", fn, curr_pos.p_line);
(void)vprintf(msgs[n], ap);
(void)printf("\n");
va_end(ap);
diff --git a/usr.bin/xlint/xlint/Makefile b/usr.bin/xlint/xlint/Makefile
index 41c833c..c172fc4 100644
--- a/usr.bin/xlint/xlint/Makefile
+++ b/usr.bin/xlint/xlint/Makefile
@@ -4,7 +4,7 @@
PROG= xlint
SRCS= xlint.c mem.c
-MAN= lint.1
+MAN1= lint.1
CFLAGS+=-I${.CURDIR}/../lint1
diff --git a/usr.bin/xlint/xlint/xlint.c b/usr.bin/xlint/xlint/xlint.c
index 3e57797..852fd01 100644
--- a/usr.bin/xlint/xlint/xlint.c
+++ b/usr.bin/xlint/xlint/xlint.c
@@ -325,7 +325,12 @@ main(argc, argv)
appcstrg(&cppflags, "-$");
appcstrg(&cppflags, "-C");
appcstrg(&cppflags, "-Wcomment");
+#if defined (__FreeBSD__) && (__FreeBSD__ == 2)
+ appcstrg(&cppflags, "-D__FreeBSD__=2");
+#else
+# error "This ain't NetBSD. You lose!"
appcstrg(&cppflags, "-D__NetBSD__");
+#endif
appcstrg(&cppflags, "-Dlint"); /* XXX don't def. with -s */
appdef(&cppflags, "lint");
appdef(&cppflags, "unix");
@@ -422,7 +427,9 @@ main(argc, argv)
freelst(&lcppflgs);
appcstrg(&lcppflgs, "-traditional");
appstrg(&lcppflgs, concat2("-D", MACHINE));
+#ifdef MACHINE_ARCH
appstrg(&lcppflgs, concat2("-D", MACHINE_ARCH));
+#endif
appcstrg(&l1flags, "-t");
appcstrg(&l2flags, "-t");
tflag = 1;
OpenPOWER on IntegriCloud