+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.
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];
/* 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);