diff options
author | David Young <dyoung@hdfgroup.org> | 2020-04-25 18:01:03 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-07-07 15:49:55 (GMT) |
commit | 345443f9ad239297e6dadbbf2153c12cbed2410e (patch) | |
tree | 7e0396d86a54d1632309dfdab24cdf1201fe9785 /src/H5public.h | |
parent | c6fcec46c9793ee43e59f11724a128a02b11872c (diff) | |
download | hdf5-345443f9ad239297e6dadbbf2153c12cbed2410e.zip hdf5-345443f9ad239297e6dadbbf2153c12cbed2410e.tar.gz hdf5-345443f9ad239297e6dadbbf2153c12cbed2410e.tar.bz2 |
Take pains to provide UINT64_MAX in all conditions.
Diffstat (limited to 'src/H5public.h')
-rw-r--r-- | src/H5public.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 |