Fix internal bz2 problems

This commit is contained in:
Dennis Heimbigner 2022-05-27 15:45:34 -06:00
parent 89f7b64442
commit bbe0b212a5
3 changed files with 2 additions and 6 deletions

View File

@ -686,6 +686,7 @@ AC_MSG_RESULT([${have_bz2}])
if test "x$have_bz2" = "xno" ; then
have_local_bz2=yes
AC_MSG_NOTICE([Defaulting to internal libbz2])
else
have_local_bz2=no
fi

View File

@ -995,6 +995,7 @@ NCZ_filter_build(const NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, const NCjson* j
/* Find the plugin for this filter */
for(i=0;i<=loaded_plugins_max;i++) {
if (!loaded_plugins[i]) continue;
if(!loaded_plugins[i] || !loaded_plugins[i]->codec.codec) continue; /* no plugin or no codec */
if(strcmp(NCJstring(jvalue), loaded_plugins[i]->codec.codec->codecid) == 0)
{plugin = loaded_plugins[i]; break;}
}

View File

@ -38,10 +38,8 @@ Author: Dennis Heimbigner
/* Forward */
#ifdef HAVE_BZ2
static int NCZ_bzip2_codec_to_hdf5(const char* codec, size_t* nparamsp, unsigned** paramsp);
static int NCZ_bzip2_hdf5_to_codec(size_t nparams, const unsigned* params, char** codecp);
#endif
#ifdef HAVE_ZSTD
static int NCZ_zstd_codec_to_hdf5(const char* codec, size_t* nparamsp, unsigned** paramsp);
@ -58,7 +56,6 @@ static void NCZ_blosc_codec_finalize(void);
/**************************************************/
/* Provide the codec support for bzip2 filter */
#ifdef HAVE_BZ2
static NCZ_codec_t NCZ_bzip2_codec = {/* NCZ_codec_t codec fields */
NCZ_CODEC_CLASS_VER, /* Struct version number */
NCZ_CODEC_HDF5, /* Struct sort */
@ -139,7 +136,6 @@ NCZ_bzip2_hdf5_to_codec(size_t nparams, const unsigned* params, char** codecp)
done:
return stat;
}
#endif
/**************************************************/
/* Provide the codec support for zstandard filter */
@ -438,9 +434,7 @@ done:
/**************************************************/
NCZ_codec_t* NCZ_stdfilters_codecs[] = {
#ifdef HAVE_BZ2
&NCZ_bzip2_codec,
#endif
#ifdef HAVE_ZSTD
&NCZ_zstd_codec,
#endif