Re: Inclusion of config.h in the example programs



On Tue, 2004-11-02 at 16:15 +0000, Martyn Russell wrote:
> On Mon, 2004-11-01 at 14:22 -0700, Michael L Torrie wrote:
> > On Mon, 2004-11-01 at 21:10 +0000, Tor Lillqvist wrote:
> > 
> > > That is presumably quite unnecesary. It's also counter-productive, as
> > > it might make people think that GTK's config.h file is supposed to be
> > > available when compiling software that just uses GTK. Which is not the
> > > case at all. If some developer package of GTK (or GLib, Pango, etc)
> > > includes the config.h file, that's an error.
> > 
> > Is it incorrect to put #ifdef CONFIG_H around the #include <config.h>?
> > (Or whatever autoconf sets as a flag these days.)
> 
> I thought it was:
> 
>         #ifdef HAVE_CONFIG_H
>         #include <config.h>
>         #endif
> 
> Also, I recently just wanted to compile the examples without actually
> running the ./autogen.sh, etc. and because config.h hadn't been
> generated, it complained.  After I deleted the line which included
> config.h from each example it was fine so it looks like it is unused -
> at least in the examples I was trying.
> 

The examples have no more reason to include config.h than any other GTK+
program: none. The #includes should just be removed.

Matthias




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