summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-06-08 21:13:15 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-06-08 21:13:15 (GMT)
commit32703c9fc5a315a005abf26965d5545043fd3605 (patch)
tree342146825782a26babcd939201f7d657520c84dc
parent8641814c4e5b4211e0980df783c3d2d25f484226 (diff)
downloadhdf5-32703c9fc5a315a005abf26965d5545043fd3605.zip
hdf5-32703c9fc5a315a005abf26965d5545043fd3605.tar.gz
hdf5-32703c9fc5a315a005abf26965d5545043fd3605.tar.bz2
[svn-r27164] various bug fixes for DT
-rw-r--r--MANIFEST8
-rw-r--r--Makefile.in1
-rw-r--r--c++/Makefile.in1
-rw-r--r--c++/examples/Makefile.in1
-rw-r--r--c++/src/Makefile.in1
-rw-r--r--c++/test/Makefile.in1
-rwxr-xr-xconfigure86
-rw-r--r--configure.ac13
-rw-r--r--examples/Makefile.in1
-rw-r--r--fortran/Makefile.in1
-rw-r--r--fortran/examples/Makefile.in1
-rw-r--r--fortran/examples/rwdset_fortran2003.f9012
-rw-r--r--fortran/src/H5_ff.F902
-rw-r--r--fortran/src/H5config_f.inc.in3
-rw-r--r--fortran/src/H5match_types.c4
-rw-r--r--fortran/src/Makefile.in1
-rw-r--r--fortran/test/Makefile.in1
-rw-r--r--fortran/test/tH5T.f902
-rw-r--r--fortran/test/tH5T_F03.F9017
-rw-r--r--fortran/testpar/Makefile.in1
-rw-r--r--hl/Makefile.in1
-rw-r--r--hl/c++/Makefile.in1
-rw-r--r--hl/c++/examples/Makefile.in1
-rw-r--r--hl/c++/src/Makefile.in1
-rw-r--r--hl/c++/test/Makefile.in1
-rw-r--r--hl/examples/Makefile.in1
-rw-r--r--hl/fortran/Makefile.in1
-rw-r--r--hl/fortran/examples/Makefile.in1
-rw-r--r--hl/fortran/src/H5LTff.F902
-rw-r--r--hl/fortran/src/Makefile.in1
-rw-r--r--hl/fortran/test/Makefile.am8
-rw-r--r--hl/fortran/test/Makefile.in40
-rw-r--r--hl/fortran/test/tstds.F90 (renamed from hl/fortran/test/tstds.f90)0
-rw-r--r--hl/fortran/test/tstimage.F90 (renamed from hl/fortran/test/tstimage.f90)0
-rw-r--r--hl/fortran/test/tstlite.F90 (renamed from hl/fortran/test/tstlite.f90)38
-rw-r--r--hl/fortran/test/tsttable.F90 (renamed from hl/fortran/test/tsttable.f90)0
-rw-r--r--hl/src/Makefile.in1
-rw-r--r--hl/test/Makefile.in1
-rw-r--r--hl/tools/Makefile.in1
-rw-r--r--hl/tools/gif2h5/Makefile.in1
-rw-r--r--m4/aclocal_fc.m434
-rw-r--r--src/H5config.h.in3
-rw-r--r--src/Makefile.in1
-rw-r--r--test/Makefile.in1
-rw-r--r--testpar/Makefile.in1
-rw-r--r--tools/Makefile.in1
-rw-r--r--tools/h5copy/Makefile.in1
-rw-r--r--tools/h5diff/Makefile.in1
-rw-r--r--tools/h5dump/Makefile.in1
-rw-r--r--tools/h5import/Makefile.in1
-rw-r--r--tools/h5jam/Makefile.in1
-rw-r--r--tools/h5ls/Makefile.in1
-rw-r--r--tools/h5repack/Makefile.in1
-rw-r--r--tools/h5stat/Makefile.in1
-rw-r--r--tools/lib/Makefile.in1
-rw-r--r--tools/misc/Makefile.in1
-rw-r--r--tools/perform/Makefile.in1
57 files changed, 245 insertions, 66 deletions
diff --git a/MANIFEST b/MANIFEST
index 8ff62b6..7da4d28 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2339,10 +2339,10 @@
./hl/fortran/src/Makefile.in
./hl/fortran/test/Makefile.am
./hl/fortran/test/Makefile.in
-./hl/fortran/test/tstds.f90
-./hl/fortran/test/tstimage.f90
-./hl/fortran/test/tstlite.f90
-./hl/fortran/test/tsttable.f90
+./hl/fortran/test/tstds.F90
+./hl/fortran/test/tstimage.F90
+./hl/fortran/test/tstlite.F90
+./hl/fortran/test/tsttable.F90
# hl c++
./hl/c++/COPYING
diff --git a/Makefile.in b/Makefile.in
index a1edd4c..6088c33 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -353,6 +353,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/c++/Makefile.in b/c++/Makefile.in
index 8fdfb06..c916f89 100644
--- a/c++/Makefile.in
+++ b/c++/Makefile.in
@@ -513,6 +513,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in
index 433f3e2..bebe35d 100644
--- a/c++/examples/Makefile.in
+++ b/c++/examples/Makefile.in
@@ -461,6 +461,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in
index dcfac25..83d515a 100644
--- a/c++/src/Makefile.in
+++ b/c++/src/Makefile.in
@@ -524,6 +524,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in
index 0b8ae50..bba5059 100644
--- a/c++/test/Makefile.in
+++ b/c++/test/Makefile.in
@@ -515,6 +515,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/configure b/configure
index 8fddc6a..554db12 100755
--- a/configure
+++ b/configure
@@ -719,6 +719,7 @@ am__fastdepCXX_TRUE
CXXDEPMODE
ac_ct_CXX
CXXFLAGS
+PAC_C_MAX_REAL_PRECISION
FORTRAN_HAVE_C_LONG_DOUBLE
HAVE_Fortran_INTEGER_SIZEOF_16
PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF
@@ -6980,8 +6981,8 @@ rm -f core conftest.err conftest.$ac_objext \
else
if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes";then
FC_SIZEOF_A="SIZEOF(a)"
- FC_SIZEOF_B="SIZEOF(a)"
- FC_SIZEOF_C="SIZEOF(a)"
+ FC_SIZEOF_B="SIZEOF(b)"
+ FC_SIZEOF_C="SIZEOF(c)"
else
## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error
as_fn_error $? "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE" "$LINENO" 5
@@ -7490,6 +7491,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
## Setting definition if there is a 16 byte fortran integer
if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then
HAVE_Fortran_INTEGER_SIZEOF_16="1"
@@ -7537,18 +7539,88 @@ $as_echo "#define FORTRAN_HAVE_C_LONG_DOUBLE 1" >>confdefs.h
$as_echo "#define FORTRAN_SIZEOF_LONG_DOUBLE SIZEOF_LONG_DOUBLE" >>confdefs.h
-else
- FC="no"
-fi
-
## Change back to the C language
-ac_ext=c
+ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking maximum decimal precision for C" >&5
+$as_echo_n "checking maximum decimal precision for C... " >&6; }
+rm -f pac_Cconftest.out
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+ #include <float.h>
+ #include <stdio.h>
+ #if __STDC_VERSION__ >= 199901L
+ #define C_LDBL_DIG DECIMAL_DIG
+ #else
+ #define C_LDBL_DIG LDBL_DIG
+ #endif
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+ FILE * pFile;
+ pFile = fopen("pac_Cconftest.out","w");
+ fprintf(pFile, "%d\n", C_LDBL_DIG);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+ if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ if ac_fn_c_try_run "$LINENO"; then :
+
+ if test -s pac_Cconftest.out ; then
+ LDBL_DIG="`cat pac_Cconftest.out`"
+
+cat >>confdefs.h <<_ACEOF
+#define PAC_C_MAX_REAL_PRECISION $LDBL_DIG
+_ACEOF
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5
+$as_echo "$as_me: WARNING: No output from test program!" >&2;}
+ fi
+ rm -f pac_Cconftest.out
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C program fails to build or run!" >&5
+$as_echo "$as_me: WARNING: C program fails to build or run!" >&2;}
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDBL_DIG" >&5
+$as_echo "$LDBL_DIG" >&6; }
+
+else
+ FC="no"
+fi
+
## ----------------------------------------------------------------------
## Check if they would like the C++ interface compiled
##
diff --git a/configure.ac b/configure.ac
index dc06081..90f7d67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -438,8 +438,8 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
else
if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes";then
FC_SIZEOF_A="SIZEOF(a)"
- FC_SIZEOF_B="SIZEOF(a)"
- FC_SIZEOF_C="SIZEOF(a)"
+ FC_SIZEOF_B="SIZEOF(b)"
+ FC_SIZEOF_C="SIZEOF(c)"
else
## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error
AC_MSG_ERROR([Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE])
@@ -472,6 +472,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF])
AC_SUBST([HAVE_Fortran_INTEGER_SIZEOF_16])
AC_SUBST([FORTRAN_HAVE_C_LONG_DOUBLE])
+ AC_SUBST([PAC_C_MAX_REAL_PRECISION])
## Setting definition if there is a 16 byte fortran integer
if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then
@@ -487,7 +488,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
##fi
##PAC_FC_AVAIL_INTEGER_MODELS
-
+
if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then
AC_DEFINE([FORTRAN_HAVE_STORAGE_SIZE], [1], [Define if we have Fortran intrinsic STORAGE_SIZE])
@@ -506,13 +507,13 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
AC_DEFINE([FORTRAN_HAVE_C_LONG_DOUBLE], [1], [Define if we have Fortran C_LONG_DOUBLE])
fi
AC_DEFINE([FORTRAN_SIZEOF_LONG_DOUBLE], [SIZEOF_LONG_DOUBLE], [Determine the size of C long double])
+## Change back to the C language
+ AC_LANG_POP(Fortran)
+ PAC_LDBL_DIG
else
FC="no"
fi
-## Change back to the C language
-AC_LANG_POP(Fortran)
-
## ----------------------------------------------------------------------
## Check if they would like the C++ interface compiled
##
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 1056bd2..20b0183 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -461,6 +461,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/fortran/Makefile.in b/fortran/Makefile.in
index d3b941d..6427d4c 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -517,6 +517,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index c517d7a..d0400c0 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -461,6 +461,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/fortran/examples/rwdset_fortran2003.f90 b/fortran/examples/rwdset_fortran2003.f90
index d65db9e..cd932bd 100644
--- a/fortran/examples/rwdset_fortran2003.f90
+++ b/fortran/examples/rwdset_fortran2003.f90
@@ -28,13 +28,13 @@ PROGRAM RWDSET_FORTRAN2003
IMPLICIT NONE
- INTEGER, PARAMETER :: int_kind_1 = SELECTED_INT_KIND(Fortran_INTEGER_1) !should map to INTEGER*1 on most modern processors
- INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(Fortran_INTEGER_2) !should map to INTEGER*2 on most modern processors
- INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(Fortran_INTEGER_4) !should map to INTEGER*4 on most modern processors
- INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(Fortran_INTEGER_8) !should map to INTEGER*8 on most modern processors
+ INTEGER, PARAMETER :: int_kind_1 = SELECTED_INT_KIND(2) !should map to INTEGER*1 on most modern processors
+ INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(4) !should map to INTEGER*2 on most modern processors
+ INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(9) !should map to INTEGER*4 on most modern processors
+ INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(18) !should map to INTEGER*8 on most modern processors
- INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors
- INTEGER, PARAMETER :: real_kind_15 = SELECTED_REAL_KIND(Fortran_REAL_8) !should map to REAL*8 on most modern processors
+ INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(6,37) !should map to REAL*4 on most modern processors
+ INTEGER, PARAMETER :: real_kind_15 = SELECTED_REAL_KIND(15,307) !should map to REAL*8 on most modern processors
CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name
CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name
diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90
index 74838cf..7939644 100644
--- a/fortran/src/H5_ff.F90
+++ b/fortran/src/H5_ff.F90
@@ -397,6 +397,8 @@ CONTAINS
h5_type = H5T_NATIVE_FLOAT_128
#endif
#endif
+ ELSE
+ h5_type = -1
ENDIF
ENDIF
diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in
index c8fcf31..dbbf43b 100644
--- a/fortran/src/H5config_f.inc.in
+++ b/fortran/src/H5config_f.inc.in
@@ -33,3 +33,6 @@
! Define if INTEGER*16 is available
#undef HAVE_Fortran_INTEGER_SIZEOF_16
+! Maximum decimal precision for C
+#undef PAC_C_MAX_REAL_PRECISION
+
diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c
index 366e3da..c22f423 100644
--- a/fortran/src/H5match_types.c
+++ b/fortran/src/H5match_types.c
@@ -163,6 +163,7 @@ int main(void)
int H5_FORTRAN_NUM_INTEGER_KINDS;
int H5_FORTRAN_NUM_REAL_KINDS;
+ int found_long_double = 0;
/* Open target files */
c_header = fopen(CFILE, "w");
@@ -206,7 +207,6 @@ int main(void)
/* (b) Define c_float_x */
- int found_long_double = 0;
for(i=0;i< H5_FORTRAN_NUM_REAL_KINDS;i++) {
if (sizeof(float) == RealKinds_SizeOf[i]) {
@@ -551,12 +551,12 @@ int main(void)
fprintf(fort_header, " INTEGER, PARAMETER :: H5R_DSET_REG_REF_BUF_SIZE_F = %u\n", H5_SIZEOF_HADDR_T + 4 );
-
/* Close files */
endCfile();
endFfile();
fclose(c_header);
fclose(fort_header);
+
return 0;
}
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index 54f2065..0abfb53 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -562,6 +562,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index 431c42a..6478b50 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -573,6 +573,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.f90
index 9aaaa73..d845f73 100644
--- a/fortran/test/tH5T.f90
+++ b/fortran/test/tH5T.f90
@@ -213,8 +213,10 @@ CONTAINS
CALL check("h5tget_size_f", error, total_error)
CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, error)
CALL check("h5tget_size_f", error, total_error)
+ PRINT*,H5T_NATIVE_DOUBLE
CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, error)
CALL check("h5tget_size_f", error, total_error)
+ stop
CALL h5tget_size_f(H5T_NATIVE_REAL, type_sizer, error)
CALL check("h5tget_size_f", error, total_error)
!write(*,*) "get sizes", type_sizec, type_sizei, type_sizer, type_sized
diff --git a/fortran/test/tH5T_F03.F90 b/fortran/test/tH5T_F03.F90
index ee9f2f2..995243f 100644
--- a/fortran/test/tH5T_F03.F90
+++ b/fortran/test/tH5T_F03.F90
@@ -994,10 +994,25 @@ END SUBROUTINE test_array_compound_atomic
INTEGER, PARAMETER :: real_kind_7 = C_FLOAT !should map to REAL*4 on most modern processors
INTEGER, PARAMETER :: real_kind_15 = C_DOUBLE !should map to REAL*8 on most modern processors
+! Check if C has quad precision extension
#if H5_HAVE_FLOAT128!=0
+! Check if Fortran supports quad precision
+# if H5_PAC_FC_MAX_REAL_PRECISION > 26
INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(31)
+# else
+ INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(15,307)
+# endif
#else
- INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(17)
+! Check if the default of long double is quad precision
+# if H5_PAC_C_MAX_REAL_PRECISION > 26
+# if H5_PAC_FC_MAX_REAL_PRECISION > 26
+ INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(31)
+# else
+ INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(15,307)
+# endif
+# else
+ INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(15,307)
+# endif
#endif
REAL(real_kind_31), DIMENSION(1:4), TARGET :: dset_data_r31, data_out_r31
INTEGER(HID_T) :: dset_idr16 ! Dataset identifier
diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index 6c81b76..79db2dc 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -513,6 +513,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/hl/Makefile.in b/hl/Makefile.in
index e1f7ed5..a178fc1 100644
--- a/hl/Makefile.in
+++ b/hl/Makefile.in
@@ -517,6 +517,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in
index 68a8868..08e1fff 100644
--- a/hl/c++/Makefile.in
+++ b/hl/c++/Makefile.in
@@ -513,6 +513,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in
index c19b82a..3eb154a 100644
--- a/hl/c++/examples/Makefile.in
+++ b/hl/c++/examples/Makefile.in
@@ -460,6 +460,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in
index ea6449e..88056fd 100644
--- a/hl/c++/src/Makefile.in
+++ b/hl/c++/src/Makefile.in
@@ -516,6 +516,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in
index 2188d62..dc4e8a2 100644
--- a/hl/c++/test/Makefile.in
+++ b/hl/c++/test/Makefile.in
@@ -513,6 +513,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in
index 891d82f..602cd7c 100644
--- a/hl/examples/Makefile.in
+++ b/hl/examples/Makefile.in
@@ -460,6 +460,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in
index 81194a5..08cf1d8 100644
--- a/hl/fortran/Makefile.in
+++ b/hl/fortran/Makefile.in
@@ -517,6 +517,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in
index 8803e1e..72f00da 100644
--- a/hl/fortran/examples/Makefile.in
+++ b/hl/fortran/examples/Makefile.in
@@ -460,6 +460,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90
index c1ca6be..3216b0a 100644
--- a/hl/fortran/src/H5LTff.F90
+++ b/hl/fortran/src/H5LTff.F90
@@ -3568,7 +3568,7 @@ CONTAINS
#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE
SizeOf_buf_type = STORAGE_SIZE(buf(1)(1:1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)
#else
- SizeOf_buf_type = SIZEOF((buf(1)(1:1))
+ SizeOf_buf_type = SIZEOF(buf(1:1)(1:1))
#endif
namelen = LEN(dset_name)
diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in
index a06331c..35886b6 100644
--- a/hl/fortran/src/Makefile.in
+++ b/hl/fortran/src/Makefile.in
@@ -537,6 +537,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/hl/fortran/test/Makefile.am b/hl/fortran/test/Makefile.am
index fa3a803..18fdaf3 100644
--- a/hl/fortran/test/Makefile.am
+++ b/hl/fortran/test/Makefile.am
@@ -39,10 +39,10 @@ check_PROGRAMS=$(TEST_PROG)
LDADD= $(LIBH5F_HL) $(LIBH5F) $(LIBH5_HL) $(LIBHDF5)
# Source files for the programs
-tstds_SOURCES=tstds.f90
-tstlite_SOURCES=tstlite.f90
-tstimage_SOURCES=tstimage.f90
-tsttable_SOURCES=tsttable.f90
+tstds_SOURCES=tstds.F90
+tstlite_SOURCES=tstlite.F90
+tstimage_SOURCES=tstimage.F90
+tsttable_SOURCES=tsttable.F90
# Temporary files.
CHECK_CLEANFILES+=dsetf[1-5].h5 f1img.h5 f1tab.h5 tstds.h5
diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in
index be12387..6389d6b 100644
--- a/hl/fortran/test/Makefile.in
+++ b/hl/fortran/test/Makefile.in
@@ -151,13 +151,16 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src
-FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS)
-LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS)
-AM_V_FC = $(am__v_FC_@AM_V@)
-am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@)
-am__v_FC_0 = @echo " FC " $@;
-am__v_FC_1 =
+PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
+LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_FCFLAGS) $(FCFLAGS)
+AM_V_PPFC = $(am__v_PPFC_@AM_V@)
+am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@)
+am__v_PPFC_0 = @echo " PPFC " $@;
+am__v_PPFC_1 =
FCLD = $(FC)
FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
@@ -525,6 +528,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
@@ -685,10 +689,10 @@ TEST_PROG = tstds tstlite tstimage tsttable
LDADD = $(LIBH5F_HL) $(LIBH5F) $(LIBH5_HL) $(LIBHDF5)
# Source files for the programs
-tstds_SOURCES = tstds.f90
-tstlite_SOURCES = tstlite.f90
-tstimage_SOURCES = tstimage.f90
-tsttable_SOURCES = tsttable.f90
+tstds_SOURCES = tstds.F90
+tstlite_SOURCES = tstlite.F90
+tstimage_SOURCES = tstimage.F90
+tsttable_SOURCES = tsttable.F90
# Mark this directory as part of the Fortran API (this affects output
# from tests in conclude.am)
@@ -716,7 +720,7 @@ TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_)
all: all-am
.SUFFIXES:
-.SUFFIXES: .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs
+.SUFFIXES: .F90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -780,14 +784,14 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-.f90.o:
- $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $<
+.F90.o:
+ $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $<
-.f90.obj:
- $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'`
+.F90.obj:
+ $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-.f90.lo:
- $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $<
+.F90.lo:
+ $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
diff --git a/hl/fortran/test/tstds.f90 b/hl/fortran/test/tstds.F90
index cbf6c38..cbf6c38 100644
--- a/hl/fortran/test/tstds.f90
+++ b/hl/fortran/test/tstds.F90
diff --git a/hl/fortran/test/tstimage.f90 b/hl/fortran/test/tstimage.F90
index 0bff6b2..0bff6b2 100644
--- a/hl/fortran/test/tstimage.f90
+++ b/hl/fortran/test/tstimage.F90
diff --git a/hl/fortran/test/tstlite.f90 b/hl/fortran/test/tstlite.F90
index da44eb7..26e9467 100644
--- a/hl/fortran/test/tstlite.f90
+++ b/hl/fortran/test/tstlite.F90
@@ -16,6 +16,7 @@
!
! This file contains the FORTRAN90 tests for H5LT
!
+#include <H5config_f.inc>
PROGRAM lite_test
@@ -1220,9 +1221,9 @@ SUBROUTINE test_datasets()
!
! read dataset.
!
- f_ptr = C_LOC(buf4(1))
- CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode)
- !CALL h5ltread_dataset_double_f(file_id, dsetname4, bufr4, dims, errcode)
+ !!!f_ptr = C_LOC(buf4(1)) MSB
+ !!!CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) MSB
+ CALL h5ltread_dataset_double_f(file_id, dsetname4, bufr4, dims, errcode)
!
! compare read and write buffers.
@@ -1499,22 +1500,22 @@ SUBROUTINE test_attributes()
!
! write attribute.
!
-!#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE
+#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE
SizeOf_buf_type = STORAGE_SIZE(buf3(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)
-!#else
-! SizeOf_buf_type = SIZEOF(bufr4(1))
-!#endif
+#else
+ SizeOf_buf_type = SIZEOF(buf3(1))
+#endif
f_ptr = C_LOC(buf3(1))
CALL h5ltset_attribute_f(file_id,dsetname1,attrname3,f_ptr,"REAL", SizeOf_buf_type, size,errcode)
!CALL h5ltset_attribute_float_f(file_id,dsetname1,attrname3,buf3,size,errcode)
!
! read attribute.
!
-!#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE
+#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE
SizeOf_buf_type = STORAGE_SIZE(bufr3(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)
-!#else
-! SizeOf_buf_type = SIZEOF(bufr4(1))
-!#endif
+#else
+ SizeOf_buf_type = SIZEOF(bufr3(1))
+#endif
f_ptr = C_LOC(bufr3(1))
CALL h5ltget_attribute_f(file_id,dsetname1,attrname3,f_ptr,"REAL",SizeOf_buf_type,errcode)
@@ -1538,9 +1539,12 @@ SUBROUTINE test_attributes()
!-------------------------------------------------------------------------
CALL test_begin(' Set/Get attributes double ')
-
- SizeOf_buf_type = STORAGE_SIZE(buf4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)
+#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE
+ SizeOf_buf_type = STORAGE_SIZE(buf4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)
+#else
+ SizeOf_buf_type = SIZEOF(buf4(1))
+#endif
!
! write attribute.
!
@@ -1553,11 +1557,11 @@ SUBROUTINE test_attributes()
! read attribute.
!
-!#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE
+#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE
SizeOf_buf_type = STORAGE_SIZE(bufr4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)
-!#else
-! SizeOf_buf_type = SIZEOF(bufr4(1))
-!#endif
+#else
+ SizeOf_buf_type = SIZEOF(bufr4(1))
+#endif
f_ptr = C_LOC(bufr4(1))
CALL h5ltget_attribute_f(file_id,dsetname1,attrname4,f_ptr,"REAL",SizeOf_buf_type,errcode)
diff --git a/hl/fortran/test/tsttable.f90 b/hl/fortran/test/tsttable.F90
index f679982..f679982 100644
--- a/hl/fortran/test/tsttable.f90
+++ b/hl/fortran/test/tsttable.F90
diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in
index ef49563..2092562 100644
--- a/hl/src/Makefile.in
+++ b/hl/src/Makefile.in
@@ -515,6 +515,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in
index 6d6df30..1bfce03 100644
--- a/hl/test/Makefile.in
+++ b/hl/test/Makefile.in
@@ -552,6 +552,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in
index d1f3002..b8babca 100644
--- a/hl/tools/Makefile.in
+++ b/hl/tools/Makefile.in
@@ -514,6 +514,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in
index e79cadb..9928c00 100644
--- a/hl/tools/gif2h5/Makefile.in
+++ b/hl/tools/gif2h5/Makefile.in
@@ -528,6 +528,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4
index 8051752..febd73c 100644
--- a/m4/aclocal_fc.m4
+++ b/m4/aclocal_fc.m4
@@ -510,3 +510,37 @@ rm -f pac_fconftest.out
AC_MSG_RESULT([$pack_int_sizeof])
AC_LANG_POP([Fortran])
])
+
+AC_DEFUN([PAC_LDBL_DIG],[
+AC_MSG_CHECKING([maximum decimal precision for C])
+rm -f pac_Cconftest.out
+ AC_LANG_CONFTEST([
+ AC_LANG_PROGRAM([
+ #include <float.h>
+ #include <stdio.h>
+ #if __STDC_VERSION__ >= 199901L
+ #define C_LDBL_DIG DECIMAL_DIG
+ #else
+ #define C_LDBL_DIG LDBL_DIG
+ #endif
+ ],[[
+ FILE * pFile;
+ pFile = fopen("pac_Cconftest.out","w");
+ fprintf(pFile, "%d\n", C_LDBL_DIG);
+ ]])
+ ])
+ AC_RUN_IFELSE([],[
+ if test -s pac_Cconftest.out ; then
+ LDBL_DIG="`cat pac_Cconftest.out`"
+ AC_DEFINE_UNQUOTED([PAC_C_MAX_REAL_PRECISION], $LDBL_DIG, [Determine the decimal precision of C long double])
+ else
+ AC_MSG_WARN([No output from test program!])
+ fi
+ rm -f pac_Cconftest.out
+ ],[
+ AC_MSG_WARN([C program fails to build or run!])
+ ],[])
+AC_MSG_RESULT([$LDBL_DIG])
+])
+
+
diff --git a/src/H5config.h.in b/src/H5config.h.in
index ffbc4c2..3f432d5 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -422,6 +422,9 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
+/* Determine the decimal precision of C long double */
+#undef PAC_C_MAX_REAL_PRECISION
+
/* Define Fortran Maximum Real Decimal Precision */
#undef PAC_FC_MAX_REAL_PRECISION
diff --git a/src/Makefile.in b/src/Makefile.in
index 75feb9e..de573f0 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -576,6 +576,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/test/Makefile.in b/test/Makefile.in
index e26066a..38986f8 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -920,6 +920,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/testpar/Makefile.in b/testpar/Makefile.in
index 83c39d9..1e022e2 100644
--- a/testpar/Makefile.in
+++ b/testpar/Makefile.in
@@ -543,6 +543,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 7f4b9d7..eb45a0d 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -514,6 +514,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in
index 10d1385..b20c389 100644
--- a/tools/h5copy/Makefile.in
+++ b/tools/h5copy/Makefile.in
@@ -522,6 +522,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in
index b0157f7..d071705 100644
--- a/tools/h5diff/Makefile.in
+++ b/tools/h5diff/Makefile.in
@@ -529,6 +529,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in
index b8ea56a..36d32bb 100644
--- a/tools/h5dump/Makefile.in
+++ b/tools/h5dump/Makefile.in
@@ -528,6 +528,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in
index 18de006..091125e 100644
--- a/tools/h5import/Makefile.in
+++ b/tools/h5import/Makefile.in
@@ -522,6 +522,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in
index 3cd0190..4498f09 100644
--- a/tools/h5jam/Makefile.in
+++ b/tools/h5jam/Makefile.in
@@ -534,6 +534,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in
index 174ad99..adb3b2f 100644
--- a/tools/h5ls/Makefile.in
+++ b/tools/h5ls/Makefile.in
@@ -514,6 +514,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in
index 4c188bd..ed58bd6 100644
--- a/tools/h5repack/Makefile.in
+++ b/tools/h5repack/Makefile.in
@@ -546,6 +546,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in
index 084b75b..ff4e99a 100644
--- a/tools/h5stat/Makefile.in
+++ b/tools/h5stat/Makefile.in
@@ -524,6 +524,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in
index d747707..9d62e57 100644
--- a/tools/lib/Makefile.in
+++ b/tools/lib/Makefile.in
@@ -511,6 +511,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in
index 818dd6b..8767a53 100644
--- a/tools/misc/Makefile.in
+++ b/tools/misc/Makefile.in
@@ -549,6 +549,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in
index d7f240d..0539283 100644
--- a/tools/perform/Makefile.in
+++ b/tools/perform/Makefile.in
@@ -553,6 +553,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@