On Wed, Dec 10, 2003 at 06:06:31PM +0100, Grzegorz Nieweglowski wrote:

>Someone with flexperience would be needed...
>
>On my config this does nicely:
>
>--- xc/programs/twm/lex.c      2003-12-10 17:10:27.000000000 +0100
>+++ xc/programs/twm/lex.c.new  2003-12-10 17:10:47.000000000 +0100
>@@ -25,6 +25,8 @@
> 
> /* flex integer type definitions */
> 
>+int yy_prev_more_offset;
>+
> #ifndef FLEXINT_H
> #define FLEXINT_H
>
>But it's just a quick&dirty hack if someone (like me) is just interested
>in getting a XFree86 release to compile.

I just looked at this again.  lex.c is generated by flex, so patching it
won't work.  Other versions of flex put the following in the generated lex.c:

static int yy_prev_more_offset = 0;

Even trying to work around it by adding something like the above to
lex.l would break other builds.

>I looked a bit at it, and it seems that flex, at least my flex-2.5.31,
>uses a /usr/include/FlexLexer.h header. I guess this header needs to be
>included in every flexed C source. However, greping twm for "FlexLexer"
>yields no results.
>
>But twm/lex.c already includes many, many definitions from FlexLexer.h
>(some are still missing, like yy_prev_more_offset). I don't know the

They are there because flex puts them in the .c file it generates.  It's
a flex bug that it is not also putting in the definition for
yy_prev_more_offset.  I don't know if this has been fixed in a newer
version of flex yet.

David
-- 
David Dawes
developer/release engineer                      The XFree86 Project
www.XFree86.org/~dawes
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to