diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2022-07-09 10:05:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-09 10:05:53 (GMT) |
commit | 1227bc041118e1c9fb3fdd48c083186f5deb4676 (patch) | |
tree | 0cddd12b3652faaf7adf242b2ed936d127fae454 /src/H5win32defs.h | |
parent | 57cc499009f49b40505b8b3c1ca3e405c6447a16 (diff) | |
download | hdf5-feature/onion_vfd.zip hdf5-feature/onion_vfd.tar.gz hdf5-feature/onion_vfd.tar.bz2 |
Sync with develop (#1863)feature/onion_vfd
Diffstat (limited to 'src/H5win32defs.h')
-rw-r--r-- | src/H5win32defs.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/H5win32defs.h b/src/H5win32defs.h index 44cf50c..d3ad098 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -26,6 +26,9 @@ */ #ifdef H5_HAVE_WIN32_API +/* __int64 is the correct type for the st_size field of the _stati64 struct. + * MSDN isn't very clear about this. + */ typedef struct _stati64 h5_stat_t; typedef __int64 h5_stat_size_t; @@ -57,7 +60,12 @@ struct timezone { #define HDlstat(S, B) _lstati64(S, B) #define HDmemset(X, C, Z) memset((void *)(X), C, Z) /* Cast avoids MSVC warning */ #define HDmkdir(S, M) _mkdir(S) -#define HDoff_t __int64 + +/* 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. + */ +#define HDoff_t __int64 /* Note that the variadic HDopen macro is using a VC++ extension * where the comma is dropped if nothing is passed to the ellipsis. |