summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2004-10-21 16:04:08 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2004-10-21 16:04:08 (GMT)
commitcacc8fa4c6bd301339ce78e8ab41a31ab8bdf654 (patch)
treef364eb370caa3dff914522121a67cc8f4e297c20 /src/H5T.c
parent229d19bc72ee1775c19428a46ac8e89618cfdb0b (diff)
downloadhdf5-cacc8fa4c6bd301339ce78e8ab41a31ab8bdf654.zip
hdf5-cacc8fa4c6bd301339ce78e8ab41a31ab8bdf654.tar.gz
hdf5-cacc8fa4c6bd301339ce78e8ab41a31ab8bdf654.tar.bz2
[svn-r9445] Purpose: Bug fix
Description: "char" was considered as always "signed char" in data type conversion. However, ISO C leaves the definition of "char" to individual implementation. i.e. for IBM AIX C compiler, it's treated as "unsigned char". Solution: Changed all "char" to "signed char". Don't even do "char" anymore because its definition is up to each vendor. Platforms tested: h5committest
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5T.c b/src/H5T.c
index 602da96..0c85c3f 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -1098,8 +1098,8 @@ H5T_init_interface(void)
status |= H5T_register(H5T_PERS_HARD, "uchar_schar", native_uchar, native_schar, H5T_conv_uchar_schar, H5AC_dxpl_id);
/* From char to floats */
- status |= H5T_register(H5T_PERS_HARD, "char_flt", native_schar, native_float, H5T_conv_char_float, H5AC_dxpl_id);
- status |= H5T_register(H5T_PERS_HARD, "char_dbl", native_schar, native_double, H5T_conv_char_double, H5AC_dxpl_id);
+ status |= H5T_register(H5T_PERS_HARD, "schar_flt", native_schar, native_float, H5T_conv_schar_float, H5AC_dxpl_id);
+ status |= H5T_register(H5T_PERS_HARD, "schar_dbl", native_schar, native_double, H5T_conv_schar_double, H5AC_dxpl_id);
/* From unsigned char to floats */
status |= H5T_register(H5T_PERS_HARD, "uchar_flt", native_uchar, native_float, H5T_conv_uchar_float, H5AC_dxpl_id);
@@ -1140,8 +1140,8 @@ H5T_init_interface(void)
#endif /* H5_ULLONG_TO_FP_CAST_WORKS */
/* From floats to char */
- status |= H5T_register(H5T_PERS_HARD, "flt_char", native_float, native_schar, H5T_conv_float_char, H5AC_dxpl_id);
- status |= H5T_register(H5T_PERS_HARD, "dbl_char", native_double, native_schar, H5T_conv_double_char, H5AC_dxpl_id);
+ status |= H5T_register(H5T_PERS_HARD, "flt_schar", native_float, native_schar, H5T_conv_float_schar, H5AC_dxpl_id);
+ status |= H5T_register(H5T_PERS_HARD, "dbl_schar", native_double, native_schar, H5T_conv_double_schar, H5AC_dxpl_id);
/* From floats to unsigned char */
status |= H5T_register(H5T_PERS_HARD, "flt_uchar", native_float, native_uchar, H5T_conv_float_uchar, H5AC_dxpl_id);