summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2006-04-16 01:33:06 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2006-04-16 01:33:06 (GMT)
commite065164883d092b26b48058ad2612e30942d2823 (patch)
treef41a2223e7e5854c898e4633e4b56252d99bcdee /src
parent014e9630d2e59301c7c15b8be4ec7914ba7bf524 (diff)
downloadhdf5-e065164883d092b26b48058ad2612e30942d2823.zip
hdf5-e065164883d092b26b48058ad2612e30942d2823.tar.gz
hdf5-e065164883d092b26b48058ad2612e30942d2823.tar.bz2
[svn-r12261] Purpose:
Improvement Description: Modified the warning messages from the Version mismatch checking to suggest the users to try recompiling or checking the shared lib setting. Platforms tested: Tested in heping only since it was just a simple text string changes. (I did moved the strings around a bit.)
Diffstat (limited to 'src')
-rw-r--r--src/H5.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/H5.c b/src/H5.c
index 0d15029..77ab302 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -566,6 +566,14 @@ done:
*
*-------------------------------------------------------------------------
*/
+#define VERSION_MISMATCH_WARNING \
+ "Warning! ***HDF5 library version mismatched error***\n" \
+ "The HDF5 header files used to compile this application do not match\n" \
+ "the version used by the HDF5 library to which this application is linked.\n" \
+ "Data corruption or segmentation faults may occur if the application continues.\n" \
+ "You should recompile the application or check your shared library related\n" \
+ "settings such as 'LD_LIBRARY_PATH'.\n"
+
herr_t
H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
{
@@ -595,14 +603,10 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
H5_VERS_RELEASE!=relnum) {
switch (disable_version_check) {
case 0:
- HDfputs ("Warning! The HDF5 header files included by this application "
- "do not match the\nversion used by the HDF5 library to which "
- "this application is linked. Data\ncorruption or "
- "segmentation faults may occur if the application "
- "is\nallowed to continue. You can, at your own risk, "
- "disable this check by setting\nthe environment variable "
- "'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.\n"
- "Setting it to 2 will suppress the warning totally.\n",
+ HDfputs (VERSION_MISMATCH_WARNING
+ "You can, at your own risk, disable this warning by setting the environment\n"
+ "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.\n"
+ "Setting it to 2 will suppress the warning messages totally.\n",
stderr);
/* Mention the versions we are referring to */
HDfprintf (stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n",
@@ -617,13 +621,10 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
break;
default:
/* continue with a warning */
- HDfputs ("Warning! The HDF5 header files included by this application "
- "do not match the\nversion used by the HDF5 library to which "
- "this application is linked. Data\ncorruption or "
- "segmentation faults may occur if the application "
- "continues.\n'HDF5_DISABLE_VERSION_CHECK' "
- "environment variable set, application will\n"
- "continue.\n", stderr);
+ HDfprintf (stderr, VERSION_MISMATCH_WARNING
+ "'HDF5_DISABLE_VERSION_CHECK' "
+ "environment variable is set to %d, application will\n"
+ "continue at your own risk.\n", disable_version_check);
/* Mention the versions we are referring to */
HDfprintf (stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n",
majnum, minnum, relnum,