summaryrefslogtreecommitdiffstats
path: root/hl/fortran/src/H5IMfc.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 /hl/fortran/src/H5IMfc.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 'hl/fortran/src/H5IMfc.c')
-rwxr-xr-xhl/fortran/src/H5IMfc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hl/fortran/src/H5IMfc.c b/hl/fortran/src/H5IMfc.c
index f4c71cb..7d09f10 100755
--- a/hl/fortran/src/H5IMfc.c
+++ b/hl/fortran/src/H5IMfc.c
@@ -16,6 +16,7 @@
#include "H5IM.h"
#include "H5LTf90proto.h"
+#include "../../../fortran/src/H5f90i_gen.h"
/*-------------------------------------------------------------------------
@@ -43,7 +44,7 @@ nh5immake_image_8bit_c (hid_t_f *loc_id,
_fcd name,
hsize_t_f *width,
hsize_t_f *height,
- void *buf)
+ int_f *buf)
{
int ret_value = -1;
herr_t ret;
@@ -54,7 +55,7 @@ nh5immake_image_8bit_c (hid_t_f *loc_id,
/*
* Convert FORTRAN name to C name
*/
- c_namelen = *namelen;
+ c_namelen = (int)*namelen;
c_name = (char *)HD5f2cstring(name, c_namelen);
if (c_name == NULL) return ret_value;
@@ -62,7 +63,6 @@ nh5immake_image_8bit_c (hid_t_f *loc_id,
* Call H5IMmake_image_8bitf function.
*/
c_loc_id = (hid_t)*loc_id;
-
ret = H5IMmake_image_8bitf(c_loc_id,c_name,*width,*height,buf);
if (ret < 0) return ret_value;
@@ -93,7 +93,7 @@ int_f
nh5imread_image_c (hid_t_f *loc_id,
int_f *namelen,
_fcd name,
- void *buf)
+ int_f *buf)
{
int ret_value = -1;
herr_t ret;
@@ -105,7 +105,7 @@ nh5imread_image_c (hid_t_f *loc_id,
/*
* Convert FORTRAN name to C name
*/
- c_namelen = *namelen;
+ c_namelen = (int)*namelen;
c_name = (char *)HD5f2cstring(name, c_namelen);
if (c_name == NULL) return ret_value;