Clean up off_t --> HDoff_t stragglers (#4555)

* off_t --> HDoff_t in test

* off_t --> HDoff_t in h5ls, h5dump, & h5repack

* Minor off_t tweak to configure.ac

* off_t --> HDoff_t fixes in src

This changes the type of the offset parameter in H5Pget_external()
to HDoff_t to match H5Pset_external(), along with other minor tweaks.

* off_t --> HDoff_t in C++ wrappers

* Fix off_t usage in Java wrapper
This commit is contained in:
Dana Robinson
2024-06-07 17:25:06 -07:00
committed by GitHub
parent 0cd6a094ab
commit f44fa558f2
17 changed files with 121 additions and 128 deletions
+2 -2
View File
@@ -16851,7 +16851,7 @@ normal'><span style='font-size:14.0pt;mso-bidi-font-size:11.0pt;line-height:
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal'>void DSetCreatPropList::setExternal(const char* name, off_t offset,
normal'>void DSetCreatPropList::setExternal(const char* name, HDoff_t offset,
hsize_t size)</p>
</td>
<td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
@@ -16925,7 +16925,7 @@ normal'><span style='font-size:14.0pt;mso-bidi-font-size:11.0pt;line-height:
mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal'>void DSetCreatPropList::getExternal(unsigned idx, size_t name_size,
char* name, off_t&amp; offset, hsize_t&amp; size)</p>
char* name, HDoff_t&amp; offset, hsize_t&amp; size)</p>
</td>
<td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+13 -6
View File
@@ -645,11 +645,14 @@ DSetCreatPropList::setFletcher32() const
/// the total size is larger than the size of a dataset then the
/// dataset can be extended (provided the data space also allows
/// the extending).
///\note On Windows, off_t is typically a 32-bit signed long value, which
/// limits the valid offset that can be set to 2 GiB.
///\note In 1.14.x and earlier, the offset parameter was of type off_t,
/// which is a 32-bit signed long value on Windows, which limited
/// the valid offset that can be set to 2 GiB.
///
///\version 1.16.0 \p offset parameter type changed to HDoff_t from off_t.
//--------------------------------------------------------------------------
void
DSetCreatPropList::setExternal(const char *name, off_t offset, hsize_t size) const
DSetCreatPropList::setExternal(const char *name, HDoff_t offset, hsize_t size) const
{
herr_t ret_value = H5Pset_external(id, name, offset, size);
if (ret_value < 0) {
@@ -695,11 +698,15 @@ DSetCreatPropList::getExternalCount() const
/// external file name will not be returned. If \a offset or
/// \a size are null pointers then the corresponding information
/// will not be returned.
///\note On Windows, off_t is typically a 32-bit signed long value, which
/// limits the valid offset that can be returned to 2 GiB.
///\note In 1.14.x and earlier, the offset parameter was of type off_t,
/// which is a 32-bit signed long value on Windows, which limited
/// the valid offset that can be returned to 2 GiB.
///
///\version 1.16.0 \p offset parameter type changed to HDoff_t from off_t.
//--------------------------------------------------------------------------
void
DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char *name, off_t &offset, hsize_t &size) const
DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char *name, HDoff_t &offset,
hsize_t &size) const
{
herr_t ret_value = H5Pget_external(id, idx, name_size, name, &offset, &size);
if (ret_value < 0) {
+2 -2
View File
@@ -50,7 +50,7 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList {
void setChunk(int ndims, const hsize_t *dim) const;
// Returns information about an external file.
void getExternal(unsigned idx, size_t name_size, char *name, off_t &offset, hsize_t &size) const;
void getExternal(unsigned idx, size_t name_size, char *name, HDoff_t &offset, hsize_t &size) const;
// Returns the number of external files for a dataset.
int getExternalCount() const;
@@ -101,7 +101,7 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList {
void setDeflate(int level) const;
// Adds an external file to the list of external files.
void setExternal(const char *name, off_t offset, hsize_t size) const;
void setExternal(const char *name, HDoff_t offset, hsize_t size) const;
// Adds a filter to the filter pipeline.
void setFilter(H5Z_filter_t filter, unsigned int flags = 0, size_t cd_nelmts = 0,