mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-22 11:45:56 -04:00
Add sagemath-m4rie.patch to adapt to m4rie 20130416.
Adapt to NTL 6.0.0 a little more.
This commit is contained in:
parent
0ce0009c63
commit
eac7c8fec1
3 changed files with 179 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
--- sage-5.8/spkg/build/sage-5.8/c_lib/include/ntl_wrap.h.orig 2010-06-28 10:37:05.000000000 -0600
|
||||
+++ sage-5.8/spkg/build/sage-5.8/c_lib/include/ntl_wrap.h 2013-05-03 15:42:32.931073654 -0600
|
||||
@@ -40,91 +40,91 @@ EXTERN void setup_NTL_error_callback(voi
|
||||
@@ -40,91 +40,92 @@ EXTERN void setup_NTL_error_callback(voi
|
||||
//////// ZZ //////////
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
@ -36,6 +36,7 @@
|
|||
#ifndef __cplusplus
|
||||
-struct ZZ_p;
|
||||
+typedef struct ZZ_p ZZ_p;
|
||||
+typedef struct ZZ_pContext ZZ_pContext;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus // sorry, if you want a C version, feel free to add it
|
||||
|
@ -154,7 +155,7 @@
|
|||
|
||||
//////// ZZXFactoring //////////
|
||||
|
||||
@@ -132,76 +132,76 @@ EXTERN void ZZX_preallocate_space(struct
|
||||
@@ -132,76 +133,77 @@ EXTERN void ZZX_preallocate_space(struct
|
||||
// e -- point to list of e longs (the exponents)
|
||||
// n -- length of above two lists
|
||||
// The lists v and e are mallocd, and must be freed by the calling code.
|
||||
|
@ -278,10 +279,11 @@
|
|||
#ifndef __cplusplus
|
||||
-struct zz_p;
|
||||
+typedef struct zz_p zz_p;
|
||||
+typedef struct zz_pContext zz_pContext;
|
||||
#endif
|
||||
|
||||
#define zz_p_set_from_long( obj1, obj2 )\
|
||||
@@ -209,14 +209,14 @@ struct zz_p;
|
||||
@@ -209,14 +211,14 @@ struct zz_p;
|
||||
#define NTL_zz_p_DOUBLE_EQUALS( obj1, obj2 )\
|
||||
(obj1) == (obj2)
|
||||
|
||||
|
@ -300,7 +302,7 @@
|
|||
#endif
|
||||
|
||||
#define NTL_zz_pX_DOUBLE_EQUALS( obj1, obj2 )\
|
||||
@@ -225,104 +225,104 @@ struct zz_pX;
|
||||
@@ -225,104 +227,106 @@ struct zz_pX;
|
||||
//////// ZZ_pEContext ///////////////
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
@ -419,6 +421,7 @@
|
|||
|
||||
#ifndef __cplusplus
|
||||
-struct GF2EContext;
|
||||
+typedef struct GF2E GF2E;
|
||||
+typedef struct GF2EContext GF2EContext;
|
||||
#endif
|
||||
|
||||
|
@ -441,6 +444,7 @@
|
|||
|
||||
#ifndef __cplusplus
|
||||
-struct mat_GF2;
|
||||
+typedef struct GF2 GF2;
|
||||
+typedef struct mat_GF2 mat_GF2;
|
||||
#endif
|
||||
|
||||
|
@ -1344,3 +1348,104 @@
|
|||
{
|
||||
//int j;
|
||||
cpn.restore();
|
||||
--- sage-5.8/spkg/build/sage-5.8/sage/libs/ntl/decl.pxi.orig 2010-06-28 10:37:01.000000000 -0600
|
||||
+++ sage-5.8/spkg/build/sage-5.8/sage/libs/ntl/decl.pxi 2013-05-07 09:38:36.134950663 -0600
|
||||
@@ -23,7 +23,7 @@ from sage.libs.ntl.ntl_ZZ_pEX_decl cimpo
|
||||
|
||||
cdef extern from "ntl_wrap.h":
|
||||
#### mat_ZZ_c
|
||||
- ctypedef struct mat_ZZ_c "struct mat_ZZ":
|
||||
+ ctypedef struct mat_ZZ_c "mat_ZZ":
|
||||
pass
|
||||
|
||||
# Some boiler-plate
|
||||
@@ -93,7 +93,7 @@ cdef extern from "ntl_wrap.h":
|
||||
cdef long mat_ZZ_G_BKZ_RR_U "G_BKZ_RR"(mat_ZZ_c B, mat_ZZ_c U, double delta, long BlockSize, long prune, int check, long verbose)
|
||||
|
||||
#### GF2_c
|
||||
- ctypedef struct GF2_c "struct GF2":
|
||||
+ ctypedef struct GF2_c "GF2":
|
||||
pass
|
||||
|
||||
GF2_c* GF2_new "New<GF2>"()
|
||||
@@ -119,7 +119,7 @@ cdef extern from "ntl_wrap.h":
|
||||
|
||||
#### GF2X_c
|
||||
|
||||
- ctypedef struct GF2X_c "struct GF2X":
|
||||
+ ctypedef struct GF2X_c "GF2X":
|
||||
pass
|
||||
|
||||
long *GF2XHexOutput_c "(&GF2X::HexOutput)" # work-around for Cython bug
|
||||
@@ -176,7 +176,7 @@ cdef extern from "ntl_wrap.h":
|
||||
void GF2X_BuildIrred "BuildIrred" (GF2X_c f, long n)
|
||||
|
||||
#### GF2XModulus_c
|
||||
- ctypedef struct GF2XModulus_c "struct GF2XModulus":
|
||||
+ ctypedef struct GF2XModulus_c "GF2XModulus":
|
||||
pass
|
||||
|
||||
GF2X_c GF2XModulus_GF2X "GF2X" (GF2XModulus_c m)
|
||||
@@ -185,7 +185,7 @@ cdef extern from "ntl_wrap.h":
|
||||
|
||||
#### GF2EContext_c
|
||||
|
||||
- ctypedef struct GF2EContext_c "struct GF2EContext":
|
||||
+ ctypedef struct GF2EContext_c "GF2EContext":
|
||||
void (*restore)()
|
||||
|
||||
GF2EContext_c* GF2EContext_new "New<GF2EContext>"()
|
||||
@@ -196,7 +196,7 @@ cdef extern from "ntl_wrap.h":
|
||||
void GF2EContext_delete "Delete<GF2EContext>"(GF2EContext_c *mem)
|
||||
|
||||
#### GF2E_c
|
||||
- ctypedef struct GF2E_c "struct GF2E":
|
||||
+ ctypedef struct GF2E_c "GF2E":
|
||||
pass
|
||||
|
||||
void GF2E_init "GF2E::init"(GF2X_c x)
|
||||
@@ -231,7 +231,7 @@ cdef extern from "ntl_wrap.h":
|
||||
GF2_c GF2E_trace "trace"(GF2E_c x)
|
||||
|
||||
#### GF2EX_c
|
||||
- ctypedef struct GF2EX_c "struct GF2EX":
|
||||
+ ctypedef struct GF2EX_c "GF2EX":
|
||||
pass
|
||||
|
||||
GF2EX_c* GF2EX_new "New<GF2EX>"()
|
||||
@@ -250,7 +250,7 @@ cdef extern from "ntl_wrap.h":
|
||||
int GF2EX_IsZero "IsZero"(GF2EX_c x)
|
||||
|
||||
#### vec_GF2E_c
|
||||
- ctypedef struct vec_GF2E_c "struct vec_GF2E":
|
||||
+ ctypedef struct vec_GF2E_c "vec_GF2E":
|
||||
pass
|
||||
|
||||
vec_GF2E_c* vec_GF2E_new "New<vec_GF2E>"()
|
||||
@@ -261,7 +261,7 @@ cdef extern from "ntl_wrap.h":
|
||||
object vec_GF2E_to_PyString "_to_PyString<vec_GF2E>"(vec_GF2E_c *x)
|
||||
|
||||
#### mat_GF2E_c
|
||||
- ctypedef struct mat_GF2E_c "struct mat_GF2E":
|
||||
+ ctypedef struct mat_GF2E_c "mat_GF2E":
|
||||
void (*SetDims)(long nrows, long ncols)
|
||||
long (*NumRows)()
|
||||
long (*NumCols)()
|
||||
@@ -300,7 +300,7 @@ cdef extern from "ntl_wrap.h":
|
||||
void mat_GF2E_conv_vec_GF2E(mat_GF2E_c out, vec_GF2E_c inp)
|
||||
|
||||
#### vec_GF2_c
|
||||
- ctypedef struct vec_GF2_c "struct vec_GF2":
|
||||
+ ctypedef struct vec_GF2_c "vec_GF2":
|
||||
pass
|
||||
|
||||
vec_GF2_c* vec_GF2_new "New<vec_GF2>"()
|
||||
@@ -312,7 +312,7 @@ cdef extern from "ntl_wrap.h":
|
||||
|
||||
|
||||
#### mat_GF2_c
|
||||
- ctypedef struct mat_GF2_c "struct mat_GF2":
|
||||
+ ctypedef struct mat_GF2_c "mat_GF2":
|
||||
void (*SetDims)(long nrows, long ncols)
|
||||
long (*NumRows)()
|
||||
long (*NumCols)()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue