You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-emulation/wine/files/wine-2.0_rc3-flex263.patch

44 lines
1.5 KiB

From 7573939745b6cf62caa04cbcfcfa6982ba036542 Mon Sep 17 00:00:00 2001
From: nvinson234 <nvinson234@gmail.com>
Date: Sun, 1 Jan 2017 20:24:49 +0100
Subject: [PATCH] undefined reference yywrap in winhlp32/macro.lex.yy.c
(flex-2.6.3)
flex-2.6.3 uses C preprocessor macros to change the prefix of its functions
from the standard yy to a user-defined one. This is a change in Flex behavior
and causes wine to fail with any version of Flex newer than 2.6.1.
The failure is caused because programs/winhlp32/macros.lex.l only defines the
yywrap macro if it is not already defined. The end result is C code that is
looking for an undefined yywrap() function.
I have attached a patch that fixes this issue by removing the yywrap macro check and definition from macros.lex.l and adding the noyywrap flex option.
---
programs/winhlp32/macro.lex.l | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/programs/winhlp32/macro.lex.l b/programs/winhlp32/macro.lex.l
index 8f6945ca98..ff8a4832d3 100644
--- a/programs/winhlp32/macro.lex.l
+++ b/programs/winhlp32/macro.lex.l
@@ -20,7 +20,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
%}
-%option noinput nounput never-interactive 8bit
+%option noinput nounput noyywrap never-interactive 8bit
%x quote
%{
#include "config.h"
@@ -367,7 +367,3 @@ WINHELP_WINDOW* MACRO_CurrentWindow(void)
{
return lex_data ? lex_data->window : Globals.active_win;
}
-
-#ifndef yywrap
-int yywrap(void) { return 1; }
-#endif
--
2.11.0