summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-01-10 22:56:20 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-01-10 22:56:20 (GMT)
commitc04b612eb42b8b63ed4b4f966d53381f60f5119a (patch)
tree92cc25bfac9f43dbec0b02fe5ac437abec3ae0ed
parent4eb3251a2cb04433f01d2c1e4f7d0ed2af4c1982 (diff)
downloadhdf5-c04b612eb42b8b63ed4b4f966d53381f60f5119a.zip
hdf5-c04b612eb42b8b63ed4b4f966d53381f60f5119a.tar.gz
hdf5-c04b612eb42b8b63ed4b4f966d53381f60f5119a.tar.bz2
[svn-r9801] Purpose:
Bug fix Description: Belatedly chase change of hobj_ref_t in C APIs. Platforms tested: FreeBSD 4.10 (sleipnir) w/backward compatibility turned on IRIX64 6.5 (modi4) w/FORTRAN h5committest
-rw-r--r--config/dec-flags1
-rw-r--r--config/freebsd1
-rw-r--r--config/hpux10.201
-rw-r--r--config/hpux11.001
-rw-r--r--config/ia64-linux-gnu2
-rw-r--r--config/irix6.x1
-rw-r--r--config/linux-gnulibc11
-rw-r--r--config/powerpc-apple1
-rw-r--r--config/powerpc-ibm-aix4.x1
-rw-r--r--config/powerpc-ibm-aix5.x1
-rw-r--r--config/rs6000-ibm-aix4.x1
-rw-r--r--config/solaris2.x1
-rw-r--r--config/sv1-cray1
-rw-r--r--config/unicos1
-rw-r--r--config/unicos10.0.X1
-rw-r--r--config/unicosmk1
-rw-r--r--config/unicosmk2.0.5.X1
-rw-r--r--config/unicosmk2.0.6.X1
-rw-r--r--config/unicosmk2.0.X1
-rwxr-xr-xconfigure10
-rw-r--r--configure.in1
-rw-r--r--fortran/src/H5Df.c161
-rw-r--r--fortran/src/H5Dff.f9022
-rw-r--r--fortran/src/H5Rf.c9
-rw-r--r--fortran/src/H5Rff.f9013
-rw-r--r--fortran/src/H5f90.h1
-rw-r--r--fortran/src/H5f90global.f903
-rw-r--r--fortran/src/H5f90i.h25
-rw-r--r--fortran/src/H5f90proto.h10
-rw-r--r--fortran/src/H5fortran_types.f90.in1
30 files changed, 152 insertions, 124 deletions
diff --git a/config/dec-flags b/config/dec-flags
index 59ae66f..0ff487f 100644
--- a/config/dec-flags
+++ b/config/dec-flags
@@ -100,6 +100,7 @@ fi
#
R_LARGE=18
R_INTEGER=9
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/freebsd b/config/freebsd
index 10ab716..51217c6 100644
--- a/config/freebsd
+++ b/config/freebsd
@@ -23,6 +23,7 @@ CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=1"
#
R_LARGE=18
R_INTEGER=9
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/hpux10.20 b/config/hpux10.20
index e37c0d3..ff88bc9 100644
--- a/config/hpux10.20
+++ b/config/hpux10.20
@@ -47,6 +47,7 @@ esac
#
R_LARGE=18
R_INTEGER=9
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/hpux11.00 b/config/hpux11.00
index 0979b42..d6327b2 100644
--- a/config/hpux11.00
+++ b/config/hpux11.00
@@ -47,6 +47,7 @@ esac
#
R_LARGE=18
R_INTEGER=9
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/ia64-linux-gnu b/config/ia64-linux-gnu
index 41cdf97..d553ef4 100644
--- a/config/ia64-linux-gnu
+++ b/config/ia64-linux-gnu
@@ -60,6 +60,7 @@ case $F9X in
# -Vaxlib is for non-standard fortran calls like exit().
MORE_FFLAGS='-fpp -DDEC$=DEC_ -DMS$=MS_ -Vaxlib'
FFLAGS="$FFLAGS $MORE_FFLAGS"
+ HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
@@ -69,6 +70,7 @@ case $F9X in
;;
*)
+ HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/irix6.x b/config/irix6.x
index 7a50f78..1fab241 100644
--- a/config/irix6.x
+++ b/config/irix6.x
@@ -93,6 +93,7 @@ esac
#
R_LARGE=18
R_INTEGER=9
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1
index 2167c46..3b2f184 100644
--- a/config/linux-gnulibc1
+++ b/config/linux-gnulibc1
@@ -71,6 +71,7 @@ fi
#
R_LARGE=18
R_INTEGER=9
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/powerpc-apple b/config/powerpc-apple
index 470a724..1ea17c8 100644
--- a/config/powerpc-apple
+++ b/config/powerpc-apple
@@ -34,6 +34,7 @@ fi
#
R_LARGE=18
R_INTEGER=9
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/powerpc-ibm-aix4.x b/config/powerpc-ibm-aix4.x
index 01f3544..8ca73f1 100644
--- a/config/powerpc-ibm-aix4.x
+++ b/config/powerpc-ibm-aix4.x
@@ -95,6 +95,7 @@ ac_cv_sizeof_uint_fast64_t=${ac_cv_sizeof_uint_fast64_t=8}
#
R_LARGE=18
R_INTEGER=9
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/powerpc-ibm-aix5.x b/config/powerpc-ibm-aix5.x
index 569252e..ede1701 100644
--- a/config/powerpc-ibm-aix5.x
+++ b/config/powerpc-ibm-aix5.x
@@ -120,6 +120,7 @@ ac_cv_sizeof_uint_fast64_t=${ac_cv_sizeof_uint_fast64_t=8}
#
R_LARGE=18
R_INTEGER=9
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/rs6000-ibm-aix4.x b/config/rs6000-ibm-aix4.x
index 6f6739c..3c528d2 100644
--- a/config/rs6000-ibm-aix4.x
+++ b/config/rs6000-ibm-aix4.x
@@ -22,6 +22,7 @@ hdf5_cv_printf_ll=${hdf5_cv_printf_ll='ll'}
#
R_LARGE=18
R_INTEGER=9
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/solaris2.x b/config/solaris2.x
index c9fafb6..1cf1505 100644
--- a/config/solaris2.x
+++ b/config/solaris2.x
@@ -47,6 +47,7 @@ LIBS="$LIBS -lsocket"
#
R_LARGE=18
R_INTEGER=9
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/sv1-cray b/config/sv1-cray
index 4c943b9..c11cde3 100644
--- a/config/sv1-cray
+++ b/config/sv1-cray
@@ -152,6 +152,7 @@ hdf5_cv_convert_denormal_float=${hdf5_cv_convert_denormal_float='no'}
#
R_LARGE=18
R_INTEGER=18
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/unicos b/config/unicos
index 9c0e81f..14a91b8 100644
--- a/config/unicos
+++ b/config/unicos
@@ -146,6 +146,7 @@ ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}
#
R_LARGE=18
R_INTEGER=18
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/unicos10.0.X b/config/unicos10.0.X
index 1598fe8..ba314be 100644
--- a/config/unicos10.0.X
+++ b/config/unicos10.0.X
@@ -153,6 +153,7 @@ hdf5_cv_convert_denormal_float=${hdf5_cv_convert_denormal_float='no'}
#
R_LARGE=18
R_INTEGER=18
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/unicosmk b/config/unicosmk
index 6b3b75b..2b94bbe 100644
--- a/config/unicosmk
+++ b/config/unicosmk
@@ -149,6 +149,7 @@ esac
#
R_LARGE=18
R_INTEGER=18
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/unicosmk2.0.5.X b/config/unicosmk2.0.5.X
index d33a668..d1a9464 100644
--- a/config/unicosmk2.0.5.X
+++ b/config/unicosmk2.0.5.X
@@ -149,6 +149,7 @@ esac
#
R_LARGE=18
R_INTEGER=18
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/unicosmk2.0.6.X b/config/unicosmk2.0.6.X
index 8f5c76d..c5e37c3 100644
--- a/config/unicosmk2.0.6.X
+++ b/config/unicosmk2.0.6.X
@@ -153,6 +153,7 @@ hdf5_cv_convert_denormal_float=${hdf5_cv_convert_denormal_float='no'}
#
R_LARGE=18
R_INTEGER=18
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/config/unicosmk2.0.X b/config/unicosmk2.0.X
index 9b357a5..89c07a7 100644
--- a/config/unicosmk2.0.X
+++ b/config/unicosmk2.0.X
@@ -149,6 +149,7 @@ esac
#
R_LARGE=18
R_INTEGER=18
+HADDR_T='SELECTED_INT_KIND(R_LARGE)'
HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
HID_T='SELECTED_INT_KIND(R_INTEGER)'
diff --git a/configure b/configure
index f394697..91c41c7 100755
--- a/configure
+++ b/configure
@@ -2484,6 +2484,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
+
for ac_prog in f90 pgf90 xlf90 f95 g95 xlf95 efc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -5239,7 +5240,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5242 "configure"' > conftest.$ac_ext
+ echo '#line 5243 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5780,7 +5781,7 @@ chmod -w .
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
compiler_c_o=no
-if { (eval echo configure:5783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:5784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
if test -s out/conftest.err; then
@@ -7587,7 +7588,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 7590 "configure"
+#line 7591 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -7685,7 +7686,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 7688 "configure"
+#line 7689 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -34723,6 +34724,7 @@ s,@OBJEXT@,$OBJEXT,;t t
s,@HDF5_INTERFACES@,$HDF5_INTERFACES,;t t
s,@R_LARGE@,$R_LARGE,;t t
s,@R_INTEGER@,$R_INTEGER,;t t
+s,@HADDR_T@,$HADDR_T,;t t
s,@HSIZE_T@,$HSIZE_T,;t t
s,@HSSIZE_T@,$HSSIZE_T,;t t
s,@HID_T@,$HID_T,;t t
diff --git a/configure.in b/configure.in
index c48a525..f668717 100644
--- a/configure.in
+++ b/configure.in
@@ -249,6 +249,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
dnl
AC_SUBST([R_LARGE])
AC_SUBST([R_INTEGER])
+ AC_SUBST([HADDR_T])
AC_SUBST([HSIZE_T])
AC_SUBST([HSSIZE_T])
AC_SUBST([HID_T])
diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c
index b7f01f0..ccf9804 100644
--- a/fortran/src/H5Df.c
+++ b/fortran/src/H5Df.c
@@ -205,50 +205,48 @@ nh5dwrite_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_
* dims argumnet being of INTEGER(HSIZE_T) type.
*---------------------------------------------------------------------------*/
int_f
-nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims)
+nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims)
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- hobj_ref_t *buf_c;
- int i, n;
- n = (int)*dims;
-
- /*
- * Define transfer property
- */
- c_xfer_prp = (hid_t)*xfer_prp;
-
- /*
- * Allocate temporary buffer and copy references from Fortran.
- */
- buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*(n));
- if ( buf_c != NULL ) {
- for (i = 0; i < n; i++) {
- HDmemcpy(&buf_c[i], buf, H5R_OBJ_REF_BUF_SIZE);
- buf = buf + REF_OBJ_BUF_LEN_F;
- }
- }
- else return ret_value;
-
- /*
- * Call H5Dwrite function.
- */
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
- HDfree(buf_c);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
-
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ hobj_ref_t *buf_c;
+ int i, n;
+
+ /*
+ * Define transfer property
+ */
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ /*
+ * Allocate temporary buffer and copy references from Fortran.
+ */
+ n = (int)*dims;
+ buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*(n));
+ if ( buf_c != NULL ) {
+ for (i = 0; i < n; i++)
+ HDmemcpy(&buf_c[i], &buf[i], sizeof(haddr_t));
+ }
+ else return ret_value;
+
+ /*
+ * Call H5Dwrite function.
+ */
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
+ HDfree(buf_c);
+ if (ret < 0) return ret_value;
+ ret_value = 0;
+ return ret_value;
}
+
/*----------------------------------------------------------------------------
* Name: h5dwrite_ref_reg_c
* Purpose: Call H5Dwrite to write a dataset of dataset region references
@@ -403,47 +401,46 @@ nh5dread_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t
* with the dims parameter being of INTEGER(HSIZE_T_F) size.
*---------------------------------------------------------------------------*/
int_f
-nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims)
+nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f * buf, hsize_t_f *dims)
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- hobj_ref_t *buf_c = NULL;
- hsize_t i,n;
- n = (hsize_t)*dims;
- /*
- * Define transfer property
- */
- c_xfer_prp = (hid_t)*xfer_prp;
-
- /*
- * Allocate temporary buffer.
- */
- buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*(size_t)n);
- if ( buf_c != NULL ) {
- /*
- * Call H5Dread function.
- */
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
- if (ret >=0) {
- for (i = 0; i < n; i++) {
- HDmemcpy(buf, &buf_c[i], H5R_OBJ_REF_BUF_SIZE);
- buf = buf + REF_OBJ_BUF_LEN_F;
- }
- }
- if ( buf_c != NULL ) HDfree(buf_c);
- }
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ hobj_ref_t *buf_c = NULL;
+ hsize_t i,n;
+
+ /*
+ * Define transfer property
+ */
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ /*
+ * Allocate temporary buffer.
+ */
+ n = (hsize_t)*dims;
+ buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*(size_t)n);
+ if ( buf_c != NULL ) {
+ /*
+ * Call H5Dread function.
+ */
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
+ if (ret >=0) {
+ for (i = 0; i < n; i++)
+ HDmemcpy(&buf[i], &buf_c[i], sizeof(haddr_t));
+ }
+ if ( buf_c != NULL ) HDfree(buf_c);
+ }
+ if (ret < 0) return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/*----------------------------------------------------------------------------
diff --git a/fortran/src/H5Dff.f90 b/fortran/src/H5Dff.f90
index 0001aca..7ceb9f0 100644
--- a/fortran/src/H5Dff.f90
+++ b/fortran/src/H5Dff.f90
@@ -330,7 +330,7 @@
INTEGER(HID_T) :: xfer_prp_default
INTEGER(HID_T) :: mem_space_id_default
INTEGER(HID_T) :: file_space_id_default
- INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf
+ INTEGER(HADDR_T), ALLOCATABLE, DIMENSION(:) :: ref_buf
INTEGER :: i,j
! INTEGER, EXTERNAL :: h5dwrite_ref_obj_c
@@ -349,7 +349,7 @@
INTEGER(HID_T) :: xfer_prp_default
INTEGER(HID_T) :: mem_space_id_default
INTEGER(HID_T) :: file_space_id_default
- INTEGER, DIMENSION(*) :: ref_buf
+ INTEGER(HADDR_T), DIMENSION(*) :: ref_buf
INTEGER(HSIZE_T), DIMENSION(*) :: dims
END FUNCTION h5dwrite_ref_obj_c
END INTERFACE
@@ -362,15 +362,13 @@
if (present(mem_space_id)) mem_space_id_default = mem_space_id
if (present(file_space_id)) file_space_id_default = file_space_id
- allocate(ref_buf(REF_OBJ_BUF_LEN*dims(1)), stat=hdferr)
+ allocate(ref_buf(dims(1)), stat=hdferr)
if (hdferr .NE. 0 ) then
hdferr = -1
return
else
do j = 1, dims(1)
- do i = 1, REF_OBJ_BUF_LEN
- ref_buf(REF_OBJ_BUF_LEN*(j-1) + i ) = buf(j)%ref(i)
- enddo
+ ref_buf(j) = buf(j)%ref
enddo
endif
hdferr = h5dwrite_ref_obj_c(dset_id, mem_type_id, mem_space_id_default, &
@@ -2500,7 +2498,7 @@
INTEGER(HID_T) :: xfer_prp_default
INTEGER(HID_T) :: mem_space_id_default
INTEGER(HID_T) :: file_space_id_default
- INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf
+ INTEGER(HADDR_T), ALLOCATABLE, DIMENSION(:) :: ref_buf
INTEGER :: i,j
! INTEGER, EXTERNAL :: h5dread_ref_obj_c
@@ -2519,12 +2517,12 @@
INTEGER(HID_T) :: xfer_prp_default
INTEGER(HID_T) :: mem_space_id_default
INTEGER(HID_T) :: file_space_id_default
- INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims
- INTEGER, DIMENSION(*) :: ref_buf
+ INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims
+ INTEGER(HADDR_T), DIMENSION(*) :: ref_buf
END FUNCTION h5dread_ref_obj_c
END INTERFACE
- allocate(ref_buf(REF_OBJ_BUF_LEN*dims(1)), stat=hdferr)
+ allocate(ref_buf(dims(1)), stat=hdferr)
if (hdferr .NE. 0) then
hdferr = -1
return
@@ -2541,9 +2539,7 @@
hdferr = h5dread_ref_obj_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, ref_buf, dims)
do j = 1, dims(1)
- do i = 1, REF_OBJ_BUF_LEN
- buf(j)%ref(i) = ref_buf(REF_OBJ_BUF_LEN*(j-1) + i)
- enddo
+ buf(j)%ref = ref_buf(j)
enddo
deallocate(ref_buf)
END SUBROUTINE h5dread_reference_obj
diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c
index 070efdd..843c2ea 100644
--- a/fortran/src/H5Rf.c
+++ b/fortran/src/H5Rf.c
@@ -29,7 +29,7 @@
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5rcreate_object_c (int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen)
+nh5rcreate_object_c (haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen)
{
int ret_value = -1;
hid_t c_loc_id;
@@ -53,11 +53,10 @@ nh5rcreate_object_c (int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen)
HDfree(c_name);
if (ret_value_c >= 0) {
- *ref=(int_f)ref_c;
+ *ref=(haddr_t_f)ref_c;
ret_value = 0;
}
- ret_value = 0;
return ret_value;
}
@@ -153,7 +152,7 @@ nh5rdereference_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id)
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5rdereference_object_c (hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id)
+nh5rdereference_object_c (hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id)
{
int ret_value = -1;
hid_t c_dset_id;
@@ -218,7 +217,7 @@ nh5rget_region_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *space_id)
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5rget_object_type_obj_c (hid_t_f *dset_id, int_f *ref, int_f *obj_type)
+nh5rget_object_type_obj_c (hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type)
{
int ret_value = -1;
hid_t c_dset_id;
diff --git a/fortran/src/H5Rff.f90 b/fortran/src/H5Rff.f90
index 97cebe1..08c85df 100644
--- a/fortran/src/H5Rff.f90
+++ b/fortran/src/H5Rff.f90
@@ -102,7 +102,7 @@
INTEGER, INTENT(OUT) :: hdferr ! Error code
INTEGER :: namelen ! Name length
- INTEGER :: ref_f(REF_OBJ_BUF_LEN) ! Local buffer to pass reference
+ INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference
! INTEGER, EXTERNAL :: h5fcreate_object_c
! Interface is needed for MS FORTRAN
@@ -114,8 +114,7 @@
!MS$ATTRIBUTES C,reference,alias:'_H5RCREATE_OBJECT_C':: h5rcreate_object_c
!DEC$ ENDIF
!DEC$ATTRIBUTES reference :: name
-! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2
- INTEGER :: ref_f(REF_OBJ_BUF_LEN)
+ INTEGER(HADDR_T) :: ref_f
INTEGER(HID_T), INTENT(IN) :: loc_id
CHARACTER(LEN=*), INTENT(IN) :: name
INTEGER :: namelen
@@ -244,7 +243,7 @@
INTEGER, INTENT(OUT) :: hdferr ! Error code
INTEGER :: ref_type ! Reference type
- INTEGER :: ref_f(REF_OBJ_BUF_LEN) ! Local buffer to pass reference
+ INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference
! INTEGER, EXTERNAL :: h5h5rdereference_object_c
! Interface is needed for MS FORTRAN
@@ -257,7 +256,7 @@
!DEC$ ENDIF
! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2
INTEGER(HID_T), INTENT(IN) :: dset_id
- INTEGER :: ref_f(REF_OBJ_BUF_LEN)
+ INTEGER(HADDR_T) :: ref_f
INTEGER(HID_T), INTENT(OUT) :: obj_id
END FUNCTION h5rdereference_object_c
END INTERFACE
@@ -452,7 +451,7 @@
! H5G_TYPE_F 3
INTEGER, INTENT(OUT) :: hdferr ! Error code
- INTEGER :: ref_f(REF_OBJ_BUF_LEN) ! Local buffer to pass reference
+ INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference
! INTEGER, EXTERNAL :: h5rget_object_type_obj_c
! Interface is needed for MS FORTRAN
@@ -465,7 +464,7 @@
!DEC$ ENDIF
! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2
INTEGER(HID_T), INTENT(IN) :: dset_id
- INTEGER :: ref_f(REF_OBJ_BUF_LEN)
+ INTEGER(HADDR_T) :: ref_f
INTEGER, INTENT(OUT) :: obj_type
END FUNCTION h5rget_object_type_obj_c
END INTERFACE
diff --git a/fortran/src/H5f90.h b/fortran/src/H5f90.h
index 82983e1..a56cb0c 100644
--- a/fortran/src/H5f90.h
+++ b/fortran/src/H5f90.h
@@ -21,7 +21,6 @@
#include "H5f90proto.h"
/* Constants used in H5Rff.f90 and H5Rf.c files */
-#define REF_OBJ_BUF_LEN_F 2
#define REF_REG_BUF_LEN_F 3
/* Constants used in H5Gf.c files */
diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90
index b224045..46591b2 100644
--- a/fortran/src/H5f90global.f90
+++ b/fortran/src/H5f90global.f90
@@ -18,11 +18,10 @@
! Definitions for reference datatypes.
! If you change the value of these parameters, do not forget to change corresponding
! values in the H5f90.h file.
- INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2
INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3
TYPE hobj_ref_t_f
- INTEGER ref(REF_OBJ_BUF_LEN)
+ INTEGER(HADDR_T) ref
END TYPE
TYPE hdset_reg_ref_t_f
diff --git a/fortran/src/H5f90i.h b/fortran/src/H5f90i.h
index 21498eb..77d6714 100644
--- a/fortran/src/H5f90i.h
+++ b/fortran/src/H5f90i.h
@@ -27,6 +27,7 @@
#include <fortran.h>
/*typedef char* _fcd;*/
+typedef long haddr_t_f;
typedef long hsize_t_f;
typedef long hssize_t_f;
typedef long size_t_f;
@@ -41,6 +42,7 @@ typedef double real_f;
#if defined(IBM6000) || defined(_AIX)
typedef char *_fcd;
+typedef long long haddr_t_f;
typedef long long hsize_t_f;
typedef long long hssize_t_f;
typedef int size_t_f;
@@ -53,6 +55,7 @@ typedef float real_f;
/* MAC APPLE definitions with IBM XL compiler*/
#if defined(__APPLE__)
typedef char *_fcd;
+typedef long long haddr_t_f;
typedef long long hsize_t_f;
typedef long long hssize_t_f;
typedef int size_t_f;
@@ -80,6 +83,7 @@ typedef float real_f;
/* IA32 specific definitions */
#if (defined(i386) || defined(__i386) || defined(__i386__))
+typedef long long haddr_t_f;
typedef long long hsize_t_f;
typedef long long hssize_t_f;
typedef int size_t_f;
@@ -92,6 +96,7 @@ typedef int size_t_f;
/* AMD64 specific definitions */
#elif defined __x86_64__
+typedef long long haddr_t_f;
typedef long long hsize_t_f;
typedef long long hssize_t_f;
typedef int size_t_f;
@@ -100,6 +105,7 @@ typedef int size_t_f;
/* IA64 specific definitions */
#elif defined __ia64
+typedef long haddr_t_f;
typedef long hsize_t_f;
typedef long hssize_t_f;
typedef long size_t_f;
@@ -111,6 +117,7 @@ typedef long size_t_f;
#if defined(IRIX) || defined(IRIS4) || defined(sgi) || defined(__sgi__) || defined(__sgi)
typedef char *_fcd;
+typedef long haddr_t_f;
typedef long hsize_t_f;
typedef long hssize_t_f;
typedef long size_t_f;
@@ -124,6 +131,7 @@ typedef float real_f;
#if (defined(SUN) || defined(sun) || defined(__sun__) || defined(__SUNPRO_C)) & !defined(__i386)
typedef char *_fcd;
+typedef long long haddr_t_f;
typedef long long hssize_t_f;
typedef long long hsize_t_f;
typedef int size_t_f;
@@ -138,6 +146,7 @@ typedef float real_f;
#if defined DEC_ALPHA || (defined __alpha && defined __unix__ && !defined __linux__)
typedef char *_fcd;
+typedef long haddr_t_f;
typedef long hsize_t_f;
typedef long hssize_t_f;
typedef long size_t_f;
@@ -152,9 +161,10 @@ typedef float real_f;
#if defined __alpha__ && defined __linux__
typedef char *_fcd;
-typedef long long hsize_t_f;
-typedef long long hssize_t_f;
-typedef long long size_t_f;
+typedef long long haddr_t_f;
+typedef long long hsize_t_f;
+typedef long long hssize_t_f;
+typedef long long size_t_f;
typedef int int_f;
typedef int hid_t_f;
typedef float real_f;
@@ -166,8 +176,9 @@ typedef float real_f;
#if defined(HP9000) || (!defined(__convexc__) && (defined(hpux) || defined(__hpux)))
typedef char *_fcd;
-typedef long long hsize_t_f;
-typedef long long hssize_t_f;
+typedef long long haddr_t_f;
+typedef long long hsize_t_f;
+typedef long long hssize_t_f;
typedef long size_t_f;
typedef int int_f;
typedef int hid_t_f;
@@ -180,6 +191,7 @@ typedef float real_f;
#if defined _WINDOWS || defined WIN32
typedef char *_fcd;
+typedef int haddr_t_f;
typedef int hsize_t_f;
typedef int hssize_t_f;
typedef int size_t_f;
@@ -204,16 +216,19 @@ typedef float real_f;
/* IA32 specific definitions */
#if (defined(i386) || defined(__i386) || defined(__i386__))
+typedef long long haddr_t_f;
typedef long long hsize_t_f;
typedef long long hssize_t_f;
typedef int size_t_f;
/* AMD64 specific definitions */
#elif defined __x86_64__
+typedef long long haddr_t_f;
typedef long long hsize_t_f;
typedef long long hssize_t_f;
typedef int size_t_f;
/* IA64 specific definitions */
#elif defined __ia64
+typedef long haddr_t_f;
typedef long hsize_t_f;
typedef long hssize_t_f;
typedef long size_t_f;
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index 8876e67..437795c 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -244,14 +244,14 @@ H5_FCDLL int_f nh5dwrite_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem
H5_FCDLL int_f nh5dwrite_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len);
H5_FCDLL int_f nh5dwrite_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len);
H5_FCDLL int_f nh5dwrite_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len);
-H5_FCDLL int_f nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f *buf, hsize_t_f *dims);
H5_FCDLL int_f nh5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims);
H5_FCDLL int_f nh5dwritec_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
H5_FCDLL int_f nh5dread_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf, hsize_t_f *dims);
H5_FCDLL int_f nh5dread_vl_integer_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len);
H5_FCDLL int_f nh5dread_vl_real_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len);
H5_FCDLL int_f nh5dread_vl_string_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len);
-H5_FCDLL int_f nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims);
+H5_FCDLL int_f nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, haddr_t_f * buf, hsize_t_f *dims);
H5_FCDLL int_f nh5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims);
H5_FCDLL int_f nh5dreadc_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims);
H5_FCDLL int_f nh5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id);
@@ -890,12 +890,12 @@ H5_FCDLL int_f nh5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag);
#endif /* DF_CAPFNAMES */
#endif /* H5Rf90_FNAMES */
-H5_FCDLL int_f nh5rcreate_object_c (int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen);
+H5_FCDLL int_f nh5rcreate_object_c (haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen);
H5_FCDLL int_f nh5rcreate_region_c (int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id);
H5_FCDLL int_f nh5rdereference_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id);
-H5_FCDLL int_f nh5rdereference_object_c (hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id);
+H5_FCDLL int_f nh5rdereference_object_c (hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id);
H5_FCDLL int_f nh5rget_region_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *space_id);
-H5_FCDLL int_f nh5rget_object_type_obj_c (hid_t_f *dset_id, int_f *ref, int_f *obj_type);
+H5_FCDLL int_f nh5rget_object_type_obj_c (hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type);
/*
* Functions from H5If.c
diff --git a/fortran/src/H5fortran_types.f90.in b/fortran/src/H5fortran_types.f90.in
index 4ff2ef2..0aaabb6 100644
--- a/fortran/src/H5fortran_types.f90.in
+++ b/fortran/src/H5fortran_types.f90.in
@@ -30,6 +30,7 @@
!
INTEGER, PARAMETER :: R_LARGE = @R_LARGE@
INTEGER, PARAMETER :: R_INTEGER = @R_INTEGER@
+ INTEGER, PARAMETER :: HADDR_T = @HADDR_T@
INTEGER, PARAMETER :: HSIZE_T = @HSIZE_T@
INTEGER, PARAMETER :: HSSIZE_T = @HSSIZE_T@
INTEGER, PARAMETER :: HID_T = @HID_T@