From: Jan Djärv Date: Wed, 31 Mar 2004 12:42:43 +0000 (+0000) Subject: data.c (Fbyteorder): Make test work even if unsigned is not 4 bytes. X-Git-Tag: ttn-vms-21-2-B4~7016 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7a8560d7d76040a75cf9bacafac98c5b75426762;p=emacs.git data.c (Fbyteorder): Make test work even if unsigned is not 4 bytes. --- diff --git a/src/ChangeLog b/src/ChangeLog index 4caaa562ee4..9f4171748ef 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-03-31 Jan Dj,Ad(Brv + + * data.c (Fbyteorder): Make test work even if unsigned is not 4 + bytes. + 2004-03-30 Kenichi Handa * editfns.c (Fformat): Fix initialization of the array info. diff --git a/src/data.c b/src/data.c index e10d7b4fd1d..c3cf05e0f10 100644 --- a/src/data.c +++ b/src/data.c @@ -2909,7 +2909,7 @@ lowercase l) for small endian machines. */) () { unsigned i = 0x04030201; - int order = *(char *)&i == 4 ? 66 : 108; + int order = *(char *)&i == 1 ? 108 : 66; return make_number (order); }