Ethereal-dev: Re: [Ethereal-dev] need gtk include file path in epan/Makefile

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

From: Guy Harris <guy@xxxxxxxxxx>
Date: Thu, 19 Oct 2000 14:15:10 -0700 (PDT)
> > gmake[2]: Entering directory `/usr/home/itojun/work/ethereal/ethereal/epan'
> > gcc -DHAVE_CONFIG_H -I. -I. -I. -I./..    -Wall -g -O2 -I/usr/pkg/lib/glib/include -I/usr/pkg/include/glib -c resolv.c
> > In file included from ../file.h:40,
> >                  from ../globals.h:30,
> >                  from resolv.c:83:
> > ../gtk/colors.h:30: gtk/gtk.h: No such file or directory
> > gmake[2]: *** [resolv.o] Error 1
> 
> In that case work needs to be done to avoid including GTK header files.

"resolv.c" compiles (at least on Solaris 2.6) if you remove the #include
of "globals.h".

However, that does run the risk that the declaration of
"g_resolving_actif" in "globals.h" could get out of sync with its
definition in "epan/resolv.c".

I would be inclined either to

	1) have "resolv.c" export routines to get and set the value of
	   "g_resolving_actif", and make that variable static to
	   "resolv.c"

or

	2) keep it global, but treat it as an interface exported by
	   libethereal, and declare it in "epan.h" rather than
	   "globals.h".