pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/editors/emacs22



Module Name:    pkgsrc
Committed By:   dholland
Date:           Sat Dec 31 06:11:21 UTC 2016

Modified Files:
        pkgsrc/editors/emacs22: distinfo
Added Files:
        pkgsrc/editors/emacs22/patches: patch-src_gmalloc.c patch-src_unexelf.c

Log Message:
Merge my recent fixes to emacs20 and emacs21:
   - set ELFSIZE correctly (I still have no idea how this ever worked)
   - insert workaround for gcc5's calloc bug

For some reason I thought emacs22 wasn't affected by these issues, or
I would have done this earlier.

This does not make the package build on -current, but it gets a lot
farther now - it segvs building the quail elisp. I have a feeling
we've seen this problem before also, but if so it was some years back
and I can't remember what it was about.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 pkgsrc/editors/emacs22/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/editors/emacs22/patches/patch-src_gmalloc.c \
    pkgsrc/editors/emacs22/patches/patch-src_unexelf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/editors/emacs22/distinfo
diff -u pkgsrc/editors/emacs22/distinfo:1.16 pkgsrc/editors/emacs22/distinfo:1.17
--- pkgsrc/editors/emacs22/distinfo:1.16        Tue Nov  3 03:32:15 2015
+++ pkgsrc/editors/emacs22/distinfo     Sat Dec 31 06:11:21 2016
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.16 2015/11/03 03:32:15 agc Exp $
+$NetBSD: distinfo,v 1.17 2016/12/31 06:11:21 dholland Exp $
 
 SHA1 (emacs-22.3.tar.gz) = 5e9b3e0205099a83be7198fd43ba1c9442a3feb0
 RMD160 (emacs-22.3.tar.gz) = a7eed5099d0cab25f34152f1b18b5c1b4e2e0746
@@ -27,4 +27,6 @@ SHA1 (patch-ax) = 4a9a795fd08eedcd83c1c9
 SHA1 (patch-ba) = 066f6e0f1f69e1e477820589d9b9de4a4a168148
 SHA1 (patch-src_Makefile.in) = 656a199e1f2b2fcc7954935c1f9db1861c12bde0
 SHA1 (patch-src_alloc_c) = 72055017f43d1526a90fdb3a02b6c317f488399d
+SHA1 (patch-src_gmalloc.c) = 3d10e1ae9f9d98495a8da47e6051a51ac18aed10
+SHA1 (patch-src_unexelf.c) = 7cff2fa2427821447a375f2f99578466d028322c
 SHA1 (patch-xx) = fe52a07d10e8347a721e20611b527c0d626cde3e

Added files:

Index: pkgsrc/editors/emacs22/patches/patch-src_gmalloc.c
diff -u /dev/null pkgsrc/editors/emacs22/patches/patch-src_gmalloc.c:1.1
--- /dev/null   Sat Dec 31 06:11:21 2016
+++ pkgsrc/editors/emacs22/patches/patch-src_gmalloc.c  Sat Dec 31 06:11:21 2016
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_gmalloc.c,v 1.1 2016/12/31 06:11:21 dholland Exp $
+
+Work around bug in gcc 5.x that makes calloc into a call to itself,
+resulting in an infinite loop.
+
+--- src/gmalloc.c.orig 2001-11-04 17:35:43.000000000 +0000
++++ src/gmalloc.c
+@@ -1520,7 +1520,13 @@ calloc (nmemb, size)
+      register __malloc_size_t nmemb;
+      register __malloc_size_t size;
+ {
+-  register __ptr_t result = malloc (nmemb * size);
++  register __ptr_t result;
++
++  result = malloc (nmemb * size);
++#ifdef __GNUC__
++/* Work around a gcc bug that converts calloc into a call to itself. */
++  __asm volatile("" : "+r" (result));
++#endif
+ 
+   if (result != NULL)
+     (void) memset (result, 0, nmemb * size);
Index: pkgsrc/editors/emacs22/patches/patch-src_unexelf.c
diff -u /dev/null pkgsrc/editors/emacs22/patches/patch-src_unexelf.c:1.1
--- /dev/null   Sat Dec 31 06:11:21 2016
+++ pkgsrc/editors/emacs22/patches/patch-src_unexelf.c  Sat Dec 31 06:11:21 2016
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_unexelf.c,v 1.1 2016/12/31 06:11:21 dholland Exp $
+
+- Set ELFSIZE correctly (from exec_elf.h)
+
+--- src/unexelf.c~     2008-01-08 04:29:48.000000000 +0000
++++ src/unexelf.c
+@@ -489,12 +489,14 @@ typedef struct {
+ /*
+  * NetBSD does not have normal-looking user-land ELF support.
+  */
++# include <sys/exec_elf.h>
+ # if defined __alpha__ || defined __sparc_v9__
++# ifndef ELFSIZE
+ #  define ELFSIZE     64
+ # else
+ #  define ELFSIZE     32
+ # endif
+-# include <sys/exec_elf.h>
++# endif
+ 
+ # ifndef PT_LOAD
+ #  define PT_LOAD     Elf_pt_load



Home | Main Index | Thread Index | Old Index