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 Use -Z to pass arguments to ccp(1) direc...
details: https://anonhg.NetBSD.org/src/rev/f8d7a0506e44
branches: trunk
changeset: 1010352:f8d7a0506e44
user: christos <christos%NetBSD.org@localhost>
date: Sat May 23 17:28:27 2020 +0000
description:
Use -Z to pass arguments to ccp(1) directly. Can be used as:
-Z-include -Zfile.h
diffstat:
usr.bin/xlint/xlint/lint.1 | 16 ++++++++++++++--
usr.bin/xlint/xlint/xlint.c | 14 +++++++++-----
2 files changed, 23 insertions(+), 7 deletions(-)
diffs (105 lines):
diff -r 40538109b4a0 -r f8d7a0506e44 usr.bin/xlint/xlint/lint.1
--- a/usr.bin/xlint/xlint/lint.1 Sat May 23 17:26:32 2020 +0000
+++ b/usr.bin/xlint/xlint/lint.1 Sat May 23 17:28:27 2020 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: lint.1,v 1.39 2016/12/25 11:10:53 wiz Exp $
+.\" $NetBSD: lint.1,v 1.40 2020/05/23 17:28:27 christos Exp $
.\"
.\" Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
.\" 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 December 24, 2016
+.Dd May 23, 2020
.Dt LINT 1
.Os
.Sh NAME
@@ -51,6 +51,7 @@
.Op Fl o Ar outputfile
.Op Fl U Ar name
.Op Fl X Ar id Ns Op ,id ...
+.Op Fl Z Ar cpparg
.Ar
.Nm lint
.Op Fl abceFgHhprVvwz
@@ -64,6 +65,7 @@
.Op Fl R Ar old=new
.Op Fl U Ar name
.Op Fl X Ar id Ns Op ,id ...
+.Op Fl Z Ar cpparg
.Ar
.Sh DESCRIPTION
.Nm
@@ -413,6 +415,16 @@
Report variables referred to by
.Sy extern
declarations, but never used.
+.It Fl Z Ar cpparg
+Pass
+.Ar cpparg
+to
+.Xr cpp 1
+directly.
+Multiple
+.Fl Z
+.Ar cppargs
+can passed in the order they are received.
.It Fl z
Do not complain about structures that are never defined
(for example, using a structure pointer without knowing
diff -r 40538109b4a0 -r f8d7a0506e44 usr.bin/xlint/xlint/xlint.c
--- a/usr.bin/xlint/xlint/xlint.c Sat May 23 17:26:32 2020 +0000
+++ b/usr.bin/xlint/xlint/xlint.c Sat May 23 17:28:27 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xlint.c,v 1.49 2020/02/10 04:54:01 christos Exp $ */
+/* $NetBSD: xlint.c,v 1.50 2020/05/23 17:28:27 christos Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: xlint.c,v 1.49 2020/02/10 04:54:01 christos Exp $");
+__RCSID("$NetBSD: xlint.c,v 1.50 2020/05/23 17:28:27 christos Exp $");
#endif
#include <sys/param.h>
@@ -291,13 +291,13 @@
(void)fprintf(stderr,
"Usage: %s [-abceghprvwxzHFS] [-s|-t] [-i|-nu] [-Dname[=def]]"
- " [-Uname] [-X <id>[,<id>]...\n", getprogname());
+ " [-Uname] [-X <id>[,<id>]... [-Z <cpparg>]\n", getprogname());
(void)fprintf(stderr,
"\t[-Idirectory] [-Ldirectory] [-llibrary] [-ooutputfile]"
" file...\n");
(void)fprintf(stderr,
" %s [-abceghprvwzHFS] [|-s|-t] -Clibrary [-Dname[=def]]\n"
- " [-X <id>[,<id>]...\n", getprogname());
+ " [-X <id>[,<id>]... [-Z <cpparg>]\n", getprogname());
(void)fprintf(stderr, "\t[-Idirectory] [-Uname] [-Bpath] [-R old=new]"
" file ...\n");
terminate(-1);
@@ -370,7 +370,7 @@
(void)signal(SIGINT, terminate);
(void)signal(SIGQUIT, terminate);
(void)signal(SIGTERM, terminate);
- while ((c = getopt(argc, argv, "abcd:eghil:no:prstuvwxzB:C:D:FHI:L:M:PR:SU:VX:")) != -1) {
+ while ((c = getopt(argc, argv, "abcd:eghil:no:prstuvwxzB:C:D:FHI:L:M:PR:SU:VX:Z:")) != -1) {
switch (c) {
case 'a':
@@ -523,6 +523,10 @@
Vflag = 1;
break;
+ case 'Z':
+ appcstrg(&cflags, optarg);
+ break;
+
default:
usage();
/* NOTREACHED */
Home |
Main Index |
Thread Index |
Old Index