Extension GMP/MPFR Versioning (The GNU Awk User’s Guide)
Next: Extension API Informational Variables, Previous: Extension Versioning, Up: Extension API Variables [Contents][Index]
17.4.13.2 GMP and MPFR Version Information
The API also includes information about the versions of GMP and MPFR with which the running gawk was compiled (if any). They are included in the API struct as read-only constant integers:
api->gmp_major_version- The major version of the GMP library used to compile
gawk. api->gmp_minor_version- The minor version of the GMP library used to compile
gawk. api->mpfr_major_version- The major version of the MPFR library used to compile
gawk. api->mpfr_minor_version- The minor version of the MPFR library used to compile
gawk.
These fields are set to zero if gawk was compiled without MPFR support.
You can check if the versions of MPFR and GMP that you are using match those of gawk with the following macro:
check_mpfr_version(extension)The
extensionis the extension id passed to all the other macros and functions defined ingawkapi.h. If you have not included the<mpfr.h>header file, then this macro will be defined to do nothing.If you have included that file, then this macro compares the MPFR and GMP major and minor versions against those of the library you are compiling against. If your libraries are newer than
gawk’s, it produces a fatal error message.The
dl_load_func()macro (see section Boilerplate Code) callscheck_mpfr_version().