diff options
-rw-r--r-- | src/H5public.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/H5public.h b/src/H5public.h index 886a964..dec8ef4 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -163,36 +163,50 @@ typedef ssize_t hssize_t; #if H5_SIZEOF_UINT64_T>=8 typedef uint64_t haddr_t; # define HADDR_UNDEF ((haddr_t)(int64_t)(-1)) +# define H5_SIZEOF_HADDR_T H5_SIZEOF_UINT64_T # ifdef H5_HAVE_PARALLEL # define HADDR_AS_MPI_TYPE MPI_LONG_LONG_INT # endif /* H5_HAVE_PARALLEL */ #elif H5_SIZEOF_INT>=8 typedef unsigned haddr_t; # define HADDR_UNDEF ((haddr_t)(-1)) +# define H5_SIZEOF_HADDR_T H5_SIZEOF_INT # ifdef H5_HAVE_PARALLEL # define HADDR_AS_MPI_TYPE MPI_UNSIGNED # endif /* H5_HAVE_PARALLEL */ #elif H5_SIZEOF_LONG>=8 typedef unsigned long haddr_t; # define HADDR_UNDEF ((haddr_t)(long)(-1)) +# define H5_SIZEOF_HADDR_T H5_SIZEOF_LONG # ifdef H5_HAVE_PARALLEL # define HADDR_AS_MPI_TYPE MPI_UNSIGNED_LONG # endif /* H5_HAVE_PARALLEL */ #elif H5_SIZEOF_LONG_LONG>=8 typedef unsigned long long haddr_t; # define HADDR_UNDEF ((haddr_t)(long long)(-1)) +# define H5_SIZEOF_HADDR_T H5_SIZEOF_LONG_LONG # ifdef H5_HAVE_PARALLEL # define HADDR_AS_MPI_TYPE MPI_LONG_LONG_INT # endif /* H5_HAVE_PARALLEL */ #elif H5_SIZEOF___INT64>=8 typedef unsigned __int64 haddr_t; # define HADDR_UNDEF ((haddr_t)(__int64)(-1)) +# define H5_SIZEOF_HADDR_T H5_SIZEOF___INT64 # ifdef H5_HAVE_PARALLEL # define HADDR_AS_MPI_TYPE MPI_LONG_LONG_INT # endif /* H5_HAVE_PARALLEL */ #else # error "nothing appropriate for haddr_t" #endif +#if H5_SIZEOF_HADDR_T ==H5_SIZEOF_INT +# define H5_PRINTF_HADDR_FMT "%u" +#elif H5_SIZEOF_HADDR_T ==H5_SIZEOF_LONG +# define H5_PRINTF_HADDR_FMT "%lu" +#elif H5_SIZEOF_HADDR_T ==H5_SIZEOF_LONG_LONG +# define H5_PRINTF_HADDR_FMT "%"H5_PRINTF_LL_WIDTH"u" +#else +# error "nothing appropriate for H5_PRINTF_HADDR_FMT" +#endif #define HADDR_MAX (HADDR_UNDEF-1) /* Functions in H5.c */ |