Re: Problem with Excel import on ARM



Please try this.  (Similar changes, if they work, are needed for the
output side too.  I have no idea what the right cpp symbol is, btw.)

Morten


--- gsf-utils.c.~1.20.~ Tue Apr 27 08:03:21 2004
+++ gsf-utils.c Wed May  5 13:17:25 2004
@@ -200,7 +200,12 @@
 double
 gsf_le_get_double (void const *p)
 {
-#if G_BYTE_ORDER == G_BIG_ENDIAN
+#if defined (ARM)
+       double data;
+       memcpy ((char *)&data + 4, p, 4);
+       memcpy ((char *)&data, (const char *)p + 4, 4);
+       return data;
+#elif G_BYTE_ORDER == G_BIG_ENDIAN
        if (sizeof (double) == 8) {
                double  d;
                int     i;



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