Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/byacc/dist Avoid duplicate "code_lines" symbols...



details:   https://anonhg.NetBSD.org/src/rev/d68d71d7ff05
branches:  trunk
changeset: 933232:d68d71d7ff05
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Fri May 22 22:59:14 2020 +0000

description:
Avoid duplicate "code_lines" symbols, which fails to link when building
tools with gcc 10.1.1 / ld 2.34-2.fc32.

diffstat:

 external/bsd/byacc/dist/defs.h   |  4 ++--
 external/bsd/byacc/dist/output.c |  6 ++++--
 external/bsd/byacc/dist/reader.c |  6 +++---
 3 files changed, 9 insertions(+), 7 deletions(-)

diffs (70 lines):

diff -r 6eaf2ec050e2 -r d68d71d7ff05 external/bsd/byacc/dist/defs.h
--- a/external/bsd/byacc/dist/defs.h    Fri May 22 20:27:16 2020 +0000
+++ b/external/bsd/byacc/dist/defs.h    Fri May 22 22:59:14 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: defs.h,v 1.17 2019/10/15 15:58:46 christos Exp $       */
+/*     $NetBSD: defs.h,v 1.18 2020/05/22 22:59:14 jmcneill Exp $       */
 
 /* Id: defs.h,v 1.61 2019/06/16 15:07:51 tom Exp  */
 
@@ -590,7 +590,7 @@
 struct code_lines {
        char *lines;
        size_t num;
-} code_lines[CODE_MAX];
+};
 
 /* skeleton.c (generated by skel2c) */
 extern void write_section(FILE * fp, const char *const section[]);
diff -r 6eaf2ec050e2 -r d68d71d7ff05 external/bsd/byacc/dist/output.c
--- a/external/bsd/byacc/dist/output.c  Fri May 22 20:27:16 2020 +0000
+++ b/external/bsd/byacc/dist/output.c  Fri May 22 22:59:14 2020 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: output.c,v 1.21 2019/10/15 15:58:46 christos Exp $     */
+/*     $NetBSD: output.c,v 1.22 2020/05/22 22:59:14 jmcneill Exp $     */
 
 /* Id: output.c,v 1.87 2018/05/10 09:08:46 tom Exp  */
 
 #include "defs.h"
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: output.c,v 1.21 2019/10/15 15:58:46 christos Exp $");
+__RCSID("$NetBSD: output.c,v 1.22 2020/05/22 22:59:14 jmcneill Exp $");
 
 #define StaticOrR      (rflag ? "" : "static ")
 #define CountLine(fp)   (!rflag || ((fp) == code_file))
@@ -36,6 +36,8 @@
 static int lowzero;
 static long high;
 
+struct code_lines code_lines[CODE_MAX];
+
 static void
 output_code_lines(FILE *fp, int cl)
 {
diff -r 6eaf2ec050e2 -r d68d71d7ff05 external/bsd/byacc/dist/reader.c
--- a/external/bsd/byacc/dist/reader.c  Fri May 22 20:27:16 2020 +0000
+++ b/external/bsd/byacc/dist/reader.c  Fri May 22 22:59:14 2020 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: reader.c,v 1.17 2019/10/15 15:58:46 christos Exp $     */
+/*     $NetBSD: reader.c,v 1.18 2020/05/22 22:59:14 jmcneill Exp $     */
 
 /* Id: reader.c,v 1.74 2017/12/04 17:50:02 tom Exp  */
 
 #include "defs.h"
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: reader.c,v 1.17 2019/10/15 15:58:46 christos Exp $");
+__RCSID("$NetBSD: reader.c,v 1.18 2020/05/22 22:59:14 jmcneill Exp $");
 
 /*  The line size must be a positive integer.  One hundred was chosen  */
 /*  because few lines in Yacc input grammars exceed 100 characters.    */
@@ -71,7 +71,7 @@
        "", "requires", "provides", "top", "imports",
 };
 
-struct code_lines code_lines[CODE_MAX];
+extern struct code_lines code_lines[CODE_MAX];
 
 #if defined(YYBTYACC)
 int destructor = 0;    /* =1 if at least one %destructor */



Home | Main Index | Thread Index | Old Index