[eclib] 01/01: Fixed #755227.

Julien Puydt julien.puydt at laposte.net
Fri Aug 1 18:55:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

jpuydt-guest pushed a commit to branch master
in repository eclib.

commit ea10d7437016682ee7d164282aa322356e2aedfd
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Fri Aug 1 20:39:01 2014 +0200

    Fixed #755227.
---
 debian/changelog          |   6 ++
 debian/patches/clang.diff | 183 ++++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series     |   1 +
 3 files changed, 190 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 1f70b5c..abc7817 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+eclib (2014-05-14a-2) UNRELEASED; urgency=medium
+
+  * Added a patch from Alexander Ovchinnikov (Closes: #755227).
+
+ -- Julien Puydt <julien.puydt at laposte.net>  Fri, 01 Aug 2014 20:35:53 +0200
+
 eclib (2014-05-14a-1) unstable; urgency=low
 
   * Upgraded to latest upstream (Closes: #743329).
diff --git a/debian/patches/clang.diff b/debian/patches/clang.diff
new file mode 100644
index 0000000..72d3a99
--- /dev/null
+++ b/debian/patches/clang.diff
@@ -0,0 +1,183 @@
+Description: makes eclib compile with clang
+Forwarded: by mail to John Cremona (Fri, 1st august 2015)
+Author: Alexander Ovchinnikov
+
+--- ./libsrc/eclib/smat.h	2014-05-15 15:12:49.000000000 +0400
++++ ../eclib-2014-05-14a-my/./libsrc/eclib/smat.h	2014-07-31 01:28:09.037375213 +0400
+@@ -23,6 +23,9 @@
+  
+ // Original version by Luiz Figueiredo
+ 
++int eqmodp(const smat&, const smat&, const scalar& p=DEFAULT_MODULUS);
++int liftmat(const smat& mm, scalar pr, smat& m, scalar& dd, int trace=0);
++
+ class smat {
+ 
+ friend class smat_elim;
+@@ -79,7 +82,7 @@
+      friend smat transpose(const smat&);
+      friend int operator==(const smat&, const smat&);
+   // Equality mod p:
+-     friend int eqmodp(const smat&, const smat&, const scalar& p=DEFAULT_MODULUS);
++     friend int eqmodp(const smat&, const smat&, const scalar& p);
+      friend ostream& operator<< (ostream&s, const smat&);
+      friend istream& operator>> (istream&s, smat&);
+      friend int get_population (const smat& );      //mainly used for testing
+@@ -87,7 +90,7 @@
+      {return (((double)(get_population(m)))/m.nro)/m.nco;}
+      friend void random_fill_in( smat&, int, scalar ); //the elimination program
+      friend smat sidmat(scalar);  // identity matrix
+-     friend int liftmat(const smat& mm, scalar pr, smat& m, scalar& dd, int trace=0);
++     friend int liftmat(const smat& mm, scalar pr, smat& m, scalar& dd, int trace);
+      friend int liftmats_chinese(const smat& mm1, scalar pr1, const smat& mm2, scalar pr2,
+                                  smat& m, scalar& dd);
+  };
+--- ./libsrc/eclib/mat.h	2014-05-15 15:12:49.000000000 +0400
++++ ../eclib-2014-05-14a-my/./libsrc/eclib/mat.h	2014-07-31 01:25:26.976901882 +0400
+@@ -32,6 +32,9 @@
+ #define INT_MIN (-INT_MAX-1)
+ #endif
+ 
++int liftmat(const mat& mm, scalar pr, mat& m, scalar& dd, int trace=0);
++int lift(const subspace& s, scalar pr, subspace& ans, int trace=0);
++
+ class mat {
+ friend class subspace;
+ friend class mat_m;
+@@ -103,8 +106,8 @@
+                                  long& rk, long& ny, scalar pr);
+ 	friend subspace combine(const subspace& s1, const subspace& s2);
+         friend mat restrict_mat(const mat& m, const subspace& s, int cr);
+-        friend int liftmat(const mat& mm, scalar pr, mat& m, scalar& dd, int trace=0);
+-        friend int lift(const subspace& s, scalar pr, subspace& ans, int trace=0);
++        friend int liftmat(const mat& mm, scalar pr, mat& m, scalar& dd, int trace);
++        friend int lift(const subspace& s, scalar pr, subspace& ans, int trace);
+ 	friend subspace pcombine(const subspace& s1, const subspace& s2, scalar pr);
+ 	friend mat prestrict(const mat& m, const subspace& s, scalar pr, int cr);
+ 	friend mat matmulmodp(const mat&, const mat&, scalar pr);
+--- ./libsrc/eclib/p2points.h	2014-05-15 15:12:49.000000000 +0400
++++ ../eclib-2014-05-14a-my/./libsrc/eclib/p2points.h	2014-07-31 01:30:04.843045951 +0400
+@@ -30,6 +30,16 @@
+ //
+ // class for  points in P^2(Q), used as base for points on elliptic curves etc.
+ //
++class P2Point;
++P2Point scale(const P2Point& P, const bigint& u, int back=0); 
++P2Point scale(const P2Point& P, long u=1, int back=0); 
++P2Point shift(const P2Point& P,
++      const bigint& r, const bigint& s, const bigint& t, 
++      int back=0); 
++P2Point transform(const P2Point& P,
++			   const bigint& u, 
++			   const bigint& r, const bigint& s, const bigint& t, 
++			   int back=0); 
+ 
+ class P2Point{ 
+   friend class Point;
+@@ -100,15 +110,15 @@
+     { X=Q.X ; Y=Q.Y; Z=Q.Z;  }
+ 
+   // Coordinate transforms useful for elliptic curve points 
+-  friend P2Point scale(const P2Point& P, const bigint& u, int back=0); 
+-  friend P2Point scale(const P2Point& P, long u=1, int back=0); 
++  friend P2Point scale(const P2Point& P, const bigint& u, int back); 
++  friend P2Point scale(const P2Point& P, long u, int back); 
+   friend P2Point shift(const P2Point& P,
+ 		       const bigint& r, const bigint& s, const bigint& t, 
+-		       int back=0); 
++		       int back); 
+   friend P2Point transform(const P2Point& P,
+ 			   const bigint& u, 
+ 			   const bigint& r, const bigint& s, const bigint& t, 
+-			   int back=0); 
++			   int back); 
+ 
+   void getcoordinates(bigint& x, bigint& y, bigint& z) const
+     {x=X; y=Y; z=Z; }
+--- ./libsrc/eclib/mmatrix.h	2014-05-15 15:12:49.000000000 +0400
++++ ../eclib-2014-05-14a-my/./libsrc/eclib/mmatrix.h	2014-07-31 01:26:09.999924774 +0400
+@@ -27,6 +27,8 @@
+ #include "mvector.h"
+ #include "matrix.h"
+ 
++msubspace lift(const msubspace& s, const bigint& pr, int =0);
++
+ class mat_m {
+ friend class msubspace;
+ public:
+@@ -84,7 +86,7 @@
+                                   long& rk, long& ny, const bigint& pr);
+         friend msubspace combine(const msubspace& s1, const msubspace& s2);
+         friend mat_m restrict_mat(const mat_m& m, const msubspace& s);
+-        friend msubspace lift(const msubspace& s, const bigint& pr, int =0);
++        friend msubspace lift(const msubspace& s, const bigint& pr, int);
+         friend msubspace pcombine(const msubspace& s1, const msubspace& s2, const bigint& pr);
+         friend mat_m prestrict(const mat_m& m, const msubspace& s, const bigint& pr);
+         friend mat_m matmulmodp(const mat_m&, const mat_m&, const bigint& pr);
+--- ./libsrc/eclib/points.h	2014-05-15 15:12:49.000000000 +0400
++++ ../eclib-2014-05-14a-my/./libsrc/eclib/points.h	2014-07-31 01:30:53.706098874 +0400
+@@ -33,6 +33,12 @@
+ // class for  points on elliptic curves
+ //
+ 
++class Point;
++Point transform(const Point& p,  Curvedata* newc, 
++			 const bigint& u, 
++			 const bigint& r, const bigint& s, const bigint& t, 
++			 int back=0); 
++
+ class Point : public P2Point { 
+   Curvedata *E;    // pointer to the curve that the point is on
+   int ord;         // order: 0 if not calculated yet, -1 if infinite
+@@ -109,7 +115,7 @@
+   friend Point transform(const Point& p,  Curvedata* newc, 
+ 			 const bigint& u, 
+ 			 const bigint& r, const bigint& s, const bigint& t, 
+-			 int back=0); 
++			 int back); 
+ 
+   void operator+=(const Point&) ; // P1 += P2 ; order and height unknown
+   void operator-=(const Point&) ; // P1 -= P2 ; ditto
+--- ./libsrc/eclib/svec.h	2014-05-15 15:12:49.000000000 +0400
++++ ../eclib-2014-05-14a-my/./libsrc/eclib/svec.h	2014-07-31 01:26:48.011089299 +0400
+@@ -21,6 +21,8 @@
+ // 
+ //////////////////////////////////////////////////////////////////////////
+  
++int eqmodp(const svec&, const svec&, const scalar& p=DEFAULT_MODULUS);
++ 
+ class svec {
+ 
+   friend class smat;
+@@ -83,7 +85,7 @@
+ 
+   friend inline int dim(const svec& v)  {return v.d;}
+   // Equality mod p:
+-  friend int eqmodp(const svec&, const svec&, const scalar& p=DEFAULT_MODULUS);
++  friend int eqmodp(const svec&, const svec&, const scalar& p);
+   friend ostream& operator<< (ostream&s, const svec&);
+   friend scalar operator*(const svec&, const svec&); //dot product
+   friend scalar operator*(const svec&, const vec&);
+--- ./libsrc/eclib/vec.h	2014-05-15 15:12:49.000000000 +0400
++++ ../eclib-2014-05-14a-my/./libsrc/eclib/vec.h	2014-07-31 01:24:03.278900642 +0400
+@@ -32,6 +32,8 @@
+ 
+ class vec;
+ vec iota(scalar n);                      // (1,2,...,n)
++mat restrict_mat(const mat& m, const subspace& s, int cr=0);
++mat prestrict(const mat& m, const subspace& s, scalar pr, int cr=0);
+ 
+ class vec {
+ friend class svec;
+@@ -78,9 +80,9 @@
+         friend scalar vecgcd(const vec&);
+         friend void swapvec(vec& v, vec& w);
+         friend int member(scalar a, const vec& v);//tests if a=v[i] for some i
+-        friend mat restrict_mat(const mat& m, const subspace& s, int cr=0);
++        friend mat restrict_mat(const mat& m, const subspace& s, int cr);
+         friend mat_m restrict_mat(const mat_m& m, const msubspace& s);
+-        friend mat prestrict(const mat& m, const subspace& s, scalar pr, int cr=0);
++        friend mat prestrict(const mat& m, const subspace& s, scalar pr, int cr);
+         friend mat_m prestrict(const mat_m& m, const msubspace& s, const bigint& pr);
+ 
+ // Implementation
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..645797c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+clang.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/eclib.git



More information about the debian-science-commits mailing list