mirror of
https://github.com/php/php-src.git
synced 2025-01-25 13:14:22 +08:00
- [DOC] expose MPIR version when mpir is used instead of gmp
This commit is contained in:
parent
3a7f8ea575
commit
272974078b
@ -8,6 +8,7 @@ if (PHP_GMP != "no") {
|
||||
CHECK_HEADER_ADD_INCLUDE("gmp.h", "CFLAGS_GMP", PHP_GMP + ";" + PHP_PHP_BUILD + "\\include\\mpir")) {
|
||||
EXTENSION("gmp", "gmp.c");
|
||||
AC_DEFINE('HAVE_GMP', 1, 'GMP support');
|
||||
AC_DEFINE('HAVE_MPIR', 1, 'MPIR support');
|
||||
} else {
|
||||
WARNING("GMP not enabled; libraries and headers not found");
|
||||
}
|
||||
|
@ -356,6 +356,9 @@ ZEND_MODULE_STARTUP_D(gmp)
|
||||
REGISTER_LONG_CONSTANT("GMP_ROUND_ZERO", GMP_ROUND_ZERO, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("GMP_ROUND_PLUSINF", GMP_ROUND_PLUSINF, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("GMP_ROUND_MINUSINF", GMP_ROUND_MINUSINF, CONST_CS | CONST_PERSISTENT);
|
||||
#ifdef mpir_version
|
||||
REGISTER_STRING_CONSTANT("GMP_MPIR_VERSION", (char *)mpir_version, CONST_CS | CONST_PERSISTENT);
|
||||
#endif
|
||||
REGISTER_STRING_CONSTANT("GMP_VERSION", (char *)gmp_version, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
mp_set_memory_functions(gmp_emalloc, gmp_erealloc, gmp_efree);
|
||||
@ -383,7 +386,11 @@ ZEND_MODULE_INFO_D(gmp)
|
||||
{
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "gmp support", "enabled");
|
||||
#ifdef mpir_version
|
||||
php_info_print_table_row(2, "MPIR version", mpir_version);
|
||||
#else
|
||||
php_info_print_table_row(2, "GMP version", gmp_version);
|
||||
#endif
|
||||
php_info_print_table_end();
|
||||
}
|
||||
/* }}} */
|
||||
|
Loading…
Reference in New Issue
Block a user