diff --git a/config.h.cmake.in b/config.h.cmake.in index 04d876ff17..941240390a 100644 --- a/config.h.cmake.in +++ b/config.h.cmake.in @@ -118,6 +118,12 @@ are set when opening a binary file on Windows. */ /* if true, build byte-range Client */ #cmakedefine ENABLE_BYTERANGE 1 +/* if true, enable ERANGE fill */ +#cmakedefine ENABLE_ERANGE_FILL 1 +#ifdef ENABLE_ERANGE_FILL +#define ERANGE_FILL 1 +#endif + /* if true, use hdf5 S3 virtual file reader */ #cmakedefine ENABLE_HDF5_ROS3 1 diff --git a/libsrc/ncx.m4 b/libsrc/ncx.m4 index c8ea6df416..275fc0ddd5 100644 --- a/libsrc/ncx.m4 +++ b/libsrc/ncx.m4 @@ -39,7 +39,7 @@ ifdef(`PNETCDF',` `#'if HAVE_CONFIG_H `#'include `#'endif') - +#include #include #include #include @@ -527,8 +527,10 @@ swapn8b(void *dst, const void *src, IntType nn) uint64_t *ip = (uint64_t*) src; for (i=0; i (double)Xmax($1) || *ip < FXmin($1)) { FillValue($1, &xx) - DEBUG_ASSIGN_ERROR(err, NC_ERANGE) + /* DEBUG_ASSIGN_ERROR(err, NC_ERANGE) */ + return NC_ERANGE; } #ifdef ERANGE_FILL else