summaryrefslogtreecommitdiffstats
path: root/lib/libm/src
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-05-24 10:57:43 +0000
committerderaadt <deraadt@openbsd.org>1996-05-24 10:57:43 +0000
commit5ca6b84731a0f9e660b4431a7bcc4c2ac40688d4 (patch)
tree2e828a4424208b217c69b59a5ac917a65631bc3c /lib/libm/src
parentserver must parseopts() after getting Root (diff)
downloadwireguard-openbsd-5ca6b84731a0f9e660b4431a7bcc4c2ac40688d4.tar.xz
wireguard-openbsd-5ca6b84731a0f9e660b4431a7bcc4c2ac40688d4.zip
darn good reason not use a primarily big-endian cpu in little-endian mode:
the ARM port runs little-endian, but it's fp is still big-endian!
Diffstat (limited to 'lib/libm/src')
-rw-r--r--lib/libm/src/math_private.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/libm/src/math_private.h b/lib/libm/src/math_private.h
index 741f1fd9ee9..a2b81a1881f 100644
--- a/lib/libm/src/math_private.h
+++ b/lib/libm/src/math_private.h
@@ -11,7 +11,7 @@
/*
* from: @(#)fdlibm.h 5.1 93/09/24
- * $Id: math_private.h,v 1.2 1995/10/28 00:57:20 deraadt Exp $
+ * $Id: math_private.h,v 1.3 1996/05/24 10:57:43 deraadt Exp $
*/
#ifndef _MATH_PRIVATE_H_
@@ -34,7 +34,12 @@
/* A union which permits us to convert between a double and two 32 bit
ints. */
-#if BYTE_ORDER == BIG_ENDIAN
+/*
+ * The arm32 port is little endian except for the FP word order which is
+ * big endian.
+ */
+
+#if (BYTE_ORDER == BIG_ENDIAN) || defined(arm32)
typedef union
{
@@ -48,7 +53,7 @@ typedef union
#endif
-#if BYTE_ORDER == LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN) && !defined(arm32)
typedef union
{