help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows port (unistd.h)


From: Bruce Lilly
Subject: Re: Windows port (unistd.h)
Date: Tue, 22 Oct 2002 10:26:19 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2a) Gecko/20020910

Vincent Caron wrote:
Hello,

since there's no such <unistd.h> on my hostile planet :), I have to use the YY_NO_UNISTD_H feature. However I'm not sure where this macro should be defined in my case. My current solution is to add this blurb to the first section of scan.l :

#ifdef _WIN32
#define YY_NO_UNISTD_H
#endif

Not satisfying IMHO since users will have to copy this in every .l file to get a working scanner under Windows. What should I do ?

Please DO NOT use _WIN32 as the sole macro for #ifdef/#ifndef.
There exist POSIX-compliant implementations (e.g. UWIN) for
which the MS compiler still defines _WIN32.  POSIX-compliant
systems necessarily always have <unistd.h>.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]