diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 0d415e859e..efe24ee1c3 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -12,6 +12,7 @@ This file contains a high-level description of this package's evolution. Release * [Enhancement] Restore use of szip compression when writing data (including writing in parallel if HDF5 version is 1.10.3 or greater). See [https://github.com/Unidata/netcdf-c/issues/1546]. * [Enhancement] Enable use of compact storage option for small vars in netCDF/HDF5 files. See [https://github.com/Unidata/netcdf-c/issues/1570]. * [Enhancement] Updated benchmarking program bm_file.c to better handle very large files. See [https://github.com/Unidata/netcdf-c/issues/1555]. +* [Enhancement] Increased size of maximum allowed name in HDF4 files to NC_MAX_NAME. See [https://github.com/Unidata/netcdf-c/issues/1631]. ## 4.7.3 - November 20, 2019 diff --git a/include/hdf4dispatch.h b/include/hdf4dispatch.h index c8dcffee71..f2dfdab13f 100644 --- a/include/hdf4dispatch.h +++ b/include/hdf4dispatch.h @@ -14,10 +14,6 @@ #include "config.h" #include "ncdispatch.h" -/** This is the max size of an SD dataset name in HDF4 (from HDF4 - * documentation).*/ -#define NC_MAX_HDF4_NAME 64 - /** This is the max number of dimensions for a HDF4 SD dataset (from * HDF4 documentation). */ #define NC_MAX_HDF4_DIMS 32 diff --git a/include/netcdf.h b/include/netcdf.h index cc8370f2b8..bb723af219 100644 --- a/include/netcdf.h +++ b/include/netcdf.h @@ -276,8 +276,11 @@ NOTE: The NC_MAX_DIMS, NC_MAX_ATTRS, and NC_MAX_VARS limits #define NC_MAX_VAR_DIMS 1024 /**< max per variable dimensions */ /**@}*/ -/** This is the max size of an SD dataset name in HDF4 (from HDF4 documentation).*/ -#define NC_MAX_HDF4_NAME 64 +/** The max size of an SD dataset name in HDF4 (from HDF4 + * documentation) is 64. But in in the wild we have encountered longer + * names. As long as the HDF4 name is not greater than NC_MAX_NAME, + * our code will be OK. */ +#define NC_MAX_HDF4_NAME NC_MAX_NAME /** In HDF5 files you can set the endianness of variables with nc_def_var_endian(). This define is used there. */