Path: utzoo!attcan!uunet!cs.utexas.edu!rice!sun-spots-request From: martin@verdelait.canada.sun.com (Martin Leclerc SE Sun Montreal) Newsgroups: comp.sys.sun Subject: Re: Building GNU EMACS 18.55 on Sparc Sunos4.1 Keywords: Software Message-ID: <10112@brazos.Rice.edu> Date: 19 Jul 90 18:09:23 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 70 Approved: Sun-Spots@rice.edu X-Refs: Original: v9n254 X-Sun-Spots-Digest: Volume 9, Issue 273, message 3 Originator: spots@titan.rice.edu The problems you described have been documented in gnu.emacs.bug. Here is a summary posting from that group. >From fmbutt@mrbt.sw.stratus.com Mon Jul 2 20:28:40 1990 >Subject: Re: emacs on SUN o/s 4.1 malloc bug > >In article <9006270051.AA01989@design.caltech.edu> you write: >We have found that emacs 18.55 won't run on a SUN Sparc machine, >... >please let me know when/if you figure out a good solution to the >malloc problem (i.e. get the GNU malloc to work). I also had to >#define SYSTEM_MALLOC to get gnuemacs to work.... I am including (below) a response that we previously got to our inquiry. We have implemented this change on both SUN3 and SPARC systems running sun o/s 4.1 (emacs 18.55) with success. We NO LONGER define SYSTEM_MALLOC (and hence use the gnu malloc). I created a new s-sunos4.1.h (that I include instead of s-sunos4.h in ./src/config.h): ----- Beginning of s-sunos4.1.h ----- #include "s-bsd4-2.h" /* Say that the text segment of a.out includes the header; the header actually occupies the first few bytes of the text segment and is counted in hdr.a_text. */ #define O_NDELAY FNDELAY /* Non-blocking I/O (4.2 style) */ #define LD_SWITCH_SYSTEM -e __start -Bstatic /* Include this definition for sun o/s 4.1 E.Antonsson, Caltech, 26-Jun-90 */ /* #define SYSTEM_MALLOC */ #define SUNOS_LOCALTIME_BUG ----- End of s-sunof4.1.h ----- See below: -erik ----- Begin Included Message ----- X-Subject: emacs on SUN o/s 4.1 malloc bug > Is this the correct fix for the problem? The correct fix for the problem is up to Sun; there is a SunOS library function in localtime.o which requests eight bytes from malloc and writes the ninth. The enclosed patch is a workaround which allows you to use GNU malloc instead of SunOS malloc. *** malloc.c~ Fri Apr 7 22:12:10 1989 --- malloc.c Tue May 8 07:07:22 1990 *************** *** 476,482 **** --- 476,487 ---- multiple of 8, then figure out which nestf[] area to use. Both the beginning of the header and the beginning of the block should be on an eight byte boundary. */ + #ifdef SUNOS_LOCALTIME_BUG + /* SunOS 4.1 localtime scribbles on the ninth byte. */ + nbytes = (n + ((sizeof *p + 15) & ~15) + EXTRA + 15) & ~15; + #else nbytes = (n + ((sizeof *p + 7) & ~7) + EXTRA + 7) & ~7; + #endif { register unsigned int shiftr = (nbytes - 1) >> 2; Martin Leclerc Martin.Leclerc@Canada.sun.com System Engineer (514) 744-9240 Sun Microsystems Canada