From 49d9e7b8223534a1529bf31edfb8c621d0fa4225 Mon Sep 17 00:00:00 2001 From: Marc Mezzarobba Date: Thu, 24 Aug 2023 19:17:36 +0200 Subject: [PATCH] Make msolve build with flint3 --- src/fglm/berlekamp_massey.c | 1 + src/fglm/data_fglm.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/fglm/berlekamp_massey.c b/src/fglm/berlekamp_massey.c index b0f2052d..2c5a8748 100644 --- a/src/fglm/berlekamp_massey.c +++ b/src/fglm/berlekamp_massey.c @@ -30,6 +30,7 @@ */ #include +#include //#include "nmod_poly.h" //#include "mpn_extras.h" diff --git a/src/fglm/data_fglm.c b/src/fglm/data_fglm.c index 0726760c..0e1da6f4 100644 --- a/src/fglm/data_fglm.c +++ b/src/fglm/data_fglm.c @@ -24,6 +24,7 @@ #include #include #include +#include typedef uint32_t szmat_t; @@ -299,9 +300,11 @@ static inline void nmod_poly_set_prime(nmod_poly_t poly, mp_limb_t ninv = n_preinvert_limb(prime); poly->mod.n = prime; poly->mod.ninv = ninv; +#if __FLINT_VERSION < 3 count_leading_zeros(poly->mod.norm, prime); - /* poly->mod.norm = flint_clz(prime); */ - +#else + poly->mod.norm = flint_clz(prime); +#endif } static inline void fglm_param_set_prime(param_t *param, mp_limb_t prime){