From 4a10a0607232ce26e5b6f93f6ca211374eddbc08 Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Fri, 18 Oct 2024 09:51:47 -0700 Subject: [PATCH] Switch HDoff_t from __int64 to int64_t on Windows (#4973) __int64 raises warnings when building with clang --- release_docs/RELEASE.txt | 2 +- src/H5public.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index cf9b65cc086..3520e8a6d96 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -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. diff --git a/src/H5public.h b/src/H5public.h index 460aca5f1e1..b50f4d4652c 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -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