summaryrefslogtreecommitdiff
path: root/math/mprime/files/patch-ecm.c
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2017-11-22 17:40:24 +0000
committerSteve Wills <swills@FreeBSD.org>2017-11-22 17:40:24 +0000
commitc29680569122353487fb0aea4cdefd3e3d9551d9 (patch)
tree7602a640df0510121a421c830f6db8fe6e370083 /math/mprime/files/patch-ecm.c
parentaudio/libgig: Update to 4.0.0; audio/linuxsampler: Update to 2.0.0; Bumped PO... (diff)
math/mprime: Fix some issues from the previous commit
Put back original creator and whitespace Fix patching Greatly simplify the Makefile Make it LOCALBASE safe Reported by: danfe Pointyhat to: swills
Diffstat (limited to 'math/mprime/files/patch-ecm.c')
-rw-r--r--math/mprime/files/patch-ecm.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/math/mprime/files/patch-ecm.c b/math/mprime/files/patch-ecm.c
new file mode 100644
index 000000000000..ff73368c6853
--- /dev/null
+++ b/math/mprime/files/patch-ecm.c
@@ -0,0 +1,20 @@
+--- ecm.c.orig 2016-05-02 04:44:52 UTC
++++ ecm.c
+@@ -1068,7 +1068,7 @@ int setN (
+ }
+
+ if (IniGetInt (INI_FILE, "PhiExtensions", 0) &&
+- w->k == 1.0 && abs(w->c) == 1 && (w->n%3) == 0) { /*=== this input means Phi(3,-b^(n/3)) ===*/
++ w->k == 1.0 && labs(w->c) == 1 && (w->n%3) == 0) { /*=== this input means Phi(3,-b^(n/3)) ===*/
+ giant tmp = allocgiant ((bits >> 5) + 5);
+ if (tmp == NULL) return (OutOfMemory (thread_num));
+ ultog (w->b, tmp);
+@@ -1156,7 +1156,7 @@ int setN (
+ /* Open file of known factors. This code has been obsoleted by the */
+ /* known factors list in worktodo.ini. */
+
+- if (w->k != 1.0 || w->b != 2 || abs(w->c) != 1) return (0);
++ if (w->k != 1.0 || w->b != 2 || labs(w->c) != 1) return (0);
+ fd = fopen (w->c == 1 ? "lowp.txt" : "lowm.txt", "r");
+ if (fd == NULL) return (0);
+