This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #27713: Include patch to pynac to fix build issue when using Cyg…
…win's system GMP
- Loading branch information
Showing
2 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.7.24 | ||
0.7.24.p0 |
52 changes: 52 additions & 0 deletions
52
build/pkgs/pynac/patches/0001-Fix-compliation-error-with-GMP-long-long-limbs.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
From 260f754cf7e421a41e89f3b93fb86a99a05cc376 Mon Sep 17 00:00:00 2001 | ||
From: "Erik M. Bray" <erik.bray@lri.fr> | ||
Date: Mon, 22 Apr 2019 16:07:17 +0200 | ||
Subject: [PATCH] Fix compliation error with GMP long long limbs. | ||
|
||
Depending how GMP is configured the macro from flint, slong, which actually | ||
refers to GMP's mp_limb_signed_t, may be a long long instead of plain long. | ||
|
||
numeric doesn't have a constructor for long long, leading to an ambiguous | ||
overload error on the constructor. In this case it should make more sense | ||
to just use normal int and long types for these loop variables as it | ||
makes sense to, and only cast to the "slong" type when passing to the | ||
flint interface. | ||
--- | ||
ginac/useries.cpp | 8 ++++---- | ||
1 file changed, 4 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/ginac/useries.cpp b/ginac/useries.cpp | ||
index 1dc97f0..fd68d49 100644 | ||
--- a/ginac/useries.cpp | ||
+++ b/ginac/useries.cpp | ||
@@ -82,10 +82,10 @@ long fmpq_poly_ldegree(const fmpq_poly_t& fp) | ||
if (fmpq_poly_is_zero(fp)) | ||
return 0; | ||
long len = fmpq_poly_length(fp); | ||
- for (slong n=0; n<=len; n++) { | ||
+ for (long n=0; n<=len; n++) { | ||
fmpq_t c; | ||
fmpq_init(c); | ||
- fmpq_poly_get_coeff_fmpq(c, fp, n); | ||
+ fmpq_poly_get_coeff_fmpq(c, fp, (slong)n); | ||
if (not fmpq_is_zero(c)) { | ||
fmpq_clear(c); | ||
return n; | ||
@@ -435,12 +435,12 @@ ex useries(const ex& the_ex, const symbol& x, int order, unsigned options) | ||
} | ||
|
||
// Fill expair vector | ||
- for (slong n=0; n<=deg+prec; n++) { | ||
+ for (int n=0; n<=deg+prec; n++) { | ||
if (n + fp.offset >= order) | ||
break; | ||
fmpq_t c; | ||
fmpq_init(c); | ||
- fmpq_poly_get_coeff_fmpq(c, fp.ft, n); | ||
+ fmpq_poly_get_coeff_fmpq(c, fp.ft, (slong)n); | ||
if (not fmpq_is_zero(c)) { | ||
mpq_t gc; | ||
mpq_init(gc); | ||
-- | ||
2.15.1 | ||
|