On Sunday, January 22, 2017 11:00:26 AM CET Mike Swanson wrote:
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
Hello,
I applied the patch and it compiles now, but I get a warning:
macro.lex.yy.c:398:0: warning: "yywrap" redefined macro.lex.yy.c:74:0: note: this is the location of the previous definition
You probably want to get rid of that, too.
Regards, Fabian
On Mon, 2017-01-23 at 05:31 +0100, Fabian Maurer wrote:
Hello,
I applied the patch and it compiles now, but I get a warning:
macro.lex.yy.c:398:0: warning: "yywrap" redefined macro.lex.yy.c:74:0: note: this is the location of the previous definition
You probably want to get rid of that, too.
Regards, Fabian
I looked into this, and the source is related to why I made the patch in the first place: it seems that flex 2.6.3 just has a bug, and I don't think I can reasonably fix it so the warning doesn't appear.
That being said, I believe my patch is still functionally equivalent to the old code and having this alternative that works with flex 2.6.3 should still be safe for older and newer (hopefully fixed) versions.
Thanks, Mike
On Sunday, January 22, 2017 9:22:46 PM CET Mike Swanson wrote:
I looked into this, and the source is related to why I made the patch in the first place: it seems that flex 2.6.3 just has a bug, and I don't think I can reasonably fix it so the warning doesn't appear.
That being said, I believe my patch is still functionally equivalent to the old code and having this alternative that works with flex 2.6.3 should still be safe for older and newer (hopefully fixed) versions.
Ah thanks, it indeed is a flex bug. However, it works for the other flex uses we have in wine. You could make the warning disappear by using
%option prefix="winhlp32_"
or something along the lines. It will rename the output files (not sure how you'd deal with that), but it makes the warning go away. Also, that's the way it's done in the other .l files.
Regards, Fabian
On Monday, January 23, 2017 5:44:53 PM CET Fabian Maurer wrote:
It will rename the output files (not sure how you'd deal with that), but it makes the warning go away
Sorry, forget that, in wine the output is set explicit, so it doesn't change the filename at all. Just changes internal function names.
Regards, Fabian
Fabian Maurer dark.shadow4@web.de writes:
On Sunday, January 22, 2017 9:22:46 PM CET Mike Swanson wrote:
I looked into this, and the source is related to why I made the patch in the first place: it seems that flex 2.6.3 just has a bug, and I don't think I can reasonably fix it so the warning doesn't appear.
That being said, I believe my patch is still functionally equivalent to the old code and having this alternative that works with flex 2.6.3 should still be safe for older and newer (hopefully fixed) versions.
Ah thanks, it indeed is a flex bug. However, it works for the other flex uses we have in wine. You could make the warning disappear by using
%option prefix="winhlp32_"
or something along the lines. It will rename the output files (not sure how you'd deal with that), but it makes the warning go away. Also, that's the way it's done in the other .l files.
FWIW the initial flex bug is now fixed by https://github.com/westes/flex/commit/078b46c69d063aef1715b11348a2871d6036f2...
Fabian Maurer dark.shadow4@web.de wrote:
I applied the patch and it compiles now, but I get a warning:
macro.lex.yy.c:398:0: warning: "yywrap" redefined macro.lex.yy.c:74:0: note: this is the location of the previous definition
You probably want to get rid of that, too.
That's a flex bug: https://github.com/westes/flex/issues/155