From 345443f9ad239297e6dadbbf2153c12cbed2410e Mon Sep 17 00:00:00 2001 From: David Young Date: Sat, 25 Apr 2020 13:01:03 -0500 Subject: Take pains to provide UINT64_MAX in all conditions. --- src/H5public.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/H5public.h b/src/H5public.h index 68f6e02..97bcb3c 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -201,16 +201,22 @@ typedef long long ssize_t; * defined in Posix.1g, otherwise it is defined here. */ #if H5_SIZEOF_UINT64_T>=8 +#ifndef UINT64_MAX +#define UINT64_MAX ((uint64_t)-1) +#endif #elif H5_SIZEOF_INT>=8 typedef unsigned uint64_t; +# define UINT64_MAX UINT_MAX # undef H5_SIZEOF_UINT64_T # define H5_SIZEOF_UINT64_T H5_SIZEOF_INT #elif H5_SIZEOF_LONG>=8 typedef unsigned long uint64_t; +# define UINT64_MAX ULONG_MAX # undef H5_SIZEOF_UINT64_T # define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG #elif H5_SIZEOF_LONG_LONG>=8 typedef unsigned long long uint64_t; +# define UINT64_MAX ULLONG_MAX # undef H5_SIZEOF_UINT64_T # define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG_LONG #else -- cgit v0.12