Kevin A. McGrail
2009-Feb-26 14:34 UTC
[Dovecot] Compilation Issue on Old Boxes with macro in src/master/main.c
I'm throwing an error compiling with a custom-compiled gcc 3.2.3 on one box. The configuration string is CC=/usr/local/gcc3.2.3/bin/gcc CPPFLAGS=-I/usr/local/ssl/include LDFLAGS=-L/usr/local/ssl/lib ./configure --with-ssl=openssl --with-ssldir=/usr/local/ssl/certs --with-pam --with-pop3d --sysconfdir=/etc --localstatedir=/var I've used this to compile on other older boxes with success. And I compared the command lines and they are identical. This is the error I get with src/master/main.c main.c:365:1: directives may not be used inside a macro argument main.c:364:16: unterminated argument list invoking macro "printf" main.c: In function `print_build_options': main.c:372: syntax error before string constant Changing the function to a simpler function without the ifdef's resolves the issue and dovecot compiles. I would really like to know why two boxes with the same compiler are failing on one but not the other. Perhaps there's some program or library or preprocessor or path or something out of whack. Especially since using gcc 2.96 on the same box works! However, I since this is a simple options output routine and (from my cursory read) there may be some standards issue with this technique, I've also patched the issue. http://www.peregrinehw.com/downloads/dovecot/dovecot-1.1.11-build_options_macro.patch Thoughts? KAM
Timo Sirainen
2009-Feb-26 15:20 UTC
[Dovecot] Compilation Issue on Old Boxes with macro in src/master/main.c
On Feb 26, 2009, at 9:34 AM, Kevin A. McGrail wrote:> main.c:365:1: directives may not be used inside a macro argument > main.c:364:16: unterminated argument list invoking macro "printf"printf is a macro in this system. I don't think that's normal (or even allowed by the standard?).
Maybe Matching Threads
- What's a Reasonable Inbox Size?
- [patch] ices CVS tree and potential problems compiling on Solaris
- Mitigation / disable FTS and pop3-uidl plugin was Re: CVE-2019-7524: Buffer overflow when reading extension header from dovecot index files
- adding math(s) symbols to src/main/plotmath.c
- src/main/arithmetic.c on OpenBSD (PR#863)