Commit 28166387 authored by Julien Puydt's avatar Julien Puydt

Add patch to fix clang compilation

parent b116ea51
......@@ -12,6 +12,7 @@ lcalc (1.23+dfsg-6) unstable; urgency=medium
- Bump std-ver to 4.1.5.
- Point Vcs-* fields to salsa.
- Mark the -dev package Multi-Arch: same.
* Add a patch for clang compilation (Closes: #748898).
-- Tobias Hansen <thansen@debian.org> Sun, 23 Oct 2016 19:10:37 +0100
......
Author: François Bissey
Description: make it build with clang
Forwarded: comes from sagemath, see https://trac.sagemath.org/ticket/12437
--- a/include/Lcomplex.h
+++ b/include/Lcomplex.h
@@ -45,8 +45,6 @@
#pragma GCC system_header
-#include <bits/c++config.h>
-
//no longer include:
//#include <bits/cpp_type_traits.h> only thing used was is_floating...
//gcc 4.0 cpp_type_traits.h is not compatible with gcc 3.3.
@@ -135,7 +133,7 @@
template<typename _Up>
complex<_Tp>& operator/=(const complex<_Up>&);
- friend reset(complex<_Tp>& C) {
+ friend void reset(complex<_Tp>& C) {
reset(C._M_real);
reset(C._M_imag);
}
--- a/include/Ldokchitser.h
+++ b/include/Ldokchitser.h
@@ -69,7 +69,7 @@
// compute the values m[j] for the respective lambda_k[j]
- Complex m[N+1];
+ std::vector<Complex> m(N+1);
for (j=1;j<=N;j++)
m[j] = -2*lambda_k[j] + 2;
@@ -78,7 +78,8 @@
int n,fact_n;
Complex log_Gamma[N+1][a+1][MYDIGITS+1];
- Complex sum_log_Gamma[N+1][MYDIGITS+1];
+ std:vector<std::vector<Complex> > sum_log_Gamma(N+1);
+ for (j=1;j<=N;j++) sum_log_Gamma[j].resize(MYDIGITS+1);
for (j=1;j<=N;j++)
for (n=0;n<=MYDIGITS;n++)
@@ -103,8 +104,13 @@
// compute the exponential taylor series for gamma = exp(sum_log_Gamma)
- Complex exp_sum_log_Gamma[N+1][MYDIGITS+1][MYDIGITS+1]; // symmetric functions
- Complex gamma[N+1][MYDIGITS+1]; // gamma(s+m[j]) for j = 1 to N
+ std::vector<std::vector<std::vector<Complex> > > exp_sum_log_Gamma(N+1); // symmetric functions
+ std::vector<std::vector<Complex> > gamma(N+1); // gamma(s+m[j]) for j = 1 to N
+ for (j=1;j<=N;j++){
+ exp_sum_log_Gamma[j].resize(MYDIGITS+1);
+ gamma[j].resize(MYDIGITS+1);
+ }
+ for (j=1;j<=N;j++) for (n=0;n<=MYDIGITS;n++) exp_sum_log_Gamma[j][n].resize(MYDIGITS+1);
Complex temp_gamma[MYDIGITS+1];
Complex temp_mult_gamma[MYDIGITS+1];
Complex temp_exp_sum_log_Gamma[MYDIGITS+1];
--- a/include/Lexplicit_formula.h
+++ b/include/Lexplicit_formula.h
@@ -25,7 +25,7 @@
dirichlet_coeffs_log_diff(int num_coeffs, Complex *c)
{
- Complex b[num_coeffs+1];
+ std::vector<Complex> b(num_coeffs+1);
int j, n, d1, ind;
Complex total, total2, temp;
......@@ -7,3 +7,4 @@ init_stack.patch
lcalc-1.23_default_parameters_2.patch
pari-apell.patch
pari-init-stack.patch
clang.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment