summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Df.c
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2005-06-22 18:23:21 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2005-06-22 18:23:21 (GMT)
commitea66068977639b7b2737bb9db1e59b26db914d1e (patch)
treebc1ce12c71d0f91dba3c2d0ddccd81862a588c89 /fortran/src/H5Df.c
parentec071c6c149c44d9b3a056948502ca2af3b875b9 (diff)
downloadhdf5-ea66068977639b7b2737bb9db1e59b26db914d1e.zip
hdf5-ea66068977639b7b2737bb9db1e59b26db914d1e.tar.gz
hdf5-ea66068977639b7b2737bb9db1e59b26db914d1e.tar.bz2
[svn-r10970] Purpose: New feature/bug #350 fix
Description: When compiler flag was used to set the size of Fortran integer to 8 bytes, library would fail. Solution: Cleaned up the code; added detection of Fortran INTEGER type size and appropriately defined int_f type for C-stubs routines. Platforms tested: Solaris 2.8 32 and 64-bit, AIX 5.1 64-bit parallel PGI Fortran with -i8 flag on heping Absoft Fortran with -i8 flag on heping g95 on mir (Fortran integer is 8 bytes by default that cannot be changed - compiler bug ;-) AIX Fortran with -qintsize=8 32 and 64-bit modes on copper Misc. update:
Diffstat (limited to 'fortran/src/H5Df.c')
-rw-r--r--fortran/src/H5Df.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c
index ccf9804..d8abc88 100644
--- a/fortran/src/H5Df.c
+++ b/fortran/src/H5Df.c
@@ -91,6 +91,9 @@ nh5dopen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dset_id)
int c_namelen;
hid_t c_loc_id;
hid_t c_dset_id;
+ hid_t plist;
+ off_t offset;
+ hsize_t size;
/*
* Convert FORTRAN name to C name
@@ -759,7 +762,7 @@ nh5dwrite_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_
hid_t c_file_space_id;
hid_t c_xfer_prp;
herr_t status;
- int *tmp;
+ int_f *tmp;
size_t max_len;
hvl_t *c_buf;
@@ -777,7 +780,7 @@ nh5dwrite_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_
c_buf = (hvl_t *)malloc((size_t)num_elem * sizeof(hvl_t));
if (c_buf == NULL) return ret_value;
- tmp = (int *)buf;
+ tmp = (int_f *)buf;
for (i=0; i < num_elem; i++) {
c_buf[i].len = (size_t)len[i];
c_buf[i].p = tmp;
@@ -849,7 +852,7 @@ nh5dread_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_s
if ( status < 0 ) goto DONE;
for (i=0; i < num_elem; i++) {
len[i] = (size_t_f)c_buf[i].len;
- memcpy(&buf[i*max_len], c_buf[i].p, c_buf[i].len*sizeof(int));
+ memcpy(&buf[i*max_len], c_buf[i].p, c_buf[i].len*sizeof(int_f));
}
H5Dvlen_reclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
ret_value = 0;