Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround to allow flint to be compiled with numpy 2 #39291

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/sage/libs/flint/flint_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
#pragma push_macro("ulong")
#undef ulong

/* Reserved in C99, needed for FLINT without https://github.com/flintlib/flint/pull/2027 */
#pragma push_macro("I")
#define I Iv

#include <flint/flint.h>

/* If flint was already previously included via another header (e.g.
Expand Down Expand Up @@ -169,6 +173,7 @@
#undef mp_bitcnt_t

#pragma pop_macro("ulong")
#pragma pop_macro("I")

/* CPU_SIZE_1 and SIZE_RED_FAILURE_THRESH are defined as macros in flint/fmpz_lll.h
* and as variables in fplll/defs.h, which breaks build if linbox is compiled with fplll */
Expand Down
5 changes: 5 additions & 0 deletions src/sage_setup/autogen/flint/templates/flint_wrap.h.template
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
#pragma push_macro("ulong")
#undef ulong

/* Reserved in C99, needed for FLINT without https://github.com/flintlib/flint/pull/2027 */
#pragma push_macro("I")
#define I Iv

#include <flint/flint.h>

/* If flint was already previously included via another header (e.g.
Expand All @@ -43,6 +47,7 @@
#undef mp_bitcnt_t

#pragma pop_macro("ulong")
#pragma pop_macro("I")

/* CPU_SIZE_1 and SIZE_RED_FAILURE_THRESH are defined as macros in flint/fmpz_lll.h
* and as variables in fplll/defs.h, which breaks build if linbox is compiled with fplll */
Expand Down
Loading