diff options
author | Robert E. McGrath <mcgrath@ncsa.uiuc.edu> | 2004-11-02 19:12:18 (GMT) |
---|---|---|
committer | Robert E. McGrath <mcgrath@ncsa.uiuc.edu> | 2004-11-02 19:12:18 (GMT) |
commit | 8c0c4f945db726fcddd2a40e4f617cdf6aac6be8 (patch) | |
tree | 82b17661293cac5042335d70c2ba1a74e56c2242 /src | |
parent | 3f0abcc71f1803b59d8ca64b9ec642235fdfc1c9 (diff) | |
download | hdf5-8c0c4f945db726fcddd2a40e4f617cdf6aac6be8.zip hdf5-8c0c4f945db726fcddd2a40e4f617cdf6aac6be8.tar.gz hdf5-8c0c4f945db726fcddd2a40e4f617cdf6aac6be8.tar.bz2 |
[svn-r9495] Purpose:
Fix SZIP filter to dynmically detect encoder.
Description:
Solution:
See:
http://hdf.ncsa.uiuc.edu/RFC/SZIP/Szip_dynamic_12_Oct.pdf
Changes to h5dump tests, contingent on detecting SZIP encoder.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Z.c | 3 | ||||
-rw-r--r-- | src/H5Zszip.c | 6 | ||||
-rw-r--r-- | src/H5config.h.in | 3 |
3 files changed, 4 insertions, 8 deletions
@@ -94,6 +94,9 @@ H5Z_init_interface (void) HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register fletcher32 filter") #endif /* H5_HAVE_FILTER_FLETCHER32 */ #ifdef H5_HAVE_FILTER_SZIP + H5Z_SZIP->encoder_present = SZ_encoder_enabled(); + if (H5Z_SZIP->encoder_present < 0) + HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "szip filter reports bad status") if (H5Z_register (H5Z_SZIP)<0) HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register szip filter") #endif /* H5_HAVE_FILTER_SZIP */ diff --git a/src/H5Zszip.c b/src/H5Zszip.c index bca998e..5d0282a 100644 --- a/src/H5Zszip.c +++ b/src/H5Zszip.c @@ -43,11 +43,7 @@ static size_t H5Z_filter_szip (unsigned flags, size_t cd_nelmts, H5Z_class_t H5Z_SZIP[1] = {{ H5Z_CLASS_T_VERS, /* H5Z_class_t version */ H5Z_FILTER_SZIP, /* Filter id number */ -#ifdef H5_SZIP_CAN_ENCODE - 1, /* Encoder present */ -#else - 0, /* Encoder disabled */ -#endif + 1, /* Assume encoder present: check before registering */ 1, /* decoder_present flag (set to true) */ "szip", /* Filter name for debugging */ H5Z_can_apply_szip, /* The "can apply" callback */ diff --git a/src/H5config.h.in b/src/H5config.h.in index 2a01753..d884a20 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -524,9 +524,6 @@ PTHREAD_SCOPE_SYSTEM) call. */ #undef SYSTEM_SCOPE_THREADS -/* Define if szip encoder is present */ -#undef SZIP_CAN_ENCODE - /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ #undef TIME_WITH_SYS_TIME |