]> granicus.if.org Git - php/commitdiff
Use extended base if we build again gmp 4.2.0 which is usually available.
authorDavid Soria Parra <dsp@php.net>
Fri, 27 Nov 2009 22:24:44 +0000 (22:24 +0000)
committerDavid Soria Parra <dsp@php.net>
Fri, 27 Nov 2009 22:24:44 +0000 (22:24 +0000)
ext/gmp/gmp.c

index 6383be5a06b9bda5735e3b124d11c3113a3cbb33..6b2843b17322b873d9b5c22a2c4161fb7dbf2604 100644 (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;
        }