summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-01-08 16:10:29 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-01-08 16:10:29 (GMT)
commitb73dc64e64070660929ed357e6a608295539e2e0 (patch)
treecd6e8354d6c25192141364b12a12f5b9529c2257 /src
parentabdb704accaf728ebab6699758e12540cace5ff4 (diff)
downloadhdf5-b73dc64e64070660929ed357e6a608295539e2e0.zip
hdf5-b73dc64e64070660929ed357e6a608295539e2e0.tar.gz
hdf5-b73dc64e64070660929ed357e6a608295539e2e0.tar.bz2
[svn-r4796] Purpose:
Bug fix Description: The value of H5_SIZEOF_SSIZE_T is not being updated to reflect the correct size of the ssize_t typedef, if we have to define it ourselves. Solution: Undef H5_SIZEOF_SSIZE_T at beginning of block where we define the typedef for ssize_t and then re-define it to the correct size when we've chosen a size. Platforms tested: FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'src')
-rw-r--r--src/H5public.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/H5public.h b/src/H5public.h
index e65176c..6b6f0cd 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -108,14 +108,20 @@ typedef int htri_t;
/* Define the ssize_t type if it not is defined */
#if H5_SIZEOF_SSIZE_T==0
+/* Undefine this size, we will re-define it in one of the sections below */
+#undef H5_SIZEOF_SSIZE_T
#if H5_SIZEOF_SIZE_T==H5_SIZEOF_INT
typedef int ssize_t;
+# define H5_SIZEOF_SSIZE_T H5_SIZEOF_INT
#elif H5_SIZEOF_SIZE_T==H5_SIZEOF_LONG
typedef long ssize_t;
+# define H5_SIZEOF_SSIZE_T H5_SIZEOF_LONG
#elif H5_SIZEOF_SIZE_T==H5_SIZEOF_LONG_LONG
typedef long long ssize_t;
+# define H5_SIZEOF_SSIZE_T H5_SIZEOF_LONG_LONG
#elif H5_SIZEOF_SIZE_T==H5_SIZEOF___INT64
typedef __int64 ssize_t;
+# define H5_SIZEOF_SSIZE_T H5_SIZEOF___INT64
#else /* Can't find matching type for ssize_t */
# error "nothing appropriate for ssize_t"
#endif