summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST1
-rw-r--r--c++/src/H5PredType.cpp4
-rw-r--r--config/nec-superux14.1146
-rwxr-xr-xconfigure19
-rw-r--r--configure.in19
-rw-r--r--fortran/src/H5FDmpiof.c2
-rw-r--r--fortran/src/H5f90proto.h2
-rwxr-xr-xhl/fortran/src/H5LTf90proto.h2
-rw-r--r--perform/zip_perf.c3
-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
-rw-r--r--test/dt_arith.c126
-rw-r--r--test/dtransform.c4
-rw-r--r--test/dtypes.c2
-rw-r--r--test/tconfig.c2
-rw-r--r--tools/h5dump/h5dump.c2
-rw-r--r--tools/h5ls/h5ls.c2
-rw-r--r--tools/lib/h5diff_util.c2
25 files changed, 505 insertions, 58 deletions
diff --git a/MANIFEST b/MANIFEST
index c695a6c..5462b41 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -77,6 +77,7 @@ a------------------------------------------------------------------------------
./config/linux-gnulibc1
./config/linux-gnulibc2
./config/lt_vers.am
+./config/nec-superux14.1
./config/nv1-cray
./config/Makefile.am.blank
./config/pgi-fflags
diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp
index a5233af..183c7d2 100644
--- a/c++/src/H5PredType.cpp
+++ b/c++/src/H5PredType.cpp
@@ -170,7 +170,9 @@ const PredType PredType::NATIVE_ULONG( E_NATIVE_ULONG );
const PredType PredType::NATIVE_LLONG( E_NATIVE_LLONG );
const PredType PredType::NATIVE_ULLONG( E_NATIVE_ULLONG );
const PredType PredType::NATIVE_DOUBLE( E_NATIVE_DOUBLE );
+#if H5_SIZEOF_LONG_DOUBLE !=0
const PredType PredType::NATIVE_LDOUBLE( E_NATIVE_LDOUBLE );
+#endif
const PredType PredType::NATIVE_B8( E_NATIVE_B8 );
const PredType PredType::NATIVE_B16( E_NATIVE_B16 );
const PredType PredType::NATIVE_B32( E_NATIVE_B32 );
@@ -426,8 +428,10 @@ hid_t PredType::getId() const
return( H5T_NATIVE_ULLONG );
case E_NATIVE_DOUBLE:
return( H5T_NATIVE_DOUBLE );
+#if H5_SIZEOF_LONG_DOUBLE !=0
case E_NATIVE_LDOUBLE:
return( H5T_NATIVE_LDOUBLE );
+#endif
case E_NATIVE_B8:
return( H5T_NATIVE_B8 );
case E_NATIVE_B16:
diff --git a/config/nec-superux14.1 b/config/nec-superux14.1
new file mode 100644
index 0000000..568945e
--- /dev/null
+++ b/config/nec-superux14.1
@@ -0,0 +1,146 @@
+# -*- shell-script -*-
+#
+# This file is part of the HDF5 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compile modes.
+# [ak] created for a nec sx6 running superux with native compilers
+# [ak] -xint is neccessary because of src/H5FDmulti.c[H5Pset_fapl_multi]
+# [ak] integer division of unsigned longs for _memb_addr
+
+#----------------------------------------------------------------------------
+# Compiler flags. The CPPFLAGS values should not include package debug
+# flags like `-DH5G_DEBUG' since these are added with the
+# `--enable-debug' switch of configure.
+#----------------------------------------------------------------------------
+
+
+# Choosing a C Compiler
+# ---------------------
+#
+# The user should be able to specify the compiler by setting the CC
+# environment variable to the name of the compiler and any switches it
+# requires for proper operation. If CC is unset then this script may
+# set it. If CC is unset by time this script completes then configure
+# will try `gcc' and `cc' in that order (perhaps some others too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+# in order to distinguish between different compilers when
+# deciding which compiler command-line switches to use. This
+# variable is set based on the incoming value of $CC and is only
+# used within this file.
+
+if test "X-" = "X-$CC"; then
+ CC="cc -Xa -size_t64 -xint"
+ CC_BASENAME=cc
+fi
+
+if test "X-" = "X-$CXX"; then
+ CXX="c++ -size_t64 -xint -Kexceptions"
+ CXX_BASENAME=c++
+fi
+
+if test "X-" = "X-$F9X"; then
+ FC="f90 -size_t64 -g -DDEBUG -UNDEBUG"
+ FC_BASENAME=f90
+fi
+
+# C Compiler and Preprocessor Flags
+# ---------------------------------
+#
+# Flags that end with `_CFLAGS' are always passed to the compiler.
+# Flags that end with `_CPPFLAGS' are passed to the compiler when
+# compiling but not when linking.
+#
+# DEBUG_CFLAGS Flags to pass to the compiler to create a
+# DEBUG_CPPFLAGS library suitable for use with debugging
+# tools. Usually this list will exclude
+# optimization switches (like `-O') and include
+# switches that turn on symbolic debugging
+# support (like `-g').
+#
+# PROD_CFLAGS Flags to pass to the compiler to create a
+# PROD_CPPFLAGS production version of the library. These
+# usualy exclude symbolic debugging switches
+# (like `-g') and include optimization switches
+# (like `-O').
+#
+# PROFILE_CFLAGS Flags to pass to the compiler to create a
+# PROFILE_CPPFLAGS library suitable for performance testing (like
+# `-pg'). This may or may not include debugging
+# or production flags.
+#
+# CFLAGS Flags can be added to this variable which
+# might already be partially initialized. These
+# flags will always be passed to the compiler
+# and should include switches to turn on full
+# warnings. HDF5 attempts to be ANSI and Posix
+# compliant and employ good programming
+# practices resulting in few if any
+# warnings.
+#
+# Warning flags do not have to be added to CFLAGS
+# variable if the compiler is the GNU gcc
+# compiler or a descendent of gcc such as EGCS or PGCC.
+#
+# The CFLAGS should contains *something* or else
+# configure will probably add `-g'. For most
+# systems this isn't a problem but some systems
+# will disable optimizations in favor of the
+# `-g'.
+#
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string. You
+# can use the value of $CC_BASENAME which is the base name of the
+# first word in $CC (note that the value of CC may have changed
+# above).
+
+case $CC_BASENAME in
+ cc)
+ CFLAGS="$CFLAGS"
+ DEBUG_CFLAGS="-Cdebug -g -wall"
+ DEBUG_CPPFLAGS=
+ PROD_CFLAGS="-Cnoopt"
+ PROD_CPPFLAGS=
+ PROFILE_CFLAGS="-p"
+ PROFILE_CPPFLAGS=
+ ;;
+
+ *)
+ CFLAGS="$CFLAGS"
+ DEBUG_CFLAGS="-g"
+ DEBUG_CPPFLAGS=
+ PROD_CFLAGS=""
+ PROD_CPPFLAGS=
+ PROFILE_CFLAGS="-p"
+ PROFILE_CPPFLAGS=
+ ;;
+esac
+
+case $CXX_BASENAME in
+ c++)
+ CXXFLAGS="$CXXFLAGS -Tlocal"
+ ;;
+
+ *)
+ CXXFLAGS="$CXXFLAGS"
+ ;;
+esac
+
+case $FC_BASENAME in
+ f90)
+ FCFLAGS="$F9XFLAGS"
+ ;;
+
+ *)
+ FCFLAGS="$F9XFLAGS"
+ ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=0}
+CONFIGURE_LIBS=/usr/lib/libi90sxe.a
+
diff --git a/configure b/configure
index 226019a..fdd6796 100755
--- a/configure
+++ b/configure
@@ -49913,6 +49913,10 @@ fi
echo "$as_me:$LINENO: checking if accurately converting from long double to integers works" >&5
echo $ECHO_N "checking if accurately converting from long double to integers works... $ECHO_C" >&6
+if test ${ac_cv_sizeof_long_double}=0; then
+ hdf5_cv_sw_ldouble_to_integer_works=${hdf5_cv_sw_ldouble_to_integer_works=no}
+fi
+
if test "${hdf5_cv_sw_ldouble_to_integer_works+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -49993,6 +49997,12 @@ fi
echo "$as_me:$LINENO: checking if accurately converting from integers to long double works" >&5
echo $ECHO_N "checking if accurately converting from integers to long double works... $ECHO_C" >&6
+
+if test ${ac_cv_sizeof_long_double}=0; then
+ hdf5_cv_sw_integer_to_ldouble_works=${hdf5_cv_sw_integer_to_ldouble_works=no}
+fi
+
+
if test "${hdf5_cv_sw_integer_to_ldouble_works+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -50302,6 +50312,10 @@ fi
echo "$as_me:$LINENO: checking if converting long double to unsigned int values works" >&5
echo $ECHO_N "checking if converting long double to unsigned int values works... $ECHO_C" >&6
+if test ${ac_cv_sizeof_long_double}=0; then
+ hdf5_cv_ldouble_to_uint_works=${hdf5_cv_ldouble_to_uint_works=no}
+fi
+
if test "${hdf5_cv_ldouble_to_uint_works+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -50418,6 +50432,11 @@ fi
echo "$as_me:$LINENO: checking if converting unsigned long long to long double with precision work" >&5
echo $ECHO_N "checking if converting unsigned long long to long double with precision work... $ECHO_C" >&6
+
+if test ${ac_cv_sizeof_long_double}=0; then
+ hdf5_cv_ullong_to_ldouble_precision_works=${hdf5_cv_ullong_to_ldouble_precision_works=no}
+fi
+
if test "${hdf5_cv_ullong_to_ldouble_precision_works+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
diff --git a/configure.in b/configure.in
index 6b3e08c..eff7977 100644
--- a/configure.in
+++ b/configure.in
@@ -2382,6 +2382,10 @@ dnl Other HP-UX systems are unknown yet. (1/8/05 - SLU)
AC_MSG_CHECKING([if accurately converting from long double to integers works])
+if test ${ac_cv_sizeof_long_double}=0; then
+ hdf5_cv_sw_ldouble_to_integer_works=${hdf5_cv_sw_ldouble_to_integer_works=no}
+fi
+
AC_CACHE_VAL([hdf5_cv_sw_ldouble_to_integer_works],
[AC_TRY_RUN([
int main(void)
@@ -2423,6 +2427,12 @@ dnl incorrect and its cache value is set "no" in its config/irix6.x and
dnl irix5.x)
dnl
AC_MSG_CHECKING([if accurately converting from integers to long double works])
+
+if test ${ac_cv_sizeof_long_double}=0; then
+ hdf5_cv_sw_integer_to_ldouble_works=${hdf5_cv_sw_integer_to_ldouble_works=no}
+fi
+
+
AC_CACHE_VAL([hdf5_cv_sw_integer_to_ldouble_works], [hdf5_cv_sw_integer_to_ldouble_works=yes])
if test ${hdf5_cv_sw_integer_to_ldouble_works} = "yes"; then
@@ -2605,6 +2615,10 @@ dnl all machines, except for some Intel compilers on some Linux.)
dnl
AC_MSG_CHECKING([if converting long double to unsigned int values works])
+if test ${ac_cv_sizeof_long_double}=0; then
+ hdf5_cv_ldouble_to_uint_works=${hdf5_cv_ldouble_to_uint_works=no}
+fi
+
AC_CACHE_VAL([hdf5_cv_ldouble_to_uint_works],
[AC_TRY_RUN([
int main(void)
@@ -2674,6 +2688,11 @@ dnl where the last 2 bytes of mantissa are lost when compiler tries to do
dnl the conversion, and Cygwin where compiler doesn't do rounding correctly.)
dnl
AC_MSG_CHECKING([if converting unsigned long long to long double with precision work])
+
+if test ${ac_cv_sizeof_long_double}=0; then
+ hdf5_cv_ullong_to_ldouble_precision_works=${hdf5_cv_ullong_to_ldouble_precision_works=no}
+fi
+
AC_CACHE_VAL([hdf5_cv_ullong_to_ldouble_precision_works],
[AC_TRY_RUN([
int main(void)
diff --git a/fortran/src/H5FDmpiof.c b/fortran/src/H5FDmpiof.c
index 3189477..1a8aa13 100644
--- a/fortran/src/H5FDmpiof.c
+++ b/fortran/src/H5FDmpiof.c
@@ -16,7 +16,7 @@
#include "H5f90.h"
#include <mpi.h>
-#include "H5pubconf.h"
+#include "H5public.h"
/* Support for C to Fortran translation in MPI */
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index 6768f19..38f6b53 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -16,7 +16,7 @@
#ifndef _H5f90proto_H
#define _H5f90proto_H
-#include "H5pubconf.h"
+#include "H5public.h"
H5_FCDLL char * HD5f2cstring (_fcd fdesc, size_t len);
H5_FCDLL void HD5packFstring(char *src, char *dest, size_t len);
diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h
index 9a198a9..cae95cf 100755
--- a/hl/fortran/src/H5LTf90proto.h
+++ b/hl/fortran/src/H5LTf90proto.h
@@ -16,7 +16,7 @@
#ifndef _H5LTf90proto_H
#define _H5LTf90proto_H
-#include "H5pubconf.h"
+#include "H5public.h"
#include "H5f90i.h"
#include <stdlib.h>
#include <string.h>
diff --git a/perform/zip_perf.c b/perform/zip_perf.c
index 321d6e6..55d19e6 100644
--- a/perform/zip_perf.c
+++ b/perform/zip_perf.c
@@ -35,6 +35,7 @@
/* our header files */
#include "hdf5.h"
+#include "H5private.h"
#include "h5tools_utils.h"
#ifdef H5_HAVE_FILTER_DEFLATE
@@ -454,7 +455,7 @@ fill_with_random_data(Bytef *src, uLongf src_len)
printf("Using random() for random data\n");
for (u = 0; u < src_len; ++u)
- src[u] = (Bytef)(0xff & random());
+ src[u] = (Bytef)(0xff & HDrandom());
}
if (compress_percent) {
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
diff --git a/test/dt_arith.c b/test/dt_arith.c
index 3a4b13d..134f96b 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -66,7 +66,10 @@ const char *FILENAME[] = {
typedef enum dtype_t {
INT_SCHAR, INT_UCHAR, INT_SHORT, INT_USHORT, INT_INT, INT_UINT,
INT_LONG, INT_ULONG, INT_LLONG, INT_ULLONG, FLT_FLOAT, FLT_DOUBLE,
- FLT_LDOUBLE, OTHER
+#if H5_SIZEOF_LONG_DOUBLE !=0
+ FLT_LDOUBLE,
+#endif
+ OTHER
} dtype_t;
/* Skip overflow tests if non-zero */
@@ -433,8 +436,10 @@ reset_hdf5(void)
SET_ALIGNMENT(ULLONG, H5_SIZEOF_LONG_LONG);
SET_ALIGNMENT(FLOAT, H5_SIZEOF_FLOAT);
SET_ALIGNMENT(DOUBLE, H5_SIZEOF_DOUBLE);
+#if H5_SIZEOF_LONG_DOUBLE !=0
SET_ALIGNMENT(LDOUBLE, H5_SIZEOF_LONG_DOUBLE);
#endif
+#endif
}
@@ -2339,7 +2344,7 @@ my_isnan(dtype_t type, void *val)
double x;
HDmemcpy(&x, val, sizeof(double));
retval = (x!=x);
-#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
} else if (FLT_LDOUBLE==type) {
long double x;
HDmemcpy(&x, val, sizeof(long double));
@@ -2362,7 +2367,7 @@ my_isnan(dtype_t type, void *val)
double x;
HDmemcpy(&x, val, sizeof(double));
sprintf(s, "%g", x);
-#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
} else if (FLT_LDOUBLE==type) {
long double x;
HDmemcpy(&x, val, sizeof(long double));
@@ -2516,7 +2521,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
} else if (H5Tequal(src, H5T_NATIVE_DOUBLE)) {
src_type_name = "double";
src_type = FLT_DOUBLE;
-#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
} else if (H5Tequal(src, H5T_NATIVE_LDOUBLE)) {
src_type_name = "long double";
src_type = FLT_LDOUBLE;
@@ -2532,7 +2537,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
} else if (H5Tequal(dst, H5T_NATIVE_DOUBLE)) {
dst_type_name = "double";
dst_type = FLT_DOUBLE;
-#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
} else if (H5Tequal(dst, H5T_NATIVE_LDOUBLE)) {
dst_type_name = "long double";
dst_type = FLT_LDOUBLE;
@@ -2611,7 +2616,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
} else if(src_type == FLT_DOUBLE) {
INIT_FP_NORM(double, DBL_MAX, DBL_MIN, DBL_MAX_10_EXP, DBL_MIN_10_EXP,
src_size, dst_size, buf, saved, nelmts);
-#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
} else if(src_type == FLT_LDOUBLE) {
INIT_FP_NORM(long double, LDBL_MAX, LDBL_MIN, LDBL_MAX_10_EXP, LDBL_MIN_10_EXP,
src_size, dst_size, buf, saved, nelmts);
@@ -2627,7 +2632,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
} else if(src_type == FLT_DOUBLE) {
INIT_FP_DENORM(double, DBL_MANT_DIG, src_size, src_nbits, endian, dst_size,
buf, saved, nelmts);
-#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
} else if(src_type == FLT_LDOUBLE) {
INIT_FP_DENORM(long double, LDBL_MANT_DIG, src_size, src_nbits, endian, dst_size,
buf, saved, nelmts);
@@ -2644,7 +2649,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
} else if(src_type == FLT_DOUBLE) {
INIT_FP_SPECIAL(src_size, src_nbits, endian, DBL_MANT_DIG, dst_size,
buf, saved, nelmts);
-#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
} else if(src_type == FLT_LDOUBLE) {
INIT_FP_SPECIAL(src_size, src_nbits, endian, LDBL_MANT_DIG, dst_size,
buf, saved, nelmts);
@@ -2731,6 +2736,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
* last few unused bytes may have garbage in them. Clean them out with
* 0s before compare the values.
*/
+#if H5_SIZEOF_LONG_DOUBLE !=0
if(endian==H5T_ORDER_LE && dst_type==FLT_LDOUBLE) {
unsigned int q;
for(q=dst_nbits/8; q<dst_size; q++) {
@@ -2738,6 +2744,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
hw[q] = 0x00;
}
}
+#endif
/* Are the two results the same? */
for (k=(dst_size-(dst_nbits/8)); k<dst_size; k++)
@@ -2760,7 +2767,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
my_isnan(dst_type, buf+j*sizeof(double)) &&
my_isnan(dst_type, hw)) {
continue;
-#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
} else if (FLT_LDOUBLE==dst_type &&
my_isnan(dst_type, buf+j*sizeof(long double)) &&
my_isnan(dst_type, hw)) {
@@ -3104,7 +3111,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
} else if (H5Tequal(src, H5T_NATIVE_DOUBLE)) {
src_type_name = "double";
src_type = FLT_DOUBLE;
-#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
} else if (H5Tequal(src, H5T_NATIVE_LDOUBLE)) {
src_type_name = "long double";
src_type = FLT_LDOUBLE;
@@ -3151,7 +3158,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
} else if (H5Tequal(dst, H5T_NATIVE_DOUBLE)) {
dst_type_name = "double";
dst_type = FLT_DOUBLE;
-#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
} else if (H5Tequal(dst, H5T_NATIVE_LDOUBLE)) {
dst_type_name = "long double";
dst_type = FLT_LDOUBLE;
@@ -3175,7 +3182,11 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
INT_USHORT==src_type || INT_INT==src_type || INT_UINT==src_type ||
INT_LONG==src_type || INT_ULONG==src_type || INT_LLONG==src_type ||
INT_ULLONG==src_type) &&
- (FLT_FLOAT!=dst_type && FLT_DOUBLE!=dst_type && FLT_LDOUBLE!=dst_type)) {
+ (FLT_FLOAT!=dst_type && FLT_DOUBLE!=dst_type
+#if H5_SIZEOF_LONG_DOUBLE !=0
+ && FLT_LDOUBLE!=dst_type
+#endif
+ )) {
sprintf(str, "Testing %s %s -> %s conversions",
name, src_type_name, dst_type_name);
printf("%-70s", str);
@@ -3184,7 +3195,11 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
goto error;
}
- if ((FLT_FLOAT==src_type || FLT_DOUBLE==src_type || FLT_LDOUBLE==src_type)
+ if ((FLT_FLOAT==src_type || FLT_DOUBLE==src_type
+#if H5_SIZEOF_LONG_DOUBLE !=0
+ || FLT_LDOUBLE==src_type
+#endif
+ )
&& (INT_SCHAR!=dst_type && INT_UCHAR!=dst_type && INT_SHORT!=dst_type
&& INT_USHORT!=dst_type && INT_INT!=dst_type && INT_UINT!=dst_type
&& INT_LONG!=dst_type && INT_ULONG!=dst_type && INT_LLONG!=dst_type
@@ -3307,7 +3322,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
} else {
INIT_FP_SPECIAL(src_size, src_nbits, endian, DBL_MANT_DIG, dst_size, buf, saved, nelmts);
}
-#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
} else if(src_type == FLT_LDOUBLE) {
if(run_test==TEST_NORMAL) {
INIT_FP_NORM(long double, LDBL_MAX, LDBL_MIN, LDBL_MAX_10_EXP, LDBL_MIN_10_EXP,
@@ -3328,7 +3343,11 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
/* Check the results from the library against hardware */
for (j=0; j<nelmts; j++) {
- if(FLT_FLOAT==src_type || FLT_DOUBLE==src_type || FLT_LDOUBLE==src_type)
+ if(FLT_FLOAT==src_type || FLT_DOUBLE==src_type
+#if H5_SIZEOF_LONG_DOUBLE !=0
+ || FLT_LDOUBLE==src_type
+#endif
+ )
if(my_isnan(src_type, saved+j*src_size))
continue;
@@ -3428,6 +3447,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
default:
break;
}
+#if H5_SIZEOF_LONG_DOUBLE !=0
} else if (FLT_LDOUBLE==dst_type) {
hw = (unsigned char*)&hw_ldouble;
switch (src_type) {
@@ -3476,6 +3496,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
default:
break;
}
+#endif
} else if (INT_SCHAR==dst_type) {
hw = (unsigned char*)&hw_schar;
switch (src_type) {
@@ -3487,10 +3508,12 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
HDmemcpy(aligned, saved+j*sizeof(double), sizeof(double));
hw_schar = (signed char)(*((double*)aligned));
break;
+#if H5_SIZEOF_LONG_DOUBLE !=0
case FLT_LDOUBLE:
HDmemcpy(aligned, saved+j*sizeof(long double), sizeof(long double));
hw_schar = (signed char)(*((long double*)aligned));
break;
+#endif
default:
break;
}
@@ -3505,10 +3528,12 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
HDmemcpy(aligned, saved+j*sizeof(double), sizeof(double));
hw_uchar = (unsigned char)(*((double*)aligned));
break;
+#if H5_SIZEOF_LONG_DOUBLE !=0
case FLT_LDOUBLE:
HDmemcpy(aligned, saved+j*sizeof(long double), sizeof(long double));
hw_uchar = (unsigned char)(*((long double*)aligned));
break;
+#endif
default:
break;
}
@@ -3523,10 +3548,12 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
HDmemcpy(aligned, saved+j*sizeof(double), sizeof(double));
hw_short = (short)(*((double*)aligned));
break;
+#if H5_SIZEOF_LONG_DOUBLE !=0
case FLT_LDOUBLE:
HDmemcpy(aligned, saved+j*sizeof(long double), sizeof(long double));
hw_short = (short)(*((long double*)aligned));
break;
+#endif
default:
break;
}
@@ -3541,10 +3568,12 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
HDmemcpy(aligned, saved+j*sizeof(double), sizeof(double));
hw_ushort = (unsigned short)(*((double*)aligned));
break;
+#if H5_SIZEOF_LONG_DOUBLE !=0
case FLT_LDOUBLE:
HDmemcpy(aligned, saved+j*sizeof(long double), sizeof(long double));
hw_ushort = (unsigned short)(*((long double*)aligned));
break;
+#endif
default:
break;
}
@@ -3559,10 +3588,12 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
HDmemcpy(aligned, saved+j*sizeof(double), sizeof(double));
hw_int = (int)(*((double*)aligned));
break;
+#if H5_SIZEOF_LONG_DOUBLE !=0
case FLT_LDOUBLE:
HDmemcpy(aligned, saved+j*sizeof(long double), sizeof(long double));
hw_int = (int)(*((long double*)aligned));
break;
+#endif
default:
break;
}
@@ -3577,10 +3608,12 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
HDmemcpy(aligned, saved+j*sizeof(double), sizeof(double));
hw_uint = (unsigned int)(*((double*)aligned));
break;
+#if H5_SIZEOF_LONG_DOUBLE !=0
case FLT_LDOUBLE:
HDmemcpy(aligned, saved+j*sizeof(long double), sizeof(long double));
hw_uint = (unsigned int)(*((long double*)aligned));
break;
+#endif
default:
break;
}
@@ -3595,10 +3628,12 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
HDmemcpy(aligned, saved+j*sizeof(double), sizeof(double));
hw_long = (long)(*((double*)aligned));
break;
+#if H5_SIZEOF_LONG_DOUBLE !=0
case FLT_LDOUBLE:
HDmemcpy(aligned, saved+j*sizeof(long double), sizeof(long double));
hw_long = (long)(*((long double*)aligned));
break;
+#endif
default:
break;
}
@@ -3613,10 +3648,12 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
HDmemcpy(aligned, saved+j*sizeof(double), sizeof(double));
hw_ulong = (unsigned long)(*((double*)aligned));
break;
+#if H5_SIZEOF_LONG_DOUBLE !=0
case FLT_LDOUBLE:
HDmemcpy(aligned, saved+j*sizeof(long double), sizeof(long double));
hw_ulong = (unsigned long)(*((long double*)aligned));
break;
+#endif
default:
break;
}
@@ -3631,10 +3668,12 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
HDmemcpy(aligned, saved+j*sizeof(double), sizeof(double));
hw_llong = (long_long)(*((double*)aligned));
break;
+#if H5_SIZEOF_LONG_DOUBLE !=0
case FLT_LDOUBLE:
HDmemcpy(aligned, saved+j*sizeof(long double), sizeof(long double));
hw_llong = (long_long)(*((long double*)aligned));
break;
+#endif
default:
break;
}
@@ -3649,10 +3688,12 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
HDmemcpy(aligned, saved+j*sizeof(double), sizeof(double));
hw_ullong = (unsigned long_long)(*((double*)aligned));
break;
+#if H5_SIZEOF_LONG_DOUBLE !=0
case FLT_LDOUBLE:
HDmemcpy(aligned, saved+j*sizeof(long double), sizeof(long double));
hw_ullong = (unsigned long_long)(*((long double*)aligned));
break;
+#endif
default:
break;
}
@@ -3667,12 +3708,14 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
* bytes may have garbage in them. Clean them out with 0s before compare
* the values.
*/
+#if H5_SIZEOF_LONG_DOUBLE !=0
if(endian==H5T_ORDER_LE && dst_type==FLT_LDOUBLE) {
unsigned int q;
for(q=dst_nbits/8; q<dst_size; q++) {
buf[j*dst_size+q] = 0x00;
}
}
+#endif
/* Are the two results the same? */
for (k=(dst_size-(dst_nbits/8)); k<dst_size; k++)
@@ -3702,7 +3745,11 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
* Try to follow the except_func callback function to check if the
* desired value was set.
*/
- if ((FLT_FLOAT==src_type || FLT_DOUBLE==src_type || FLT_LDOUBLE==src_type)
+ if ((FLT_FLOAT==src_type || FLT_DOUBLE==src_type
+#if H5_SIZEOF_LONG_DOUBLE !=0
+ || FLT_LDOUBLE==src_type
+#endif
+ )
&& (INT_SCHAR==dst_type || INT_SHORT==dst_type || INT_INT==dst_type
|| INT_LONG==dst_type || INT_LLONG==dst_type)) {
if(0==H5T_bit_get_d(src_bits, src_nbits-1, 1) &&
@@ -3739,7 +3786,11 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
}
}
- if ((FLT_FLOAT==src_type || FLT_DOUBLE==src_type || FLT_LDOUBLE==src_type)
+ if ((FLT_FLOAT==src_type || FLT_DOUBLE==src_type
+#if H5_SIZEOF_LONG_DOUBLE !=0
+ || FLT_LDOUBLE==src_type
+#endif
+ )
&& (INT_UCHAR==dst_type || INT_USHORT==dst_type || INT_UINT==dst_type
|| INT_ULONG==dst_type || INT_ULLONG==dst_type)) {
if (H5T_bit_get_d(src_bits, src_nbits-1, 1)) {
@@ -3820,6 +3871,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
* to the 3rd last byte of mantissa. So we only try to compare all but the last 3 bytes.
*/
#ifndef H5_ULLONG_TO_LDOUBLE_PRECISION_WORKS
+#if H5_SIZEOF_LONG_DOUBLE !=0
if(src_type==INT_ULLONG && dst_type==FLT_LDOUBLE) {
long double tmp_s, tmp_h;
HDmemcpy(&tmp_s,&buf[j*dst_size],sizeof(long double));
@@ -3828,6 +3880,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
if(!HDmemcmp(&tmp_s+4, &tmp_h+4, sizeof(long double)-4))
continue; /*no error*/
}
+#endif
#endif /*end H5_ULLONG_TO_LDOUBLE_PRECISION_WORKS*/
/* Print errors */
@@ -3893,10 +3946,12 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
HDmemcpy(aligned, saved+j*sizeof(double), sizeof(double));
printf(" %29f\n", *((double*)aligned));
break;
+#if H5_SIZEOF_LONG_DOUBLE !=0
case FLT_LDOUBLE:
HDmemcpy(aligned, saved+j*sizeof(long double), sizeof(long double));
printf(" %29Lf\n", *((long double*)aligned));
break;
+#endif
case OTHER:
break;
}
@@ -3954,10 +4009,12 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
HDmemcpy(aligned, buf+j*sizeof(double), sizeof(double));
printf(" %29f\n", *((double*)aligned));
break;
+#if H5_SIZEOF_LONG_DOUBLE !=0
case FLT_LDOUBLE:
HDmemcpy(aligned, buf+j*sizeof(long double), sizeof(long double));
printf(" %29Lf\n", *((long double*)aligned));
break;
+#endif
case OTHER:
break;
}
@@ -4003,9 +4060,11 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
case FLT_DOUBLE:
printf(" %29f\n", *((double*)hw));
break;
+#if H5_SIZEOF_LONG_DOUBLE !=0
case FLT_LDOUBLE:
printf(" %29Lf\n", *((long double*)hw));
break;
+#endif
case OTHER:
break;
}
@@ -4330,14 +4389,16 @@ run_fp_tests(const char *name)
if(!strcmp(name, "noop")) {
nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_FLOAT, H5T_NATIVE_FLOAT);
nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_DOUBLE, H5T_NATIVE_DOUBLE);
+#if H5_SIZEOF_LONG_DOUBLE !=0
nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_LDOUBLE, H5T_NATIVE_LDOUBLE);
+#endif
goto done;
}
/*Test normalized values. TEST_NORMAL indicates normalized values.*/
nerrors += test_conv_flt_1(name, TEST_NORMAL, H5T_NATIVE_FLOAT, H5T_NATIVE_DOUBLE);
nerrors += test_conv_flt_1(name, TEST_NORMAL, H5T_NATIVE_DOUBLE, H5T_NATIVE_FLOAT);
-#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE !=0
nerrors += test_conv_flt_1(name, TEST_NORMAL, H5T_NATIVE_FLOAT, H5T_NATIVE_LDOUBLE);
nerrors += test_conv_flt_1(name, TEST_NORMAL, H5T_NATIVE_DOUBLE, H5T_NATIVE_LDOUBLE);
nerrors += test_conv_flt_1(name, TEST_NORMAL, H5T_NATIVE_LDOUBLE, H5T_NATIVE_FLOAT);
@@ -4347,7 +4408,7 @@ run_fp_tests(const char *name)
/*Test denormalized values. TEST_DENORM indicates denormalized values.*/
nerrors += test_conv_flt_1(name, TEST_DENORM, H5T_NATIVE_FLOAT, H5T_NATIVE_DOUBLE);
nerrors += test_conv_flt_1(name, TEST_DENORM, H5T_NATIVE_DOUBLE, H5T_NATIVE_FLOAT);
-#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
nerrors += test_conv_flt_1(name, TEST_DENORM, H5T_NATIVE_FLOAT, H5T_NATIVE_LDOUBLE);
nerrors += test_conv_flt_1(name, TEST_DENORM, H5T_NATIVE_DOUBLE, H5T_NATIVE_LDOUBLE);
nerrors += test_conv_flt_1(name, TEST_DENORM, H5T_NATIVE_LDOUBLE, H5T_NATIVE_FLOAT);
@@ -4357,7 +4418,7 @@ run_fp_tests(const char *name)
/*Test special values, +/-0, +/-infinity, +/-QNaN, +/-SNaN.*/
nerrors += test_conv_flt_1(name, TEST_SPECIAL, H5T_NATIVE_FLOAT, H5T_NATIVE_DOUBLE);
nerrors += test_conv_flt_1(name, TEST_SPECIAL, H5T_NATIVE_DOUBLE, H5T_NATIVE_FLOAT);
-#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
nerrors += test_conv_flt_1(name, TEST_SPECIAL, H5T_NATIVE_FLOAT, H5T_NATIVE_LDOUBLE);
nerrors += test_conv_flt_1(name, TEST_SPECIAL, H5T_NATIVE_DOUBLE, H5T_NATIVE_LDOUBLE);
nerrors += test_conv_flt_1(name, TEST_SPECIAL, H5T_NATIVE_LDOUBLE, H5T_NATIVE_FLOAT);
@@ -4477,7 +4538,12 @@ run_int_fp_conv(const char *name)
name, "all integers", "long double");
printf("%-70s", str);
SKIPPED();
+#if H5_SIZEOF_LONG_DOUBLE !=0
HDputs(" Test skipped due to hardware conversion error.");
+#else
+ HDputs(" Test skipped due to disabled long double.");
+#endif
+
}
#endif /*H5_SW_INTEGER_TO_LDOUBLE_WORKS*/
@@ -4601,15 +4667,19 @@ run_fp_int_conv(const char *name)
name, "long double", "unsigned int");
printf("%-70s", str);
SKIPPED();
+#if H5_SIZEOF_LONG_DOUBLE!=0
HDputs(" Test skipped due to hardware conversion error.");
+#else
+ HDputs(" Test skipped due to disabled long double.");
+#endif
}
#endif /*H5_CV_LDOUBLE_TO_UINT_WORKS*/
-#if H5_SIZEOF_LONG!=H5_SIZEOF_INT
+#if H5_SIZEOF_LONG!=H5_SIZEOF_INT && H5_SIZEOF_LONG_DOUBLE!=0
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_LONG);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_ULONG);
#endif
-#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
+#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG && H5_SIZEOF_LONG_DOUBLE!=0
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_LLONG);
#ifdef H5_FP_TO_ULLONG_RIGHT_MAXIMUM
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_ULLONG);
@@ -4621,7 +4691,11 @@ run_fp_int_conv(const char *name)
name, "long double", "unsigned long long");
printf("%-70s", str);
SKIPPED();
+#if H5_SIZEOF_LONG_DOUBLE!=0
HDputs(" Test skipped due to hardware conversion error.");
+#else
+ HDputs(" Test skipped due to disabled long double.");
+#endif
}
#endif /*H5_FP_TO_ULLONG_RIGHT_MAXIMUM*/
#endif
@@ -4634,7 +4708,11 @@ run_fp_int_conv(const char *name)
name, "long double", "all integers");
printf("%-70s", str);
SKIPPED();
+#if H5_SIZEOF_LONG_DOUBLE!=0
HDputs(" Test skipped due to hardware conversion error.");
+#else
+ HDputs(" Test skipped due to disabled long double.");
+#endif
}
#endif /*H5_SW_LDOUBLE_TO_INTEGER_WORKS*/
}
@@ -4645,7 +4723,11 @@ run_fp_int_conv(const char *name)
name, "all floating-point numbers", "all integers");
printf("%-70s", str);
SKIPPED();
+#if H5_SIZEOF_LONG_DOUBLE!=0
HDputs(" Test skipped due to hardware conversion error.");
+#else
+ HDputs(" Test skipped due to disbaled long double.");
+#endif
}
return nerrors;
diff --git a/test/dtransform.c b/test/dtransform.c
index 3ae8520..2c09c76 100644
--- a/test/dtransform.c
+++ b/test/dtransform.c
@@ -262,7 +262,9 @@ int main(void)
#endif
TEST_TYPE_CONTIG(dxpl_id_c_to_f, float, H5T_NATIVE_FLOAT, "float", windchillFfloat, 1);
TEST_TYPE_CONTIG(dxpl_id_c_to_f, double, H5T_NATIVE_DOUBLE, "double", windchillFfloat, 1);
+#if H5_SIZEOF_LONG_DOUBLE!=0
TEST_TYPE_CONTIG(dxpl_id_c_to_f, long double, H5T_NATIVE_LDOUBLE, "ldouble", windchillFfloat, 1);
+#endif
TEST_TYPE_CHUNK(dxpl_id_utrans_inv, char, H5T_NATIVE_CHAR, "char", transformData, 0);
TEST_TYPE_CHUNK(dxpl_id_utrans_inv, unsigned char, H5T_NATIVE_UCHAR, "uchar", transformData, 0);
@@ -288,7 +290,9 @@ int main(void)
#endif
TEST_TYPE_CHUNK(dxpl_id_c_to_f, float, H5T_NATIVE_FLOAT, "float", windchillFfloat, 1);
TEST_TYPE_CHUNK(dxpl_id_c_to_f, double, H5T_NATIVE_DOUBLE, "double", windchillFfloat, 1);
+#if H5_SIZEOF_LONG_DOUBLE!=0
TEST_TYPE_CHUNK(dxpl_id_c_to_f, long double, H5T_NATIVE_LDOUBLE, "ldouble", windchillFfloat, 1);
+#endif
if(test_copy(dxpl_id_c_to_f_copy, dxpl_id_polynomial_copy) < 0) TEST_ERROR;
if(test_trivial(dxpl_id_simple) < 0) TEST_ERROR;
diff --git a/test/dtypes.c b/test/dtypes.c
index 8872727..b3ad6c2 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -130,8 +130,10 @@ reset_hdf5(void)
SET_ALIGNMENT(ULLONG, H5_SIZEOF_LONG_LONG);
SET_ALIGNMENT(FLOAT, H5_SIZEOF_FLOAT);
SET_ALIGNMENT(DOUBLE, H5_SIZEOF_DOUBLE);
+#if H5_SIZEOF_LONG_DOUBLE !=0
SET_ALIGNMENT(LDOUBLE, H5_SIZEOF_LONG_DOUBLE);
#endif
+#endif
}
diff --git a/test/tconfig.c b/test/tconfig.c
index 5f1c246..9c18b4b 100644
--- a/test/tconfig.c
+++ b/test/tconfig.c
@@ -120,7 +120,9 @@ test_config_ctypes(void)
vrfy_cint_type(long, unsigned long, H5_SIZEOF_LONG);
vrfy_ctype(float, H5_SIZEOF_FLOAT);
vrfy_ctype(double, H5_SIZEOF_DOUBLE);
+#if H5_SIZEOF_LONG_DOUBLE >0
vrfy_ctype(long double, H5_SIZEOF_LONG_DOUBLE);
+#endif
/* standard C99 basic types */
#if H5_SIZEOF_LONG_LONG > 0
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index e6a1bf1..82716b2 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -748,8 +748,10 @@ print_datatype(hid_t type,unsigned in_group)
printf("H5T_NATIVE_FLOAT");
} else if (H5Tequal(type, H5T_NATIVE_DOUBLE)) {
printf("H5T_NATIVE_DOUBLE");
+#if H5_SIZEOF_LONG_DOUBLE !=0
} else if (H5Tequal(type, H5T_NATIVE_LDOUBLE)) {
printf("H5T_NATIVE_LDOUBLE");
+#endif
} else {
printf("undefined float");
d_status = EXIT_FAILURE;
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index 8485821..b2d377d 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -320,8 +320,10 @@ display_native_type(hid_t type, int UNUSED ind)
printf("native float");
} else if (H5Tequal(type, H5T_NATIVE_DOUBLE)) {
printf("native double");
+#if H5_SIZEOF_LONG_DOUBLE !=0
} else if (H5Tequal(type, H5T_NATIVE_LDOUBLE)) {
printf("native long double");
+#endif
} else if (H5Tequal(type, H5T_NATIVE_INT8)) {
printf("native int8_t");
} else if (H5Tequal(type, H5T_NATIVE_UINT8)) {
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c
index 3a9e7e4..3311d7c 100644
--- a/tools/lib/h5diff_util.c
+++ b/tools/lib/h5diff_util.c
@@ -255,8 +255,10 @@ void print_type(hid_t type)
printf("H5T_NATIVE_FLOAT");
} else if (H5Tequal(type, H5T_NATIVE_DOUBLE)) {
printf("H5T_NATIVE_DOUBLE");
+#if H5_SIZEOF_LONG_DOUBLE !=0
} else if (H5Tequal(type, H5T_NATIVE_LDOUBLE)) {
printf("H5T_NATIVE_LDOUBLE");
+#endif
} else {
printf("undefined float");
}