Bug#951004: libmath-prime-util-gmp-perl: Patch for FTBFS with gmp 6.2.0: test failure
gregor herrmann
gregoa at debian.org
Tue Feb 18 15:49:52 GMT 2020
On Tue, 18 Feb 2020 16:19:05 +0100, Marco Bodrato wrote:
> Il 2020-02-18 12:39 Marco Bodrato ha scritto:
> > A proposed patch:
> Looking at it twice, it is probably better to propose a cleaner patch, that
> can be adopted also upstream:
Thanks for your help!
I have to admit that I haven't seen a non-unified patch in ages, and
unfortunately it doesn't apply [0].
I tried to convert it into the following unified patch:
#v+
--- a/squfof126.c
+++ b/squfof126.c
@@ -43,15 +43,12 @@
return v;
}
static INLINE void mpz_set64(mpz_t n, SQUFOF_TYPE v) {
- if (v == 0) {
- mpz_set_ui(n,0);
- } else if (GMP_LIMB_BITS < 64 || sizeof(mp_limb_t) < sizeof(SQUFOF_TYPE)) {
+ if (v > ULONG_MAX) {
mpz_set_ui(n, (uint32_t)(v >> 32));
mpz_mul_2exp(n, n, 32);
mpz_add_ui(n, n, (uint32_t)v);
} else {
- n->_mp_d[0] = v;
- n->_mp_size = 1;
+ mpz_set_ui(n, v);
}
}
#v-
Does this look correct? And/or could you try to 1) produce a patch
with "diff -u" and 2) send it as an attachment so it doesn't get
mangled?
(The package builds and passes all tests with the above patch.)
Cheers,
gregor
[0]
% patch --dry-run --verbose -p0 < ~/tmp/perl/gmp.patch
Hmm...patch: **** malformed patch at line 11: {
--
.''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org
: :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06
`. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
`- NP: Element Of Crime: Narzissen und Kakteen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: Digital Signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-perl-maintainers/attachments/20200218/c259e147/attachment.sig>
More information about the pkg-perl-maintainers
mailing list