🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99806

SunOS 4.1, malloc, and localtime

#99806
From: eirik
Date: Tue, 08 May 1990 11:21
28 lines
1588 bytes
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;
  
Technical Details
Message-ID: <9005081121.AA01868@elf.TN.Cornell.EDU>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!bu.edu!snorkelwacker!tut.cis.ohio-state.edu!ELF.TN.CORNELL.EDU!eirik

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,748570474b18c5f7,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-05-08 04:21:46 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!bu.edu!snorkelwacker!tut.cis.ohio-state.edu!ELF.TN.CORNELL.EDU!eirik
From: eirik@ELF.TN.CORNELL.EDU
Newsgroups: gnu.emacs.bug
Subject: SunOS 4.1, malloc, and localtime
Message-ID: <9005081121.AA01868@elf.TN.Cornell.EDU>
Date: 8 May 90 11:21:46 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 28
Posted: Tue May  8 12:21:46 1990