summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/lcalc-using-namespace-std.patch
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-06-27 23:33:48 +0200
committerLudovic Courtès <ludo@gnu.org>2019-06-27 23:33:48 +0200
commit5cc1075a76392666d3d733837f5c6252b1e48002 (patch)
treeaff2a303881a6fe53021a6e78a767958e608719b /gnu/packages/patches/lcalc-using-namespace-std.patch
parent9c2563a80b6f1d8fb8677f5314e6180ea9916aa5 (diff)
parentc30d117822a8ca26cd8c06c0a3974955bef68eac (diff)
downloadguix-patches-5cc1075a76392666d3d733837f5c6252b1e48002.tar
guix-patches-5cc1075a76392666d3d733837f5c6252b1e48002.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches/lcalc-using-namespace-std.patch')
-rw-r--r--gnu/packages/patches/lcalc-using-namespace-std.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/patches/lcalc-using-namespace-std.patch b/gnu/packages/patches/lcalc-using-namespace-std.patch
new file mode 100644
index 0000000000..6e0075fdc8
--- /dev/null
+++ b/gnu/packages/patches/lcalc-using-namespace-std.patch
@@ -0,0 +1,43 @@
+Patch taken from the Sage packaging system.
+
+diff --git a/include/Lcommon.h b/include/Lcommon.h
+index 1b3be43..bf40532 100644
+--- a/include/Lcommon.h
++++ b/include/Lcommon.h
+@@ -48,7 +48,7 @@ const bool outputSeries=true; // Whether to output the coefficients or just th
+
+ // Loop i from m to n
+ // Useful in tidying up most for loops
+-#define loop(i,m,n) for(typeof(m) i=(m); i!=(n); i++)
++#define loop(i,m,n) for(auto i=(m); i!=(n); i++)
+
+ // A class for calculations involving polynomials of small degree
+ // Not efficient enough for huge polynomials
+diff --git a/include/Lcommon_ld.h b/include/Lcommon_ld.h
+index 86ae4df..33c560c 100644
+--- a/include/Lcommon_ld.h
++++ b/include/Lcommon_ld.h
+@@ -53,7 +53,7 @@ const bool outputSeries=true; // Whether to output the coefficients or just th
+
+ // Loop i from m to n
+ // Useful in tidying up most for loops
+-#define loop(i,m,n) for(typeof(m) i=(m); i!=(n); i++)
++#define loop(i,m,n) for(auto i=(m); i!=(n); i++)
+
+ // A class for calculations involving polynomials of small degree
+ // Not efficient enough for huge polynomials
+diff --git a/include/Lglobals.h b/include/Lglobals.h
+index 60002e4..ca2606c 100644
+--- a/include/Lglobals.h
++++ b/include/Lglobals.h
+@@ -24,9 +24,9 @@
+ #ifndef Lglobals_H
+ #define Lglobals_H
+
++#include <valarray>
+ using namespace std;
+
+-#include <valarray>
+ #ifdef USE_MPFR
+ #include "Lgmpfrxx.h"
+ typedef mpfr_class Double;