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/H5Epkg.h | |
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/H5Epkg.h')
-rw-r--r-- | src/H5Epkg.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/H5Epkg.h b/src/H5Epkg.h index a85ddc9..9a1163a 100644 --- a/src/H5Epkg.h +++ b/src/H5Epkg.h @@ -68,15 +68,20 @@ /****************************/ /* Some syntactic sugar to make the compiler happy with two different kinds of callbacks */ -typedef struct { - unsigned vers; /* Which version callback to use */ - union { #ifndef H5_NO_DEPRECATED_SYMBOLS - H5E_auto1_t func1; /* Old-style callback, NO error stack param. */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ - H5E_auto2_t func2; /* New-style callback, with error stack param. */ - }u; +typedef struct { + unsigned vers; /* Which version callback to use */ + hbool_t is_default; /* If the printing function is the library's own. */ + H5E_auto1_t func1; /* Old-style callback, NO error stack param. */ + H5E_auto2_t func2; /* New-style callback, with error stack param. */ + H5E_auto1_t func1_default; /* The saved library's default function - old style. */ + H5E_auto2_t func2_default; /* The saved library's default function - new style. */ +} H5E_auto_op_t; +#else /* H5_NO_DEPRECATED_SYMBOLS */ +typedef struct { + H5E_auto_t func2; /* Only the new style callback function is available. */ } H5E_auto_op_t; +#endif /* H5_NO_DEPRECATED_SYMBOLS */ /* Some syntactic sugar to make the compiler happy with two different kinds of callbacks */ typedef struct { |