diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 52064cb6..cdc6d471 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -409,6 +409,7 @@ patch_enable_all () enable_winex11_XEMBED="$1" enable_winex11__NET_ACTIVE_WINDOW="$1" enable_winex11_wglShareLists="$1" + enable_winhlp32_Flex_Workaround="$1" enable_winhttp_Accept_Headers="$1" enable_winhttp_System_Proxy_Autoconfig="$1" enable_wininet_Cleanup="$1" @@ -1427,6 +1428,9 @@ patch_enable () winex11-wglShareLists) enable_winex11_wglShareLists="$2" ;; + winhlp32-Flex_Workaround) + enable_winhlp32_Flex_Workaround="$2" + ;; winhttp-Accept_Headers) enable_winhttp_Accept_Headers="$2" ;; @@ -8601,6 +8605,21 @@ if test "$enable_winex11_wglShareLists" -eq 1; then ) >> "$patchlist" fi +# Patchset winhlp32-Flex_Workaround +# | +# | This patchset fixes the following Wine bugs: +# | * [#42132] Workaround a bug present in the current versions of Flex +# | +# | Modified files: +# | * programs/winhlp32/macro.lex.l +# | +if test "$enable_winhlp32_Flex_Workaround" -eq 1; then + patch_apply winhlp32-Flex_Workaround/0001-winhlp32-Workaround-a-bug-in-Flex.patch + ( + echo '+ { "Sebastian Lackner", "winhlp32: Workaround a bug in Flex.", 1 },'; + ) >> "$patchlist" +fi + # Patchset winhttp-Accept_Headers # | # | Modified files: diff --git a/patches/winhlp32-Flex_Workaround/0001-winhlp32-Workaround-a-bug-in-Flex.patch b/patches/winhlp32-Flex_Workaround/0001-winhlp32-Workaround-a-bug-in-Flex.patch new file mode 100644 index 00000000..d674ead8 --- /dev/null +++ b/patches/winhlp32-Flex_Workaround/0001-winhlp32-Workaround-a-bug-in-Flex.patch @@ -0,0 +1,33 @@ +From cf6bdd7b7dc1dc1ba31bd48171c218ba3503eb76 Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Sat, 14 Jan 2017 05:48:28 +0100 +Subject: winhlp32: Workaround a bug in Flex. + +--- + 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 8f6945ca988..da2dd22e447 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 never-interactive 8bit noyywrap + %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 + diff --git a/patches/winhlp32-Flex_Workaround/definition b/patches/winhlp32-Flex_Workaround/definition new file mode 100644 index 00000000..6d8a4552 --- /dev/null +++ b/patches/winhlp32-Flex_Workaround/definition @@ -0,0 +1 @@ +Fixes: [42132] Workaround a bug present in the current versions of Flex