diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2010-10-12 16:45:36 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2010-10-12 16:45:36 (GMT) |
commit | 98c90bd9cd572616b3335746d4aaf5045f55dfe4 (patch) | |
tree | acb82bccac043aab98bf429e76052c79ef0b2900 /src/H5Eint.c | |
parent | 09d549d0e9b20f592b5fb3708380aa74ca0084cc (diff) | |
download | hdf5-98c90bd9cd572616b3335746d4aaf5045f55dfe4.zip hdf5-98c90bd9cd572616b3335746d4aaf5045f55dfe4.tar.gz hdf5-98c90bd9cd572616b3335746d4aaf5045f55dfe4.tar.bz2 |
[svn-r19583] Bug fix for 1707 - H5Eset_auto causes a seg fault when an application uses -DH5_USE_16_API
with the 1.8 library to compile. The cause is from the mismatch of H5Eprint1 and H5Eprint2
set through H5Eset_auto. I changed the structure H5E_auto_t. I added a IS_DEDAULT flag in
it. Both H5Eprint1/2 are the default now. If the user sets his/her own printing function.
Then a call to H5Eget_auto1/2 will have to match H5Eset_auto1/2.
Tested on heiwa, jam, and amani.
The property change in configure.in, config, tools/misc, tools/lib, c++/test, fortran, and
Makefile.am came from the merge of the trunk library change.
--This line, and th se below, will be ignored--
_M .
M test/testerror.sh.in
M test/err_compat.c
M test/testfiles/err_compat_1
_M configure.in
M src/H5Epkg.h
M src/H5E.c
M src/H5Eint.c
M src/H5Edeprec.c
_M tools/misc
_M tools/lib
_M config
_M c++/test
_M Makefile.am
_M fortran
Diffstat (limited to 'src/H5Eint.c')
-rw-r--r-- | src/H5Eint.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/H5Eint.c b/src/H5Eint.c index 3cdf549..1f05d52 100644 --- a/src/H5Eint.c +++ b/src/H5Eint.c @@ -1011,18 +1011,20 @@ H5E_dump_api_stack(int is_api) H5E_t *estack = H5E_get_my_stack(); HDassert(estack); + +#ifdef H5_NO_DEPRECATED_SYMBOLS + if(estack->auto_op.func2) + (void)((estack->auto_op.func2)(H5E_DEFAULT, estack->auto_data)); +#else /* H5_NO_DEPRECATED_SYMBOLS */ if(estack->auto_op.vers == 1) { -#ifndef H5_NO_DEPRECATED_SYMBOLS - if(estack->auto_op.u.func1) - (void)((estack->auto_op.u.func1)(estack->auto_data)); -#else /* H5_NO_DEPRECATED_SYMBOLS */ - HDassert(0 && "version 1 error stack dump without deprecated symbols!"); -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + if(estack->auto_op.func1) + (void)((estack->auto_op.func1)(estack->auto_data)); } /* end if */ else { - if(estack->auto_op.u.func2) - (void)((estack->auto_op.u.func2)(H5E_DEFAULT, estack->auto_data)); + if(estack->auto_op.func2) + (void)((estack->auto_op.func2)(H5E_DEFAULT, estack->auto_data)); } /* end else */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ } /* end if */ done: |