Skip to content
Snippets Groups Projects
Commit 78823b2c authored by Niels Möller's avatar Niels Möller
Browse files

Avoid redefining mpn_zero_p when building with mini-gmp.

parent 6320374d
No related branches found
No related tags found
No related merge requests found
2017-09-12 Niels Möller <nisse@lysator.liu.se>
* testsuite/testutils.h (mpn_zero_p): Avoid redefining mpn_zero_p
when building with mini-gmp. Since the mini-gmp update, this
function is defined by mini-gmp, causing link errors if nettle is
configured with --enable-mini-gmp --disable-shared. Reported by
Tim Rühsen.
2017-09-09 Daiki Ueno <dueno@redhat.com>
* testsuite/ecc-mul-g-test.c (test_main): Fixed mpn_cmp call.
......
......@@ -163,13 +163,6 @@ test_armor(const struct nettle_armor *armor,
const char *ascii);
#if WITH_HOGWEED
#ifndef mpn_zero_p
int
mpn_zero_p (mp_srcptr ap, mp_size_t n);
#endif
void
mpn_out_str (FILE *f, int base, const mp_limb_t *xp, mp_size_t xn);
#if NETTLE_USE_MINI_GMP
typedef struct knuth_lfib_ctx gmp_randstate_t[1];
......@@ -180,8 +173,20 @@ void mpz_urandomb (mpz_t r, struct knuth_lfib_ctx *ctx, mp_bitcnt_t bits);
/* This is cheating */
#define mpz_rrandomb mpz_urandomb
/* mini-gmp defines this function (in the GMP library, it was added in
gmp in version 6.1.0). */
#define mpn_zero_p mpn_zero_p
#endif /* NETTLE_USE_MINI_GMP */
#ifndef mpn_zero_p
int
mpn_zero_p (mp_srcptr ap, mp_size_t n);
#endif
void
mpn_out_str (FILE *f, int base, const mp_limb_t *xp, mp_size_t xn);
mp_limb_t *
xalloc_limbs (mp_size_t n);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment