Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!uflorida!bikini!mjm From: mjm@reef.cis.ufl.edu (Michael Murphy) Newsgroups: comp.emacs Subject: Re: GNU emacs on a Sparcstation Message-ID: Date: 24 Aug 90 04:03:53 GMT References: <125@tdatirv.UUCP> <1990Aug22.205644.3744@slhisc.uucp> Sender: news@uflorida.cis.ufl.EDU Organization: The Bookhouse Boys Lines: 42 In-reply-to: rlewis@slhisc.uucp's message of 22 Aug 90 20:56:44 GMT In article <1990Aug22.205644.3744@slhisc.uucp> rlewis@slhisc.uucp (Richard Lewis) writes: > In the src/m-sparc.h file insert this line: > #define SYSTEM_MALLOC 1 > > Recompiling emacs will cause it to use Sun's malloc rather than GNU's > malloc. Everything should work fine once this is done. Actually, there's another way, if you want to use Gnu's malloc instead of Sun's. I found the workaround here or on gnu.emacs; since it's pretty short, here it is again: >From: eirik@ELF.TN.CORNELL.EDU >Subject: SunOS 4.1, malloc, and localtime >Date: 8 May 90 11:21:46 GMT >With the enclosed patch, it is possible to build a working emacs under >SunOS 4.1 using malloc.c from the emacs sources. Just put this line >into config.h: #define SUNOS_LOCALTIME_BUG >A static function called by tzsetwall clears the byte just past an >eight byte region it mallocs. Without this patch, that unsociable act >corrupts GNU malloc's memory pool. *** 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;