Path: blob/master/build/pkgs/lcalc/patches/init_stack.patch
8820 views
diff -ru src/include/Lcommandline.h b/include/Lcommandline.h1--- src/include/Lcommandline.h 2012-08-08 23:21:55.000000000 +02002+++ b/include/Lcommandline.h 2014-01-06 14:04:55.981027532 +01003@@ -40,12 +40,7 @@4#include "Lcommandline_globals.h" //command line global variables5#ifdef INCLUDE_PARI6#include "pari.h" //for pari's elliptic curve functions7-#undef init //pari has a '#define init pari_init' which8- //causes trouble with the stream.h init.9- //pari also causes trouble with things like abs.10- //we place the pari include first since otherwise it11- //messes up.12-13+#include "paripriv.h" //for pari_init_stack()14#endif //ifdef INCLUDE_PARI151617diff -ru src/src/Lcommandline.cc b/src/Lcommandline.cc18--- src/src/Lcommandline.cc 2012-08-08 23:21:56.000000000 +020019+++ b/src/Lcommandline.cc 2014-01-06 14:02:19.463388366 +010020@@ -473,7 +473,9 @@2122#ifdef INCLUDE_PARI23if(do_elliptic_curve){24- allocatemoremem((int) N_terms*16+1000000); //XXXXXXXXX this should depend on whether we're double or long double or mpfr double25+ // Reallocate PARI stack26+ pari_init_stack((size_t)N_terms*16 + 1000000, top-bot); //XXXXXXXXX this should depend on whether we're double or long double or mpfr double27+28if (my_verbose>0) cout << "Will precompute " << N_terms << " elliptic L-function dirichlet coefficients..." << endl;29initialize_new_L(a1,a2,a3,a4,a6,N_terms);30}313233