From c65c1958dfeca54c74a39c65ca676a536c08de46 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 25 Nov 2007 19:11:39 +0000 Subject: [PATCH] * bugs/compression.sh: Don't fail on big-endian system. Partial fix for bug #21590. * bugs/sysfile-info.sh: Disregard "Integer Format" and "Real Format" lines in SYSFILE INFO output, to permit big-endian systems to pass also. Partial fix for bug #21590. * float-format.c (assemble_number): Only store 32 bits for Z short format. Partial fix for bug #21590. --- src/libpspp/ChangeLog | 5 +++++ src/libpspp/float-format.c | 2 +- tests/ChangeLog | 9 +++++++++ tests/bugs/compression.sh | 25 ++++++++++++++++--------- tests/command/sysfile-info.sh | 4 +--- 5 files changed, 32 insertions(+), 13 deletions(-) diff --git a/src/libpspp/ChangeLog b/src/libpspp/ChangeLog index d237d1fe..12c70f9d 100644 --- a/src/libpspp/ChangeLog +++ b/src/libpspp/ChangeLog @@ -1,3 +1,8 @@ +2007-11-25 Ben Pfaff + + * float-format.c (assemble_number): Only store 32 bits for Z short + format. Partial fix for bug #21590. + 2007-11-08 Ben Pfaff * str.c (ds_read_stream): Change return value semantics to be more diff --git a/src/libpspp/float-format.c b/src/libpspp/float-format.c index 50a4eae6..332e2e78 100644 --- a/src/libpspp/float-format.c +++ b/src/libpspp/float-format.c @@ -695,7 +695,7 @@ assemble_number (enum float_format type, struct fp *fp, void *number) break; case FLOAT_Z_SHORT: - put_uint64 (native_to_be32 (assemble_z (fp, 7, 24)), number); + put_uint32 (native_to_be32 (assemble_z (fp, 7, 24)), number); break; case FLOAT_Z_LONG: put_uint64 (native_to_be64 (assemble_z (fp, 7, 56)), number); diff --git a/tests/ChangeLog b/tests/ChangeLog index 08f43500..7ce9ce63 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,12 @@ +2007-11-25 Ben Pfaff + + * bugs/compression.sh: Don't fail on big-endian system. Partial + fix for bug #21590. + + * bugs/sysfile-info.sh: Disregard "Integer Format" and "Real + Format" lines in SYSFILE INFO output, to permit big-endian systems + to pass also. Partial fix for bug #21590. + 2007-11-15 Ben Pfaff * automake.mk: Add definition of CHARSETALIASDIR to diff --git a/tests/bugs/compression.sh b/tests/bugs/compression.sh index 65564064..d2147237 100755 --- a/tests/bugs/compression.sh +++ b/tests/bugs/compression.sh @@ -77,15 +77,22 @@ if [ $? -ne 0 ] ; then fail ; fi # Make sure the file really was compressed activity="inspect system file" -dd if=$TEMPDIR/com.sav bs=1 skip=72 count=1 2> /dev/null | od > $TEMPDIR/file +dd if=$TEMPDIR/com.sav bs=1 skip=72 count=4 2> /dev/null | od > $TEMPDIR/file if [ $? -ne 0 ] ; then no_result ; fi -activity="check compression byte" -diff -b $TEMPDIR/file - < /dev/null < /dev/null < $TEMPDIR/out-filtered +egrep -v '^(Created|Endian|Integer Format|Real Format): ' $TEMPDIR/pspp.list > $TEMPDIR/out-filtered if [ $? -ne 0 ] ; then no_result ; fi activity="compare output" @@ -94,8 +94,6 @@ diff -b -w $TEMPDIR/out-filtered - << EOF 2.1 SYSFILE INFO. File: pro.sav Label: No label. -Integer Format: Little Endian. -Real Format: IEEE 754 LE. Variables: 2 Cases: 3 Type: System File. -- 2.30.2