php-5.2.16-fix-build-when-__GMP_BITS_PER_MP_LIMB-is-not-defined.patch 1010 B

123456789101112131415161718192021222324252627282930
  1. From e814fcac0599dbaae50ede1f9f78e20941e27877 Mon Sep 17 00:00:00 2001
  2. From: pajoye <pajoye@c90b9560-bf6c-de11-be94-00142212c4b1>
  3. Date: Tue, 23 Feb 2010 11:07:39 +0000
  4. Subject: [PATCH] - fix build when __GMP_BITS_PER_MP_LIMB is not defined but GMP_LIMB_BITS (no trace of this change in gmp's changelog...)
  5. git-svn-id: http://svn.php.net/repository/php/php-src/branches/PHP_5_3@295402 c90b9560-bf6c-de11-be94-00142212c4b1
  6. ---
  7. ext/gmp/gmp.c | 5 ++++-
  8. 1 files changed, 4 insertions(+), 1 deletions(-)
  9. diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
  10. index a54ffe9..f53dcd6 100644
  11. --- a/ext/gmp/gmp.c
  12. +++ b/ext/gmp/gmp.c
  13. @@ -1374,8 +1374,11 @@ ZEND_FUNCTION(gmp_random)
  14. GMPG(rand_initialized) = 1;
  15. }
  16. +#ifdef GMP_LIMB_BITS
  17. + mpz_urandomb(*gmpnum_result, GMPG(rand_state), GMP_ABS (limiter) * GMP_LIMB_BITS);
  18. +#else
  19. mpz_urandomb(*gmpnum_result, GMPG(rand_state), GMP_ABS (limiter) * __GMP_BITS_PER_MP_LIMB);
  20. -
  21. +#endif
  22. ZEND_REGISTER_RESOURCE(return_value, gmpnum_result, le_gmp);
  23. }
  24. /* }}} */
  25. --
  26. 1.7.1