From: David Soria Parra Date: Fri, 27 Nov 2009 22:24:44 +0000 (+0000) Subject: Use extended base if we build again gmp 4.2.0 which is usually available. X-Git-Tag: php-5.3.2RC1~168 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7957efe4d49ce8858661161ac4488c4e226ed7c2;p=php Use extended base if we build again gmp 4.2.0 which is usually available. --- diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index 44c8154cf0..b4c8f7fe67 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -746,7 +746,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; } @@ -796,7 +800,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; }