From c04b612eb42b8b63ed4b4f966d53381f60f5119a Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 10 Jan 2005 17:56:20 -0500 Subject: [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 --- config/dec-flags | 1 + config/freebsd | 1 + config/hpux10.20 | 1 + config/hpux11.00 | 1 + config/ia64-linux-gnu | 2 + config/irix6.x | 1 + config/linux-gnulibc1 | 1 + config/powerpc-apple | 1 + config/powerpc-ibm-aix4.x | 1 + config/powerpc-ibm-aix5.x | 1 + config/rs6000-ibm-aix4.x | 1 + config/solaris2.x | 1 + config/sv1-cray | 1 + config/unicos | 1 + config/unicos10.0.X | 1 + config/unicosmk | 1 + config/unicosmk2.0.5.X | 1 + config/unicosmk2.0.6.X | 1 + config/unicosmk2.0.X | 1 + configure | 10 ++- configure.in | 1 + fortran/src/H5Df.c | 161 ++++++++++++++++++------------------- fortran/src/H5Dff.f90 | 22 +++-- fortran/src/H5Rf.c | 9 +-- fortran/src/H5Rff.f90 | 13 ++- fortran/src/H5f90.h | 1 - fortran/src/H5f90global.f90 | 3 +- fortran/src/H5f90i.h | 25 ++++-- fortran/src/H5f90proto.h | 10 +-- fortran/src/H5fortran_types.f90.in | 1 + 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 < conftest.$ac_ext <=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 /*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@ -- cgit v0.12