37 lines
1.1 KiB
Text
37 lines
1.1 KiB
Text
$NetBSD: patch-aa,v 1.8 1998/12/28 22:21:59 bad Exp $
|
|
|
|
--- stdlib/strtod.c.orig Mon Sep 25 09:30:57 1995
|
|
+++ stdlib/strtod.c Sun Dec 27 23:39:16 1998
|
|
@@ -93,12 +93,23 @@
|
|
static char *rcsid = "$Id: patch-aa,v 1.8 1998/12/28 22:21:59 bad Exp $";
|
|
#endif /* LIBC_SCCS and not lint */
|
|
|
|
+#ifndef __arm32__
|
|
#include <endian.h>
|
|
#if BYTE_ORDER == BIG_ENDIAN
|
|
#define IEEE_BIG_ENDIAN 1
|
|
#else
|
|
#define IEEE_LITTLE_ENDIAN 1
|
|
#endif
|
|
+#endif
|
|
+
|
|
+#ifdef __arm32__
|
|
+/*
|
|
+ * Although the CPU is little endian the FP has different
|
|
+ * byte and word endianness. The byte order is still little endian
|
|
+ * but the word order is big endian.
|
|
+ */
|
|
+#define IEEE_BIG_ENDIAN
|
|
+#endif
|
|
|
|
#include <pthread/ac-types.h>
|
|
/*
|
|
@@ -222,7 +233,7 @@
|
|
* An alternative that might be better on some machines is
|
|
* #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff)
|
|
*/
|
|
-#if defined(IEEE_LITTLE_ENDIAN) + defined(VAX)
|
|
+#if defined(IEEE_LITTLE_ENDIAN) + defined(VAX) + defined(__arm32__)
|
|
#define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b, \
|
|
((unsigned short *)a)[0] = (unsigned short)c, a++)
|
|
#else
|