diff --git a/pari-2.5.1-clobbered.patch b/pari-2.5.1-clobbered.patch deleted file mode 100644 index ba0660e..0000000 --- a/pari-2.5.1-clobbered.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- src/basemath/bibli1.c -+++ src/basemath/bibli1.c -@@ -2238,9 +2238,9 @@ END: - * If check is non-NULL keep x only if check(x). - * If a is a vector, assume a[1] is the LLL-reduced Cholesky form of q */ - GEN --fincke_pohst(GEN a, GEN B0, long stockmax, long PREC, FP_chk_fun *CHECK) -+fincke_pohst(GEN a, GEN B0, VOLATILE long stockmax, long PREC, FP_chk_fun *CHECK) - { -- pari_sp av = avma; -+ VOLATILE pari_sp av = avma; - VOLATILE long i,j,l; - VOLATILE GEN r,rinv,rinvtrans,u,v,res,z,vnorm,rperm,perm,uperm, bound = B0; - ---- src/gp/gp.c -+++ src/gp/gp.c -@@ -1250,7 +1250,7 @@ static void - gp_initrc(pari_stack *p_A, char *path) - { - char *nexts,*s,*t; -- FILE *file = gprc_get(path); -+ FILE * VOLATILE file = gprc_get(path); - Buffer *b; - filtre_t F; - VOLATILE long c = 0; ---- src/modules/stark.c -+++ src/modules/stark.c -@@ -2740,7 +2740,7 @@ quadray_init(GEN *pD, GEN f, GEN *pbnf, - /* compute the polynomial over Q of the Hilbert class field of - Q(sqrt(D)) where D is a positive fundamental discriminant */ - static GEN --quadhilbertreal(GEN D, long prec) -+quadhilbertreal(GEN D, VOLATILE long prec) - { - pari_sp av = avma; - long newprec; diff --git a/pari-2.5.1-declaration-not-prototype.patch b/pari-2.5.1-declaration-not-prototype.patch deleted file mode 100644 index 1f775c6..0000000 --- a/pari-2.5.1-declaration-not-prototype.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- src/headers/paripriv.h -+++ src/headers/paripriv.h -@@ -252,7 +252,7 @@ - GEN pari_compile_str(char *lex, int strict); - - void pari_sigint(const char *s); --pariFILE *pari_last_tmp_file(); -+pariFILE *pari_last_tmp_file(void); - void* get_stack(double fraction, long min); - void init_graph(void); - void free_graph(void); ---- src/language/eval.c -+++ src/language/eval.c -@@ -1079,11 +1079,11 @@ - break; - } - --#define EVAL_f(f) \ -+#define EVAL_f0(f) f() -+#define EVAL_f1(f) sp--; f(st[sp]) -+#define EVAL_fn(f) \ - switch (ep->arity) \ - { \ -- case 0: f(); break; \ -- case 1: sp--; f(st[sp]); break; \ - case 2: sp-=2; f(st[sp],st[sp+1]); break; \ - case 3: sp-=3; f(st[sp],st[sp+1],st[sp+2]); break; \ - case 4: sp-=4; f(st[sp],st[sp+1],st[sp+2],st[sp+3]); break; \ -@@ -1114,7 +1114,12 @@ - GEN res; - /* Macro Madness : evaluate function ep->value on arguments - * st[sp-ep->arity .. sp]. Set res = result. */ -- EVAL_f(res = ((GEN (*)(ANYARG))ep->value)); -+ switch (ep->arity) -+ { -+ case 0: EVAL_f0(res = ((GEN (*)(void))ep->value)); break; -+ case 1: EVAL_f1(res = ((GEN (*)(long))ep->value)); break; -+ default: EVAL_fn(res = ((GEN (*)(long, ...))ep->value)); -+ } - if (br_status) goto endeval; - gel(st,sp++)=res; - break; -@@ -1133,7 +1138,12 @@ - { - entree *ep = (entree *)operand; - long res; -- EVAL_f(res = ((long (*)(ANYARG))ep->value)); -+ switch (ep->arity) -+ { -+ case 0: EVAL_f0(res = ((long (*)(void))ep->value)); break; -+ case 1: EVAL_f1(res = ((long (*)(long))ep->value)); break; -+ default: EVAL_fn(res = ((long (*)(long, ...))ep->value)); -+ } - if (br_status) goto endeval; - st[sp++] = res; - break; -@@ -1142,7 +1152,12 @@ - { - entree *ep = (entree *)operand; - long res; -- EVAL_f(res = ((int (*)(ANYARG))ep->value)); -+ switch (ep->arity) -+ { -+ case 0: EVAL_f0(res = ((int (*)(void))ep->value)); break; -+ case 1: EVAL_f1(res = ((int (*)(long))ep->value)); break; -+ default: EVAL_fn(res = ((int (*)(long, ...))ep->value)); -+ } - if (br_status) goto endeval; - st[sp++] = res; - break; -@@ -1150,11 +1165,18 @@ - case OCcallvoid: - { - entree *ep = (entree *)operand; -- EVAL_f(((void (*)(ANYARG))ep->value)); -+ switch (ep->arity) -+ { -+ case 0: EVAL_f0(((void (*)(void))ep->value)); break; -+ case 1: EVAL_f1(((void (*)(long))ep->value)); break; -+ default: EVAL_fn(((void (*)(long, ...))ep->value)); -+ } - if (br_status) goto endeval; - break; - } --#undef EVAL_f -+#undef EVAL_f0 -+#undef EVAL_f1 -+#undef EVAL_fn - - case OCcalluser: - { diff --git a/pari-2.5.2-clobbered.patch b/pari-2.5.2-clobbered.patch new file mode 100644 index 0000000..8a9e0ed --- /dev/null +++ b/pari-2.5.2-clobbered.patch @@ -0,0 +1,59 @@ +--- src/basemath/bibli1.c ++++ src/basemath/bibli1.c +@@ -2016,7 +2016,7 @@ sub_fudge(GEN x) { + * If (check != NULL) consider only vectors passing the check, and assumes + * we only want the smallest possible vectors */ + static GEN +-smallvectors(GEN q, GEN BORNE, long maxnum, FP_chk_fun *CHECK) ++smallvectors(GEN q, GEN BORNE, const long maxnum, FP_chk_fun *CHECK) + { + long N = lg(q), n = N-1, i, j, k, s, stockmax, checkcnt = 1; + pari_sp av, av1, lim; +@@ -2238,9 +2238,9 @@ END: + * If check is non-NULL keep x only if check(x). + * If a is a vector, assume a[1] is the LLL-reduced Cholesky form of q */ + GEN +-fincke_pohst(GEN a, GEN B0, long stockmax, long PREC, FP_chk_fun *CHECK) ++fincke_pohst(GEN a, GEN B0, const long stockmax, long PREC, FP_chk_fun *CHECK) + { +- pari_sp av = avma; ++ VOLATILE pari_sp av = avma; + VOLATILE long i,j,l; + VOLATILE GEN r,rinv,rinvtrans,u,v,res,z,vnorm,rperm,perm,uperm, bound = B0; + +--- src/gp/gp.c ++++ src/gp/gp.c +@@ -1250,7 +1250,7 @@ static void + gp_initrc(pari_stack *p_A, char *path) + { + char *nexts,*s,*t; +- FILE *file = gprc_get(path); ++ FILE * VOLATILE file = gprc_get(path); + Buffer *b; + filtre_t F; + VOLATILE long c = 0; +--- src/headers/parinf.h ++++ src/headers/parinf.h +@@ -145,7 +145,7 @@ typedef struct { + GEN U; /* base change matrix from generators to bid.gen */ + } zlog_S; + +-GEN fincke_pohst(GEN a,GEN BOUND,long stockmax,long PREC, FP_chk_fun *CHECK); ++GEN fincke_pohst(GEN a,GEN BOUND,const long stockmax,long PREC, FP_chk_fun *CHECK); + void remake_GM(GEN nf, nffp_t *F, long prec); + GEN nfbasic_to_nf(nfbasic_t *T, GEN ro, long prec); + +--- src/modules/stark.c ++++ src/modules/stark.c +@@ -2740,9 +2740,10 @@ quadray_init(GEN *pD, GEN f, GEN *pbnf, + /* compute the polynomial over Q of the Hilbert class field of + Q(sqrt(D)) where D is a positive fundamental discriminant */ + static GEN +-quadhilbertreal(GEN D, long prec) ++quadhilbertreal(GEN D, long baseprec) + { + pari_sp av = avma; ++ VOLATILE long prec = baseprec; + long newprec; + GEN bnf; + VOLATILE GEN bnr, dtQ, data, nf, cyc, M; diff --git a/pari-2.5.3-declaration-not-prototype.patch b/pari-2.5.3-declaration-not-prototype.patch new file mode 100644 index 0000000..b084768 --- /dev/null +++ b/pari-2.5.3-declaration-not-prototype.patch @@ -0,0 +1,80 @@ +--- src/language/eval.c ++++ src/language/eval.c +@@ -1079,11 +1079,11 @@ + break; + } + +-#define EVAL_f(f) \ ++#define EVAL_f0(f) f() ++#define EVAL_f1(f) sp--; f(st[sp]) ++#define EVAL_fn(f) \ + switch (ep->arity) \ + { \ +- case 0: f(); break; \ +- case 1: sp--; f(st[sp]); break; \ + case 2: sp-=2; f(st[sp],st[sp+1]); break; \ + case 3: sp-=3; f(st[sp],st[sp+1],st[sp+2]); break; \ + case 4: sp-=4; f(st[sp],st[sp+1],st[sp+2],st[sp+3]); break; \ +@@ -1114,7 +1114,12 @@ + GEN res; + /* Macro Madness : evaluate function ep->value on arguments + * st[sp-ep->arity .. sp]. Set res = result. */ +- EVAL_f(res = ((GEN (*)(ANYARG))ep->value)); ++ switch (ep->arity) ++ { ++ case 0: EVAL_f0(res = ((GEN (*)(void))ep->value)); break; ++ case 1: EVAL_f1(res = ((GEN (*)(long))ep->value)); break; ++ default: EVAL_fn(res = ((GEN (*)(long, ...))ep->value)); ++ } + if (br_status) goto endeval; + gel(st,sp++)=res; + break; +@@ -1133,7 +1138,12 @@ + { + entree *ep = (entree *)operand; + long res; +- EVAL_f(res = ((long (*)(ANYARG))ep->value)); ++ switch (ep->arity) ++ { ++ case 0: EVAL_f0(res = ((long (*)(void))ep->value)); break; ++ case 1: EVAL_f1(res = ((long (*)(long))ep->value)); break; ++ default: EVAL_fn(res = ((long (*)(long, ...))ep->value)); ++ } + if (br_status) goto endeval; + st[sp++] = res; + break; +@@ -1142,7 +1152,12 @@ + { + entree *ep = (entree *)operand; + long res; +- EVAL_f(res = ((int (*)(ANYARG))ep->value)); ++ switch (ep->arity) ++ { ++ case 0: EVAL_f0(res = ((int (*)(void))ep->value)); break; ++ case 1: EVAL_f1(res = ((int (*)(long))ep->value)); break; ++ default: EVAL_fn(res = ((int (*)(long, ...))ep->value)); ++ } + if (br_status) goto endeval; + st[sp++] = res; + break; +@@ -1150,11 +1165,18 @@ + case OCcallvoid: + { + entree *ep = (entree *)operand; +- EVAL_f(((void (*)(ANYARG))ep->value)); ++ switch (ep->arity) ++ { ++ case 0: EVAL_f0(((void (*)(void))ep->value)); break; ++ case 1: EVAL_f1(((void (*)(long))ep->value)); break; ++ default: EVAL_fn(((void (*)(long, ...))ep->value)); ++ } + if (br_status) goto endeval; + break; + } +-#undef EVAL_f ++#undef EVAL_f0 ++#undef EVAL_f1 ++#undef EVAL_fn + + case OCcalluser: + { diff --git a/pari.spec b/pari.spec index b273a1c..4b04073 100644 --- a/pari.spec +++ b/pari.spec @@ -1,5 +1,5 @@ Name: pari -Version: 2.5.2 +Version: 2.5.3 Release: 1%{?dist} Summary: Number Theory-oriented Computer Algebra System Group: System Environment/Libraries @@ -11,8 +11,8 @@ Source1: gp.desktop Patch0: pari-2.5.1-xdgopen.patch Patch1: pari-2.5.1-optflags.patch Patch10: pari-2.5.1-missing-field-init.patch -Patch11: pari-2.5.1-declaration-not-prototype.patch -Patch12: pari-2.5.1-clobbered.patch +Patch11: pari-2.5.3-declaration-not-prototype.patch +Patch12: pari-2.5.2-clobbered.patch BuildRequires: readline-devel BuildRequires: gmp-devel BuildRequires: tex(tex) @@ -156,6 +156,11 @@ make test-all %{_libdir}/libpari.so %changelog +* Thu Oct 4 2012 Paul Howarth - 2.5.3-1 +- update to 2.5.3 (see CHANGES for details) +- further compiler warning fixes after discussion with upstream +- drop upstreamed parts of declaration-not-prototype patch + * Mon Aug 6 2012 Paul Howarth - 2.5.2-1 - update to 2.5.2 (see CHANGES for details) - drop upstreamed gcc 4.7, bug#1264 and FSF address patches diff --git a/sources b/sources index 605debd..c38bdc4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b346e037d7a6c25017e34f6afdba43b5 pari-2.5.2.tar.gz +ce4e09bb7225a63172cea9021d5d2704 pari-2.5.3.tar.gz