Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/xlint Now that we use cc -E, -U__GNUC__ to avo...



details:   https://anonhg.NetBSD.org/src/rev/f488f3c4b3b8
branches:  trunk
changeset: 472604:f488f3c4b3b8
user:      christos <christos%NetBSD.org@localhost>
date:      Mon May 03 15:23:27 1999 +0000

description:
Now that we use cc -E, -U__GNUC__ to avoid gnu extensions. Nuke the
__attribute__ and __extension__ workarounds.
Our invariant is: No gcc extensions if __GNUC__ is not defined, so lint
should not be playing around trying to pretend it is gcc.

diffstat:

 usr.bin/xlint/xlint/xlint.c |  22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diffs (52 lines):

diff -r 636d01353dfc -r f488f3c4b3b8 usr.bin/xlint/xlint/xlint.c
--- a/usr.bin/xlint/xlint/xlint.c       Mon May 03 15:20:28 1999 +0000
+++ b/usr.bin/xlint/xlint/xlint.c       Mon May 03 15:23:27 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xlint.c,v 1.11 1999/04/29 12:40:39 christos Exp $      */
+/*     $NetBSD: xlint.c,v 1.12 1999/05/03 15:23:27 christos Exp $      */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: xlint.c,v 1.11 1999/04/29 12:40:39 christos Exp $");
+__RCSID("$NetBSD: xlint.c,v 1.12 1999/05/03 15:23:27 christos Exp $");
 #endif
 
 #include <sys/param.h>
@@ -282,11 +282,15 @@
 static void
 usage()
 {
-       (void)printf("lint [-abceghprvxzHF] [-s|-t] [-i|-nu] [-Dname[=def]] [-Uname]\n");
-       (void)printf("     [-Idirectory] [-Ldirectory] [-llibrary] [-ooutputfile] file ...\n");
-       (void)printf("\n");
-       (void)printf("lint [-abceghprvzHF] [-s|-t] -Clibrary [-Dname[=def]]\n");
-       (void)printf("     [-Idirectory] [-Uname] file ...\n");
+       extern char *__progname;
+       (void)fprintf(stderr,
+    "Usage: %s [-abceghprvxzHF] [-s|-t] [-i|-nu] [-Dname[=def]] [-Uname]\n",
+           __progname);
+       (void)fprintf(stderr, 
+    "\t[-Idirectory] [-Ldirectory] [-llibrary] [-ooutputfile] file ...\n\n");
+       (void)fprintf(stderr,
+    "%s [-abceghprvzHF] [-s|-t] -Clibrary [-Dname[=def]]\n", __progname);
+       (void)fprintf(stderr, "\t[-Idirectory] [-Uname] file ...\n");
        terminate(-1);
 }
 
@@ -330,8 +334,12 @@
        appcstrg(&cflags, "-E");
        appcstrg(&cflags, "-x");
        appcstrg(&cflags, "c");
+#if 0
        appcstrg(&cflags, "-D__attribute__(x)=");
        appcstrg(&cflags, "-D__extension__(x)=/*NOSTRICT*/0");
+#else
+       appcstrg(&cflags, "-U__GNUC__");
+#endif
        appcstrg(&cflags, "-Wp,-$");
        appcstrg(&cflags, "-Wp,-CC");
        appcstrg(&cflags, "-Wcomment");



Home | Main Index | Thread Index | Old Index