diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2011-06-09 15:19:04 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2011-06-09 15:19:04 +0000 |
commit | e9d3ba74175b7b84330ac8f2e5579b257f768ffb (patch) | |
tree | e8c24817502350b394532c971d587a426fb7d31e /usr.bin | |
parent | dd769974ecea4185abd4b3cdf4e34852eaf4cbf5 (diff) |
Accept and ignore -M so we can pass the same CPPFLAGS to lint and cpp.
Makes the kernel lint target work again.
ok martynas@, with input from guenther@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/xlint/xlint/lint.1 | 11 | ||||
-rw-r--r-- | usr.bin/xlint/xlint/xlint.c | 13 |
2 files changed, 17 insertions, 7 deletions
diff --git a/usr.bin/xlint/xlint/lint.1 b/usr.bin/xlint/xlint/lint.1 index 20ba665c386..8e9fd24a008 100644 --- a/usr.bin/xlint/xlint/lint.1 +++ b/usr.bin/xlint/xlint/lint.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: lint.1,v 1.26 2007/09/05 19:31:21 jmc Exp $ +.\" $OpenBSD: lint.1,v 1.27 2011/06/09 15:19:03 jsg Exp $ .\" $NetBSD: lint.1,v 1.3 1995/10/23 13:45:31 jpo Exp $ .\" .\" Copyright (c) 1994, 1995 Jochen Pohl @@ -30,7 +30,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: September 5 2007 $ +.Dd $Mdocdate: June 9 2011 $ .Dt LINT 1 .Os .Sh NAME @@ -44,6 +44,7 @@ .Op Fl I Ns Ar directory .Op Fl L Ns Ar directory .Op Fl l Ns Ar library +.Op Fl MD .Op Fl o Ns Ar outputfile .Op Fl U Ns Ar name .Ar @@ -52,6 +53,7 @@ .Fl C Ns Ar library .Op Fl D Ns Ar name Ns Op =def .Op Fl I Ns Ar directory +.Op Fl MD .Op Fl U Ns Ar name .Ar .Sh DESCRIPTION @@ -244,6 +246,11 @@ before searching the standard place. .It Fl l Ns Ar library Include the lint library .Pa llib-l Ns Ar library Ns Pa \&.ln . +.It Fl MD +Ignored, so the same flags can be passed to +.Nm lint +and +.Xr cpp 1 . .It Fl n Do not check compatibility against the standard library. .It Fl o Ns Ar outputfile diff --git a/usr.bin/xlint/xlint/xlint.c b/usr.bin/xlint/xlint/xlint.c index 71e53bd93db..979f318eee5 100644 --- a/usr.bin/xlint/xlint/xlint.c +++ b/usr.bin/xlint/xlint/xlint.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xlint.c,v 1.34 2010/02/03 20:46:31 miod Exp $ */ +/* $OpenBSD: xlint.c,v 1.35 2011/06/09 15:19:03 jsg Exp $ */ /* $NetBSD: xlint.c,v 1.3 1995/10/23 14:29:30 jpo Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: xlint.c,v 1.34 2010/02/03 20:46:31 miod Exp $"; +static char rcsid[] = "$OpenBSD: xlint.c,v 1.35 2011/06/09 15:19:03 jsg Exp $"; #endif #include <sys/param.h> @@ -266,9 +266,9 @@ static void usage() { (void)printf("usage: lint [-ceFfgHhprsVvxz] [-i | -nu] [-Dname[=def]] [-Idirectory]\n"); - (void)printf("\t[-Ldirectory] [-llibrary] [-ooutputfile] [-Uname] file ...\n"); + (void)printf("\t[-Ldirectory] [-llibrary] [-ooutputfile] [-MD] [-Uname] file ...\n"); (void)printf(" lint [-ceFfgHhprsVvz] -Clibrary [-Dname[=def]]\n"); - (void)printf("\t[-Idirectory] [-Uname] file ...\n"); + (void)printf("\t[-Idirectory] [-MD] [-Uname] file ...\n"); terminate(-1); } @@ -355,7 +355,7 @@ main(int argc, char *argv[]) (void)signal(SIGTERM, terminate); while (argc > optind) { - c = getopt(argc, argv, "abcefghil:no:prstuvxyzC:D:FHI:L:U:V"); + c = getopt(argc, argv, "abcefghil:no:prstuvxyzC:D:FHI:L:M:U:V"); switch (c) { @@ -463,6 +463,9 @@ main(int argc, char *argv[]) appcstrg(&libsrchpath, optarg); break; + case 'M': + break; + case 'H': appcstrg(&l2flags, "-H"); break; |