aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/xlint
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>1995-11-06 21:54:02 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>1995-11-06 21:54:02 +0000
commit6b024ad2a89b8cda6006cfce9be2f7a9a09e0624 (patch)
tree48742a465a7992b929339d68a7b5b297747e6097 /usr.bin/xlint
parentcc066d80c424babb2f42c2513535beb5c27d4e24 (diff)
downloadsrc-6b024ad2a89b8cda6006cfce9be2f7a9a09e0624.tar.gz
src-6b024ad2a89b8cda6006cfce9be2f7a9a09e0624.zip
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...
Notes
Notes: svn path=/head/; revision=12134
Diffstat (limited to 'usr.bin/xlint')
-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 32c80c4cd53f..c2be198e8b9a 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 41c833ca15d7..c172fc411f2e 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 3e577974d69c..852fd0120ad3 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;