From 74bdcccfff783fbf66c95dd7d668c36d6d043596 Mon Sep 17 00:00:00 2001
From: Sascha Wildner <saw@online.de>
Date: Tue, 20 Aug 2019 10:35:24 +0200
Subject: [PATCH 3/3] Adjust world for byacc upgrade.

---
 bin/expr/expr.y               | 1 -
 games/atc/grammar.y           | 3 ---
 libexec/dma/aliases_parse.y   | 1 -
 libexec/ftpd/ftpcmd.y         | 3 +--
 usr.bin/localedef/Makefile    | 1 +
 usr.bin/localedef/localedef.h | 1 -
 usr.bin/localedef/scanner.c   | 1 +
 usr.bin/m4/parser.y           | 1 -
 usr.bin/mkcsmapper/ldef.h     | 1 -
 usr.bin/mkcsmapper/lex.l      | 2 --
 usr.bin/mkesdb/yacc.y         | 2 --
 usr.sbin/bthcid/parser.y      | 3 ---
 usr.sbin/config/config.y      | 3 ---
 usr.sbin/ndiscvt/inf-parse.y  | 1 -
 usr.sbin/rrenumd/Makefile     | 2 +-
 usr.sbin/tcpdump/config.h     | 2 +-
 16 files changed, 5 insertions(+), 23 deletions(-)

diff --git a/bin/expr/expr.y b/bin/expr/expr.y
index 684483a824..31396d835b 100644
--- a/bin/expr/expr.y
+++ b/bin/expr/expr.y
@@ -59,7 +59,6 @@ struct val	*op_times (struct val *, struct val *);
 quad_t		to_integer (struct val *);
 void		to_string (struct val *);
 int		yyerror (const char *) __dead2;
-int		yylex (void);
 
 char **av;
 %}
diff --git a/games/atc/grammar.y b/games/atc/grammar.y
index 2ee9d0c268..626e97ee39 100644
--- a/games/atc/grammar.y
+++ b/games/atc/grammar.y
@@ -30,7 +30,6 @@
  * SUCH DAMAGE.
  *
  * @(#)grammar.y	8.1 (Berkeley) 5/31/93
- * $DragonFly: src/games/atc/grammar.y,v 1.3 2006/08/08 15:03:02 pavalos Exp $
  */
 
 /*
@@ -60,8 +59,6 @@
 %{
 #include "include.h"
 
-extern int	yylex(void);
-
 static void	check_edge(int, int);
 static void	check_point(int, int);
 static void	check_linepoint(int, int);
diff --git a/libexec/dma/aliases_parse.y b/libexec/dma/aliases_parse.y
index a5a9e7b32f..e494e454b6 100644
--- a/libexec/dma/aliases_parse.y
+++ b/libexec/dma/aliases_parse.y
@@ -8,7 +8,6 @@
 extern int yylineno;
 static void yyerror(const char *);
 int yywrap(void);
-int yylex(void);
 
 static void
 yyerror(const char *msg)
diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y
index f0a5dc1c72..d1ec33dbd0 100644
--- a/libexec/ftpd/ftpcmd.y
+++ b/libexec/ftpd/ftpcmd.y
@@ -1165,7 +1165,6 @@ static void	 toolong(int);
 #ifdef INET6
 static void	 v4map_data_dest(void);
 #endif
-static int	 yylex(void);
 
 static struct tab *
 lookup(struct tab *p, char *cmd)
@@ -1287,7 +1286,7 @@ toolong(int signo)
 	dologout(1);
 }
 
-static int
+int
 yylex(void)
 {
 	static int cpos;
diff --git a/usr.bin/localedef/Makefile b/usr.bin/localedef/Makefile
index 9a888c8c50..cf28755b66 100644
--- a/usr.bin/localedef/Makefile
+++ b/usr.bin/localedef/Makefile
@@ -16,6 +16,7 @@ SRCS=	charmap.c \
 ${SRCS:M*.c}: parser.h
 parser.h: parser.y
 
+CFLAGS+=	-DYYDEBUG
 CFLAGS+=	-I. -I${.CURDIR}
 CFLAGS+=	-I${.CURDIR}/../../lib/libc/locale
 CFLAGS+=	-I${.CURDIR}/../../lib/libc/stdtime
diff --git a/usr.bin/localedef/localedef.h b/usr.bin/localedef/localedef.h
index 28736f8582..1286c3f647 100644
--- a/usr.bin/localedef/localedef.h
+++ b/usr.bin/localedef/localedef.h
@@ -50,7 +50,6 @@ extern int undefok;	/* mostly ignore undefined symbols */
 extern int warnok;
 extern int warnings;
 
-int yylex(void);
 void yyerror(const char *);
 void errf(const char *, ...) __dead2;
 void warn(const char *, ...);
diff --git a/usr.bin/localedef/scanner.c b/usr.bin/localedef/scanner.c
index e731be2633..d9548a0afe 100644
--- a/usr.bin/localedef/scanner.c
+++ b/usr.bin/localedef/scanner.c
@@ -52,6 +52,7 @@ int			lineno = 1;
 int			warnings = 0;
 int			is_stdin = 1;
 FILE			*input;
+int			yylex(void);
 static int		nextline;
 //static FILE		*input = stdin;
 static const char	*filename = "<stdin>";
diff --git a/usr.bin/m4/parser.y b/usr.bin/m4/parser.y
index 12cd84e543..d338535de3 100644
--- a/usr.bin/m4/parser.y
+++ b/usr.bin/m4/parser.y
@@ -29,7 +29,6 @@
 
 #define	YYSTYPE	int32_t
 
-extern int yylex(void);
 extern int yyerror(const char *);
 %}
 %token NUMBER
diff --git a/usr.bin/mkcsmapper/ldef.h b/usr.bin/mkcsmapper/ldef.h
index eef9d6a707..d348bcb040 100644
--- a/usr.bin/mkcsmapper/ldef.h
+++ b/usr.bin/mkcsmapper/ldef.h
@@ -38,4 +38,3 @@ typedef struct {
 extern int	 debug;
 extern int	 linenumber;
 extern int	 yyerror(const char *) __dead2;
-extern int	 yylex(void);
diff --git a/usr.bin/mkcsmapper/lex.l b/usr.bin/mkcsmapper/lex.l
index fa4dcbfe9c..4670ae6b81 100644
--- a/usr.bin/mkcsmapper/lex.l
+++ b/usr.bin/mkcsmapper/lex.l
@@ -41,8 +41,6 @@
 #include "ldef.h"
 #include "yacc.h"
 
-#define YY_DECL int yylex(void)
-
 int linenumber = 1;
 %}
 %option	noinput
diff --git a/usr.bin/mkesdb/yacc.y b/usr.bin/mkesdb/yacc.y
index d56013eab0..194ffc2028 100644
--- a/usr.bin/mkesdb/yacc.y
+++ b/usr.bin/mkesdb/yacc.y
@@ -61,8 +61,6 @@ static void	dump_file(void);
 static void	register_named_csid(char *, uint32_t);
 static void	set_prop_string(const char *, char **, char **);
 static void	set_invalid(uint32_t);
-
-int yylex (void);
 %}
 %union {
 	uint32_t	i_value;
diff --git a/usr.sbin/bthcid/parser.y b/usr.sbin/bthcid/parser.y
index da0aacb3da..1154ba95cc 100644
--- a/usr.sbin/bthcid/parser.y
+++ b/usr.sbin/bthcid/parser.y
@@ -28,7 +28,6 @@
  *
  * $Id: parser.y,v 1.5 2003/06/07 21:22:30 max Exp $
  * $FreeBSD: src/usr.sbin/bluetooth/hcsecd/parser.y,v 1.4 2004/09/14 20:04:33 emax Exp $
- * $DragonFly: src/usr.sbin/bthcid/parser.y,v 1.1 2008/01/30 14:10:19 hasso Exp $
  */
 
 #include <sys/fcntl.h>
@@ -44,8 +43,6 @@
 #include <unistd.h>
 #include "bthcid.h"
 
-	int	yylex    (void);
-
 static	void	free_key (link_key_p key);
 static	int	hexa2int4(char *a);
 static	int	hexa2int8(char *a);
diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y
index fbf0971643..fbfe06347b 100644
--- a/usr.sbin/config/config.y
+++ b/usr.sbin/config/config.y
@@ -77,7 +77,6 @@
  *
  *	@(#)config.y	8.1 (Berkeley) 6/6/93
  * $FreeBSD: src/usr.sbin/config/config.y,v 1.42.2.1 2001/01/23 00:09:32 peter Exp $
- * $DragonFly: src/usr.sbin/config/config.y,v 1.15 2008/05/01 09:24:42 swildner Exp $
  */
 
 #include <ctype.h>
@@ -100,8 +99,6 @@ int	maxusers;
 static int connect(char *, int);
 static void yyerror(const char *s);
 
-int yylex(void);
-
 %}
 %%
 Configuration:
diff --git a/usr.sbin/ndiscvt/inf-parse.y b/usr.sbin/ndiscvt/inf-parse.y
index 2507990215..76f55f1b8d 100644
--- a/usr.sbin/ndiscvt/inf-parse.y
+++ b/usr.sbin/ndiscvt/inf-parse.y
@@ -39,7 +39,6 @@
 
 #include "inf.h"
 
-extern int yylex (void);
 extern void yyerror(const char *);
 %}
 
diff --git a/usr.sbin/rrenumd/Makefile b/usr.sbin/rrenumd/Makefile
index 3bac475a9f..637597e2cb 100644
--- a/usr.sbin/rrenumd/Makefile
+++ b/usr.sbin/rrenumd/Makefile
@@ -27,8 +27,8 @@ MAN=	rrenumd.conf.5 rrenumd.8
 SRCS+=y.tab.h
 y.tab.h: parser.y
 
-.if defined(YACCDEBUG)
 CFLAGS+= -DYYDEBUG
+.if defined(YACCDEBUG)
 YFLAGS+= -t -v
 .endif
 
diff --git a/usr.sbin/tcpdump/config.h b/usr.sbin/tcpdump/config.h
index 7d7397b634..2a0881e73c 100644
--- a/usr.sbin/tcpdump/config.h
+++ b/usr.sbin/tcpdump/config.h
@@ -31,7 +31,7 @@
 /* #undef HAVE_PCAP_VERSION */
 
 /* define if libpcap has pcap_debug */
-#define HAVE_PCAP_DEBUG 1
+/* #undef HAVE_PCAP_DEBUG */
 
 /* define if libpcap has yydebug */
 /* #undef HAVE_YYDEBUG */
-- 
2.22.0

