>>>> "Colin" == Colin Rafferty
<colin.rafferty(a)msdw.com> writes:
Colin> Björn Torkelsson writes:
> The latest version of XEmacs updated from CVS yesterday
(2000-04-03) is
> uncompilable under SGI IRIX with the naitive SGI cc compiler.
Colin> I submitted the patch to xemacs-patches to undo Martin's changes
Colin> already. Here it is for your personal enjoyment.
Colin> 2000-03-23 Colin Rafferty <colin(a)xemacs.org>
Colin> * lisp.h (STRETCHY_STRUCT_SIZEOF): Add back.
Colin> * fns.c (size_bit_vector):
Colin> * alloc.c (size_vector):
Colin> (make_vector_internal):
Colin> (make_bit_vector_internal):
Colin> (sweep_bit_vectors_1):
Colin> Replace calls to offsetof with STRETCHY_STRUCT_SIZEOF macro.
I don't like reversing this change. Is the code in XEmacs
ANSI-compliant? I think so. Then is this a bug in SGI's compiler?
If so, I'd rather not have code ugliness for one specific compiler,
especially one so rarely used by the development community. Instead,
I would like to find a better fix for this problem. If necessary, we
add something like:
#undef offsetof
#define offsetof ...
to the sgi s&M files. Or introduce a true configure test for broken
offsetof.
The principle, as I've said many times before, is
Write code compliant with standards, and add workarounds, if
necessary, to special files, especially configure and header files,
designed as portability adapters.
Martin