Maynard, Chris wrote:
> However, all 3 of these files are auto-generated, and I'm not exactly
> sure where the unistd.h file gets included from.
The #include of <unistd.h> is put into those files by the UN*X version of
Flex.
Those files (along with some other files of that sort such as
epan/dfilter/scanner.c) have to be removed if you're building on Windows
from the source tarball.
The source tarball is often used to build and install Ethereal by people
using a UN*X platform for which no binary package is available (or for
which they don't want a binary package version), so it includes a number
of generated source files to allow it to be built on systems that don't
have Flex or Bison/byacc or....
Windows users are far more likely to be installing from a binary package,
so making the source build "out of the box" on Windows is less important
than making it do so on UN*X.
> I ran a full
> clean before compiling, so I don't think it's due to any extraneous
> left-over files.
Unfortunately, a "full clean", in the sense of "make -f Makefile.nmake
clean", isn't sufficient for the first build on Windows after unpacking
the source tarball; it's not really as full a clean as is necessary in
this case.
You have to do "make -f Makefile.nmake distclean", to remove all the files
generated from Flex (and Bison) source, and the config.h files (that's
done so that, if you are using the same directory to build on Windows and
some UN*X platform (e.g., if it's stored on some file server), it gets rid
of old UN*X config.h files (yes, this was a problem somebody reported at
one point, which is why we made the "distclean" rules remove them).
I've added a note about this to the top-level README.win32 file. Ulf,
should something about this go into the Developer's Guide? (And should
the Developer's Guide be generated as on-line HTML, to be read from the
Web site?)