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 only define yystos when needed.



details:   https://anonhg.NetBSD.org/src/rev/d2237d3387ae
branches:  trunk
changeset: 335374:d2237d3387ae
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jan 04 20:32:03 2015 +0000

description:
only define yystos when needed.

diffstat:

 external/bsd/byacc/dist/output.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r b37518e65b88 -r d2237d3387ae external/bsd/byacc/dist/output.c
--- a/external/bsd/byacc/dist/output.c  Sun Jan 04 20:19:46 2015 +0000
+++ b/external/bsd/byacc/dist/output.c  Sun Jan 04 20:32:03 2015 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: output.c,v 1.13 2015/01/04 18:52:04 christos Exp $     */
+/*     $NetBSD: output.c,v 1.14 2015/01/04 20:32:03 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.13 2015/01/04 18:52:04 christos Exp $");
+__RCSID("$NetBSD: output.c,v 1.14 2015/01/04 20:32:03 christos Exp $");
 
 #define StaticOrR      (rflag ? "" : "static ")
 #define CountLine(fp)   (!rflag || ((fp) == code_file))
@@ -334,6 +334,8 @@
            translate[i] = symbol_pval[gsymb];
        }
 
+       putl_code(output_file,
+           "#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)\n");
        /* yystos[] may be unused, depending on compile-time defines */
        start_int_table("stos", translate[0]);
 
@@ -353,6 +355,8 @@
 
        end_table();
        FREE(translate);
+       putl_code(output_file,
+           "#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */\n");
     }
 }
 



Home | Main Index | Thread Index | Old Index