Ethereal-dev: Re: [Ethereal-dev] Problems compiling 0.9.5 with VC++ 6

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Thu, 4 Jul 2002 11:52:09 -0700
(Damn, once again hit "y" at the wrong time....)

On Thu, Jul 04, 2002 at 11:38:51AM -0700, Guy Harris wrote:
> On Thu, Jul 04, 2002 at 05:05:33PM +0200, andreas.sikkema@xxxxxxxxxxx wrote:
> > scanner.c
> > scanner.c(1512) : error C4013: 'isatty' undefined; assuming extern 
> > returning int
> 
> 	...
> 
> > I tried a couple of times, error on scanner.c can also be 
> > "Can not find file 'unistd.h'"
> 
> Try removing "scanner.c" and rebuilding it; you'd probably have to
> install Cygwin in order to get Flex for Win32, if you don't already have
> it installed.

I diffed the Ethereal 0.9.3 and 0.9.5 versions of
"epan/dfilter/scanner.l" and the only differences other than differences
in comments were

	130c129
	< [[:alnum:]_.:]+	{
	---
	> [-[:alnum:]_.:]+	{
	134c133
	< 	hfinfo = dfilter_lookup_token(yytext);
	---
	> 	hfinfo = proto_registrar_get_byname(yytext);

However, there were differences between the two versions of
"epan/dfilter/scanner.c" that weren't obviously the result of those
changes:

	30a31
	> #include <unistd.h>
	44d44
	< #include <unistd.h>

		...

	1491,1495d1489
	< #ifndef YY_ALWAYS_INTERACTIVE
	< #ifndef YY_NEVER_INTERACTIVE
	< extern int isatty YY_PROTO(( int ));
	< #endif
	< #endif

Presumably these are the result of the two source tarballs being built
with different versions of Flex generating "scanner.c"; the first one
generates code that happens to build on Windows with MSVC++, but the
second one doesn't.

Note that the 0.9.3 version of "scanner.c" probably won't work with the
rest of the 0.9.5 source ("dfilter_lookup_token()" doesn't exist in
0.9.5, it's now "proto_registrar_get_byname()").  The other difference
means that 0.9.3 can't handle field or protocol names with hyphens in
them while 0.9.5 can.