summaryrefslogtreecommitdiff
path: root/devel/mit-pthreads/patches/patch-aa
blob: ecd6abc731dea19c07ab0a6e5904f2c3f4528ff2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$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