Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 2493] Wireshark compile errors for cygwin flex (v 2.5.35)

Date: Wed, 23 Apr 2008 10:17:03 -0700 (PDT)
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2493





--- Comment #9 from Guy Harris <guy@xxxxxxxxxxxx>  2008-04-23 10:17:03 GMT ---
The page at

    http://flex.sourceforge.net/manual/Code_002dLevel-And-API-Options.html

says

    `--nounistd, %option nounistd'
        suppresses inclusion of the non-ANSI header file unistd.h. This option
is meant to target environments in which unistd.h does not exist. Be aware that
certain options may cause flex to generate code that relies on functions
normally found in unistd.h, (e.g. isatty(), read().) If you wish to use these
functions, you will have to inform your compiler where to find them. See
option-always-interactive. See option-read.

which seems to suggest that Flex might, by default, assume that the target is
an environment with unistd.h (e.g., a sufficiently modern UN*X or Windows in
the full Cygwin development environment), *perhaps even when you're on Windows*
(i.e., on Windows, it might be assuming that you're building under Cygwin, with
all the Cygwin headers and library routines to pretend you're on UN*X), and
that you need to explicitly say "no unistd.h, please".

If so, we should be doing that on Windows - possibly conditionally, if older
versions of Flex that people might be using on Windows don't have the
"--nounistd" option.  The page at

    http://www.mail-archive.com/cygwin-announce@xxxxxxxxxx/msg02365.html

seems to indicate that "--nounistd" first appeared in Flex 2.5.6.


-- 
Configure bugmail: http://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.