summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-11-08 14:21:55 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-11-08 14:21:55 (GMT)
commit677f6cc3d8d7000c19869f7c09e9a015606369b8 (patch)
tree36d06202979d3b972dd923eecfa9ee7a9757bd1d /src/H5private.h
parent1716cab24b78f7cdd0590da2b30a35320af9456b (diff)
downloadhdf5-677f6cc3d8d7000c19869f7c09e9a015606369b8.zip
hdf5-677f6cc3d8d7000c19869f7c09e9a015606369b8.tar.gz
hdf5-677f6cc3d8d7000c19869f7c09e9a015606369b8.tar.bz2
[svn-r7828] Purpose:
Bug fix Description: Make --disable-hsizet work properly again by fixing a couple of tests and correcting the definition of SSIZET_MAX. Platforms tested: FreeBSD 4.9 (sleipnir) h5committest not used, as it doesn't test this configuration.
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 9b9cf41..d187581 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -437,15 +437,15 @@
# define ULLONG_MAX ((unsigned long_long)((long_long)(-1)))
#endif
#ifndef SIZET_MAX
-# define SIZET_MAX ((hsize_t)(size_t)(ssize_t)(-1))
-# define SSIZET_MAX ((hsize_t)(ssize_t)((size_t)1<<(8*sizeof(ssize_t)-1)))
+# define SIZET_MAX ((size_t)(ssize_t)(-1))
+# define SSIZET_MAX ((ssize_t)(((size_t)1<<(8*sizeof(ssize_t)-1))-1))
#endif
#ifdef H5_HAVE_LARGE_HSIZET
-#define HSIZET_MAX ULLONG_MAX
-#define HSSIZET_MAX LLONG_MAX
+#define HSIZET_MAX ((hsize_t)ULLONG_MAX)
+#define HSSIZET_MAX ((hssize_t)LLONG_MAX)
#else /* H5_HAVE_LARGE_HSIZET */
-#define HSIZET_MAX SIZET_MAX
-#define HSSIZET_MAX SSIZET_MAX
+#define HSIZET_MAX ((hsize_t)SIZET_MAX)
+#define HSSIZET_MAX ((hssize_t)SSIZET_MAX)
#endif /* H5_HAVE_LARGE_HSIZET */
#define HSSIZET_MIN (~(HSSIZET_MAX))