Source-Changes-HG archive

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

[src/trunk]: src/external/gpl2/dtc/dist Make this compatible with byacc



details:   https://anonhg.NetBSD.org/src/rev/5ae682c27e67
branches:  trunk
changeset: 824448:5ae682c27e67
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jun 05 18:59:21 2017 +0000

description:
Make this compatible with byacc

diffstat:

 external/gpl2/dtc/dist/dtc-parser.y |  11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diffs (30 lines):

diff -r 046705d54451 -r 5ae682c27e67 external/gpl2/dtc/dist/dtc-parser.y
--- a/external/gpl2/dtc/dist/dtc-parser.y       Mon Jun 05 18:59:10 2017 +0000
+++ b/external/gpl2/dtc/dist/dtc-parser.y       Mon Jun 05 18:59:21 2017 +0000
@@ -24,7 +24,11 @@
 #include "srcpos.h"
 
 extern int yylex(void);
+#ifndef YYBYACC
 extern void yyerror(char const *s);
+#else
+#include "dtc-parser.h"
+#endif
 #define ERROR(loc, ...) \
        do { \
                srcpos_error((loc), "Error", __VA_ARGS__); \
@@ -471,7 +475,14 @@
 
 %%
 
+#ifndef YYBYACC
 void yyerror(char const *s)
 {
        ERROR(&yylloc, "%s", s);
 }
+#else
+void yyerror(YYLTYPE *loc, char const *s)
+{
+       ERROR(loc, "%s", s);
+}
+#endif



Home | Main Index | Thread Index | Old Index