diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-09-26 18:38:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-26 18:38:07 (GMT) |
commit | 58f3d6664e7a2af8d6b1813374ab02d72795a5e1 (patch) | |
tree | 6ea0aa75925b343d756583d3ec746610739e01fd /tools/src | |
parent | d26d674e676446dd2f785ba2895fa72b78025b6e (diff) | |
download | hdf5-58f3d6664e7a2af8d6b1813374ab02d72795a5e1.zip hdf5-58f3d6664e7a2af8d6b1813374ab02d72795a5e1.tar.gz hdf5-58f3d6664e7a2af8d6b1813374ab02d72795a5e1.tar.bz2 |
Use HDoff_t with lseek consistently (#3600)
lseek on Windows uses __int64 for both the offset and return type
instead of off_t like most POSIX systems. This changes ensures we
use HDoff_t (which is typdef'd correctly on Windows) w/ lseek.
Diffstat (limited to 'tools/src')
-rw-r--r-- | tools/src/h5jam/h5jam.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c index 9fea8b8..d97d339 100644 --- a/tools/src/h5jam/h5jam.c +++ b/tools/src/h5jam/h5jam.c @@ -420,8 +420,8 @@ copy_some_to_file(int infid, int outfid, hsize_t starting, hsize_t startout, ssi } /* end if */ while (howmuch > 0) { - HDlseek(outfid, (off_t)to, SEEK_SET); - HDlseek(infid, (off_t)from, SEEK_SET); + HDlseek(outfid, (HDoff_t)to, SEEK_SET); + HDlseek(infid, (HDoff_t)from, SEEK_SET); if (howmuch > 512) { nchars = HDread(infid, buf, (unsigned)512); @@ -499,7 +499,7 @@ write_pad(int ofile, hsize_t old_where, hsize_t *new_where) buf[0] = '\0'; - HDlseek(ofile, (off_t)old_where, SEEK_SET); + HDlseek(ofile, (HDoff_t)old_where, SEEK_SET); psize = compute_user_block_size(old_where); psize -= old_where; |