Include only needed headers in programs/winhelp
James Juran
jamesjuran at alumni.psu.edu
Sun Dec 2 20:33:31 CST 2001
Francois Gouget wrote:
>
> On Sun, 2 Dec 2001, Francois Gouget wrote:
> [...]
> > > So it seems the real conflict is in using flex in Winelib applications
> > > that (directly or indirectly) include windows.h on systems with glibc >=
> > > 2.2.3. Since I would think that flex wouldn't be used to port a real
> > > Windows application to Wine, I would think this isn't a significant
> > > problem.
>
> That's strange. winhelp compiles just fine here. I have:
>
> libc6 2.2.4-5
> flex 2.5.4a-14
>
> If I look at lex.yy.c, I see:
>
> #ifdef __cplusplus
>
> #include <stdlib.h>
> #include <unistd.h>
>
> So unless you are compiling lex.yy.c with a C++ compiler then you
> should not have any trouble. Which version of flex are you using?
To answer an earlier question: I have no idea if flex is available on
Windows. I've never used it or anything like it on Unix or Windows. I
just have an idea what is and figured out that it was involved in this
issue.
I just checked the Red Hat flex RPM's, and I see that they patch their
flex to include <unistd.h> outside the #ifdef __cplusplus. It's not
immediately obvious to me why they do this. I just checked the latest
flex RPM from Red Hat's Rawhide (flex-2.5.4a-17), and it still does
this. I'll try to figure out the reason for including this patch to
flex.
James
--
James Juran
jamesjuran at alumni.psu.edu
More information about the wine-devel
mailing list