[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_C_BIGENDIAN: grep'ing an object file

From: Alexandre Duret-Lutz
Subject: Re: AC_C_BIGENDIAN: grep'ing an object file
Date: 12 Aug 2001 14:00:00 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>> "Akim" == Akim Demaille <address@hidden> writes:


 Akim> I'd be very happy if your completion of the documentation could also
 Akim> explain that it most situations, detecting the endianness at runtime
 Akim> is a preferred solution, 

I'm sorry, none of the 3 patches I've sent do this.  The reason
is that this would requires some arguments I don't have :)

IMHO the prefered solution is to NOT rely on byte ordering at
all.  But when you start to rely on it, I can only come up to
examples where either speed is involved and you can't afford
doing some byte-sex-dispatch in you routines, either you don't
want to bloat your code with twin functions supporting each
endianness because actually only half of them will be used.  (I
remember I heard about a transexual system which could change
it's byte ordering at run-time, and would therefore justify a
run-time check, is that real or just a myth?)

Besides, browsing the archives I realize that « check this at
run-time » was the answer given to people complaining that
AC_C_BIGENDIAN did not work for the cross-compiling case.  I'm
quite sure this weakness of AC_C_BIGENDIAN was a strong argument
for recommending a run-time check.  Unfortunately I think it
doesn't hold anymore (well, I hope so).


Alexandre Duret-Lutz

reply via email to

[Prev in Thread] Current Thread [Next in Thread]