[comp.sys.sun] GNU Emacs and SunOS 4.1

mikej@marob.masa.com (Michael Johnston) (08/14/90)

I have heard rumors to the effect that Emacs under 4.1 is broken. I
believe I may have seen the patches floating around awhile back but with
my head in a cloud I passed them up. Can someone Email them to me? Thanks
very much.

Michael R. Johnston                          / mikej@marob.masa.com
System Administrator         Temporary Email: 
Lilink Public Xenix                          \ mikej@marob

fbresz@uunet.uu.net (08/15/90)

	OK 1 more time.

	This is GNU-Emacs.

	This is SunOS4.1

	This is GNU-Emacs on SunOS4.1

	In config.h add :
	#define SYSTEM_MALLOC

	Any Questions.


P.S.  1 other solution.

X-From: eirik@ELF.TN.CORNELL.EDU
X-Subject: SunOS 4.1, malloc, and localtime
X-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;
--
+--------------------+
|fbresz@ittc.wec.com |  My opinions are my own, I'm not paid
|uunet!ittc!fbresz   |  enough to make an official statement  
|(412)733-6749       |  +-----------------------------------+
|Fax: (412)733-6444  |  |      THIS SPACE FOR SALE!!!       |
+--------------------+  +-----------------------------------+