summaryrefslogtreecommitdiffstats
path: root/src/H5win32defs.h
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2024-01-18 17:03:59 (GMT)
committerGitHub <noreply@github.com>2024-01-18 17:03:59 (GMT)
commitab11e076bf90ee2f59016bbbc4a781c9142f30b2 (patch)
tree4531f6cde46e3d3a9376ffebda318e8a76592062 /src/H5win32defs.h
parent5ae4ecc1f20659b3abffcc4098a91e085173017b (diff)
downloadhdf5-ab11e076bf90ee2f59016bbbc4a781c9142f30b2.zip
hdf5-ab11e076bf90ee2f59016bbbc4a781c9142f30b2.tar.gz
hdf5-ab11e076bf90ee2f59016bbbc4a781c9142f30b2.tar.bz2
Replace off_t with HDoff_t internally (#3944)
off_t is a 32-bit signed value on Windows, so we should use HDoff_t (which is __int64 on Windows) internally instead. Also defines HDftell on Windows to be _ftelli64().
Diffstat (limited to 'src/H5win32defs.h')
-rw-r--r--src/H5win32defs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5win32defs.h b/src/H5win32defs.h
index ba6028a..a9a4628 100644
--- a/src/H5win32defs.h
+++ b/src/H5win32defs.h
@@ -22,7 +22,7 @@
/* off_t exists on Windows, but is always a 32-bit long, even on 64-bit Windows,
* so we define HDoff_t to be __int64, which is the type of the st_size field
- * of the _stati64 struct.
+ * of the _stati64 struct and what is returned by _ftelli64().
*/
#define HDoff_t __int64
@@ -42,6 +42,7 @@ struct timezone {
#define HDcreat(S, M) Wopen_utf8(S, O_CREAT | O_TRUNC | O_RDWR, M)
#define HDflock(F, L) Wflock(F, L)
#define HDfstat(F, B) _fstati64(F, B)
+#define HDftell(F) _ftelli64(F)
#define HDgetdcwd(D, S, Z) _getdcwd(D, S, Z)
#define HDgetdrive() _getdrive()
#define HDgettimeofday(V, Z) Wgettimeofday(V, Z)