This is an automated email from the git hooks/post-receive script. gregoa pushed a commit to branch master in repository libmath-bigint-gmp-perl.
commit 8ccd93172105fb1e44b726d476001861acdaeb0b Author: gregor herrmann <[email protected]> Date: Sun Dec 13 00:39:30 2015 +0100 Add patch to fix breakage on 32 bit platforms where perl is compiled with 64 bit support. Patch taken from proposed fix in CPAN RT#103517. Closes: #807492 --- debian/patches/32bit.patch | 32 ++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 33 insertions(+) diff --git a/debian/patches/32bit.patch b/debian/patches/32bit.patch new file mode 100644 index 0000000..9c73029 --- /dev/null +++ b/debian/patches/32bit.patch @@ -0,0 +1,32 @@ +Description: fix breakage on 32 bit platforms where perl is compiled with 64 bit support +Origin: CPAN RT#103517 +Bug: https://rt.cpan.org/Public/Bug/Display.html?id=103517 +Bug-Debian: https://bugs.debian.org/807492 +Author: Dana A Jacobsen <[email protected]> +Last-Update: 2015-12-13 + +--- a/GMP.xs ++++ b/GMP.xs +@@ -167,9 +167,9 @@ + CODE: + NEW_GMP_MPZ_T; + /* using the IV directly is a bit faster */ +- if (SvUOK(x) || SvIOK(x)) ++ if ((SvUOK(x) || SvIOK(x)) && (sizeof(UV) <= sizeof(unsigned long) || SvUV(x) == (unsigned long)SvUV(x))) + { +- mpz_init_set_ui(*RETVAL, (UV)SvUV(x)); ++ mpz_init_set_ui(*RETVAL, (unsigned long)SvUV(x)); + } + else + { +@@ -189,8 +189,8 @@ + mpz_t *mpz; + CODE: + mpz = malloc (sizeof(mpz_t)); +- if (SvUOK(x) || SvIOK(x)) { +- mpz_init_set_ui(*mpz, (UV)SvUV(x)); ++ if ((SvUOK(x) || SvIOK(x)) && (sizeof(UV) <= sizeof(unsigned long) || SvUV(x) == (unsigned long)SvUV(x))) { ++ mpz_init_set_ui(*mpz, (unsigned long)SvUV(x)); + } + else { + mpz_init_set_str(*mpz, SvPV_nolen(x), 10); diff --git a/debian/patches/series b/debian/patches/series index 8dccbc9..4f80d18 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ fix-checklib-fail.patch +32bit.patch -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmath-bigint-gmp-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits
