Martin Buchholz wrote:
>>>>> "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.
well, i disagree. this is nice in theory but less so in practice esp. wrt to
posix/stdclib stuff -- in fact i will veto such changes. i do agree that we
should be writing to ansi-mandated behavior, though -- esp. if it's
long-established practice, i.e. not c9x. (is it in this case?)
Martin
--
Ben
In order to save my hands, I am cutting back on my mail. I also write
as succinctly as possible -- please don't be offended. If you send me
mail, you _will_ get a response, but please be patient, especially for
XEmacs-related mail. If you need an immediate response and it is not
apparent in your message, please say so. Thanks for your understanding.
See also
http://www.666.com/ben/typing.html.