Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Apr 2014 03:57:13 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r350882 - head/math/miracl/files
Message-ID:  <201404110357.s3B3vDHi010943@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Fri Apr 11 03:57:13 2014
New Revision: 350882
URL: http://svnweb.freebsd.org/changeset/ports/350882
QAT: https://qat.redports.org/buildarchive/r350882/

Log:
  Fix build with clang34

Added:
  head/math/miracl/files/patch-big.h   (contents, props changed)
  head/math/miracl/files/patch-zzn.h   (contents, props changed)

Added: head/math/miracl/files/patch-big.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/miracl/files/patch-big.h	Fri Apr 11 03:57:13 2014	(r350882)
@@ -0,0 +1,43 @@
+--- ./big.h.orig	2012-03-07 16:18:08.000000000 -0600
++++ ./big.h	2014-04-10 22:50:46.942771472 -0500
+@@ -299,7 +299,7 @@
+               {if (mr_compare(b1.fn,b2.fn)>0) return TRUE; else return FALSE;}
+ 
+     friend Big from_binary(int,char *);
+-    friend int to_binary(const Big&,int,char *,BOOL justify=FALSE);
++    friend int to_binary(const Big&,int,char *,BOOL justify);
+     friend Big modmult(const Big&,const Big&,const Big&);
+     friend Big mad(const Big&,const Big&,const Big&,const Big&,Big&);
+     friend Big norm(const Big&);
+@@ -321,7 +321,7 @@
+                                                          // x^m.y^k mod n 
+     friend Big pow(int,Big *,Big *,Big);  // x[0]^m[0].x[1].m[1]... mod n
+ 
+-    friend Big luc(const Big& ,const Big&, const Big&, Big *b4=NULL);
++    friend Big luc(const Big& ,const Big&, const Big&, Big *b4);
+ 	friend Big moddiv(const Big&,const Big&,const Big&);
+     friend Big inverse(const Big&, const Big&);
+     friend void multi_inverse(int,Big*,const Big&,Big *);
+@@ -353,8 +353,8 @@
+     friend void modulo(const Big&);
+     friend BOOL modulo(int,int,int,int,BOOL);
+     friend Big get_modulus(void);
+-    friend int window(const Big&,int,int*,int*,int window_size=5);
+-    friend int naf_window(const Big&,const Big&,int,int*,int*,int store=11);
++    friend int window(const Big&,int,int*,int*,int window_size);
++    friend int naf_window(const Big&,const Big&,int,int*,int*,int store);
+     friend void jsf(const Big&,const Big&,Big&,Big&,Big&,Big&);
+ 
+ /* Montgomery stuff */
+@@ -420,7 +420,10 @@
+ extern Big rand(int,int); 
+ extern Big strong_rand(csprng *,int,int);
+ extern Big from_binary(int,char *);
+-extern int to_binary(const Big&,int,char *,BOOL);
++extern int to_binary(const Big&,int,char *,BOOL=false);
++extern Big luc(const Big& ,const Big&, const Big&, Big *b4=NULL);
++extern int window(const Big&,int,int*,int*,int window_size=5);
++extern int naf_window(const Big&,const Big&,int,int*,int*,int store=11);
+ 
+ using namespace std;
+ 

Added: head/math/miracl/files/patch-zzn.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/miracl/files/patch-zzn.h	Fri Apr 11 03:57:13 2014	(r350882)
@@ -0,0 +1,19 @@
+--- ./zzn.h.orig	2014-04-10 22:52:14.562766913 -0500
++++ ./zzn.h	2014-04-10 22:52:17.524768077 -0500
+@@ -183,7 +183,7 @@
+     friend ZZn getB(void);        // get B parameter of elliptic curve
+ 
+     friend ZZn  sqrt(const ZZn&); // only works if modulus is prime
+-    friend ZZn  luc( const ZZn&, const Big&, ZZn* b3=NULL);
++    friend ZZn  luc( const ZZn&, const Big&, ZZn* b3);
+ 
+     big getzzn(void) const;
+ 
+@@ -206,6 +206,7 @@
+ extern ZZn getA(void);  
+ extern ZZn getB(void);    
+ extern ZZn one(void);
++extern ZZn  luc( const ZZn&, const Big&, ZZn* b3=NULL);
+ 
+ #endif
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404110357.s3B3vDHi010943>