Next: Miscellaneous Utilities, Up: General Library Functions [Index]
Different releases of the GNU MPRIA library are distinguished by an authoritative version triplet of nonnegative integer constants defined as macro constants. Utilities are implemented to efficiently check against, to numerically pack or to stringify this triplet; packed variants of the triplet are also defined as macro constants.
The authoritative version triplet, respectively, as nonnegative integer constants: the major version number, the minor version number (or revision number), the micro version number (or major patch level).
Retrieve the major, minor and micro version numbers
of the MPRIA library against which the application is currently linked.
The NULL
pointer is accepted as argument.
Check the compatibility of the arbitrary major, minor and micro version numbers with their counterpart from the MPRIA library against which the application is currently linked. The returned response is as follows:
This function performs no action apart from checking and responding,
in particular it does not cause the application to abort
or to show up any kind of messages
(it may be enwrapped within a if else
statement to do so).
Check the compatibility of the version triplet of the MPRIA library
with which an application was compiled with the version triplet of the MPRIA library
against which the application is currently linked.
This is a convenient wrapping macro that passes the authoritative macro version numbers
to the function mpria_libversion_check_numbers
,
as such it acts similarly.
The most common cause for an incompatibility or a weak compatibility is that
an application was compiled against one version of the MPRIA library
while it is dynamically linked against a different one,
what might be due to a misconfiguration, a downgrading or an upgrading.
A typical usage may look like:
/* Check version of libmpria */ if (!(mpria_libversion_check ())) { fprintf (stderr,"version miss-compatibility\n"); fflush (stderr); abort (); }
The extra version string suffix, only meant for development purposes. For production releases, alpha and stable ones, it must be reset to the empty string "".
Compact, respectively stringify, the arbitrary version triplet [Major, Minor, Micro] into a single number, resp. into a null-terminated string to which is appended the arbitrary extra version string suffix StrExtra.
The non-authoritative version number, respectively string,
obtained by passing the authoritative version triplet
to MPRIA_VERSION_NUMBER_PACK
,
resp. to MPRIA_VERSION_STRING_PACK
with MPRIA_VERSION_EXTRA
as fourth argument.
Retrieve the non-authoritative version number and string, respectively, of the MPRIA library against which the application is currently linked.
The version string of the MPRIA library against which the application is currently linked.
While mpria_libversion
is a convenient macro that wraps mpria_libversion_get_string
,
mpria_version
is defined as synonymous of mpria_libversion
with respect to the GNU MP naming scheme.
Next: Miscellaneous Utilities, Up: General Library Functions [Index]