Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/flex/dist/src fix the re-entrant prefixed case.
details: https://anonhg.NetBSD.org/src/rev/7fcce965fdb4
branches: trunk
changeset: 350064:7fcce965fdb4
user: christos <christos%NetBSD.org@localhost>
date: Tue Jan 03 01:56:03 2017 +0000
description:
fix the re-entrant prefixed case.
diffstat:
external/bsd/flex/dist/src/flex.skl | 6 ++++--
external/bsd/flex/dist/src/main.c | 8 ++++----
2 files changed, 8 insertions(+), 6 deletions(-)
diffs (60 lines):
diff -r 52e387a9d32c -r 7fcce965fdb4 external/bsd/flex/dist/src/flex.skl
--- a/external/bsd/flex/dist/src/flex.skl Tue Jan 03 01:30:15 2017 +0000
+++ b/external/bsd/flex/dist/src/flex.skl Tue Jan 03 01:56:03 2017 +0000
@@ -113,7 +113,7 @@
m4preproc_define(`M4_GEN_PREFIX',
``[[#define yy$1 ]]M4_YY_PREFIX[[$1]]
-m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'')
+%# m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'')
%if-c++-only
/* The c++ scanner is a mess. The FlexLexer.h header file relies on the
@@ -126,7 +126,8 @@
%endif
%if-c-only
-m4_ifelse(M4_YY_PREFIX,M4_YY_PREFIX,,
+%if-reentrant
+m4_ifelse(M4_YY_PREFIX,yy,,
M4_GEN_PREFIX(`_create_buffer')
M4_GEN_PREFIX(`_delete_buffer')
M4_GEN_PREFIX(`_scan_buffer')
@@ -164,6 +165,7 @@
M4_GEN_PREFIX(`wrap')
)
%endif
+%endif
m4_ifdef( [[M4_YY_BISON_LVAL]],
[[
diff -r 52e387a9d32c -r 7fcce965fdb4 external/bsd/flex/dist/src/main.c
--- a/external/bsd/flex/dist/src/main.c Tue Jan 03 01:30:15 2017 +0000
+++ b/external/bsd/flex/dist/src/main.c Tue Jan 03 01:56:03 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.5 2017/01/03 00:22:56 christos Exp $ */
+/* $NetBSD: main.c,v 1.6 2017/01/03 01:56:03 christos Exp $ */
/* flex - tool to generate fast lexical analyzers */
@@ -33,7 +33,7 @@
/* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
/* PURPOSE. */
#include "flexdef.h"
-__RCSID("$NetBSD: main.c,v 1.5 2017/01/03 00:22:56 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.6 2017/01/03 01:56:03 christos Exp $");
#include "version.h"
@@ -1590,9 +1590,9 @@
if (!do_yywrap) {
if (!C_plus_plus) {
if (reentrant)
- outn ("\n#define yywrap(yyscanner) (/*CONSTCOND*/1)");
+ out_str ("\n#define %swrap(yyscanner) (/*CONSTCOND*/1)\n", prefix);
else
- outn ("\n#define yywrap() (/*CONSTCOND*/1)");
+ out_str ("\n#define %swrap() (/*CONSTCOND*/1)\n", prefix);
}
outn ("#define YY_SKIP_YYWRAP");
}
Home |
Main Index |
Thread Index |
Old Index