Skip to content

Commit

Permalink
Switch HDoff_t from __int64 to int64_t on Windows (#4973)
Browse files Browse the repository at this point in the history
__int64 raises warnings when building with clang
  • Loading branch information
derobins authored Oct 18, 2024
1 parent e12f513 commit 4a10a06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion release_docs/RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ New Features
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 on
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
off_t throughout. The H5Pset_external() offset parameter has also been
updated to be HDoff_t.
Expand Down
6 changes: 3 additions & 3 deletions src/H5public.h
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,14 @@ typedef long long ssize_t;
typedef uint64_t hsize_t;

/* off_t exists on Windows, but is always a 32-bit long, even on 64-bit Windows,
* so on Windows we define HDoff_t to be __int64, which is the type of the
* st_size field of the _stati64 struct.
* so on Windows we define HDoff_t to be int64_t, which is equivalent to __int64,
* the type of the st_size field of the _stati64 struct.
*/
#ifdef H5_HAVE_WIN32_API
/**
* Platform-independent offset
*/
typedef __int64 HDoff_t;
typedef int64_t HDoff_t;
#else
/**
* Platform-independent offset
Expand Down

0 comments on commit 4a10a06

Please sign in to comment.