summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorMartynas Venckus <martynas@cvs.openbsd.org>2011-07-26 09:36:26 +0000
committerMartynas Venckus <martynas@cvs.openbsd.org>2011-07-26 09:36:26 +0000
commite60d558dab43a24221fecede49e0547bb9a5d37a (patch)
tree6f4c4aed9bb387418aa5837a8c70a0e0cbde6743 /lib/libc
parent5590ed34310d7c2190d6cd27b730d915d3593f40 (diff)
Assumptions about floating-point word order based on BYTE_ORDER are
wrong on ARM. A more elegant solution is pending, but this is good for now. OK miod@.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/rpc/xdr_float.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/rpc/xdr_float.c b/lib/libc/rpc/xdr_float.c
index 23450ae6ae0..155f042177a 100644
--- a/lib/libc/rpc/xdr_float.c
+++ b/lib/libc/rpc/xdr_float.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xdr_float.c,v 1.18 2010/09/01 14:43:34 millert Exp $ */
+/* $OpenBSD: xdr_float.c,v 1.19 2011/07/26 09:36:25 martynas Exp $ */
/*
* Copyright (c) 2010, Oracle America, Inc.
@@ -210,7 +210,7 @@ xdr_double(XDR *xdrs, double *dp)
case XDR_ENCODE:
#ifdef IEEEFP
i32p = (int32_t *)dp;
-#if BYTE_ORDER == BIG_ENDIAN
+#if (BYTE_ORDER == BIG_ENDIAN) || defined(__arm__)
tmpl = *i32p++;
rv = XDR_PUTLONG(xdrs, &tmpl);
if (!rv)
@@ -254,7 +254,7 @@ xdr_double(XDR *xdrs, double *dp)
case XDR_DECODE:
#ifdef IEEEFP
i32p = (int32_t *)dp;
-#if BYTE_ORDER == BIG_ENDIAN
+#if (BYTE_ORDER == BIG_ENDIAN) || defined(__arm__)
rv = XDR_GETLONG(xdrs, &tmpl);
*i32p++ = tmpl;
if (!rv)