Glynn Clements <glynn(a)gclements.plus.com> writes:
Stephen J. Turnbull wrote:
> > Fix compile issues for C89 compilers. Use log() instead of log2().
>
> GCC has a -C89 switch or something like that that either enforces or
> warns about C89 compatibility.
-std=c89 (for C, this is equivalent to -ansi). If you use that switch,
you typically need to explicitly define feature macros (-D_POSIX_SOURCE,
-D_XOPEN_SOURCE, etc), otherwise the standard C headers (<stdio.h> etc)
will omit declarations which aren't part of the C standard.
I compiled with -ansi successfully without changes. (After I fixed the
error I had introduced.) I didn't look at any warnings though.
I just tried with -std=c89 and it failed at line 1389 in lisp.h, which
is DECLARE_INLINE_HEADER. It must turn off gcc extensions, wchi aren't
standard anyway. :-)
So we could use -ansi with gcc. Or would that be on linux? I'm not
sure which condition would trigger it. I've added it to my personal
configuration script.
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta