On Thu, Jan 29, 2009 at 2:17 AM, Michel Dänzer <[email protected]> wrote:
> On Wed, 2009-01-28 at 21:48 +1000, Dave Airlie wrote:
>>
>> Maybe someone understand wtf the code in
>> libXfont/util/fontxlfd.c:xlfd_round_double
>> is all about, but the results were different on different endian
>> machines due to the code
>> being hardcoded for little endian.
>>
>> I reimplemented it for other endian, however I'm unsure about the
>> endian detect code on other OSes,
>> it just uses the autoconf macros.
>
> Not sure it's that simple - IIRC there are differences in the order of
> the two 32 bit halves of a double even within big/little endian
> architectures.
>

Well thats why it tests the bytes 6/7 first to make sure the ordering
is correct before
using the broken (for whatever reason) printf codepath.

It works for me on powerpc which is really the only one I cared about
at the moment.

Dave.

>
> --
> Earthling Michel Dänzer           |                http://www.vmware.com
> Libre software enthusiast         |          Debian, X and DRI developer
>
_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to