Commit ede8bf66 authored by Martin Storsjö's avatar Martin Storsjö Committed by Niels Möller

Add a fallback definition for mpn_sqr.

parent 38859630
......@@ -3,6 +3,7 @@
From Martin Storsjö. Fallback functions for older GMP releases.
* gmp-glue.c (mpn_copyd, mpn_copyi, mpn_zero): New functions.
* gmp-glue.h: Declare them.
(mpn_sqr): Fallback macro.
* gmp-glue.h (cnd_add_n, cnd_sub_n): Moved here, define in terms
of mpn_cnd_add_n and mpn_sub_n if available, otherwise in terms of
......
......@@ -54,6 +54,10 @@
#define mpn_zero _nettle_mpn_zero
#endif
#ifndef mpn_sqr
#define mpn_sqr(rp, ap, n) mpn_mul_n((rp), (ap), (ap), (n))
#endif
#define mpz_limbs_cmp _nettle_mpz_limbs_cmp
#define mpz_limbs_read_n _nettle_mpz_limbs_read_n
#define mpz_limbs_copy _nettle_mpz_limbs_copy
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment