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.
> Please add some ifdefs to check the values, for instance at the top
> of sync.c:
> #ifdef __EXTENSIONS__
> #warn __EXTENSIONS__ is set
> #endif
> #ifdef _REENTRANT
> #warn REENTRANT is set
> #endif
> #ifdef _POSIX_C_SOURCE
> #warn _POSIX_C_SOURCE is set
> #endif
I added this and issued gmake again, here's the output:
cc -fast -xarch=v8 -xildoff -xstrconst -DUSE_FD_POOL -DUSE_DNSRBL
-DCONFFILE=\"/opt/csw/etc/mail/greylist.conf\" -D_BSD_SOURCE -I. -I.
-I/opt/csw/include -c -o sync.o sync.c
"sync.c", line 373: warning: implicit function declaration: strtok_r
"sync.c", line 373: warning: improper pointer/integer combination: op "="
"sync.c", line 614: warning: improper pointer/integer combination: op "="
"sync.c", line 872: warning: statement not reached
"sync.c", line 1020: warning: improper pointer/integer combination: op "="
"sync.c", line 1055: warning: improper pointer/integer combination: op "="
"sync.c", line 1068: warning: improper pointer/integer combination: op "="
"sync.c", line 1092: warning: improper pointer/integer combination: op "="
"sync.c", line 1105: warning: improper pointer/integer combination: op "="
"sync.c", line 1116: warning: improper pointer/integer combination: op "="
"sync.c", line 1129: warning: improper pointer/integer combination: op "="
"sync.c", line 1140: warning: improper pointer/integer combination: op "="
"sync.c", line 1153: warning: improper pointer/integer combination: op "="
"sync.c", line 1165: warning: improper pointer/integer combination: op "="
"sync.c", line 1178: warning: improper pointer/integer combination: op "="
"sync.c", line 1191: warning: improper pointer/integer combination: op "="
"sync.c", line 1535: warning: improper pointer/integer combination: op "="
cc -o milter-greylist milter-greylist.o pending.o sync.o dnsrbl.o
list.o macro.o conf_yacc.o dump_yacc.o conf.o autowhite.o dump.o spf.o
acl.o urlcheck.o stat.o clock.o geoip.o fd_pool.o -lpthread -lsocket
-lresolv -lnsl -lmilter
> Check the man page of your C preprocessor to discover the value of
> _POSIX_C_SOURCE. With GCC, cpp -dM /dev/null should give it.
I'm not sure how to do that with Sun Studio C..?
--
/peter