Tue Jan 24 22:28:42 2017 UTC ()
don't output extern YYSTYPE decl if pure_parser.


(christos)
diff -r1.15 -r1.16 src/external/bsd/byacc/dist/output.c

cvs diff -r1.15 -r1.16 src/external/bsd/byacc/dist/output.c (expand / switch to context diff)
--- src/external/bsd/byacc/dist/output.c 2016/01/09 22:05:33 1.15
+++ src/external/bsd/byacc/dist/output.c 2017/01/24 22:28:42 1.16
@@ -1,11 +1,11 @@
-/*	$NetBSD: output.c,v 1.15 2016/01/09 22:05:33 christos Exp $	*/
+/*	$NetBSD: output.c,v 1.16 2017/01/24 22:28:42 christos Exp $	*/
 
 /* Id: output.c,v 1.74 2014/10/05 23:21:09 tom Exp  */
 
 #include "defs.h"
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: output.c,v 1.15 2016/01/09 22:05:33 christos Exp $");
+__RCSID("$NetBSD: output.c,v 1.16 2017/01/24 22:28:42 christos Exp $");
 
 #define StaticOrR	(rflag ? "" : "static ")
 #define CountLine(fp)   (!rflag || ((fp) == code_file))
@@ -1217,7 +1217,8 @@
 		while ((c = getc(union_file)) != EOF)
 		    putc_code(fp, c);
 	    }
-	    fprintf(fp, "extern YYSTYPE %slval;\n", symbol_prefix);
+	    if (!pure_parser)
+		fprintf(fp, "extern YYSTYPE %slval;\n", symbol_prefix);
 	}
     }
 }