Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

config.h included twice

2013-08-11 by Jim Klimov

I found some build noise in the milter-greylist compilation like this:

gcc -L/lib -L/usr/lib -L/usr/local/ssl/lib -L/usr/local/lib 
-L/usr/sfw/lib -L/opt/sfw/lib -I. -I..  -Wall -I/usr/local/ssl/include 
-I/usr/local/include -DUSE_LDAP -DLDAP_DEPRECATED 
-I/home/jim/BuildNew/milter-greylist-buildzone/__installroot_i386_build-sol10-x86_8.13.8+Sun//opt/COSmail/include 
-DUSE_FD_POOL -DUSE_P0F -DHAVE_P0F3 -DHAVE_P0F306 
-I'/home/jim/BuildNew/milter-greylist-buildzone/p0f-3.06b' 
-DP0F_QUERY_FROM_P0F_DIST -DUSE_DNSRBL -DUSE_MX 
-DCONFFILE=\"/etc/mail/greylist.conf\" 
-DDUMPFILE=\"/var/milter-greylist/greylist.db\" -D_BSD_SOURCE -I.. -I. 
   -c -o conf_yacc.o conf_yacc.c
In file included from ../conf.h:35,
                  from ../conf_yacc.y:41:
../config.h:5:1: warning: "BUILD_ENV" redefined
In file included from ../conf_yacc.y:24:
config.h:5:1: warning: this is the location of the previous definition
In file included from ../conf.h:35,
                  from ../conf_yacc.y:41:
../config.h:187:1: warning: "PACKAGE_STRING" redefined
In file included from ../conf_yacc.y:24:
config.h:187:1: warning: this is the location of the previous definition
In file included from ../conf.h:35,
                  from ../conf_yacc.y:41:
../config.h:196:1: warning: "PACKAGE_VERSION" redefined
In file included from ../conf_yacc.y:24:
config.h:196:1: warning: this is the location of the previous definition
In file included from ../conf_lex.l:179,
                  from ../conf_yacc.y:1948:
config.h:5:1: warning: "BUILD_ENV" redefined
In file included from ../p0f.h:35,
                  from ../conf_yacc.y:64:
../config.h:5:1: warning: this is the location of the previous definition
In file included from ../conf_lex.l:179,
                  from ../conf_yacc.y:1948:
config.h:187:1: warning: "PACKAGE_STRING" redefined
In file included from ../p0f.h:35,
                  from ../conf_yacc.y:64:
../config.h:187:1: warning: this is the location of the previous definition
In file included from ../conf_lex.l:179,
                  from ../conf_yacc.y:1948:
config.h:196:1: warning: "PACKAGE_VERSION" redefined
In file included from ../p0f.h:35,
                  from ../conf_yacc.y:64:
../config.h:196:1: warning: this is the location of the previous definition


I see that config.h is generated from config.h.in by configure, and
the template may be generated from configure(.ac?) by autoconf suite.

I also see that conf.h does have "ifdef" protection against double
inclusion, and includes config.h - which does not have this protection.

Finally, I see that conf_yacc.c includes both of these - leading to
double-processing of define's:

$ grep include conf_yacc.c | grep conf
#include "config.h"
#include "conf.h"
#include "conf_lex.c"


P0f.c as well:

$ grep include p0f.c | grep conf
#include "config.h"
#include "conf.h"


I think something outta be fixed, even if only for cosmetic aesthetics ;)

//Jim Klimov

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.