netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Aw: Re: [PATCH 4/7] autotools conversion: include the header 'config.h' in every C source file.
@ 2014-07-10 10:32 giorgio.nicole
  2014-07-10 12:52 ` Patrick McHardy
  2014-07-10 13:57 ` Aw: Re: Re: [PATCH 4/7] " giorgio.nicole
  0 siblings, 2 replies; 6+ messages in thread
From: giorgio.nicole @ 2014-07-10 10:32 UTC (permalink / raw)
  To: kaber; +Cc: netfilter-devel

 


----- Original Nachricht ----
Von:     Patrick McHardy <kaber@trash.net>
An:      Giorgio Dal Molin <giorgio.nicole@arcor.de>
Datum:   10.07.2014 12:04
Betreff: Re: [PATCH 4/7] autotools conversion: include the header 'config.h'
 in every C source file.

> On Mon, Jul 07, 2014 at 04:19:28PM +0200, Giorgio Dal Molin wrote:
> > Added an #include <config.h> to all the C source files so that the
> results
> > of the tests in the configure script are available to all the compilation
> > units.
> > 
> > We could have added the include also to 'yacc_parser.y' and 'scanner.l'
> > but we don't, because it is not strictly needed and to avoid to define
> > the variable 'VERSION' two times.
> 
> > --- a/src/cli.c
> > +++ b/src/cli.c
> > @@ -11,6 +11,9 @@
> >   *
> >   * Development of this code funded by Astaro AG (http://www.astaro.com/)
> >   */
> > +#ifdef HAVE_CONFIG_H
> > +#include <config.h>
> > +#endif
> 
> Do we really need those ifdefs?
>

Hi,

do you mean just the #ifdefs or the whole #include <config.h> ?

The config.h should be included, unless there are real problems with it; one I've found
is the preprocessor variable VERSION defined in the yacc source 'src/yacc_parser.y':
it would conflict with the same variable defined in the 'config.h'.

Actually, if you just build the package under linux, using the ./configure... && make all install
you will always generate / include the config.h, so the #ifdef is not strictly needed.

giorgio

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-12  9:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-10 10:32 Aw: Re: [PATCH 4/7] autotools conversion: include the header 'config.h' in every C source file giorgio.nicole
2014-07-10 12:52 ` Patrick McHardy
2014-07-10 14:08   ` [PATCH] " Giorgio Dal Molin
2014-07-10 14:54     ` Pablo Neira Ayuso
2014-07-12  9:09       ` Jan Engelhardt
2014-07-10 13:57 ` Aw: Re: Re: [PATCH 4/7] " giorgio.nicole

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).