Yahoo Groups archive

Milter-greylist

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

Message

Re: [milter-greylist] milter-greylist 4.4 alpha1 is available

2012-02-28 by Johann Klasek

On Sun, Feb 26, 2012 at 04:08:22PM +0100, shuttlebox wrote:
> On Sun, Feb 26, 2012 at 4:37 AM,  <manu@...> wrote:
> > shuttlebox <shuttlebox@...> wrote:
> >
> >> This is what I could find, does it help?
> >
> > Yes, please try this patch:
> > http://ftp.espci.fr/shadow/manu/mg44a1p2.patch
> 
> I still get the warnings. I'm not sure I understand how you're trying
> to solve this but I'm guessing you want to trigger EXTENSIONS to be
> used..? However, configure doesn't seem to pick it up:
> 
> checking if -D_REENTRANT is needed to use localtime_r and strtok_r... no
> checking if -D__EXTENSIONS__ is needed to use localtime_r and strtok_r... no
> 
> Also, the build command hasn't added it either:
> 
> /opt/csw/bin/gcc-4.6 -mtune=i686 -O2 -pipe -m32 -march=i386
> -DUSE_DB185_EMULATION -Wall -I/opt/csw/lib/include -DUSE_CURL
> -I/opt/csw/lib/include -DUSE_GEOIP -I/opt/csw/lib/include
> -DUSE_FD_POOL -DUSE_DRAC -DHAVE_DATA_CALLBACK -DUSE_DNSRBL
> -DCONFFILE=\"/etc/opt/csw/greylist.conf\"
> -DDUMPFILE=\"/var/opt/csw/milter-greylist/greylist.db\" -D_BSD_SOURCE
> -I. -I. -I/opt/csw/bdb48/include -I/opt/csw/include
> -I/opt/csw/bdb48/include -I/opt/csw/include  -c -o milter-greylist.o
> milter-greylist.c
> milter-greylist.c: In function 'real_header':
> milter-greylist.c:812:11: warning: variable 'stat' set but not used
> [-Wunused-but-set-variable]
> milter-greylist.c: In function 'real_body':
> milter-greylist.c:889:11: warning: variable 'stat' set but not used
> [-Wunused-but-set-variable]
> milter-greylist.c: In function 'real_eom':
> milter-greylist.c:991:11: warning: variable 'stat' set but not used
> [-Wunused-but-set-variable]
> milter-greylist.c: In function 'gmtoffset':
> milter-greylist.c:2043:2: warning: implicit declaration of function
> 'gmtime_r' [-Wimplicit-function-declaration]
> milter-greylist.c:2044:2: warning: implicit declaration of function
> 'localtime_r' [-Wimplicit-function-declaration]
> milter-greylist.c: In function 'fstring_expand':
> milter-greylist.c:2571:2: warning: implicit declaration of function
> 'strtok_r' [-Wimplicit-function-declaration]
> milter-greylist.c:2571:15: warning: assignment makes pointer from
> integer without a cast [enabled by default]

_r functions are only defined with correct prototypes if 
 a) gcc is called with option -pthreads (POSIX threads)
 b) cc (Sun Studio Compiler) with -mt -lpthread

This defines implicit _REENTRANT and therefore the extended system interface which
will be enabled by defining __EXTENSIONS__ is not needed (AFAIK).
As I have experienced _REENTRANT should not be defined explicitly (except for a
temporary hack or so).


> 
> If I add EXTENSIONS manually to our build system it works:
> 
> EXTRA_CFLAGS = -DUSE_DB185_EMULATION -D__EXTENSIONS__

What about with set the compile option -ptreads?

[..]

Johann E.K.

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.