Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 282821 | Differences between
and this patch

Collapse All | Expand All

(-)mathgl-1.9.0.1.orig/configure.ac (+1 lines)
Lines 153-158 Link Here
153
153
154
AC_CHECK_LIB([hdf5], [main], [(test x$all = xtrue || test x$hdf5 = xtrue) && HDF5_LIBS=-lhdf5 AC_SUBST(HDF5_LIBS)], 
154
AC_CHECK_LIB([hdf5], [main], [(test x$all = xtrue || test x$hdf5 = xtrue) && HDF5_LIBS=-lhdf5 AC_SUBST(HDF5_LIBS)], 
155
    [(test x$all = xtrue || test x$hdf5 = xtrue) && echo "Please install hdf5 library" && exit])
155
    [(test x$all = xtrue || test x$hdf5 = xtrue) && echo "Please install hdf5 library" && exit])
156
AC_CHECK_LIB([hdf5], [H5Literate], [(test x$all = xtrue || test x$hdf5 = xtrue) && HDF5_FLAGS="-DHAVE_HDF5 -DHAVE_HDF5_18" AC_SUBST(HDF5_FLAGS)], [])
156
AM_CONDITIONAL(USE_HDF5, (test x$all = xtrue || test x$hdf5 = xtrue))
157
AM_CONDITIONAL(USE_HDF5, (test x$all = xtrue || test x$hdf5 = xtrue))
157
158
158
AC_ARG_ENABLE(gif,
159
AC_ARG_ENABLE(gif,
(-)mathgl-1.9.0.1.orig/mgl/mgl_data_io.cpp (+16 lines)
Lines 919-925 Link Here
919
	hid_t hf,hd,hs;
919
	hid_t hf,hd,hs;
920
	hsize_t dims[3];
920
	hsize_t dims[3];
921
	long rank = 3, res;
921
	long rank = 3, res;
922
#ifdef HAVE_HDF5_18
923
	H5Eset_auto(H5E_DEFAULT,0,0);
924
#else
922
	H5Eset_auto(0,0);
925
	H5Eset_auto(0,0);
926
#endif
923
	res=H5Fis_hdf5(fname);
927
	res=H5Fis_hdf5(fname);
924
	if(res>0 && !rewrite)	hf = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT);
928
	if(res>0 && !rewrite)	hf = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT);
925
	else	hf = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
929
	else	hf = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
Lines 929-938 Link Here
929
	else	{	rank = 3;	dims[0] = nz;	dims[1] = ny;	dims[2] = nx;	}
933
	else	{	rank = 3;	dims[0] = nz;	dims[1] = ny;	dims[2] = nx;	}
930
	hs = H5Screate_simple(rank, dims, 0);
934
	hs = H5Screate_simple(rank, dims, 0);
931
#if(MGL_USE_DOUBLE==1)
935
#if(MGL_USE_DOUBLE==1)
936
#ifdef HAVE_HDF5_18
937
	hd = H5Dcreate(hf, data, H5T_NATIVE_DOUBLE, hs, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
938
#else  /* ! HAVE_HDF5_18 */
932
	hd = H5Dcreate(hf, data, H5T_NATIVE_DOUBLE, hs, H5P_DEFAULT);
939
	hd = H5Dcreate(hf, data, H5T_NATIVE_DOUBLE, hs, H5P_DEFAULT);
940
#endif /* HAVE_HDF5_18 */
933
	H5Dwrite(hd, H5T_NATIVE_DOUBLE, hs, hs, H5P_DEFAULT, a);
941
	H5Dwrite(hd, H5T_NATIVE_DOUBLE, hs, hs, H5P_DEFAULT, a);
934
#else
942
#else
943
#ifdef HAVE_HDF5_18
944
	hd = H5Dcreate(hf, data, H5T_NATIVE_FLOAT, hs, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
945
#else  /* ! HAVE_HDF5_18 */
935
	hd = H5Dcreate(hf, data, H5T_NATIVE_FLOAT, hs, H5P_DEFAULT);
946
	hd = H5Dcreate(hf, data, H5T_NATIVE_FLOAT, hs, H5P_DEFAULT);
947
#endif /* HAVE_HDF5_18 */
936
	H5Dwrite(hd, H5T_NATIVE_FLOAT, hs, hs, H5P_DEFAULT, a);
948
	H5Dwrite(hd, H5T_NATIVE_FLOAT, hs, hs, H5P_DEFAULT, a);
937
#endif
949
#endif
938
	H5Dclose(hd);	H5Sclose(hs);	H5Fclose(hf);
950
	H5Dclose(hd);	H5Sclose(hs);	H5Fclose(hf);
Lines 944-950 Link Here
944
	hsize_t dims[3];
956
	hsize_t dims[3];
945
	long rank;
957
	long rank;
946
	hf = H5Fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT);
958
	hf = H5Fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT);
959
#ifdef HAVE_HDF5_18
960
	hd = H5Dopen(hf,data,H5P_DEFAULT);
961
#else
947
	hd = H5Dopen(hf,data);
962
	hd = H5Dopen(hf,data);
963
#endif
948
	hs = H5Dget_space(hd);
964
	hs = H5Dget_space(hd);
949
	rank = H5Sget_simple_extent_ndims(hs);
965
	rank = H5Sget_simple_extent_ndims(hs);
950
	if(rank>0 && rank<=3)
966
	if(rank>0 && rank<=3)

Return to bug 282821