[singular] 03/03: Add new NTL compatibility patch from sage.

Tobias Hansen thansen at moszumanska.debian.org
Wed Jul 6 18:09:16 UTC 2016


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

thansen pushed a commit to branch master3-sage
in repository singular.

commit be58b11d0b1fe7678b4b61af56c57b71fd9c6c18
Author: Tobias Hansen <thansen at debian.org>
Date:   Wed Jul 6 17:59:27 2016 +0000

    Add new NTL compatibility patch from sage.
---
 debian/changelog                  |  1 +
 debian/patches/series             |  1 +
 debian/patches/singular_ntl.patch | 45 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 47 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 3815e71..8310ab9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ singular (3-1-6+dfsg-1+sage2) unstable-sage; urgency=medium
 
   * Rebuild for transition to libntl27.
   * 0018-NTL6-compatibility-patch-from-sagemath.patch.
+  * Add new NTL compatibility patch from sage.
 
  -- Tobias Hansen <thansen at debian.org>  Wed, 06 Jul 2016 18:43:57 +0100
 
diff --git a/debian/patches/series b/debian/patches/series
index 01d53fe..4b69aaf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -16,3 +16,4 @@
 0016-Use-full-path-for-a-few-coreutils.patch
 0017-make-interactive-docbuild-work.patch
 fix-for-new-perl.patch
+singular_ntl.patch
diff --git a/debian/patches/singular_ntl.patch b/debian/patches/singular_ntl.patch
new file mode 100644
index 0000000..0fdf87b
--- /dev/null
+++ b/debian/patches/singular_ntl.patch
@@ -0,0 +1,45 @@
+From de688442dfe449992dc14a000bca0691ecc7e106 Mon Sep 17 00:00:00 2001
+From: Oleksandr Motsak <motsak at mathematik.uni-kl.de>
+Date: Sat, 14 Mar 2015 16:58:01 +0100
+Subject: [PATCH] Fixing incompatibility with NTL8
+
+---
+ factory/NTLconvert.cc | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+--- a/factory/NTLconvert.cc
++++ b/factory/NTLconvert.cc
+@@ -30,6 +30,7 @@
+ #include <NTL/GF2EXFactoring.h>
+ #include <NTL/tools.h>
+ #include <NTL/mat_ZZ.h>
++#include <NTL/version.h>
+ #include "int_int.h"
+ #include <limits.h>
+ #include "NTLconvert.h"
+@@ -510,8 +511,14 @@
+     return CanonicalForm(coeff_long);
+   }
+   else
+-  {
+-    long sizeofrep= ((long *) a.rep) [1];
++  { 
++    const long * rep =
++#if NTL_MAJOR_VERSION <= 6
++      static_cast<long *>( a.rep );
++#else
++      static_cast<long *>( a.rep.rep ); // what about NTL7?
++#endif
++    long sizeofrep= rep[1];
+     bool lessZero= false;
+     if (sizeofrep < 0)
+     {
+@@ -529,7 +536,7 @@
+       cf_stringtemp_l= sizeofrep*sizeof(mp_limb_t)*2;
+       cf_stringtemp= (unsigned char*) Alloc (cf_stringtemp_l);
+     }
+-    int cc= mpn_get_str (cf_stringtemp, 16, (mp_limb_t *) (((long *) (a.rep)) + 2), sizeofrep);
++    int cc= mpn_get_str (cf_stringtemp, 16, (mp_limb_t *) ((rep) + 2), sizeofrep);
+ 
+     char* cf_stringtemp2;
+     if (lessZero)

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



More information about the debian-science-commits mailing list