Fix a number of minor bugs

1. Fix a shift bug in ncexhash.c (Issue https://github.com/Unidata/netcdf-c/issues/2702)
2. Fix an S3 related error in test_byterange.sh
3. Fix bz2/bzip2 handling in configure.ac
This commit is contained in:
Dennis Heimbigner 2023-07-24 16:20:26 -06:00
parent db2519cf89
commit c4ecdd6403
3 changed files with 16 additions and 2 deletions

View File

@ -749,6 +749,17 @@ fi
AC_MSG_CHECKING([whether libbz2 library is available])
AC_MSG_RESULT([${have_bz2}])
if test "x$have_bz2" = x ; then
# How about bzip2
AC_CHECK_LIB([bzip2],[BZ2_bzCompress],[have_bz2=yes],[have_bz2=no])
if test "x$have_bz2" = "xyes" ; then
AC_SEARCH_LIBS([BZ2_bzCompress],[bzip2 bzip2.dll cygbzip2.dll], [], [])
AC_DEFINE([HAVE_BZ2], [1], [if true, bzip2 library is installed])
fi
AC_MSG_CHECKING([whether libbzip2 library is available])
AC_MSG_RESULT([${have_bz2}])
fi
if test "x$have_bz2" = "xno" ; then
have_local_bz2=yes
AC_MSG_NOTICE([Defaulting to internal libbz2])

View File

@ -854,7 +854,7 @@ ncexhashprintstats(NCexhashmap* map)
fprintf(stderr," |leaf|=%d nactive/nleaves=%g", map->leaflen, leafavg);
fprintf(stderr," load=%g",leafload);
fprintf(stderr,"]\n");
dirsize = (1<<(map->depth)*((unsigned long long)sizeof(void*)));
dirsize = (1<<(map->depth))*((unsigned long long)sizeof(void*));
leafsize = (nleaves)*((unsigned long long)sizeof(NCexleaf));
total = dirsize + leafsize;
fprintf(stderr,"\tsizeof(directory)=%llu sizeof(leaves)=%lld total=%lld\n",

View File

@ -26,9 +26,10 @@ URL4d="s3://unidata-zarr-test-data/byterangefiles/upload4.nc#bytes&aws.profile=u
fi
URL4f="https://crudata.uea.ac.uk/cru/data/temperature/HadCRUT.4.6.0.0.median.nc#mode=bytes"
if test "x$FEATURE_S3TESTS" = xyes ; then
# Do not use unless we know it has some permanence (note the segment 'testing' in the URL);
URL4x="https://s3.us-west-2.amazonaws.com/coawst-public/testing/HadCRUT.4.6.0.0.median.nc#mode=bytes,&aws.profile=none"
fi
echo ""
@ -86,7 +87,9 @@ ${NCDUMP} -n nc_enddef "$U" >tmp_${TAG}.cdl
diff -wb tmp_$TAG.cdl ${srcdir}/nc_enddef.cdl
}
if test "x$FEATURE_S3TESTS" = xyes ; then
testsetup https://s3.us-east-1.amazonaws.com/unidata-zarr-test-data
fi
echo "*** Testing reading NetCDF-3 file with http"