[Midnightbsd-cvs] src [10776] trunk/usr.bin/xlint/xlint: sync with freebsd
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Jun 9 22:39:43 EDT 2018
Revision: 10776
http://svnweb.midnightbsd.org/src/?rev=10776
Author: laffer1
Date: 2018-06-09 22:39:42 -0400 (Sat, 09 Jun 2018)
Log Message:
-----------
sync with freebsd
Modified Paths:
--------------
trunk/usr.bin/xlint/xlint/Makefile
trunk/usr.bin/xlint/xlint/lint.1
trunk/usr.bin/xlint/xlint/pathnames.h
trunk/usr.bin/xlint/xlint/xlint.c
Property Changed:
----------------
trunk/usr.bin/xlint/xlint/lint.1
Modified: trunk/usr.bin/xlint/xlint/Makefile
===================================================================
--- trunk/usr.bin/xlint/xlint/Makefile 2018-06-10 02:39:06 UTC (rev 10775)
+++ trunk/usr.bin/xlint/xlint/Makefile 2018-06-10 02:39:42 UTC (rev 10776)
@@ -1,5 +1,6 @@
+# $MidnightBSD$
# $NetBSD: Makefile,v 1.2 1995/07/03 21:25:14 cgd Exp $
-# $MidnightBSD$
+# $FreeBSD: stable/10/usr.bin/xlint/xlint/Makefile 201725 2010-01-07 09:45:15Z dwmalone $
.PATH: ${.CURDIR}/../lint1
Modified: trunk/usr.bin/xlint/xlint/lint.1
===================================================================
--- trunk/usr.bin/xlint/xlint/lint.1 2018-06-10 02:39:06 UTC (rev 10775)
+++ trunk/usr.bin/xlint/xlint/lint.1 2018-06-10 02:39:42 UTC (rev 10776)
@@ -1,4 +1,5 @@
-.\" $NetBSD: lint.1,v 1.21 2002/01/03 04:25:18 thorpej Exp $
+.\" $MidnightBSD$
+.\" $NetBSD: lint.1,v 1.29 2004/01/26 21:59:42 wiz Exp $
.\"
.\" Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
.\" Copyright (c) 1994, 1995 Jochen Pohl
@@ -30,9 +31,9 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/usr.bin/xlint/xlint/lint.1 281168 2015-04-06 19:56:27Z pfg $
.\"
-.Dd May 24, 2001
+.Dd Mar 23, 2015
.Dt LINT 1
.Os
.Sh NAME
@@ -49,6 +50,7 @@
.Op Fl I Ar directory
.Op Fl d Ar directory
.Op Fl L Ar directory
+.Op Fl MD
.Op Fl l Ar library
.Op Fl o Ar outputfile
.Op Fl B Ar directory
@@ -269,6 +271,8 @@
flag,
.Dv __STRICT_ANSI__
is a predefined preprocessor macro.
+.It Fl S
+C9X mode. Currently not fully implemented.
.It Fl t
Traditional C mode.
.Dv __STDC__
@@ -369,6 +373,13 @@
.Nm
prints the name of the included file instead of the source file name
followed by a question mark.
+.It Fl MD
+Pass
+.Fl MD
+to
+.Xr cpp 1
+causing cpp to create files containing dependency information for
+each source file.
.It Fl o Ar outputfile
Name the output file
.Ar outputfile .
@@ -415,7 +426,7 @@
utility recognizes the following C comments as commands.
.Bl -tag -width indent
.It Li /* ARGSUSED Ns Ar n Li */
-makes
+Makes
.Nm
check only the first
.Ar n
Property changes on: trunk/usr.bin/xlint/xlint/lint.1
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.bin/xlint/xlint/pathnames.h
===================================================================
--- trunk/usr.bin/xlint/xlint/pathnames.h 2018-06-10 02:39:06 UTC (rev 10775)
+++ trunk/usr.bin/xlint/xlint/pathnames.h 2018-06-10 02:39:42 UTC (rev 10776)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: pathnames.h,v 1.3 1999/04/22 04:40:58 mrg Exp $ */
/*
@@ -30,7 +31,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.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/usr.bin/xlint/xlint/pathnames.h 92813 2002-03-20 18:25:50Z ru $
*/
/* directory where lint1 and lint2 reside */
Modified: trunk/usr.bin/xlint/xlint/xlint.c
===================================================================
--- trunk/usr.bin/xlint/xlint/xlint.c 2018-06-10 02:39:06 UTC (rev 10775)
+++ trunk/usr.bin/xlint/xlint/xlint.c 2018-06-10 02:39:42 UTC (rev 10776)
@@ -1,4 +1,5 @@
-/* $NetBSD: xlint.c,v 1.27 2002/01/31 19:09:33 tv Exp $ */
+/* $MidnightBSD$ */
+/* $NetBSD: xlint.c,v 1.36 2005/02/09 21:24:48 dsl Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -34,9 +35,9 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: xlint.c,v 1.27 2002/01/31 19:09:33 tv Exp $");
+__RCSID("$NetBSD: xlint.c,v 1.36 2005/02/09 21:24:48 dsl Exp $");
#endif
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/xlint/xlint/xlint.c 281168 2015-04-06 19:56:27Z pfg $");
#include <sys/param.h>
#include <sys/wait.h>
@@ -80,7 +81,7 @@
/* flags always passed to cc(1) */
static char **cflags;
-/* flags for cc(1), controled by sflag/tflag */
+/* flags for cc(1), controlled by sflag/tflag */
static char **lcflags;
/* flags for lint1 */
@@ -104,7 +105,7 @@
static char *libexec_path;
/* flags */
-static int iflag, oflag, Cflag, sflag, tflag, Fflag, dflag, Bflag;
+static int iflag, oflag, Cflag, sflag, tflag, Fflag, dflag, Bflag, Sflag;
/* print the commands executed to run the stages of compilation */
static int Vflag;
@@ -145,7 +146,7 @@
/*
* Some functions to deal with lists of strings.
- * Take care that we get no surprises in case of asyncron signals.
+ * Take care that we get no surprises in case of asynchronous signals.
*/
static void
appstrg(char ***lstp, char *s)
@@ -286,13 +287,13 @@
{
(void)fprintf(stderr,
- "usage: lint [-abceghprvwxzHF] [-s|-t] [-i|-nu] [-Dname[=def]]"
+ "usage: lint [-abceghprvwxzHFS] [-s|-t] [-i|-nu] [-Dname[=def]]"
" [-Uname] [-X <id>[,<id>]...\n");
(void)fprintf(stderr,
"\t[-Idirectory] [-Ldirectory] [-llibrary] [-ooutputfile]"
" file...\n");
(void)fprintf(stderr,
- " lint [-abceghprvwzHF] [-s|-t] -Clibrary [-Dname[=def]]\n"
+ " lint [-abceghprvwzHFS] [-s|-t] -Clibrary [-Dname[=def]]\n"
" [-X <id>[,<id>]...\n");
(void)fprintf(stderr, "\t[-Idirectory] [-Uname] [-Bpath] file"
" ...\n");
@@ -345,6 +346,9 @@
appcstrg(&cflags, "-U__GNUC__");
appcstrg(&cflags, "-undef");
#endif
+#if 0
+ appcstrg(&cflags, "-Wp,-$");
+#endif
appcstrg(&cflags, "-Wp,-C");
appcstrg(&cflags, "-Wcomment");
appcstrg(&cflags, "-D__LINT__");
@@ -359,8 +363,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:U:VX:")) != -1) {
+ while ((c = getopt(argc, argv, "abcd:eghil:no:prstuvwxzB:C:D:FHI:L:M:SU:VX:")) != -1) {
switch (c) {
case 'a':
@@ -426,6 +429,13 @@
sflag = 1;
break;
+ case 'S':
+ if (tflag)
+ usage();
+ appcstrg(&l1flags, "-S");
+ Sflag = 1;
+ break;
+
#if !HAVE_CONFIG_H
case 't':
if (sflag)
@@ -465,6 +475,7 @@
case 'D':
case 'I':
+ case 'M':
case 'U':
(void)sprintf(flgbuf, "-%c", c);
appstrg(&cflags, concat2(flgbuf, optarg));
More information about the Midnightbsd-cvs
mailing list