Next: , Previous: Initialization, Up: Preparation


2.3 Version Check

It is often desirable to check that the version of GSS 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. The function is called gss_check_version() and is described formally in See Extended GSS API.

The normal way to use the function is to put something similar to the following early in your main():

     #include <gss.h>
     ...
       if (!gss_check_version (GSS_VERSION))
         {
           printf ("gss_check_version() failed:\n"
                   "Header file incompatible with shared library.\n");
           exit(EXIT_FAILURE);
         }