Module Name: src
Committed By: christos
Date: Tue Jan 3 00:22:56 UTC 2017
Modified Files:
src/external/bsd/flex/dist/src: flex.skl main.c
Log Message:
don't #define yywrap yywrap (that is if the prefix is yy, don't #define macros
for the same name). Breaks compatibility for things like:
#ifndef yywrap
int
yywrap(void)
{
return 1;
}
#endif
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/flex/dist/src/flex.skl
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/dist/src/main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/flex/dist/src/flex.skl
diff -u src/external/bsd/flex/dist/src/flex.skl:1.6 src/external/bsd/flex/dist/src/flex.skl:1.7
--- src/external/bsd/flex/dist/src/flex.skl:1.6 Mon Jan 2 18:21:14 2017
+++ src/external/bsd/flex/dist/src/flex.skl Mon Jan 2 19:22:56 2017
@@ -120,6 +120,7 @@ m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]
%endif
%if-c-only
+m4_ifelse(M4_YY_PREFIX,yy,,
M4_GEN_PREFIX(`_create_buffer')
M4_GEN_PREFIX(`_delete_buffer')
M4_GEN_PREFIX(`_scan_buffer')
@@ -155,6 +156,7 @@ m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]
M4_GEN_PREFIX(`set_column')
]])
M4_GEN_PREFIX(`wrap')
+)
%endif
m4_ifdef( [[M4_YY_BISON_LVAL]],
@@ -170,11 +172,14 @@ m4_ifdef( [[<M4_YY_BISON_LLOC>]],
]])
+m4_ifelse(M4_YY_PREFIX,yy,,
M4_GEN_PREFIX(`alloc')
M4_GEN_PREFIX(`realloc')
M4_GEN_PREFIX(`free')
+)
%if-c-only
+m4_ifelse(M4_YY_PREFIX,yy,,
m4_ifdef( [[M4_YY_NOT_REENTRANT]],
[[
M4_GEN_PREFIX(`text')
@@ -184,6 +189,7 @@ m4_ifdef( [[M4_YY_NOT_REENTRANT]],
M4_GEN_PREFIX(`_flex_debug')
M4_GEN_PREFIX(`lineno')
]])
+)
%endif
Index: src/external/bsd/flex/dist/src/main.c
diff -u src/external/bsd/flex/dist/src/main.c:1.4 src/external/bsd/flex/dist/src/main.c:1.5
--- src/external/bsd/flex/dist/src/main.c:1.4 Mon Jan 2 14:24:39 2017
+++ src/external/bsd/flex/dist/src/main.c Mon Jan 2 19:22:56 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.4 2017/01/02 19:24:39 christos Exp $ */
+/* $NetBSD: main.c,v 1.5 2017/01/03 00:22:56 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.4 2017/01/02 19:24:39 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.5 2017/01/03 00:22:56 christos Exp $");
#include "version.h"
@@ -1589,7 +1589,6 @@ void readin (void)
if (!do_yywrap) {
if (!C_plus_plus) {
- outn ("\n#undef yywrap");
if (reentrant)
outn ("\n#define yywrap(yyscanner) (/*CONSTCOND*/1)");
else