summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-12-30 14:52:52 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-12-30 14:52:52 (GMT)
commit27bff24bed117605d31a51d04baa5bbdc6fc02d6 (patch)
treeb100e435fd8b54af0605bed6c02807904ae91a55
parent12a728c05af4d7af04ce805324854ef2599d0f12 (diff)
downloadhdf5-27bff24bed117605d31a51d04baa5bbdc6fc02d6.zip
hdf5-27bff24bed117605d31a51d04baa5bbdc6fc02d6.tar.gz
hdf5-27bff24bed117605d31a51d04baa5bbdc6fc02d6.tar.bz2
[svn-r9733] Purpose:
Bug fix Description: szip tests were failing due to a few "H5_SZIP_CAN_ENCODE" ifdefs still lying around in the source code. Solution: Eliminate compile time testing by using new SZ_encoder_enabled() routine at run time. Platforms tested: FreeBSD 4.10 (sleipnir) w/szip
-rw-r--r--test/dsets.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/test/dsets.c b/test/dsets.c
index 6731c5d..ead0c43 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -23,6 +23,9 @@
#include <time.h>
#include "h5test.h"
+#ifdef H5_HAVE_SZLIB_H
+# include "szlib.h"
+#endif
/*
* This file needs to access private datatypes from the H5Z package.
@@ -1806,17 +1809,18 @@ test_get_filter_info(void)
#endif
#ifdef H5_HAVE_FILTER_SZIP
- if(H5Zget_filter_info(H5Z_FILTER_SZIP, &flags) < 0) TEST_ERROR
-
-#ifdef H5_SZIP_CAN_ENCODE
- if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
- ((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0))
- TEST_ERROR
-#else
- if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) != 0) ||
- ((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0))
- TEST_ERROR
-#endif /* H5_SZIP_CAN_ENCODE */
+ if(H5Zget_filter_info(H5Z_FILTER_SZIP, &flags) < 0) TEST_ERROR
+
+ if(SZ_encoder_enabled()) {
+ if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
+ ((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0))
+ TEST_ERROR
+ } /* end if */
+ else {
+ if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) != 0) ||
+ ((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0))
+ TEST_ERROR
+ } /* end else */
#endif /* H5_HAVE_FILTER_SZIP */
/* Verify that get_filter_info doesn't throw an error when given a bad filter */