Skip to content

Commit

Permalink
Rename HDoff_t to hoff_t
Browse files Browse the repository at this point in the history
hoff_t is in line with the other typedefs in H5public.h (hsize_t, etc.).
  • Loading branch information
derobins committed Nov 4, 2024
1 parent 35df4fb commit faeea29
Show file tree
Hide file tree
Showing 48 changed files with 169 additions and 169 deletions.
2 changes: 1 addition & 1 deletion bin/trace
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ $Source = "";
"H5M_iterate_t" => 'MI',
"H5FD_mem_t" => "Mt",
"off_t" => "o",
"HDoff_t" => "Ho",
"hoff_t" => "Ho",
"H5O_iterate1_t" => "Oi",
"H5O_iterate2_t" => "OI",
"H5O_mcdt_search_cb_t" => "Os",
Expand Down
4 changes: 2 additions & 2 deletions c++/src/C2Cppfunction_map.htm
Original file line number Diff line number Diff line change
Expand Up @@ -16851,7 +16851,7 @@
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, HDoff_t offset,
normal'>void DSetCreatPropList::setExternal(const char* name, hoff_t offset,
hsize_t size)</p>
</td>
<td width=35 valign=top style='width:26.05pt;border-top:none;border-left:
Expand Down Expand Up @@ -16925,7 +16925,7 @@
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, HDoff_t&amp; offset, hsize_t&amp; size)</p>
char* name, hoff_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;
Expand Down
8 changes: 4 additions & 4 deletions c++/src/H5DcreatProp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,10 +649,10 @@ DSetCreatPropList::setFletcher32() const
/// which is a 32-bit signed long value on Windows, which limited
/// the valid offset that can be set to 2 GiB.
///
///\version 2.0.0 \p offset parameter type changed to HDoff_t from off_t.
///\version 2.0.0 \p offset parameter type changed to hoff_t from off_t.
//--------------------------------------------------------------------------
void
DSetCreatPropList::setExternal(const char *name, HDoff_t offset, hsize_t size) const
DSetCreatPropList::setExternal(const char *name, hoff_t offset, hsize_t size) const
{
herr_t ret_value = H5Pset_external(id, name, offset, size);
if (ret_value < 0) {
Expand Down Expand Up @@ -702,10 +702,10 @@ DSetCreatPropList::getExternalCount() const
/// which is a 32-bit signed long value on Windows, which limited
/// the valid offset that can be returned to 2 GiB.
///
///\version 2.0.0 \p offset parameter type changed to HDoff_t from off_t.
///\version 2.0.0 \p offset parameter type changed to hoff_t from off_t.
//--------------------------------------------------------------------------
void
DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char *name, HDoff_t &offset,
DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char *name, hoff_t &offset,
hsize_t &size) const
{
herr_t ret_value = H5Pget_external(id, idx, name_size, name, &offset, &size);
Expand Down
4 changes: 2 additions & 2 deletions c++/src/H5DcreatProp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, HDoff_t &offset, hsize_t &size) const;
void getExternal(unsigned idx, size_t name_size, char *name, hoff_t &offset, hsize_t &size) const;

// Returns the number of external files for a dataset.
int getExternalCount() const;
Expand Down Expand Up @@ -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, HDoff_t offset, hsize_t size) const;
void setExternal(const char *name, hoff_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,
Expand Down
2 changes: 1 addition & 1 deletion fortran/src/H5Pf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,7 @@ h5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f *name_size, _fcd name, o
herr_t status;
size_t c_namelen;
char *c_name = NULL;
HDoff_t c_offset;
hoff_t c_offset;
hsize_t size;

c_namelen = (size_t)*name_size;
Expand Down
4 changes: 2 additions & 2 deletions java/src/jni/h5pDCPLImp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ Java_hdf_hdf5lib_H5_H5Pset_1external(JNIEnv *env, jclass clss, jlong plist, jstr

PIN_JAVA_STRING(ENVONLY, name, fileName, NULL, "H5Pset_external: file name not pinned");

if ((status = H5Pset_external((hid_t)plist, fileName, (HDoff_t)offset, (hsize_t)size)) < 0)
if ((status = H5Pset_external((hid_t)plist, fileName, (hoff_t)offset, (hsize_t)size)) < 0)
H5_LIBRARY_ERROR(ENVONLY);

done:
Expand All @@ -1083,7 +1083,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1external(JNIEnv *env, jclass clss, jlong plist, jint
jboolean isCopy;
jstring str;
hsize_t s;
HDoff_t o;
hoff_t o;
jsize arrLen;
jlong *theArray = NULL;
char *file = NULL;
Expand Down
8 changes: 4 additions & 4 deletions release_docs/RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -353,17 +353,17 @@ New Features
developers who wish to provide an ID for their driver should create
a routine specific to their individual implementation.

- H5Pset_external() now uses HDoff_t, which is always a 64-bit type
- H5Pset_external() now uses hoff_t, which is always a 64-bit type

The H5Pset_external() call took an off_t parameter in HDF5 1.14.x and
earlier. On POSIX systems, off_t is specified as a 64-bit type via
POSIX large-file support (LFS). On Windows, however, off_t is defined
as a 32-bit type, even on 64-bit Windows.

HDoff_t has been added to H5public.h and is defined to be int64_t on
Windows and the library has been updated to use HDoff_t in place of
hoff_t has been added to H5public.h and is defined to be int64_t on
Windows and the library has been updated to use hoff_t in place of
off_t throughout. The H5Pset_external() offset parameter has also been
updated to be HDoff_t.
updated to be hoff_t.

There is no API compatibility wrapper for this change.

Expand Down
4 changes: 2 additions & 2 deletions src/H5Defl.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size
HGOTO_ERROR(H5E_EFL, H5E_NOSPACE, FAIL, "can't build external file name");
if ((fd = HDopen(full_name, O_RDONLY)) < 0)
HGOTO_ERROR(H5E_EFL, H5E_CANTOPENFILE, FAIL, "unable to open external raw data file");
if (HDlseek(fd, (HDoff_t)(efl->slot[u].offset + (HDoff_t)skip), SEEK_SET) < 0)
if (HDlseek(fd, (hoff_t)(efl->slot[u].offset + (hoff_t)skip), SEEK_SET) < 0)
HGOTO_ERROR(H5E_EFL, H5E_SEEKERROR, FAIL, "unable to seek in external raw data file");
#ifndef NDEBUG
tempto_read = MIN((size_t)(efl->slot[u].size - skip), (hsize_t)size);
Expand Down Expand Up @@ -434,7 +434,7 @@ H5D__efl_write(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t siz
else
HGOTO_ERROR(H5E_EFL, H5E_CANTOPENFILE, FAIL, "unable to open external raw data file");
} /* end if */
if (HDlseek(fd, (HDoff_t)(efl->slot[u].offset + (HDoff_t)skip), SEEK_SET) < 0)
if (HDlseek(fd, (hoff_t)(efl->slot[u].offset + (hoff_t)skip), SEEK_SET) < 0)
HGOTO_ERROR(H5E_EFL, H5E_SEEKERROR, FAIL, "unable to seek in external raw data file");
#ifndef NDEBUG
tempto_write = MIN(efl->slot[u].size - skip, (hsize_t)size);
Expand Down
10 changes: 5 additions & 5 deletions src/H5FDcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,16 +349,16 @@ H5FD__core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size)
unsigned char *ptr = file->mem + addr; /* mutable pointer into the
* buffer (can't change mem)
*/
HDoff_t offset = (HDoff_t)addr; /* Offset to write at */
herr_t ret_value = SUCCEED; /* Return value */
hoff_t offset = (hoff_t)addr; /* Offset to write at */
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_PACKAGE

assert(file);

#ifndef H5_HAVE_PREADWRITE
/* Seek to the correct location (if we don't have pwrite) */
if ((HDoff_t)addr != HDlseek(file->fd, (HDoff_t)addr, SEEK_SET))
if ((hoff_t)addr != HDlseek(file->fd, (hoff_t)addr, SEEK_SET))
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "error seeking in backing store");
#endif /* H5_HAVE_PREADWRITE */

Expand Down Expand Up @@ -853,7 +853,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
*/

uint8_t *mem = file->mem; /* memory pointer for writes */
HDoff_t offset = 0; /* offset for reading */
hoff_t offset = 0; /* offset for reading */

while (size > 0) {
h5_posix_io_t bytes_in = 0; /* # of bytes to read */
Expand Down Expand Up @@ -1547,7 +1547,7 @@ H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool closing)
if (0 == bError)
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly");
#else /* H5_HAVE_WIN32_API */
if (-1 == HDftruncate(file->fd, (HDoff_t)new_eof))
if (-1 == HDftruncate(file->fd, (hoff_t)new_eof))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly");
#endif /* H5_HAVE_WIN32_API */

Expand Down
24 changes: 12 additions & 12 deletions src/H5FDdirect.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ typedef struct H5FD_direct_t {

/*
* These macros check for overflow of various quantities. These macros
* assume that HDoff_t is signed and haddr_t and size_t are unsigned.
* assume that hoff_t is signed and haddr_t and size_t are unsigned.
*
* ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
* is too large to be represented by the second argument
Expand All @@ -105,11 +105,11 @@ typedef struct H5FD_direct_t {
* which can be addressed entirely by the second
* argument of the file seek function.
*/
#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
#define MAXADDR (((haddr_t)1 << (8 * sizeof(hoff_t) - 1)) - 1)
#define ADDR_OVERFLOW(A) (HADDR_UNDEF == (A) || ((A) & ~(haddr_t)MAXADDR))
#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
#define REGION_OVERFLOW(A, Z) \
(ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || HADDR_UNDEF == (A) + (Z) || (HDoff_t)((A) + (Z)) < (HDoff_t)(A))
(ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || HADDR_UNDEF == (A) + (Z) || (hoff_t)((A) + (Z)) < (hoff_t)(A))

/* Prototypes */
static herr_t H5FD__direct_populate_config(size_t boundary, size_t block_size, size_t cbuf_size,
Expand Down Expand Up @@ -429,7 +429,7 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
FUNC_ENTER_PACKAGE

/* Sanity check on file offsets */
assert(sizeof(HDoff_t) >= sizeof(size_t));
assert(sizeof(hoff_t) >= sizeof(size_t));

/* Check arguments */
if (!name || !*name)
Expand Down Expand Up @@ -839,7 +839,7 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
*/
if (!_must_align || ((addr % _fbsize == 0) && (size % _fbsize == 0) && ((size_t)buf % _boundary == 0))) {
/* Seek to the correct location */
if ((addr != file->pos || OP_READ != file->op) && HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
if ((addr != file->pos || OP_READ != file->op) && HDlseek(file->fd, (hoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");
/* Read the aligned data in file first, being careful of interrupted
* system calls and partial results. */
Expand Down Expand Up @@ -879,7 +879,7 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U

/* look for the aligned position for reading the data */
assert(!(((addr / _fbsize) * _fbsize) % _fbsize));
if (HDlseek(file->fd, (HDoff_t)((addr / _fbsize) * _fbsize), SEEK_SET) < 0)
if (HDlseek(file->fd, (hoff_t)((addr / _fbsize) * _fbsize), SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");

/*
Expand Down Expand Up @@ -1019,7 +1019,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
*/
if (!_must_align || ((addr % _fbsize == 0) && (size % _fbsize == 0) && ((size_t)buf % _boundary == 0))) {
/* Seek to the correct location */
if ((addr != file->pos || OP_WRITE != file->op) && HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
if ((addr != file->pos || OP_WRITE != file->op) && HDlseek(file->fd, (hoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");

while (size > 0) {
Expand Down Expand Up @@ -1056,7 +1056,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "posix_memalign failed");

/* look for the right position for reading or writing the data */
if (HDlseek(file->fd, (HDoff_t)write_addr, SEEK_SET) < 0)
if (HDlseek(file->fd, (hoff_t)write_addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");

p3 = buf;
Expand Down Expand Up @@ -1097,7 +1097,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_

/* Seek to the last block, for reading */
assert(!((write_addr + write_size - _fbsize) % _fbsize));
if (HDlseek(file->fd, (HDoff_t)(write_addr + write_size - _fbsize), SEEK_SET) < 0)
if (HDlseek(file->fd, (hoff_t)(write_addr + write_size - _fbsize), SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");
} /* end if */
else
Expand Down Expand Up @@ -1133,7 +1133,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_

/*look for the aligned position for writing the data*/
assert(!(write_addr % _fbsize));
if (HDlseek(file->fd, (HDoff_t)write_addr, SEEK_SET) < 0)
if (HDlseek(file->fd, (hoff_t)write_addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");

/*
Expand Down Expand Up @@ -1221,7 +1221,7 @@ H5FD__direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_
if (SetEndOfFile((HANDLE)filehandle) == 0)
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly");
#else /* H5_HAVE_WIN32_API */
if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa))
if (-1 == HDftruncate(file->fd, (hoff_t)file->eoa))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly");
#endif /* H5_HAVE_WIN32_API */

Expand All @@ -1236,7 +1236,7 @@ H5FD__direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_
/*Even though eof is equal to eoa, file is still truncated because Direct I/O
*write introduces some extra data for alignment.
*/
if (-1 == HDftruncate(file->fd, (HDoff_t)file->eof))
if (-1 == HDftruncate(file->fd, (hoff_t)file->eof))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly");
}

Expand Down
6 changes: 3 additions & 3 deletions src/H5FDhdfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,15 @@ typedef struct H5FD_hdfs_t {

/*
* These macros check for overflow of various quantities. These macros
* assume that HDoff_t is signed and haddr_t and size_t are unsigned.
* assume that hoff_t is signed and haddr_t and size_t are unsigned.
*
* ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
* is too large to be represented by the second argument
* of the file seek function.
* Only included if HDFS code should compile.
*
*/
#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
#define MAXADDR (((haddr_t)1 << (8 * sizeof(hoff_t) - 1)) - 1)
#define ADDR_OVERFLOW(A) (HADDR_UNDEF == (A) || ((A) & ~(haddr_t)MAXADDR))

/* Prototypes */
Expand Down Expand Up @@ -833,7 +833,7 @@ H5FD__hdfs_open(const char *path, unsigned flags, hid_t fapl_id, haddr_t maxaddr
#endif /* HDFS_DEBUG */

/* Sanity check on file offsets */
HDcompile_assert(sizeof(HDoff_t) >= sizeof(size_t));
HDcompile_assert(sizeof(hoff_t) >= sizeof(size_t));

/* Check arguments */
if (!path || !*path)
Expand Down
18 changes: 9 additions & 9 deletions src/H5FDlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ typedef struct H5FD_log_t {

/*
* These macros check for overflow of various quantities. These macros
* assume that HDoff_t is signed and haddr_t and size_t are unsigned.
* assume that hoff_t is signed and haddr_t and size_t are unsigned.
*
* ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
* is too large to be represented by the second argument
Expand All @@ -144,11 +144,11 @@ typedef struct H5FD_log_t {
* which can be addressed entirely by the second
* argument of the file seek function.
*/
#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
#define MAXADDR (((haddr_t)1 << (8 * sizeof(hoff_t) - 1)) - 1)
#define ADDR_OVERFLOW(A) (HADDR_UNDEF == (A) || ((A) & ~(haddr_t)MAXADDR))
#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
#define REGION_OVERFLOW(A, Z) \
(ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || HADDR_UNDEF == (A) + (Z) || (HDoff_t)((A) + (Z)) < (HDoff_t)(A))
(ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || HADDR_UNDEF == (A) + (Z) || (hoff_t)((A) + (Z)) < (hoff_t)(A))

/* Prototypes */
static void *H5FD__log_fapl_get(H5FD_t *file);
Expand Down Expand Up @@ -443,7 +443,7 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
FUNC_ENTER_PACKAGE

/* Sanity check on file offsets */
HDcompile_assert(sizeof(HDoff_t) >= sizeof(size_t));
HDcompile_assert(sizeof(hoff_t) >= sizeof(size_t));

/* Check arguments */
if (!name || !*name)
Expand Down Expand Up @@ -1106,7 +1106,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
haddr_t orig_addr = addr;
H5_timer_t read_timer; /* Timer for read operation */
H5_timevals_t read_times; /* Elapsed time for read operation */
HDoff_t offset = (HDoff_t)addr;
hoff_t offset = (hoff_t)addr;
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_PACKAGE
Expand Down Expand Up @@ -1149,7 +1149,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
if (file->fa.flags & H5FD_LOG_TIME_SEEK)
H5_timer_start(&seek_timer);

if (HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
if (HDlseek(file->fd, (hoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");

/* Stop timer for seek() call */
Expand Down Expand Up @@ -1321,7 +1321,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
haddr_t orig_addr = addr;
H5_timer_t write_timer; /* Timer for write operation */
H5_timevals_t write_times; /* Elapsed time for write operation */
HDoff_t offset = (HDoff_t)addr;
hoff_t offset = (hoff_t)addr;
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_PACKAGE
Expand Down Expand Up @@ -1372,7 +1372,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
if (file->fa.flags & H5FD_LOG_TIME_SEEK)
H5_timer_start(&seek_timer);

if (HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
if (HDlseek(file->fd, (hoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");

/* Stop timer for seek() call */
Expand Down Expand Up @@ -1581,7 +1581,7 @@ H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_UNU
}
#else /* H5_HAVE_WIN32_API */
/* Truncate/extend the file */
if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa))
if (-1 == HDftruncate(file->fd, (hoff_t)file->eoa))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly");
#endif /* H5_HAVE_WIN32_API */

Expand Down
Loading

0 comments on commit faeea29

Please sign in to comment.