diff options
Diffstat (limited to 'src/H5public.h')
-rw-r--r-- | src/H5public.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/H5public.h b/src/H5public.h index da67b5c..a63f6cc 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -98,6 +98,26 @@ typedef size_t hsize_t; typedef ssize_t hssize_t; #endif +/* + * File addresses have there own types. + */ +#if SIZEOF_UINT64_T>=8 + typedef uint64_t haddr_t; +# define HADDR_UNDEF ((haddr_t)(int64_t)(-1)) +#elif SIZEOF_INT>=8 + typedef unsigned haddr_t; +# define HADDR_UNDEF ((haddr_t)(-1)) +#elif SIZEOF_LONG>=8 + typedef unsigned long haddr_t; +# define HADDR_UNDEF ((haddr_t)(long)(-1)) +#elif SIZEOF_LONG_LONG>=8 + typedef unsigned long long haddr_t; +# define HADDR_UNDEF ((haddr_t)(long long)(-1)) +#else +# error "nothing appropriate for haddr_t" +#endif +#define HADDR_MAX (HADDR_UNDEF-1) + #ifdef __cplusplus extern "C" { #endif |