1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00

Use extended base if we build again gmp 4.2.0 which is usually available.

This commit is contained in:
David Soria Parra
2009-11-27 22:24:44 +00:00
parent 30073cf03e
commit 8d3cf31e25
+8
View File
@@ -754,7 +754,11 @@ ZEND_FUNCTION(gmp_init)
return;
}
#if __GNU_MP_VERSION >= 4 && __GNU_MP_VERSION_MINOR >= 2
if (base && (base < 2 || base > 62)) {
#else
if (base && (base < 2 || base > 36)) {
#endif
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad base for conversion: %ld (should be between 2 and 36)", base);
RETURN_FALSE;
}
@@ -804,7 +808,11 @@ ZEND_FUNCTION(gmp_strval)
return;
}
#if __GNU_MP_VERSION >= 4 && __GNU_MP_VERSION_MINOR >= 2
if ((base < 2 && base > -2) || base > 62 || base < -36) {
#else
if (base < 2 || base > 36) {
#endif
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad base for conversion: %ld", base);
RETURN_FALSE;
}