summaryrefslogtreecommitdiff
path: root/math/pari23/patches/patch-src_modules_mpqs.c
blob: 1a67027cf061958d727f90d73f2df871eedb6dc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$NetBSD: patch-src_modules_mpqs.c,v 1.1 2016/03/03 13:23:22 wiz Exp $

--- src/modules/mpqs.c.orig	2015-01-22 19:57:31.000000000 +0000
+++ src/modules/mpqs.c
@@ -2345,7 +2345,7 @@ mpqs_combine_large_primes(mpqs_handle_t 
     *f = gerepileuptoint(av0, inv_q);
     return c;
   }
-  Y1 = strtoi(e[0].Y);
+  Y1 = pari_strtoi(e[0].Y);
   av2 = avma; /* preserve inv_q and Y1 */
 
   while (fgets(buf, MPQS_STRING_LENGTH, COMB))
@@ -2371,7 +2371,7 @@ mpqs_combine_large_primes(mpqs_handle_t 
         *f = gerepileuptoint(av0, inv_q);
         return c;
       }
-      Y1 = strtoi(e[i].Y);
+      Y1 = pari_strtoi(e[i].Y);
       i = 1 - i; /* subsequent relations go to other row */
       av2 = avma; /* preserve inv_q and Y1 */
       continue;
@@ -2381,7 +2381,7 @@ mpqs_combine_large_primes(mpqs_handle_t 
     memset((void *)ei, 0, ei_size * sizeof(long));
     mpqs_set_exponents(ei, e[0].E);
     mpqs_set_exponents(ei, e[1].E);
-    Y2 = strtoi(e[i].Y);
+    Y2 = pari_strtoi(e[i].Y);
     new_Y = modii(mulii(mulii(Y1, Y2), inv_q), h->N);
     new_Y1 = subii(h->N, new_Y);
     if (absi_cmp(new_Y1, new_Y) < 0) new_Y = new_Y1;
@@ -2692,7 +2692,7 @@ mpqs_add_relation(GEN Y_prod, GEN N, lon
   s = strchr(rel, ':') - 1;
   *s = '\0';
   
-  res = remii(mulii(Y_prod, strtoi(rel)), N);
+  res = remii(mulii(Y_prod, pari_strtoi(rel)), N);
 
   s = strtok(s + 3, " \n");
   while (s != NULL)