summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2014-03-10 18:29:16 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2014-03-10 18:29:16 +0000
commitdc362c86f24bc8b351f2a603bcc3a6db29ccd8f5 (patch)
tree79c6fd63f3d3a983d59cdbe8a819d4ecb2a4050d /dev-libs/ntl/files
parentx86 stable, bug #493400 (diff)
downloadhistorical-dc362c86f24bc8b351f2a603bcc3a6db29ccd8f5.tar.gz
historical-dc362c86f24bc8b351f2a603bcc3a6db29ccd8f5.tar.bz2
historical-dc362c86f24bc8b351f2a603bcc3a6db29ccd8f5.zip
Version bump, mostly taken from sage-on-gentoo
Package-Manager: portage-2.2.8-prefix/cvs/Linux x86_64 Manifest-Sign-Key: 0x13CB1360
Diffstat (limited to 'dev-libs/ntl/files')
-rw-r--r--dev-libs/ntl/files/ntl-6.0.0-sage-tools.patch61
-rw-r--r--dev-libs/ntl/files/ntl-6.0.0-singular.patch12
2 files changed, 73 insertions, 0 deletions
diff --git a/dev-libs/ntl/files/ntl-6.0.0-sage-tools.patch b/dev-libs/ntl/files/ntl-6.0.0-sage-tools.patch
new file mode 100644
index 000000000000..e79731fc2fce
--- /dev/null
+++ b/dev-libs/ntl/files/ntl-6.0.0-sage-tools.patch
@@ -0,0 +1,61 @@
+--- src.orig/src/tools.c 2012-08-06 11:54:53.652334400 +0200
++++ src/src/tools.c 2012-08-06 11:59:18.183993600 +0200
+@@ -18,8 +18,35 @@
+ void (*ErrorCallback)() = 0;
+
+
++/*
++ The following code differs from vanilla NTL.
++
++ We add a SetErrorCallbackFunction(). This sets a global callback function _function_,
++ which gets called with parameter _context_ and an error message string whenever Error()
++ gets called.
++
++ Note that if the custom error handler *returns*, then NTL will dump the error message
++ back to stderr and abort() as it habitually does.
++
++ -- David Harvey (2008-04-12)
++*/
++
++void (*ErrorCallbackFunction)(const char*, void*) = NULL;
++void *ErrorCallbackContext = NULL;
++
++
++void SetErrorCallbackFunction(void (*function)(const char*, void*), void *context)
++{
++ ErrorCallbackFunction = function;
++ ErrorCallbackContext = context;
++}
++
++
+ void Error(const char *s)
+ {
++ if (ErrorCallbackFunction != NULL)
++ ErrorCallbackFunction(s, ErrorCallbackContext);
++
+ cerr << s << "\n";
+ _ntl_abort();
+ }
+--- src.orig/include/NTL/tools.h 2012-08-06 11:54:52.830333000 +0200
++++ src/include/NTL/tools.h 2012-08-06 11:59:18.143993600 +0200
+@@ -10,6 +10,7 @@
+
+ #include <cstdlib>
+ #include <cmath>
++#include <cstdio>
+ #include <iostream>
+
+ #else
+@@ -252,6 +253,12 @@
+ char IntValToChar(long a);
+
+
++/*
++ This function is not present in vanilla NTL.
++ See tools.c for documentation.
++ */
++void SetErrorCallbackFunction(void (*func)(const char *s, void *context), void *context);
++
+
+ void Error(const char *s);
+
diff --git a/dev-libs/ntl/files/ntl-6.0.0-singular.patch b/dev-libs/ntl/files/ntl-6.0.0-singular.patch
new file mode 100644
index 000000000000..c172386f3102
--- /dev/null
+++ b/dev-libs/ntl/files/ntl-6.0.0-singular.patch
@@ -0,0 +1,12 @@
+--- src.orig/include/NTL/new.h 2012-08-06 17:12:25.658913083 +0200
++++ src/include/NTL/new.h 2012-08-06 17:11:15.002915713 +0200
+@@ -12,7 +12,8 @@
+
+ #include <new>
+
+-#define NTL_NEW_OP new (std::nothrow)
++// commenting std::nothrow makes this ntl work properly with Singular
++#define NTL_NEW_OP new //(std::nothrow)
+
+
+ #else