summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-06-04 20:26:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-06-04 20:26:35 (GMT)
commitc508e1ddc46df7aefaed7949ef14afd1b26c2730 (patch)
tree54ec527254a4bfd4bbcfabb8af1bdd849bdfffd1
parentbdf3620e62d575f8ce7a408f08375974ca07656f (diff)
downloadhdf5-c508e1ddc46df7aefaed7949ef14afd1b26c2730.zip
hdf5-c508e1ddc46df7aefaed7949ef14afd1b26c2730.tar.gz
hdf5-c508e1ddc46df7aefaed7949ef14afd1b26c2730.tar.bz2
[svn-r6963] Purpose:
Code cleanup Description: Fix HSIZET_MAX, HSSIZET_MAX and HSSIZET_MIN to work with Windows (hopefully) Platforms tested: h5committested
-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