I was trying to compile pop3filter on FreeBSD 5.3 and
got stuck at make:
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -pedantic
-Wall -pedantic-errors -MT newopt.o -MD -MP -MF
".deps/newopt.Tpo" -c -o newopt.o `test -f 'newopt.c'
|| echo './'`newopt.c; then mv -f ".deps/newopt.Tpo"
".deps/newopt.Po"; else rm -f ".deps/newopt.Tpo"; exit
1; fi
newopt.c: In function `process':
newopt.c:464: error: ISO C forbids conversion of object
pointer to function pointer type
newopt.c: At top level:
newopt.c:146: warning: 'clone_argv' defined but not used
*** Error code 1
Notes:
# gcc -v
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.4.2 [FreeBSD] 20040728
# uname -a
FreeBSD nuclear.localdomain 5.3-RELEASE-p2 FreeBSD
5.3-RELEASE-p2 #0: Tue Dec 28 12:57:05 WET 2004
root@nuclear.localdomain:/usr/obj/usr/src/sys/GENERIC i386
Logged In: YES
user_id=991010
you need to remove option -pedantic-errors from ./configure
Logged In: YES
user_id=224010
but i like -pedantic-errors!!!
does the attached patch solves the problem?
thanks for the report. I must warn that pop3filter is not
mantained (and i don't longer use it), but i hope it helps you.
proposed patch
Logged In: YES
user_id=991010
You're author, it's your right to use or not use
-pedantic-errors, and support/forget pop3filter. I'm very
grateful that you just wrote this code.
Actually, pop3filter is most usable with DSPAM project
(which is developing very fast), so it's sad that you don't
support it anymore.
Probably some other developer (not me, i'm not the one! :)
should take your code and continue the project.
About -pedantic-errors. Yes, gcc3 and gcc4 without
-pedantic-errors compiles pop3filter well (tested on Solaris
9x86, Solaris 10x86, RedHat 7.3 x86). I think it would be
reasonable to read an error message (ISO C forbids
conversion of object
pointer to function pointer type) and take a look at the code.
Anyway, thank you for your attention to pop3filter.
Logged In: YES
user_id=224010
he, it was an ironic comment. actually i want to found the
real fix (trying to keep the pedantic-errors flag)
did you tried the attached patch
(https://sourceforge.net/tracker/download.php?group_id=56055&atid=479202&file_id=144145&aid=1092818)
?
Regards,
Juan.
Logged In: YES
user_id=991010
Yes, patch works fine for newopt.c
But there are the same errors in main.c:
main.c:117: error: ISO C forbids conversion of function
pointer to object pointe r type
main.c:118: error: ISO C forbids conversion of function
pointer to object pointe r type
main.c:119: error: ISO C forbids conversion of function
pointer to object pointe r type
main.c:120: error: ISO C forbids conversion of function
pointer to object pointe r type
main.c: In function `main':
main.c:379: warning: implicit declaration of function
`open_syslogd'
main.c:388: warning: implicit declaration of function
`switch_to'
main.c:398: warning: implicit declaration of function
`close_syslogd'
PS. And could you please rename queue_t structure in bugfix
version (0.5.6 may be?)? queue_t1, for instance?
Logged In: NO
If you edit the Makefiles and take out the -pedantic-errors, and re-run make, it compiles.
I can't attest to the viability of the build yet, though.