data.c (Fbyteorder): Make test work even if unsigned is not 4 bytes.
authorJan Djärv <jan.h.d@swipnet.se>
Wed, 31 Mar 2004 12:42:43 +0000 (12:42 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Wed, 31 Mar 2004 12:42:43 +0000 (12:42 +0000)
src/ChangeLog
src/data.c

index 4caaa56..9f41717 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-31  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
+
+       * data.c (Fbyteorder): Make test work even if unsigned is not 4
+       bytes.
+
 2004-03-30  Kenichi Handa  <handa@m17n.org>
 
        * editfns.c (Fformat): Fix initialization of the array info.
index e10d7b4..c3cf05e 100644 (file)
@@ -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);
 }