It is often desirable to check that the version of `Libgsasl' used is indeed one which fits all requirements. Even with binary compatibility new features may have been introduced but due to problem with the dynamic linker an old version is actually used. So you may want to check that the version is okay right after program startup.
const char * gsasl_check_version
(const char * req_version)
req_version: version string to compare with, or NULL
Check library version.
Return value: Check that the the version of the library is at minimum the one given as a string in req_version and return the actual version string of the library; return NULL if the condition is not met. If NULL is passed to this function no check is done and only the version string is returned. It is a pretty good idea to run this function as soon as possible, because it may also intializes some subsystems. In a multithreaded environment if should be called before any more threads are created.
The normal way to use the function is to put something similar to the following early in your main:
if (!gsasl_check_version (GSASL_VERSION)) { printf ("gsasl_check_version failed:\n" "Header file incompatible with shared library.\n"); exit(1); }