Skip to content

Commit b76843c

Browse files
committed
Include gmp.h before flint/fmpz.h
Required for certain FLINT functions that use GMP since FLINT 3.2.0 We actually include M2/math-include.h, which includes gmp.h. Also remove some redundant includes of gmp.h from other files in the e directory.
1 parent b346b1b commit b76843c

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

M2/Macaulay2/e/NCAlgebras/FreeAlgebra.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include "ringelem.hpp" // for ring_elem
1010
#include "style.hpp" // for GEOHEAP_SIZE
1111

12-
#include <gmp.h> // for mpz_srcptr, mpq_srcptr
1312
#include <iosfwd> // for ostream, string
1413
#include <utility> // for pair
1514
#include <vector> // for vector

M2/Macaulay2/e/NCAlgebras/FreeAlgebraQuotient.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include "newdelete.hpp" // for our_new_delete
99
#include "ringelem.hpp" // for ring_elem
1010

11-
#include <gmp.h> // for mpz_srcptr, mpq_srcptr
1211
#include <vector> // for vector
1312

1413
class Ring;

M2/Macaulay2/e/aring-gf-flint-big.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// The following needs to be included before any flint files are included.
99
#include <M2/gc-include.h>
1010

11+
// includes gmp.h, which is required for FLINT functions that use GMP
12+
#include <M2/math-include.h>
13+
1114
#pragma GCC diagnostic push
1215
#pragma GCC diagnostic ignored "-Wconversion"
1316
#include <flint/flint.h> // for flint_free, flint_rand_t, fmpz_t

M2/Macaulay2/e/aring-gf-flint.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// The following needs to be included before any flint files are included.
99
#include <M2/gc-include.h>
1010

11+
// includes gmp.h, which is required for FLINT functions that use GMP
12+
#include <M2/math-include.h>
13+
1114
#pragma GCC diagnostic push
1215
#pragma GCC diagnostic ignored "-Wconversion"
1316
#include <flint/flint.h> // for flint_rand_t, fmpz_t, ulong

M2/Macaulay2/e/schreyer-resolution/res-f4-m2-interface.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#include "schreyer-resolution/res-schreyer-frame.hpp" // for SchreyerFrame
3434
#include "schreyer-resolution/res-schreyer-order.hpp" // for ResSchreyer...
3535
#include "timing.hpp" // for timer, seconds
36-
#include <gmp.h> // for mpz_clear
3736
#include <cstdlib> // for exit, size_t
3837
#include <chrono> // for common_type...
3938
#include <iostream> // for operator<<

0 commit comments

Comments
 (0)