svn commit: r291128 - head/usr.bin/m4

Baptiste Daroussin bapt at FreeBSD.org
Sat Nov 21 11:05:40 UTC 2015


Author: bapt
Date: Sat Nov 21 11:05:38 2015
New Revision: 291128
URL: https://svnweb.freebsd.org/changeset/base/291128

Log:
  Synchronize m4(1) with OpenBSD

Modified:
  head/usr.bin/m4/eval.c
  head/usr.bin/m4/extern.h
  head/usr.bin/m4/m4.1
  head/usr.bin/m4/main.c
  head/usr.bin/m4/mdef.h
  head/usr.bin/m4/pathnames.h

Modified: head/usr.bin/m4/eval.c
==============================================================================
--- head/usr.bin/m4/eval.c	Sat Nov 21 10:52:32 2015	(r291127)
+++ head/usr.bin/m4/eval.c	Sat Nov 21 11:05:38 2015	(r291128)
@@ -1,4 +1,4 @@
-/*	$OpenBSD: eval.c,v 1.73 2014/07/11 21:04:17 espie Exp $ */
+/*	$OpenBSD: eval.c,v 1.74 2015/02/05 12:59:57 millert Exp $	*/
 /*	$NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $	*/
 
 /*
@@ -48,8 +48,8 @@ __FBSDID("$FreeBSD$");
 #include <errno.h>
 #include <limits.h>
 #include <unistd.h>
-#include <stdint.h>
 #include <stdio.h>
+#include <stdint.h>
 #include <stdlib.h>
 #include <stddef.h>
 #include <string.h>

Modified: head/usr.bin/m4/extern.h
==============================================================================
--- head/usr.bin/m4/extern.h	Sat Nov 21 10:52:32 2015	(r291127)
+++ head/usr.bin/m4/extern.h	Sat Nov 21 11:05:38 2015	(r291128)
@@ -1,4 +1,4 @@
-/*	$OpenBSD: extern.h,v 1.54 2014/05/12 19:11:19 espie Exp $ */
+/*	$OpenBSD: extern.h,v 1.54 2014/05/12 19:11:19 espie Exp $	*/
 /*	$NetBSD: extern.h,v 1.3 1996/01/13 23:25:24 pk Exp $	*/
 
 /*-
@@ -112,7 +112,7 @@ extern void	usage(void);
 extern void	resizedivs(int);
 extern size_t	buffer_mark(void);
 extern void	dump_buffer(FILE *, size_t);
-extern void	m4errx(int, const char *, ...);
+extern void	__dead m4errx(int, const char *, ...);
 
 extern int	obtain_char(struct input_file *);
 extern void	set_input(struct input_file *, FILE *, const char *);

Modified: head/usr.bin/m4/m4.1
==============================================================================
--- head/usr.bin/m4/m4.1	Sat Nov 21 10:52:32 2015	(r291127)
+++ head/usr.bin/m4/m4.1	Sat Nov 21 11:05:38 2015	(r291128)
@@ -1,5 +1,5 @@
 .\"	$NetBSD: m4.1,v 1.23 2012/04/08 22:00:39 wiz Exp $
-.\"	@(#) $OpenBSD: m4.1,v 1.62 2014/04/14 07:00:47 jmc Exp $
+.\"	@(#) $OpenBSD: m4.1,v 1.63 2015/09/14 20:06:58 schwarze Exp $
 .\"
 .\" Copyright (c) 1989, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -33,7 +33,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd $Mdocdate: April 14 2014 $
+.Dd $Mdocdate: September 14 2015 $
 .Dt M4 1
 .Os
 .Sh NAME
@@ -98,9 +98,7 @@ recognized as special when not followed 
 .Pp
 The options are as follows:
 .Bl -tag -width Ds
-.It Fl D Ns Ar name Ns Oo
-.Pf = Ns Ar value
-.Oc
+.It Fl D Ns Ar name Ns Op = Ns Ar value
 Define the symbol
 .Ar name
 to have some value (or

Modified: head/usr.bin/m4/main.c
==============================================================================
--- head/usr.bin/m4/main.c	Sat Nov 21 10:52:32 2015	(r291127)
+++ head/usr.bin/m4/main.c	Sat Nov 21 11:05:38 2015	(r291128)
@@ -1,4 +1,4 @@
-/*	$OpenBSD: main.c,v 1.84 2014/12/21 09:33:12 espie Exp $	*/
+/*	$OpenBSD: main.c,v 1.86 2015/11/03 16:21:47 deraadt Exp $	*/
 /*	$NetBSD: main.c,v 1.12 1997/02/08 23:54:49 cgd Exp $	*/
 
 /*-
@@ -133,13 +133,7 @@ static struct keyblk keywrds[] = {	/* m4
 	{ "traceon",	  TRACEONTYPE | NOARGS },
 	{ "traceoff",	  TRACEOFFTYPE | NOARGS },
 
-#if defined(unix) || defined(__unix__)
 	{ "unix",         SELFTYPE | NOARGS },
-#else
-#ifdef vms
-	{ "vms",          SELFTYPE | NOARGS },
-#endif
-#endif
 };
 
 #define MAXKEYS	(sizeof(keywrds)/sizeof(struct keyblk))
@@ -477,14 +471,14 @@ macro(void)
 
 		default:
 			if (LOOK_AHEAD(t, scommt)) {
-				char *cp;
-				for (cp = scommt; *cp; cp++)
-					chrsave(*cp);
+				char *p;
+				for (p = scommt; *p; p++)
+					chrsave(*p);
 				for(;;) {
 					t = gpbc();
 					if (LOOK_AHEAD(t, ecommt)) {
-						for (cp = ecommt; *cp; cp++)
-							chrsave(*cp);
+						for (p = ecommt; *p; p++)
+							chrsave(*p);
 						break;
 					}
 					if (t == EOF)

Modified: head/usr.bin/m4/mdef.h
==============================================================================
--- head/usr.bin/m4/mdef.h	Sat Nov 21 10:52:32 2015	(r291127)
+++ head/usr.bin/m4/mdef.h	Sat Nov 21 11:05:38 2015	(r291128)
@@ -1,4 +1,4 @@
-/*	$OpenBSD: mdef.h,v 1.32 2014/12/21 09:33:12 espie Exp $	*/
+/*	$OpenBSD: mdef.h,v 1.33 2015/11/03 16:21:47 deraadt Exp $	*/
 /*	$NetBSD: mdef.h,v 1.7 1996/01/13 23:25:27 pk Exp $	*/
 
 /*
@@ -107,10 +107,6 @@
 #define SCOMMT          '#'
 #define ECOMMT          '\n'
 
-#ifdef msdos
-#define system(str)	(-1)
-#endif
-
 /*
  * other important constants
  */

Modified: head/usr.bin/m4/pathnames.h
==============================================================================
--- head/usr.bin/m4/pathnames.h	Sat Nov 21 10:52:32 2015	(r291127)
+++ head/usr.bin/m4/pathnames.h	Sat Nov 21 11:05:38 2015	(r291128)
@@ -1,4 +1,4 @@
-/*	$OpenBSD: pathnames.h,v 1.5 2003/06/03 02:56:10 millert Exp $	*/
+/*	$OpenBSD: pathnames.h,v 1.6 2015/11/03 16:21:47 deraadt Exp $	*/
 /*	$NetBSD: pathnames.h,v 1.6 1995/09/29 00:27:55 cgd Exp $	*/
 
 /*
@@ -36,22 +36,4 @@
  * $FreeBSD$
  */
 
-/*
- * Definitions of diversion files.  If the name of the file is changed,
- * adjust UNIQUE to point to the wildcard (*) character in the filename.
- */
-
-#ifdef msdos
-#define _PATH_DIVNAME	"\\M4*XXXXXX"		/* msdos diversion files */
-#define	UNIQUE		3			/* unique char location */
-#endif
-
-#if defined(unix) || defined(__NetBSD__) || defined(__OpenBSD__)
 #define _PATH_DIVNAME	"/tmp/m4.0XXXXXXXXXX"	/* unix diversion files */
-#define UNIQUE		8			/* unique char location */
-#endif
-
-#ifdef vms
-#define _PATH_DIVNAME	"sys$login:m4*XXXXXX"	/* vms diversion files */
-#define UNIQUE		12			/* unique char location */
-#endif


More information about the svn-src-head mailing list