changeset 54660:122a60d4f165

data.c (Fbyteorder): Make test work even if unsigned is not 4 bytes.
author Jan Djärv <jan.h.d@swipnet.se>
date Wed, 31 Mar 2004 12:42:43 +0000
parents 31c6392d9307
children 7b96c8a4ad75
files src/ChangeLog src/data.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Mar 31 01:33:26 2004 +0000
+++ b/src/ChangeLog	Wed Mar 31 12:42:43 2004 +0000
@@ -1,3 +1,8 @@
+2004-03-31  Jan Dj,Ad(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.
--- a/src/data.c	Wed Mar 31 01:33:26 2004 +0000
+++ b/src/data.c	Wed Mar 31 12:42:43 2004 +0000
@@ -2909,7 +2909,7 @@
      ()
 {
   unsigned i = 0x04030201;
-  int order = *(char *)&i == 4 ? 66 : 108;
+  int order = *(char *)&i == 1 ? 108 : 66;
 
   return make_number (order);
 }