summaryrefslogtreecommitdiffstats
path: root/src/H5.c
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2016-03-08 17:49:38 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2016-03-08 17:49:38 (GMT)
commitd380f20a0d4ada972da1fa667e5faa04cf6e2221 (patch)
treead20790efc16ff023821337b9b03a71cfba5494f /src/H5.c
parent3fabbf45f05855665da16e699e420a756d024a2c (diff)
downloadhdf5-d380f20a0d4ada972da1fa667e5faa04cf6e2221.zip
hdf5-d380f20a0d4ada972da1fa667e5faa04cf6e2221.tar.gz
hdf5-d380f20a0d4ada972da1fa667e5faa04cf6e2221.tar.bz2
[svn-r29350] Revert h5check_version change to check LT_VERS_XXXX numbers rather than HDF5 library version numbers.
Svn revisions reverted: 29341, 29326 Branch features/h5check_version was created for further development. Files changed test/tcheck_version.c test/testcheck_version.sh.in src/H5public.h src/H5.c config/lt_vers.am bin/h5vers Tested with h5committest.new
Diffstat (limited to 'src/H5.c')
-rw-r--r--src/H5.c130
1 files changed, 0 insertions, 130 deletions
diff --git a/src/H5.c b/src/H5.c
index acbdecb..41fb3ba 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -720,9 +720,6 @@ done:
} /* end H5get_libversion() */
-/* Depreciated by H5check_interface_compatibility. Need to keep it around
- * because Fortran API calls it. Will be retired later.
- */
/*-------------------------------------------------------------------------
* Function: H5check_version
*
@@ -858,133 +855,6 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5check_interface_compatibility
- *
- * Purpose: Verifies that the arguments are compatible with the link library.
- * This function is intended to be called from user to verify that
- * the versions of header files compiled into the application
- * is compatible with the version of the link hdf5 library.
- *
- * Return: Success: SUCCEED
- *
- * Failure: abort()
- * The value of the environment variable,
- * HDF5_DISABLE_VERSION_CHECK, could affect
- * how failure is handles. See Code below.
- *
- * Algorithm: {provided by Mike McGreevy}
- * How to determine if two libraries, given their interface, revision,
- * and age, are compatible? Let's say you have:
- *
- * interface, revision, age --> compiled HDF5
- * INTERFACE, REVISION, AGE --> linked HDF5 library
- * Then:
- * if ((INTERFACE-AGE) != (interface-age))
- * not compatible
- * else
- * if (age <= AGE)
- * compatible
- * else
- * not compatible
- * endif
- * endif
- * [Note: revision/REVISION do not affect compatibility]
- *
- * Programmer: Albert Cheng
- * Feb 21, 2016
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-#define INTERFACE_INCOMPATIBLE_WARNING \
-"Warning! ***HDF5 interface incompatibility detected***\n" \
-"The HDF5 header files used to compile this application are not compatible \n" \
-"with the HDF5 library to which this application is linked.\n" \
-"Data corruption or segmentation faults may occur if the application continues.\n" \
-"This can happen when an application was compiled by one version of HDF5 but\n" \
-"linked with a different version of static or shared HDF5 library.\n" \
-"You should recompile the application or check your shared library related\n" \
-"settings such as 'LD_LIBRARY_PATH'.\n"
-
-herr_t
-H5check_interface_compatibility(unsigned interface, unsigned age, unsigned revision)
-{
- char lib_str[256];
- static int checked = 0; /* If we've already checked the version info */
- static unsigned int disable_version_check = 0; /* Set if the version check should be disabled */
- static const char *interface_incompatible_warning = INTERFACE_INCOMPATIBLE_WARNING;
- const char *s; /* Environment string for disabling version check */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_API_NOINIT_NOERR_NOFS
- H5TRACE3("e", "IuIuIu", interface, age, revision);
-
- assert(interface >= age);
- assert(LT_VERS_INTERFACE >= LT_VERS_AGE);
-
- /* Optimization: Don't check again, if we already have */
- if (checked)
- HGOTO_DONE(SUCCEED)
- else
- /* Indicate that the version check has been performed */
- checked++;
-
- /* check version compatibility */
- if (((LT_VERS_INTERFACE - LT_VERS_AGE) == (interface - age)) &&\
- (LT_VERS_AGE >= age))
- HGOTO_DONE(SUCCEED)
- /* else NOT COMPATIBLE */
-
- /* Allow different handling of not compatible */
- s = HDgetenv ("HDF5_DISABLE_VERSION_CHECK");
- if (s && HDisdigit(*s))
- disable_version_check = (unsigned int)HDstrtol (s, NULL, 0);
-
- /* check the version of the link library */
- switch (disable_version_check) {
- case 0:
- /* print a message and abort */
- HDfprintf(stderr, "%s%s", interface_incompatible_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 or higher will suppress the warning messages totally.\n");
- /* Mention the versions we are referring to */
- HDfprintf (stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n",
- (interface-age), age, revision,
- ((unsigned)LT_VERS_INTERFACE-(unsigned)LT_VERS_AGE), (unsigned)LT_VERS_AGE, (unsigned)LT_VERS_REVISION);
- /* Show library settings if available */
- HDfprintf (stderr, "%s", H5libhdf5_settings);
-
- /* Bail out now. */
- HDfputs ("Bye...\n", stderr);
- HDabort ();
- case 1:
- /* continue with a warning */
- /* Note that the warning message is embedded in the format string.*/
- HDfprintf (stderr,
- "%s'HDF5_DISABLE_VERSION_CHECK' "
- "environment variable is set to %d, application will\n"
- "continue at your own risk.\n",
- interface_incompatible_warning, disable_version_check);
- /* Mention the versions we are referring to */
- HDfprintf (stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n",
- (interface-age), age, revision,
- ((unsigned)LT_VERS_INTERFACE-(unsigned)LT_VERS_AGE), (unsigned)LT_VERS_AGE, (unsigned)LT_VERS_REVISION);
- /* Show library settings if available */
- HDfprintf (stderr, "%s", H5libhdf5_settings);
- break;
- default:
- /* 2 or higher: continue silently */
- break;
- } /* end switch */
-
-done:
- FUNC_LEAVE_API_NOFS(ret_value)
-} /* end H5check_version() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5open
*
* Purpose: Initialize the library. This is normally called