20 lines
632 B
Text
20 lines
632 B
Text
$NetBSD: patch-af,v 1.2 2010/03/03 02:15:15 taca Exp $
|
|
|
|
Fix php-gmp build problem with gmp-5.0.1 and later refering
|
|
http://svn.php.net/viewvc?view=revision&revision=295402.
|
|
|
|
--- ext/gmp/gmp.c.orig 2010-01-03 09:23:27.000000000 +0000
|
|
+++ ext/gmp/gmp.c
|
|
@@ -1396,8 +1396,11 @@ ZEND_FUNCTION(gmp_random)
|
|
|
|
GMPG(rand_initialized) = 1;
|
|
}
|
|
+#ifdef GMP_LIMB_BITS
|
|
+ mpz_urandomb(*gmpnum_result, GMPG(rand_state), GMP_ABS (limiter) * GMP_LIMB_BITS);
|
|
+#else
|
|
mpz_urandomb(*gmpnum_result, GMPG(rand_state), GMP_ABS (limiter) * __GMP_BITS_PER_MP_LIMB);
|
|
-
|
|
+#endif
|
|
ZEND_REGISTER_RESOURCE(return_value, gmpnum_result, le_gmp);
|
|
}
|
|
/* }}} */
|