summaryrefslogtreecommitdiff
path: root/editors/emacs20
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2011-12-01 05:12:57 +0000
committerdholland <dholland@pkgsrc.org>2011-12-01 05:12:57 +0000
commit8e4aaab666134daa5da599e348702a087b946ffa (patch)
treed6603dafd999b77dd5745461dc5d07ab38c5fd73 /editors/emacs20
parent851a85ee41bd732dcf45e01c7709dc1eab4b3afe (diff)
downloadpkgsrc-8e4aaab666134daa5da599e348702a087b946ffa.tar.gz
Extend previous to realloc and free as well, which is almost certainly
necessary. PR 45669.
Diffstat (limited to 'editors/emacs20')
-rw-r--r--editors/emacs20/distinfo4
-rw-r--r--editors/emacs20/patches/patch-bm30
2 files changed, 30 insertions, 4 deletions
diff --git a/editors/emacs20/distinfo b/editors/emacs20/distinfo
index fd072782a73..4bbd2f0adb7 100644
--- a/editors/emacs20/distinfo
+++ b/editors/emacs20/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.21 2011/12/01 05:07:22 dholland Exp $
+$NetBSD: distinfo,v 1.22 2011/12/01 05:12:57 dholland Exp $
SHA1 (emacs-20.7-mule-4.1b-elc.tar.gz) = 3894fb2b81bb326545f6ccc3bf0a8405c23004ff
RMD160 (emacs-20.7-mule-4.1b-elc.tar.gz) = c675b31dafaa4321a453af9d87eddf051ee71b1f
@@ -47,7 +47,7 @@ SHA1 (patch-bi) = d97512603b313ee730687e3b5680d45002ade51c
SHA1 (patch-bj) = 6dba88723ee632b67fcf6a2dd2918e69034837e2
SHA1 (patch-bk) = 7582e915a5bd9778259961e7fa842d5cdce3e85c
SHA1 (patch-bl) = f2cd03713d7cdb6cb41119569031249d7d708b13
-SHA1 (patch-bm) = b493e6d24bc3940da004322651ee24a25eda46e5
+SHA1 (patch-bm) = 2f00f63120a90477c6f5c63ac6ca23fc508b9e54
SHA1 (patch-bn) = 247c04ae1accf3bc6b07b22767eb3cf2cdb55013
SHA1 (patch-bo) = f9b8b73af91a445dbf50f9e862b84c7abc2b730e
SHA1 (patch-bp) = 9091134cf50e17ce58976c3193666e716345a124
diff --git a/editors/emacs20/patches/patch-bm b/editors/emacs20/patches/patch-bm
index ea6a0be585e..f0c6c1c60f0 100644
--- a/editors/emacs20/patches/patch-bm
+++ b/editors/emacs20/patches/patch-bm
@@ -1,4 +1,10 @@
-$NetBSD: patch-bm,v 1.3 2011/12/01 05:07:23 dholland Exp $
+$NetBSD: patch-bm,v 1.4 2011/12/01 05:12:57 dholland Exp $
+
+- use standard headers
+- fix type of __malloc_extra_blocks
+- add an empty asm() destroying memory that prevents gcc from
+ optimizing out __malloc_hook and friends (which leads to
+ SIGSEGV in temacs during build)
--- src/alloc.c.orig 1999-09-16 07:20:15.000000000 +0000
+++ src/alloc.c
@@ -17,7 +23,17 @@ $NetBSD: patch-bm,v 1.3 2011/12/01 05:07:23 dholland Exp $
#endif /* !defined(DOUG_LEA_MALLOC) */
#define max(A,B) ((A) > (B) ? (A) : (B))
-@@ -420,6 +421,9 @@ emacs_blocked_malloc (size)
+@@ -380,6 +381,9 @@ emacs_blocked_free (ptr)
+ {
+ BLOCK_INPUT;
+ __free_hook = old_free_hook;
++#ifdef __GNUC__
++ __asm __volatile("":::"memory");
++#endif
+ free (ptr);
+ /* If we released our reserve (due to running out of memory),
+ and we have a fair amount free once again,
+@@ -420,6 +424,9 @@ emacs_blocked_malloc (size)
BLOCK_INPUT;
__malloc_hook = old_malloc_hook;
@@ -27,3 +43,13 @@ $NetBSD: patch-bm,v 1.3 2011/12/01 05:07:23 dholland Exp $
#ifdef DOUG_LEA_MALLOC
mallopt (M_TOP_PAD, malloc_hysteresis * 4096);
#else
+@@ -441,6 +448,9 @@ emacs_blocked_realloc (ptr, size)
+
+ BLOCK_INPUT;
+ __realloc_hook = old_realloc_hook;
++#ifdef __GNUC__
++ __asm __volatile("":::"memory");
++#endif
+ value = (void *) realloc (ptr, size);
+ __realloc_hook = emacs_blocked_realloc;
+ UNBLOCK_INPUT;