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

glibc-patch for ARM-linux



Hi,

attached is a dpatch for glibc which enables correct handling of doubles on
the ARM. I found this when I tried to transfer doubles from or to the arm
using pvm.

Thanks
   Alexander





#! /bin/sh -e

# All lines beginning with `# DP:' are a description of the patch.
# DP: sunrpc/xdr_float.c
# DP: Corrects encoding of doubles on arm-linux
# DP:    Phillip Blundell / Alexander Schulz

# remove the next line

if [ $# -ne 2 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch) patch -d "$2" -f --no-backup-if-mismatch -p0 < $0;;
    -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p0 < $0;;
    *)
	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
	exit 1
esac
exit 0

# append the patch here and adjust the -p? flag in the patch calls.

Index: xdr_float.c
===================================================================
RCS file: /cvs/glibc/libc/sunrpc/xdr_float.c,v
retrieving revision 1.6
diff -u -p -r1.6 xdr_float.c
--- sunrpc/xdr_float.c 1997/05/21 01:15:27     1.6
+++ sunrpc/xdr_float.c 1999/10/10 11:59:16
@@ -52,7 +52,7 @@ static char sccsid[] = "@(#)xdr_float.c
  * This routine works on Suns (Sky / 68000's) and Vaxen.
  */

-#define LSW	(__BYTE_ORDER == __BIG_ENDIAN)
+#define LSW	(__FLOAT_WORD_ORDER == __BIG_ENDIAN)

 #ifdef vax


Reply to: