summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
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