summaryrefslogtreecommitdiffstats
path: root/test/big.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-09-26 18:38:07 (GMT)
committerGitHub <noreply@github.com>2023-09-26 18:38:07 (GMT)
commit58f3d6664e7a2af8d6b1813374ab02d72795a5e1 (patch)
tree6ea0aa75925b343d756583d3ec746610739e01fd /test/big.c
parentd26d674e676446dd2f785ba2895fa72b78025b6e (diff)
downloadhdf5-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 'test/big.c')
-rw-r--r--test/big.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/big.c b/test/big.c
index fc422b1..428da0a 100644
--- a/test/big.c
+++ b/test/big.c
@@ -143,7 +143,7 @@ is_sparse(void)
if ((fd = HDopen("x.h5", O_RDWR | O_TRUNC | O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0)
return 0;
- if (HDlseek(fd, (off_t)(1024 * 1024), SEEK_SET) != 1024 * 1024)
+ if (HDlseek(fd, (HDoff_t)(1024 * 1024), SEEK_SET) != 1024 * 1024)
return 0;
if (5 != HDwrite(fd, "hello", (size_t)5))
return 0;
@@ -267,7 +267,7 @@ enough_room(hid_t fapl)
if ((fd[i] = HDopen(name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
goto done;
}
- if ((off_t)size != HDlseek(fd[i], (off_t)size, SEEK_SET)) {
+ if ((HDoff_t)size != HDlseek(fd[i], (HDoff_t)size, SEEK_SET)) {
goto done;
}
if (1 != HDwrite(fd[i], "X", (size_t)1)) {