mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
[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)
This commit is contained in:
parent
abdb704acc
commit
b73dc64e64
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user