summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5private.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 7a52698..8288efb 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -431,8 +431,15 @@
# define SSIZET_MAX ((hsize_t)(ssize_t)((size_t)1<<(8*sizeof(ssize_t)-1)))
#endif
#ifdef H5_HAVE_LARGE_HSIZET
-#define HSIZET_MAX 0xffffffffffffffffULL
-#define HSSIZET_MAX 0x7fffffffffffffffLL
+# if H5_SIZEOF___INT64>0
+#define HSIZET_MAX _UI64_MAX /*Win32*/
+#define HSSIZET_MAX I64_MAX
+# elif H5_SIZEOF_LONG_LONG>0
+#define HSIZET_MAX ULLONG_MAX
+#define HSSIZET_MAX LLONG_MAX
+# else /* Can't find matching type for hsize_t */
+# error "nothing appropriate for hsize_t"
+# endif /* H5_HAVE_LARGE_HSIZET */
#else /* H5_HAVE_LARGE_HSIZET */
#define HSIZET_MAX SIZET_MAX
#define HSSIZET_MAX SSIZET_MAX