On Jul 6, 2009, at 9:13 AM, Stephan Bosch wrote:
Jonathan Siegle wrote:
Dovecot revision: 9186:f70192e7ff3c libsieve revision: 958:e86a81f4bf28 Using IBM c compiler version 8. Trying to compile libsieve(64 bit mode if it matters): "sieve-ast.c", line 302.9: 1506-045 (S) Undeclared identifier last. "sieve-ast.c", line 302.9: 1506-045 (S) Undeclared identifier result. "sieve-ast.c", line 320.9: 1506-275 (S) Unexpected text node
encountered. "sieve-ast.c", line 320.9: 1506-045 (S) Undeclared identifier node. "sieve-ast.c", line 324.9: 1506-045 (S) Undeclared identifier last. "sieve-ast.c", line 324.9: 1506-045 (S) Undeclared identifier result.Apparently, the typeof() operator is not supported by your C
compiler. Having relatively little experience with cross-platform
programming, I did not notice that the typeof operator is not part
of the main ANSI C standard. I've removed it from the sources
entirely (making things somewhat more ugly), so your problem should
be resolved with the following changes:
Ok. I added -qkeyword=typeof to my CFLAGS and the errors go away and
no further issues on compilation.
I didn't have to update to this to make it compile. I don't know if
you need to keep that patch set around.
Thanks! Jonathan
I browsed the web a little and found that IBM C should at least
support __typeof__(e), and, with the appropriate command line
options, typeof as well. Timo, do you know how this works and other
systems that may be affected? Or is it a better idea to avoid
typeof() in general?Regards,
Stephan.