summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5.c2
-rw-r--r--src/H5T.c58
-rw-r--r--src/H5Tconv.c69
-rw-r--r--src/H5Tnative.c44
-rw-r--r--src/H5Tpkg.h6
-rw-r--r--src/H5Tpublic.h4
-rw-r--r--src/H5Ztrans.c38
-rw-r--r--src/H5detect.c2
-rw-r--r--src/H5private.h2
9 files changed, 193 insertions, 32 deletions
diff --git a/src/H5.c b/src/H5.c
index cb86136..d0affcd 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -2126,8 +2126,10 @@ H5_trace (const double *returning, const char *func, const char *type, ...)
fprintf(out, "H5T_NATIVE_FLOAT");
} else if (obj==H5T_NATIVE_DOUBLE_g) {
fprintf(out, "H5T_NATIVE_DOUBLE");
+#if H5_SIZEOF_LONG_DOUBLE !=0
} else if (obj==H5T_NATIVE_LDOUBLE_g) {
fprintf(out, "H5T_NATIVE_LDOUBLE");
+#endif
} else if (obj==H5T_IEEE_F32BE_g) {
fprintf(out, "H5T_IEEE_F32BE");
} else if (obj==H5T_IEEE_F32LE_g) {
diff --git a/src/H5T.c b/src/H5T.c
index 644934a..575a9fe 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -103,7 +103,9 @@ hid_t H5T_NATIVE_LLONG_g = FAIL;
hid_t H5T_NATIVE_ULLONG_g = FAIL;
hid_t H5T_NATIVE_FLOAT_g = FAIL;
hid_t H5T_NATIVE_DOUBLE_g = FAIL;
+#if H5_SIZEOF_LONG_DOUBLE !=0
hid_t H5T_NATIVE_LDOUBLE_g = FAIL;
+#endif
hid_t H5T_NATIVE_B8_g = FAIL;
hid_t H5T_NATIVE_B16_g = FAIL;
hid_t H5T_NATIVE_B32_g = FAIL;
@@ -161,7 +163,9 @@ size_t H5T_NATIVE_LLONG_COMP_ALIGN_g = 0;
size_t H5T_NATIVE_ULLONG_COMP_ALIGN_g = 0;
size_t H5T_NATIVE_FLOAT_COMP_ALIGN_g = 0;
size_t H5T_NATIVE_DOUBLE_COMP_ALIGN_g = 0;
+#if H5_SIZEOF_LONG_DOUBLE !=0
size_t H5T_NATIVE_LDOUBLE_COMP_ALIGN_g = 0;
+#endif
size_t H5T_POINTER_COMP_ALIGN_g = 0;
size_t H5T_HVL_COMP_ALIGN_g = 0;
@@ -184,7 +188,9 @@ size_t H5T_NATIVE_LLONG_ALIGN_g = 0;
size_t H5T_NATIVE_ULLONG_ALIGN_g = 0;
size_t H5T_NATIVE_FLOAT_ALIGN_g = 0;
size_t H5T_NATIVE_DOUBLE_ALIGN_g = 0;
+#if H5_SIZEOF_LONG_DOUBLE !=0
size_t H5T_NATIVE_LDOUBLE_ALIGN_g = 0;
+#endif
/*
* Alignment constraints for C9x types. These are initialized at run time in
@@ -675,7 +681,9 @@ H5T_init_interface(void)
H5T_t *native_ullong=NULL; /* Datatype structure for native unsigned long long */
H5T_t *native_float=NULL; /* Datatype structure for native float */
H5T_t *native_double=NULL; /* Datatype structure for native double */
+#if H5_SIZEOF_LONG_DOUBLE !=0
H5T_t *native_ldouble=NULL; /* Datatype structure for native long double */
+#endif
H5T_t *std_u8le=NULL; /* Datatype structure for unsigned 8-bit little-endian integer */
H5T_t *std_u8be=NULL; /* Datatype structure for unsigned 8-bit big-endian integer */
H5T_t *std_u16le=NULL; /* Datatype structure for unsigned 16-bit little-endian integer */
@@ -748,8 +756,10 @@ H5T_init_interface(void)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object");
if (NULL==(native_double=H5I_object(H5T_NATIVE_DOUBLE_g)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object");
+#if H5_SIZEOF_LONG_DOUBLE !=0
if (NULL==(native_ldouble=H5I_object(H5T_NATIVE_LDOUBLE_g)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object");
+#endif
/*------------------------------------------------------------
* Native types
@@ -992,11 +1002,13 @@ H5T_init_interface(void)
/* floating point */
#if H5_CONVERT_DENORMAL_FLOAT
status |= H5T_register(H5T_PERS_HARD, "flt_dbl", native_float, native_double, H5T_conv_float_double, H5AC_dxpl_id);
- status |= H5T_register(H5T_PERS_HARD, "flt_ldbl", native_float, native_ldouble, H5T_conv_float_ldouble, H5AC_dxpl_id);
status |= H5T_register(H5T_PERS_HARD, "dbl_flt", native_double, native_float, H5T_conv_double_float, H5AC_dxpl_id);
+#if H5_SIZEOF_LONG_DOUBLE !=0
+ status |= H5T_register(H5T_PERS_HARD, "flt_ldbl", native_float, native_ldouble, H5T_conv_float_ldouble, H5AC_dxpl_id);
status |= H5T_register(H5T_PERS_HARD, "dbl_ldbl", native_double, native_ldouble, H5T_conv_double_ldouble, H5AC_dxpl_id);
status |= H5T_register(H5T_PERS_HARD, "ldbl_flt", native_ldouble, native_float, H5T_conv_ldouble_float, H5AC_dxpl_id);
status |= H5T_register(H5T_PERS_HARD, "ldbl_dbl", native_ldouble, native_double, H5T_conv_ldouble_double, H5AC_dxpl_id);
+#endif
#endif /*H5_CONVERT_DENORMAL_FLOAT*/
/* from long_long */
@@ -1104,7 +1116,7 @@ H5T_init_interface(void)
status |= H5T_register(H5T_PERS_HARD, "schar_dbl", native_schar, native_double, H5T_conv_schar_double, H5AC_dxpl_id);
#if H5_SW_INTEGER_TO_LDOUBLE_WORKS
status |= H5T_register(H5T_PERS_HARD, "schar_ldbl", native_schar, native_ldouble, H5T_conv_schar_ldouble, H5AC_dxpl_id);
-#endif /*H5_SW_INTEGER_TO_LDOUBLE_WORKS*/
+#endif /* H5_SW_INTEGER_TO_LDOUBLE_WORKS */
/* From unsigned char to floats */
status |= H5T_register(H5T_PERS_HARD, "uchar_flt", native_uchar, native_float, H5T_conv_uchar_float, H5AC_dxpl_id);
@@ -1152,99 +1164,99 @@ H5T_init_interface(void)
#if H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS
status |= H5T_register(H5T_PERS_HARD, "ulong_flt", native_ulong, native_float, H5T_conv_ulong_float, H5AC_dxpl_id);
status |= H5T_register(H5T_PERS_HARD, "ulong_dbl", native_ulong, native_double, H5T_conv_ulong_double, H5AC_dxpl_id);
-#endif /*H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS*/
+#endif /* H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS */
#if H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS && H5_SW_INTEGER_TO_LDOUBLE_WORKS
status |= H5T_register(H5T_PERS_HARD, "ulong_ldbl", native_ulong, native_ldouble, H5T_conv_ulong_ldouble, H5AC_dxpl_id);
-#endif /* H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS && H5_SW_INTEGER_TO_LDOUBLE_WORKS*/
+#endif /* H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS && H5_SW_INTEGER_TO_LDOUBLE_WORKS */
/* From long long to floats */
status |= H5T_register(H5T_PERS_HARD, "llong_flt", native_llong, native_float, H5T_conv_llong_float, H5AC_dxpl_id);
status |= H5T_register(H5T_PERS_HARD, "llong_dbl", native_llong, native_double, H5T_conv_llong_double, H5AC_dxpl_id);
#if H5_SW_INTEGER_TO_LDOUBLE_WORKS
status |= H5T_register(H5T_PERS_HARD, "llong_ldbl", native_llong, native_ldouble, H5T_conv_llong_ldouble, H5AC_dxpl_id);
-#endif /*H5_SW_INTEGER_TO_LDOUBLE_WORKS*/
+#endif /* H5_SW_INTEGER_TO_LDOUBLE_WORKS */
/* From unsigned long long to floats */
#if H5_ULLONG_TO_FP_CAST_WORKS && H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS
status |= H5T_register(H5T_PERS_HARD, "ullong_flt", native_ullong, native_float, H5T_conv_ullong_float, H5AC_dxpl_id);
status |= H5T_register(H5T_PERS_HARD, "ullong_dbl", native_ullong, native_double, H5T_conv_ullong_double, H5AC_dxpl_id);
-#endif /*H5_ULLONG_TO_FP_CAST_WORKS && H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS*/
-#if H5_ULLONG_TO_FP_CAST_WORKS && H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS && H5_SW_INTEGER_TO_LDOUBLE_WORKS && H5_ULLONG_TO_LDOUBLE_PRECISION_WORKS
+#if H5_ULLONG_TO_LDOUBLE_PRECISION_WORKS
status |= H5T_register(H5T_PERS_HARD, "ullong_ldbl", native_ullong, native_ldouble, H5T_conv_ullong_ldouble, H5AC_dxpl_id);
-#endif /*H5_ULLONG_TO_FP_CAST_WORKS && H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS && H5_SW_INTEGER_TO_LDOUBLE_WORKS && H5_ULLONG_TO_LDOUBLE_PRECISION_WORKS*/
+#endif /* H5_ULLONG_TO_LDOUBLE_PRECISION_WORKS */
+#endif /* H5_ULLONG_TO_FP_CAST_WORKS && H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS */
/* From floats to char */
status |= H5T_register(H5T_PERS_HARD, "flt_schar", native_float, native_schar, H5T_conv_float_schar, H5AC_dxpl_id);
status |= H5T_register(H5T_PERS_HARD, "dbl_schar", native_double, native_schar, H5T_conv_double_schar, H5AC_dxpl_id);
#if H5_SW_LDOUBLE_TO_INTEGER_WORKS
status |= H5T_register(H5T_PERS_HARD, "ldbl_schar", native_ldouble, native_schar, H5T_conv_ldouble_schar, H5AC_dxpl_id);
-#endif /*H5_SW_LDOUBLE_TO_INTEGER_WORKS*/
+#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */
/* From floats to unsigned char */
status |= H5T_register(H5T_PERS_HARD, "flt_uchar", native_float, native_uchar, H5T_conv_float_uchar, H5AC_dxpl_id);
status |= H5T_register(H5T_PERS_HARD, "dbl_uchar", native_double, native_uchar, H5T_conv_double_uchar, H5AC_dxpl_id);
#if H5_SW_LDOUBLE_TO_INTEGER_WORKS
status |= H5T_register(H5T_PERS_HARD, "ldbl_uchar", native_ldouble, native_uchar, H5T_conv_ldouble_uchar, H5AC_dxpl_id);
-#endif /*H5_SW_LDOUBLE_TO_INTEGER_WORKS*/
+#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */
/* From floats to short */
status |= H5T_register(H5T_PERS_HARD, "flt_short", native_float, native_short, H5T_conv_float_short, H5AC_dxpl_id);
status |= H5T_register(H5T_PERS_HARD, "dbl_short", native_double, native_short, H5T_conv_double_short, H5AC_dxpl_id);
#if H5_SW_LDOUBLE_TO_INTEGER_WORKS
status |= H5T_register(H5T_PERS_HARD, "ldbl_short", native_ldouble, native_short, H5T_conv_ldouble_short, H5AC_dxpl_id);
-#endif /*H5_SW_LDOUBLE_TO_INTEGER_WORKS*/
+#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */
/* From floats to unsigned short */
status |= H5T_register(H5T_PERS_HARD, "flt_ushort", native_float, native_ushort, H5T_conv_float_ushort, H5AC_dxpl_id);
status |= H5T_register(H5T_PERS_HARD, "dbl_ushort", native_double, native_ushort, H5T_conv_double_ushort, H5AC_dxpl_id);
#if H5_SW_LDOUBLE_TO_INTEGER_WORKS
status |= H5T_register(H5T_PERS_HARD, "ldbl_ushort", native_ldouble, native_ushort, H5T_conv_ldouble_ushort, H5AC_dxpl_id);
-#endif /*H5_SW_LDOUBLE_TO_INTEGER_WORKS*/
+#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */
/* From floats to int */
status |= H5T_register(H5T_PERS_HARD, "flt_int", native_float, native_int, H5T_conv_float_int, H5AC_dxpl_id);
status |= H5T_register(H5T_PERS_HARD, "dbl_int", native_double, native_int, H5T_conv_double_int, H5AC_dxpl_id);
#if H5_SW_LDOUBLE_TO_INTEGER_WORKS
status |= H5T_register(H5T_PERS_HARD, "ldbl_int", native_ldouble, native_int, H5T_conv_ldouble_int, H5AC_dxpl_id);
-#endif /*H5_SW_LDOUBLE_TO_INTEGER_WORKS*/
+#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */
/* From floats to unsigned int */
status |= H5T_register(H5T_PERS_HARD, "flt_uint", native_float, native_uint, H5T_conv_float_uint, H5AC_dxpl_id);
status |= H5T_register(H5T_PERS_HARD, "dbl_uint", native_double, native_uint, H5T_conv_double_uint, H5AC_dxpl_id);
#if H5_SW_LDOUBLE_TO_INTEGER_WORKS && H5_CV_LDOUBLE_TO_UINT_WORKS
status |= H5T_register(H5T_PERS_HARD, "ldbl_uint", native_ldouble, native_uint, H5T_conv_ldouble_uint, H5AC_dxpl_id);
-#endif /*H5_SW_LDOUBLE_TO_INTEGER_WORKS && H5_CV_LDOUBLE_TO_UINT_WORKS*/
+#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS && H5_CV_LDOUBLE_TO_UINT_WORKS */
status |= H5T_register(H5T_PERS_HARD, "flt_long", native_float, native_long, H5T_conv_float_long, H5AC_dxpl_id);
status |= H5T_register(H5T_PERS_HARD, "dbl_long", native_double, native_long, H5T_conv_double_long, H5AC_dxpl_id);
#if H5_SW_LDOUBLE_TO_INTEGER_WORKS
status |= H5T_register(H5T_PERS_HARD, "ldbl_long", native_ldouble, native_long, H5T_conv_ldouble_long, H5AC_dxpl_id);
-#endif /*H5_SW_LDOUBLE_TO_INTEGER_WORKS*/
+#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */
/* From floats to unsigned long */
status |= H5T_register(H5T_PERS_HARD, "flt_ulong", native_float, native_ulong, H5T_conv_float_ulong, H5AC_dxpl_id);
status |= H5T_register(H5T_PERS_HARD, "dbl_ulong", native_double, native_ulong, H5T_conv_double_ulong, H5AC_dxpl_id);
#if H5_SW_LDOUBLE_TO_INTEGER_WORKS
status |= H5T_register(H5T_PERS_HARD, "ldbl_ulong", native_ldouble, native_ulong, H5T_conv_ldouble_ulong, H5AC_dxpl_id);
-#endif /*H5_SW_LDOUBLE_TO_INTEGER_WORKS*/
+#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */
/* From floats to long long */
#ifndef H5_HW_FP_TO_LLONG_NOT_WORKS
status |= H5T_register(H5T_PERS_HARD, "flt_llong", native_float, native_llong, H5T_conv_float_llong, H5AC_dxpl_id);
status |= H5T_register(H5T_PERS_HARD, "dbl_llong", native_double, native_llong, H5T_conv_double_llong, H5AC_dxpl_id);
-#endif /*H5_HW_FP_TO_LLONG_NOT_WORKS*/
-#if H5_SW_LDOUBLE_TO_INTEGER_WORKS && !H5_HW_FP_TO_LLONG_NOT_WORKS
+#if H5_SW_LDOUBLE_TO_INTEGER_WORKS
status |= H5T_register(H5T_PERS_HARD, "ldbl_llong", native_ldouble, native_llong, H5T_conv_ldouble_llong, H5AC_dxpl_id);
-#endif /*H5_SW_LDOUBLE_TO_INTEGER_WORKS && !H5_HW_FP_TO_LLONG_NOT_WORKS*/
+#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */
+#endif /* !H5_HW_FP_TO_LLONG_NOT_WORKS */
/* From floats to unsigned long long */
#if H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS && H5_FP_TO_ULLONG_RIGHT_MAXIMUM
status |= H5T_register(H5T_PERS_HARD, "flt_ullong", native_float, native_ullong, H5T_conv_float_ullong, H5AC_dxpl_id);
status |= H5T_register(H5T_PERS_HARD, "dbl_ullong", native_double, native_ullong, H5T_conv_double_ullong, H5AC_dxpl_id);
-#endif /*H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS && H5_FP_TO_ULLONG_RIGHT_MAXIMUM*/
-#if H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS && H5_SW_LDOUBLE_TO_INTEGER_WORKS && H5_FP_TO_ULLONG_RIGHT_MAXIMUM
+#if H5_SW_LDOUBLE_TO_INTEGER_WORKS
status |= H5T_register(H5T_PERS_HARD, "ldbl_ullong", native_ldouble, native_ullong, H5T_conv_ldouble_ullong, H5AC_dxpl_id);
-#endif /*H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS && H5_SW_LDOUBLE_TO_INTEGER_WORKS && H5_FP_TO_ULLONG_RIGHT_MAXIMUM*/
+#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */
+#endif /* H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS && H5_FP_TO_ULLONG_RIGHT_MAXIMUM */
/*
* The special no-op conversion is the fastest, so we list it last. The
@@ -1460,7 +1472,9 @@ H5T_term_interface(void)
H5T_NATIVE_ULLONG_g = FAIL;
H5T_NATIVE_FLOAT_g = FAIL;
H5T_NATIVE_DOUBLE_g = FAIL;
+#if H5_SIZEOF_LONG_DOUBLE !=0
H5T_NATIVE_LDOUBLE_g = FAIL;
+#endif
H5T_NATIVE_B8_g = FAIL;
H5T_NATIVE_B16_g = FAIL;
H5T_NATIVE_B32_g = FAIL;
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index a80b7c3..ee917fe 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -7057,6 +7057,7 @@ done:
* destination values are packed.
*-------------------------------------------------------------------------
*/
+#if H5_CONVERT_DENORMAL_FLOAT
herr_t
H5T_conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7072,6 +7073,7 @@ H5T_conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_CONVERT_DENORMAL_FLOAT */
/*-------------------------------------------------------------------------
@@ -7089,6 +7091,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_CONVERT_DENORMAL_FLOAT && H5_SIZEOF_LONG_DOUBLE !=0
herr_t
H5T_conv_float_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7104,6 +7107,7 @@ H5T_conv_float_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_CONVERT_DENORMAL_FLOAT && H5_SIZEOF_LONG_DOUBLE !=0 */
/*-------------------------------------------------------------------------
@@ -7128,6 +7132,7 @@ done:
* destination values are packed.
*-------------------------------------------------------------------------
*/
+#if H5_CONVERT_DENORMAL_FLOAT
herr_t
H5T_conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7143,6 +7148,7 @@ H5T_conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /*H5_CONVERT_DENORMAL_FLOAT*/
/*-------------------------------------------------------------------------
@@ -7160,6 +7166,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_CONVERT_DENORMAL_FLOAT && H5_SIZEOF_LONG_DOUBLE !=0
herr_t
H5T_conv_double_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7172,9 +7179,11 @@ H5T_conv_double_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_fF(DOUBLE, LDOUBLE, double, long double, -, -);
+
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_CONVERT_DENORMAL_FLOAT && H5_SIZEOF_LONG_DOUBLE !=0 */
/*-------------------------------------------------------------------------
@@ -7192,6 +7201,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_CONVERT_DENORMAL_FLOAT && H5_SIZEOF_LONG_DOUBLE !=0
herr_t
H5T_conv_ldouble_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7207,6 +7217,7 @@ H5T_conv_ldouble_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_CONVERT_DENORMAL_FLOAT && H5_SIZEOF_LONG_DOUBLE !=0 */
/*-------------------------------------------------------------------------
@@ -7224,6 +7235,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_CONVERT_DENORMAL_FLOAT && H5_SIZEOF_LONG_DOUBLE !=0
herr_t
H5T_conv_ldouble_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7239,6 +7251,7 @@ H5T_conv_ldouble_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_CONVERT_DENORMAL_FLOAT && H5_SIZEOF_LONG_DOUBLE !=0 */
/*-------------------------------------------------------------------------
@@ -7320,6 +7333,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_INTEGER_TO_LDOUBLE_WORKS
herr_t
H5T_conv_schar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7335,6 +7349,7 @@ H5T_conv_schar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_INTEGER_TO_LDOUBLE_WORKS */
/*-------------------------------------------------------------------------
@@ -7416,6 +7431,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_INTEGER_TO_LDOUBLE_WORKS
herr_t
H5T_conv_uchar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7431,6 +7447,7 @@ H5T_conv_uchar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_INTEGER_TO_LDOUBLE_WORKS */
/*-------------------------------------------------------------------------
@@ -7512,6 +7529,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_INTEGER_TO_LDOUBLE_WORKS
herr_t
H5T_conv_short_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7527,6 +7545,7 @@ H5T_conv_short_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_INTEGER_TO_LDOUBLE_WORKS */
/*-------------------------------------------------------------------------
@@ -7608,6 +7627,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_INTEGER_TO_LDOUBLE_WORKS
herr_t
H5T_conv_ushort_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7623,6 +7643,7 @@ H5T_conv_ushort_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_INTEGER_TO_LDOUBLE_WORKS */
/*-------------------------------------------------------------------------
@@ -7704,6 +7725,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_INTEGER_TO_LDOUBLE_WORKS
herr_t
H5T_conv_int_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7719,6 +7741,7 @@ H5T_conv_int_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_INTEGER_TO_LDOUBLE_WORKS */
/*-------------------------------------------------------------------------
@@ -7800,6 +7823,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_INTEGER_TO_LDOUBLE_WORKS
herr_t
H5T_conv_uint_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7815,6 +7839,7 @@ H5T_conv_uint_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_INTEGER_TO_LDOUBLE_WORKS */
/*-------------------------------------------------------------------------
@@ -7896,6 +7921,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_INTEGER_TO_LDOUBLE_WORKS
herr_t
H5T_conv_long_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7911,6 +7937,7 @@ H5T_conv_long_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_INTEGER_TO_LDOUBLE_WORKS */
/*-------------------------------------------------------------------------
@@ -7928,6 +7955,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS
herr_t
H5T_conv_ulong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7943,6 +7971,7 @@ H5T_conv_ulong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS */
/*-------------------------------------------------------------------------
@@ -7960,6 +7989,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS
herr_t
H5T_conv_ulong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7975,6 +8005,7 @@ H5T_conv_ulong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS */
/*-------------------------------------------------------------------------
@@ -7992,6 +8023,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS && H5_SW_INTEGER_TO_LDOUBLE_WORKS
herr_t
H5T_conv_ulong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -8007,6 +8039,7 @@ H5T_conv_ulong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS && H5_SW_INTEGER_TO_LDOUBLE_WORKS */
/*-------------------------------------------------------------------------
@@ -8088,6 +8121,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_INTEGER_TO_LDOUBLE_WORKS
herr_t
H5T_conv_llong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -8103,9 +8137,10 @@ H5T_conv_llong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_INTEGER_TO_LDOUBLE_WORKS */
+#if H5_ULLONG_TO_FP_CAST_WORKS && H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS
-#if H5_ULLONG_TO_FP_CAST_WORKS
/*-------------------------------------------------------------------------
* Function: H5T_conv_ullong_float
*
@@ -8185,6 +8220,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_ULLONG_TO_LDOUBLE_PRECISION_WORKS
herr_t
H5T_conv_ullong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -8200,7 +8236,8 @@ H5T_conv_ullong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
-#endif /*H5_ULLONG_TO_FP_CAST_WORKS*/
+#endif /* H5_ULLONG_TO_LDOUBLE_PRECISION_WORKS */
+#endif /* H5_ULLONG_TO_FP_CAST_WORKS && H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS */
/*-------------------------------------------------------------------------
@@ -8346,6 +8383,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_LDOUBLE_TO_INTEGER_WORKS
herr_t
H5T_conv_ldouble_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -8361,6 +8399,7 @@ H5T_conv_ldouble_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */
/*-------------------------------------------------------------------------
@@ -8378,6 +8417,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_LDOUBLE_TO_INTEGER_WORKS
herr_t
H5T_conv_ldouble_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -8393,6 +8433,7 @@ H5T_conv_ldouble_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */
/*-------------------------------------------------------------------------
@@ -8538,6 +8579,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_LDOUBLE_TO_INTEGER_WORKS
herr_t
H5T_conv_ldouble_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -8553,6 +8595,7 @@ H5T_conv_ldouble_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */
/*-------------------------------------------------------------------------
@@ -8570,6 +8613,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_LDOUBLE_TO_INTEGER_WORKS
herr_t
H5T_conv_ldouble_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -8585,6 +8629,7 @@ H5T_conv_ldouble_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */
/*-------------------------------------------------------------------------
@@ -8730,6 +8775,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_LDOUBLE_TO_INTEGER_WORKS
herr_t
H5T_conv_ldouble_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -8745,6 +8791,7 @@ H5T_conv_ldouble_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */
/*-------------------------------------------------------------------------
@@ -8762,6 +8809,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_LDOUBLE_TO_INTEGER_WORKS && H5_CV_LDOUBLE_TO_UINT_WORKS
herr_t
H5T_conv_ldouble_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -8777,6 +8825,7 @@ H5T_conv_ldouble_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS && H5_CV_LDOUBLE_TO_UINT_WORKS */
/*-------------------------------------------------------------------------
@@ -8922,6 +8971,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_LDOUBLE_TO_INTEGER_WORKS
herr_t
H5T_conv_ldouble_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -8937,6 +8987,7 @@ H5T_conv_ldouble_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /*H5_SW_LDOUBLE_TO_INTEGER_WORKS*/
/*-------------------------------------------------------------------------
@@ -8954,6 +9005,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_SW_LDOUBLE_TO_INTEGER_WORKS
herr_t
H5T_conv_ldouble_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -8969,6 +9021,7 @@ H5T_conv_ldouble_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */
/*-------------------------------------------------------------------------
@@ -8986,6 +9039,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#ifndef H5_HW_FP_TO_LLONG_NOT_WORKS
herr_t
H5T_conv_float_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -9001,6 +9055,7 @@ H5T_conv_float_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* !H5_HW_FP_TO_LLONG_NOT_WORKS */
/*-------------------------------------------------------------------------
@@ -9018,6 +9073,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS && H5_FP_TO_ULLONG_RIGHT_MAXIMUM
herr_t
H5T_conv_float_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -9033,6 +9089,7 @@ H5T_conv_float_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS && H5_FP_TO_ULLONG_RIGHT_MAXIMUM */
/*-------------------------------------------------------------------------
@@ -9050,6 +9107,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#ifndef H5_HW_FP_TO_LLONG_NOT_WORKS
herr_t
H5T_conv_double_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -9065,6 +9123,7 @@ H5T_conv_double_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* !H5_HW_FP_TO_LLONG_NOT_WORKS */
/*-------------------------------------------------------------------------
@@ -9082,6 +9141,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS && H5_FP_TO_ULLONG_RIGHT_MAXIMUM
herr_t
H5T_conv_double_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -9097,6 +9157,7 @@ H5T_conv_double_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS && H5_FP_TO_ULLONG_RIGHT_MAXIMUM */
/*-------------------------------------------------------------------------
@@ -9114,6 +9175,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if !H5_HW_FP_TO_LLONG_NOT_WORKS && H5_SW_LDOUBLE_TO_INTEGER_WORKS
herr_t
H5T_conv_ldouble_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -9129,6 +9191,7 @@ H5T_conv_ldouble_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* !H5_HW_FP_TO_LLONG_NOT_WORKS && H5_SW_LDOUBLE_TO_INTEGER_WORKS */
/*-------------------------------------------------------------------------
@@ -9146,6 +9209,7 @@ done:
*
*-------------------------------------------------------------------------
*/
+#if H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS && H5_FP_TO_ULLONG_RIGHT_MAXIMUM && H5_SW_LDOUBLE_TO_INTEGER_WORKS
herr_t
H5T_conv_ldouble_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -9161,6 +9225,7 @@ H5T_conv_ldouble_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
done:
FUNC_LEAVE_NOAPI(ret_value);
}
+#endif /* H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS && H5_FP_TO_ULLONG_RIGHT_MAXIMUM && H5_SW_LDOUBLE_TO_INTEGER_WORKS */
/*-------------------------------------------------------------------------
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index ecae777..986d440 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -695,7 +695,9 @@ H5T_get_native_float(size_t size, H5T_direction_t direction, size_t *struct_alig
enum match_type { /* The different kinds of floating point types we can match */
H5T_NATIVE_FLOAT_MATCH_FLOAT,
H5T_NATIVE_FLOAT_MATCH_DOUBLE,
+#if H5_SIZEOF_LONG_DOUBLE !=0
H5T_NATIVE_FLOAT_MATCH_LDOUBLE,
+#endif
H5T_NATIVE_FLOAT_MATCH_UNKNOWN
} match=H5T_NATIVE_FLOAT_MATCH_UNKNOWN;
H5T_t *ret_value; /* Return value */
@@ -708,21 +710,33 @@ H5T_get_native_float(size_t size, H5T_direction_t direction, size_t *struct_alig
if(size<=sizeof(float)) {
match=H5T_NATIVE_FLOAT_MATCH_FLOAT;
native_size = sizeof(float);
- } else if(size<=sizeof(double)) {
+ }
+ else if(size<=sizeof(double)) {
match=H5T_NATIVE_FLOAT_MATCH_DOUBLE;
native_size = sizeof(double);
- } else if(size<=sizeof(long double)) {
+ }
+#if H5_SIZEOF_LONG_DOUBLE !=0
+ else if(size<=sizeof(long double)) {
match=H5T_NATIVE_FLOAT_MATCH_LDOUBLE;
native_size = sizeof(long double);
- } else { /* If not match, return the biggest datatype */
+ }
+#endif
+ else { /* If not match, return the biggest datatype */
+#if H5_SIZEOF_LONG_DOUBLE !=0
match=H5T_NATIVE_FLOAT_MATCH_LDOUBLE;
native_size = sizeof(long double);
+#else
+ match=H5T_NATIVE_FLOAT_MATCH_DOUBLE;
+ native_size = sizeof(double);
+#endif
}
} else {
+#if H5_SIZEOF_LONG_DOUBLE !=0
if(size>=sizeof(long double)) {
match=H5T_NATIVE_FLOAT_MATCH_LDOUBLE;
native_size = sizeof(long double);
- } else if(size>=sizeof(double)) {
+ }
+ else if(size>=sizeof(double)) {
if(size==sizeof(double)) {
match=H5T_NATIVE_FLOAT_MATCH_DOUBLE;
native_size = sizeof(double);
@@ -744,6 +758,25 @@ H5T_get_native_float(size_t size, H5T_direction_t direction, size_t *struct_alig
match=H5T_NATIVE_FLOAT_MATCH_FLOAT;
native_size = sizeof(float);
}
+#else
+ if(size>=sizeof(double)) {
+ match=H5T_NATIVE_FLOAT_MATCH_DOUBLE;
+ native_size = sizeof(double);
+ }
+ else if(size>=sizeof(float)) {
+ if(size==sizeof(float)) {
+ match=H5T_NATIVE_FLOAT_MATCH_FLOAT;
+ native_size = sizeof(float);
+ } else {
+ match=H5T_NATIVE_FLOAT_MATCH_DOUBLE;
+ native_size = sizeof(double);
+ }
+ }
+ else {
+ match=H5T_NATIVE_FLOAT_MATCH_FLOAT;
+ native_size = sizeof(float);
+ }
+#endif
}
/* Set the appropriate native floating point information */
@@ -758,11 +791,12 @@ H5T_get_native_float(size_t size, H5T_direction_t direction, size_t *struct_alig
align = H5T_NATIVE_DOUBLE_COMP_ALIGN_g;
break;
+#if H5_SIZEOF_LONG_DOUBLE !=0
case H5T_NATIVE_FLOAT_MATCH_LDOUBLE:
tid = H5T_NATIVE_LDOUBLE;
align = H5T_NATIVE_LDOUBLE_COMP_ALIGN_g;
break;
-
+#endif
case H5T_NATIVE_FLOAT_MATCH_UNKNOWN:
default:
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "Unknown native floating-point match")
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index e562c66..7763dd9 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -258,7 +258,9 @@ H5_DLLVAR size_t H5T_NATIVE_LONG_COMP_ALIGN_g;
H5_DLLVAR size_t H5T_NATIVE_LLONG_COMP_ALIGN_g;
H5_DLLVAR size_t H5T_NATIVE_FLOAT_COMP_ALIGN_g;
H5_DLLVAR size_t H5T_NATIVE_DOUBLE_COMP_ALIGN_g;
+#if H5_SIZEOF_LONG_DOUBLE !=0
H5_DLLVAR size_t H5T_NATIVE_LDOUBLE_COMP_ALIGN_g;
+#endif
H5_DLLVAR size_t H5T_POINTER_COMP_ALIGN_g;
H5_DLLVAR size_t H5T_HVL_COMP_ALIGN_g;
@@ -283,7 +285,9 @@ H5_DLLVAR size_t H5T_NATIVE_LLONG_ALIGN_g;
H5_DLLVAR size_t H5T_NATIVE_ULLONG_ALIGN_g;
H5_DLLVAR size_t H5T_NATIVE_FLOAT_ALIGN_g;
H5_DLLVAR size_t H5T_NATIVE_DOUBLE_ALIGN_g;
+#if H5_SIZEOF_LONG_DOUBLE !=0
H5_DLLVAR size_t H5T_NATIVE_LDOUBLE_ALIGN_g;
+#endif
/* C9x alignment constraints */
H5_DLLVAR size_t H5T_NATIVE_INT8_ALIGN_g;
@@ -320,8 +324,10 @@ H5_DLLVAR float H5T_NATIVE_FLOAT_POS_INF_g;
H5_DLLVAR float H5T_NATIVE_FLOAT_NEG_INF_g;
H5_DLLVAR double H5T_NATIVE_DOUBLE_POS_INF_g;
H5_DLLVAR double H5T_NATIVE_DOUBLE_NEG_INF_g;
+#if H5_SIZEOF_LONG_DOUBLE !=0
H5_DLLVAR double H5T_NATIVE_LDOUBLE_POS_INF_g;
H5_DLLVAR double H5T_NATIVE_LDOUBLE_NEG_INF_g;
+#endif
/* Common functions */
H5_DLL H5T_t *H5T_create(H5T_class_t type, size_t size);
diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h
index 1971b8f..2e0f17f 100644
--- a/src/H5Tpublic.h
+++ b/src/H5Tpublic.h
@@ -395,7 +395,9 @@ H5_DLLVAR hid_t H5T_FORTRAN_S1_g;
#define H5T_NATIVE_ULLONG (H5OPEN H5T_NATIVE_ULLONG_g)
#define H5T_NATIVE_FLOAT (H5OPEN H5T_NATIVE_FLOAT_g)
#define H5T_NATIVE_DOUBLE (H5OPEN H5T_NATIVE_DOUBLE_g)
+#if H5_SIZEOF_LONG_DOUBLE !=0
#define H5T_NATIVE_LDOUBLE (H5OPEN H5T_NATIVE_LDOUBLE_g)
+#endif
#define H5T_NATIVE_B8 (H5OPEN H5T_NATIVE_B8_g)
#define H5T_NATIVE_B16 (H5OPEN H5T_NATIVE_B16_g)
#define H5T_NATIVE_B32 (H5OPEN H5T_NATIVE_B32_g)
@@ -418,7 +420,9 @@ H5_DLLVAR hid_t H5T_NATIVE_LLONG_g;
H5_DLLVAR hid_t H5T_NATIVE_ULLONG_g;
H5_DLLVAR hid_t H5T_NATIVE_FLOAT_g;
H5_DLLVAR hid_t H5T_NATIVE_DOUBLE_g;
+#if H5_SIZEOF_LONG_DOUBLE !=0
H5_DLLVAR hid_t H5T_NATIVE_LDOUBLE_g;
+#endif
H5_DLLVAR hid_t H5T_NATIVE_B8_g;
H5_DLLVAR hid_t H5T_NATIVE_B16_g;
H5_DLLVAR hid_t H5T_NATIVE_B32_g;
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index b1c3487..8e2f92d 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -170,7 +170,7 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
#define H5Z_XFORM_LL_DO_OP1(RESL,RESR,TYPE,OP,SIZE) \
H5Z_XFORM_DO_OP1(RESL,RESR,TYPE,OP,SIZE)
#endif
-
+#if H5_SIZEOF_LONG_DOUBLE !=0
#define H5Z_XFORM_TYPE_OP(RESL,RESR,TYPE,OP,SIZE) \
{ \
if((TYPE) == H5T_NATIVE_CHAR) \
@@ -202,6 +202,37 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
else if((TYPE) == H5T_NATIVE_LDOUBLE) \
H5Z_XFORM_DO_OP1((RESL), (RESR), long double, OP, (SIZE)) \
}
+#else
+#define H5Z_XFORM_TYPE_OP(RESL,RESR,TYPE,OP,SIZE) \
+{ \
+ if((TYPE) == H5T_NATIVE_CHAR) \
+ H5Z_XFORM_DO_OP1((RESL), (RESR), char, OP, (SIZE)) \
+ else if((TYPE) == H5T_NATIVE_UCHAR) \
+ H5Z_XFORM_DO_OP1((RESL), (RESR), unsigned char, OP, (SIZE)) \
+ else if((TYPE) == H5T_NATIVE_SCHAR) \
+ H5Z_XFORM_DO_OP1((RESL), (RESR), signed char, OP, (SIZE)) \
+ else if((TYPE) == H5T_NATIVE_SHORT) \
+ H5Z_XFORM_DO_OP1((RESL), (RESR), short, OP, (SIZE)) \
+ else if((TYPE) == H5T_NATIVE_USHORT) \
+ H5Z_XFORM_DO_OP1((RESL), (RESR), unsigned short, OP, (SIZE)) \
+ else if((TYPE) == H5T_NATIVE_INT) \
+ H5Z_XFORM_DO_OP1((RESL), (RESR), int, OP, (SIZE)) \
+ else if((TYPE) == H5T_NATIVE_UINT) \
+ H5Z_XFORM_DO_OP1((RESL), (RESR), unsigned int, OP, (SIZE)) \
+ else if((TYPE) == H5T_NATIVE_LONG) \
+ H5Z_XFORM_DO_OP1((RESL), (RESR), long, OP, (SIZE)) \
+ else if((TYPE) == H5T_NATIVE_ULONG) \
+ H5Z_XFORM_DO_OP1((RESL), (RESR), unsigned long, OP, (SIZE)) \
+ else if((TYPE) == H5T_NATIVE_LLONG) \
+ H5Z_XFORM_LL_DO_OP1((RESL), (RESR), long_long, OP, (SIZE)) \
+ else if((TYPE) == H5T_NATIVE_ULLONG) \
+ H5Z_XFORM_ULL_DO_OP1((RESL), (RESR), unsigned long_long, OP, (SIZE)) \
+ else if((TYPE) == H5T_NATIVE_FLOAT) \
+ H5Z_XFORM_DO_OP1((RESL), (RESR), float, OP, (SIZE)) \
+ else if((TYPE) == H5T_NATIVE_DOUBLE) \
+ H5Z_XFORM_DO_OP1((RESL), (RESR), double, OP, (SIZE)) \
+}
+#endif /*H5_SIZEOF_LONG_DOUBLE */
#define H5Z_XFORM_DO_OP3(OP) \
{ \
@@ -917,8 +948,10 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void* array, size_t array_size
H5Z_XFORM_DO_OP5(float, array_size)
else if(array_type == H5T_NATIVE_DOUBLE)
H5Z_XFORM_DO_OP5(double, array_size)
+#if H5_SIZEOF_LONG_DOUBLE !=0
else if(array_type == H5T_NATIVE_LDOUBLE)
H5Z_XFORM_DO_OP5(long double, array_size)
+#endif
}
/* Otherwise, do the full data transform */
@@ -1140,10 +1173,11 @@ H5Z_xform_find_type(const H5T_t* type)
else if((H5T_cmp(type, H5I_object_verify(H5T_NATIVE_DOUBLE,H5I_DATATYPE), FALSE))==0)
HGOTO_DONE(H5T_NATIVE_DOUBLE)
-
+#if H5_SIZEOF_LONG_DOUBLE !=0
/* Check for LONGDOUBLE type */
else if((H5T_cmp(type, H5I_object_verify(H5T_NATIVE_LDOUBLE,H5I_DATATYPE), FALSE))==0)
HGOTO_DONE(H5T_NATIVE_LDOUBLE)
+#endif
else
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not find matching type");
diff --git a/src/H5detect.c b/src/H5detect.c
index e4b093a..1b8f635 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -1381,7 +1381,7 @@ detect_C99_floats(void)
* anyway.
*/
DETECT_F(double, LDOUBLE, d_g[nd_g]); nd_g++;
-#else
+#elif H5_SIZEOF_LONG_DOUBLE !=0
DETECT_F(long double, LDOUBLE, d_g[nd_g]); nd_g++;
#endif
}
diff --git a/src/H5private.h b/src/H5private.h
index eb8eae4..dac97b9 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -462,6 +462,8 @@
# define LLONG_MAX ((long_long)(((unsigned long_long)1 \
<<(8*sizeof(long_long)-1))-1))
# define LLONG_MIN ((long_long)(-LLONG_MAX)-1)
+#endif
+#ifndef ULLONG_MAX
# define ULLONG_MAX ((unsigned long_long)((long_long)(-1)))
#endif
#ifndef SIZET_MAX