[SCM] branch, master, updated. debian/0.26-1-7-g221694a
Salvatore Bonaccorso
carnil at debian.org
Fri May 24 20:24:03 UTC 2013
The following commit has been merged in the master branch:
commit 5fb4d060e23c35166067e6cacba61556d9fa029b
Author: Salvatore Bonaccorso <carnil at debian.org>
Date: Fri May 24 14:37:09 2013 +0200
Add 0001-ranged-moebius-was-depending-on-char-being-signed.-F.patch
Add upstream patch to fix FTBFS on various architectures. Ranged moebius
was depending on char being signed.
Thanks: Dana Jacobsen <dana at acm.org>
Closes: #705909
diff --git a/debian/patches/0001-ranged-moebius-was-depending-on-char-being-signed.-F.patch b/debian/patches/0001-ranged-moebius-was-depending-on-char-being-signed.-F.patch
new file mode 100644
index 0000000..5ef26f1
--- /dev/null
+++ b/debian/patches/0001-ranged-moebius-was-depending-on-char-being-signed.-F.patch
@@ -0,0 +1,91 @@
+From ae11792b3ac9cda84189f6390a95c6e538467191 Mon Sep 17 00:00:00 2001
+From: Dana Jacobsen <dana at acm.org>
+Date: Thu, 23 May 2013 23:03:23 -0700
+Subject: [PATCH] ranged moebius was depending on char being signed. Fix.
+ Thanks Debian testers.
+
+---
+ Changes | 4 ++++
+ XS.xs | 2 +-
+ util.c | 12 ++++++------
+ util.h | 2 +-
+ 4 files changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/XS.xs b/XS.xs
+index bc01288..3422caa 100644
+--- a/XS.xs
++++ b/XS.xs
+@@ -546,7 +546,7 @@ _XS_moebius(IN UV lo, IN UV hi = 0)
+ UV i;
+ PPCODE:
+ if (hi != lo && hi != 0) { /* mobius in a range */
+- char* mu = _moebius_range(lo, hi);
++ signed char* mu = _moebius_range(lo, hi);
+ MPUassert( mu != 0, "_moebius_range returned 0" );
+ EXTEND(SP, hi-lo+1);
+ for (i = lo; i <= hi; i++)
+diff --git a/util.c b/util.c
+index 48d6ce0..3507eaa 100644
+--- a/util.c
++++ b/util.c
+@@ -739,14 +739,14 @@ UV _XS_nth_prime(UV n)
+ #define PGTLO(p,lo) ((p) >= lo) ? (p) : ((p)*(lo/(p)) + ((lo%(p))?(p):0))
+ #define P2GTLO(pinit, p, lo) \
+ ((pinit) >= lo) ? (pinit) : ((p)*(lo/(p)) + ((lo%(p))?(p):0))
+-char* _moebius_range(UV lo, UV hi)
++signed char* _moebius_range(UV lo, UV hi)
+ {
+- char* mu;
++ signed char* mu;
+ UV i;
+ UV sqrtn = isqrt(hi);
+ #if 0
+ /* Simple char method. Needs way too many primes. */
+- New(0, mu, hi-lo+1, char);
++ New(0, mu, hi-lo+1, signed char);
+ if (mu == 0)
+ croak("Could not get memory for %"UVuf" moebius results\n", hi-lo+1);
+ memset(mu, 1, hi-lo+1);
+@@ -780,7 +780,7 @@ char* _moebius_range(UV lo, UV hi)
+ for (i = PGTLO(p, lo); i <= hi; i += p)
+ A[i-lo] *= -(IV)p;
+ } END_DO_FOR_EACH_PRIME
+- New(0, mu, hi-lo+1, char);
++ New(0, mu, hi-lo+1, signed char);
+ if (mu == 0)
+ croak("Could not get memory for %"UVuf" moebius results\n", hi-lo+1);
+ memset(mu, 0, hi-lo+1);
+@@ -801,7 +801,7 @@ char* _moebius_range(UV lo, UV hi)
+ unsigned char logp;
+ UV nextlog;
+
+- Newz(0, mu, hi-lo+1, char);
++ Newz(0, mu, hi-lo+1, signed char);
+ if (mu == 0)
+ croak("Could not get memory for %"UVuf" moebius results\n", hi-lo+1);
+ A = (unsigned char*) mu;
+@@ -883,7 +883,7 @@ IV _XS_mertens(UV n) {
+ * This implementation uses their lemma 2.1 directly, so is n^1/2.
+ */
+ UV u, i, m, nmk;
+- char* mu;
++ signed char* mu;
+ IV* M;
+ IV sum;
+
+diff --git a/util.h b/util.h
+index 36ba169..4194879 100644
+--- a/util.h
++++ b/util.h
+@@ -15,7 +15,7 @@ extern UV _XS_prev_prime(UV x);
+ extern UV _XS_prime_count(UV low, UV high);
+ extern UV _XS_nth_prime(UV x);
+
+-extern char* _moebius_range(UV low, UV high);
++extern signed char* _moebius_range(UV low, UV high);
+ extern UV* _totient_range(UV low, UV high);
+ extern IV _XS_mertens(UV n);
+ extern double _XS_chebyshev_theta(UV n);
+--
+1.7.10.4
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..80623f7
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-ranged-moebius-was-depending-on-char-being-signed.-F.patch
--
More information about the Pkg-perl-cvs-commits
mailing list