GNU Emacs and SunOS 4.1

ittc!fbresz at uunet.uu.net ittc!fbresz at uunet.uu.net
Thu Aug 16 01:08:41 AEST 1990


	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 at 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 at 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!!!       |
+--------------------+  +-----------------------------------+



More information about the Comp.sys.sun mailing list