Yahoo Groups archive

Milter-greylist

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

Message

Re: [milter-greylist] milter-greylist 4.0beta3 is available

2007-10-04 by Johann E. Klasek

On Thu, Oct 04, 2007 at 11:30:11AM +0200, shuttlebox wrote:
> On 10/3/07, Emmanuel Dreyfus <manu@...> wrote:
> > On Wed, Oct 03, 2007 at 05:50:25PM +0200, shuttlebox wrote:
> >  > #if     defined(__EXTENSIONS__) || defined(_REENTRANT) || \
> >  >             (_POSIX_C_SOURCE - 0 >= 199506L)
> >
> >  What do you have in CFLAGS in the Makefile?
> 
> CFLAGS=         -fast -xarch=v8 -xildoff -xstrconst -DUSE_FD_POOL -DUSE_DNSRBL -
> DCONFFILE=\"/opt/csw/etc/mail/greylist.conf\" -D_BSD_SOURCE -I${SRCDIR} -I.

I think _REENTRANT is missing. On my Sun box the man page for strtok_r
says

NOTES
     When compiling multithreaded  applications,  the  _REENTRANT
     flag  must  be defined on the compile line. This flag should
     only be used in multithreaded applications.


After trying

cc -E -g -fast -xarch=v8 -xildoff -xstrconst -I/pd/db/include -I/usr/local/include -DUSE_DNSRBL -D_BSD_SOURCE -DUSE_FD_POOL -D_REENTRANT -c sync.c  | less

you should see the strtok_r declaration ...

> I'm not sure how to do that with Sun Studio C..?

I think in Solaris environments with Sun Studio CC the definition of _REENTRANT
is mandatory (I found it also in other milter applications).

On some projects I'm using

./configure -C CC=cc CFLAGS="-D_XOPEN_SOURCE_EXTENDED=1 -D_XOPEN_SOURCE=1 -D__EXTENSIONS__ -O"

which also leads to the strtok_r declaration (because of __EXTENSIONS__) ...


Johann

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.