autoconf
[Top][All Lists]
Advanced

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

Re: reasons for having no inclusion guards in config.h


From: Tim Rice
Subject: Re: reasons for having no inclusion guards in config.h
Date: Sun, 7 Mar 2010 13:40:40 -0800 (PST)

On Sun, 7 Mar 2010, John Calcote wrote:

> On 3/7/2010 11:53 AM, Bob Friesenhahn wrote:
[...]
> > There may be several config.h files, each of which has somewhat different
> > content.  Bing!
> 
> So what would be wrong with generating an include guard tag based on the name
> of the project?
> 
> For instance,
> 
> --------
> #ifndef GRAPHICSMAGICK_CONFIG_H
> #define GRAPHICSMAGICK_CONFIG_H
> 
> ...
> 
> #endif
> --------
> 
> John

To give a real world example, in freeradius there are
src/modules/rlm_counter/config.h.in
src/modules/rlm_eap/types/rlm_eap_peap/config.h.in
src/modules/rlm_eap/types/rlm_eap_tls/config.h.in
src/modules/rlm_eap/types/rlm_eap_ttls/config.h.in
src/modules/rlm_example/config.h.in
src/modules/rlm_ippool/config.h.in
src/modules/rlm_pam/config.h.in
src/modules/rlm_perl/config.h.in
src/modules/rlm_radutmp/config.h.in
src/modules/rlm_smb/config.h.in
src/modules/rlm_smsotp/config.h.in
src/modules/rlm_sql/drivers/rlm_sql_mysql/config.h.in
src/modules/rlm_sqlhpwippool/config.h.in
src/modules/rlm_unix/config.h.in

It would work to have each of those with
#ifndef FREERADIUS_CONFIG_H
#define FREERADIUS_CONFIG_H
....
#endif

-- 
Tim Rice                                Multitalents    (707) 887-1469
address@hidden






reply via email to

[Prev in Thread] Current Thread [Next in Thread]