[pari-sage] 07/12: Apply public_memory_functions.patch from sage.

Tobias Hansen thansen at moszumanska.debian.org
Sat May 23 14:30:50 UTC 2015


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

thansen pushed a commit to branch master
in repository pari-sage.

commit 81c548f2cb094c464716157d824d63ebc575c0f1
Author: Tobias Hansen <tobias.han at gmx.de>
Date:   Sun Mar 15 02:52:40 2015 +0000

    Apply public_memory_functions.patch from sage.
---
 debian/changelog                             |  1 +
 debian/patches/public_memory_functions.patch | 57 ++++++++++++++++++++++++++++
 debian/patches/series                        |  1 +
 3 files changed, 59 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index b05e901..a13e84f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 pari (2.8-1369-g0e48e9b-1) UNRELEASED; urgency=medium
 
   * Import pari snapshot that sage uses.
+  * Apply public_memory_functions.patch from sage.
 
  -- Tobias Hansen <thansen at debian.org>  Sun, 15 Mar 2015 02:39:33 +0000
 
diff --git a/debian/patches/public_memory_functions.patch b/debian/patches/public_memory_functions.patch
new file mode 100644
index 0000000..91937f1
--- /dev/null
+++ b/debian/patches/public_memory_functions.patch
@@ -0,0 +1,57 @@
+--- a/src/headers/paridecl.h
++++ b/src/headers/paridecl.h
+@@ -3094,6 +3094,9 @@
+ void    pari_thread_valloc(struct pari_thread *t, size_t s, size_t v, GEN arg);
+ GEN     pari_version(void);
+ void    pari_warn(int numerr, ...);
++void *  pari_mainstack_malloc(size_t size);
++void    pari_mainstack_mfree(void *s, size_t size);
++void    pari_mainstack_free(struct pari_mainstack *st);
+ void    paristack_alloc(size_t rsize, size_t vsize);
+ void    paristack_newrsize(ulong newsize);
+ void    paristack_resize(ulong newsize);
+--- a/src/language/init.c
++++ b/src/language/init.c
+@@ -608,7 +608,7 @@
+ #ifndef MAP_NORESERVE
+ #define MAP_NORESERVE 0
+ #endif
+-static void *
++void *
+ pari_mainstack_malloc(size_t size)
+ {
+   void *b = mmap(NULL, size, PROT_READ|PROT_WRITE,
+@@ -616,7 +616,7 @@
+   return (b == MAP_FAILED) ? NULL: b;
+ }
+ 
+-static void
++void
+ pari_mainstack_mfree(void *s, size_t size)
+ {
+   munmap(s, size);
+@@ -630,13 +630,13 @@
+ 
+ #else
+ #define PARI_STACK_ALIGN (0x40UL)
+-static void *
++void *
+ pari_mainstack_malloc(size_t s)
+ {
+   return malloc(s); /* NOT pari_malloc, e_MEM would be deadly */
+ }
+ 
+-static void
++void
+ pari_mainstack_mfree(void *s, size_t size) { (void) size; free(s); }
+ 
+ static void
+@@ -677,7 +677,7 @@
+   st->memused = 0;
+ }
+ 
+-static void
++void
+ pari_mainstack_free(struct pari_mainstack *st)
+ {
+   pari_mainstack_mfree((void*)st->vbot, st->vsize ? st->vsize : fix_size(st->rsize));
diff --git a/debian/patches/series b/debian/patches/series
index 91c39c7..fe46e21 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 enable_build_envvar
+public_memory_functions.patch

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



More information about the debian-science-commits mailing list