🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99338

Re: Shell mode in SunOS 4.1

#99338
From: Vick Khera
Date: Fri, 28 Sep 1990 13:04
100 lines
4602 bytes
ok.  many people have been  having problems with emacs under SunOS
4.1, and we have not seen the FAQ list for a while (which has all the
answers).  So, here is my set of patches that i have collected that
make GNU Emacs work just fine under SunOS 4.1, even under X when
started via rsh (no controlling terminal.)

								v.

------------------------------------------------------------------------
Fixes to GNU Emacs 18.55 for SunOS 4.1

apply these patches to ..../emacs-18.55/src using the patch program:

  patch < emacs.patches

where emacs.patches is this file.  the patch to alloc.c is needed for
getting gcc -traditional to compile emacs properly (at least on a sparc.)
the fix to malloc.c is to get around a SunOS 4.1 bogon where the localtime
function scribbles beyond the amount of memory it requests. be sure to
#define SUNOS_LOCALTIME_BUG in the config.h file.  the patch to process.c is
needed for spawning sub-processes from emacs.  in particular, shells started
within emacs will suspend themselves if this patch is not applied. these
patches have only been tested on a SPARCStation 1.

i have collected these patches from USENET (mostly gnu.emacs.bugs). if you
have any problems, read that newsgroup.  if you don't have access to it,
then (and only then) send me e-mail and i'll see what i can do for you.

these are the original sources for the fixes as best i can determine:
 process and localtime patch: Eirik Fuller (eirik@elf.tn.cornell.edu)
 gcc patch (alloc.c): Michael Meissner (meissner@osf.org)

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vick Khera           (919) 660-6528     Department of Computer Science
ARPA:   khera@cs.duke.edu               Duke University
UUCP:   ..!{mcnc,decvax}!duke!khera     Durham, NC 27706


*** /tmp/,RCSt1a12626	Fri Jul  6 11:29:07 1990
--- alloc.c	Fri Jun 22 22:59:28 1990
***************
*** 663,674 ****
  struct gcpro *gcprolist;
  
  #define NSTATICS 200
  
- char staticvec1[NSTATICS * sizeof (Lisp_Object *)] = {0};
- 
  int staticidx = 0;
- 
- #define staticvec ((Lisp_Object **) staticvec1)
  
  /* Put an entry in staticvec, pointing at the variable whose address is given */
  
--- 663,671 ----
  struct gcpro *gcprolist;
  
  #define NSTATICS 200
+ Lisp_Object *staticvec[NSTATICS] = {0};
  
  int staticidx = 0;
  
  /* Put an entry in staticvec, pointing at the variable whose address is given */
  
*** /tmp/,RCSt1a12629	Fri Jul  6 11:29:08 1990
--- malloc.c	Sat Jun 16 14:04:58 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;
  
*** /tmp/,RCSt1a12635	Fri Jul  6 11:29:10 1990
--- process.c	Sat Jun 16 14:04:55 1990
***************
*** 1031,1036 ****
--- 1031,1039 ----
  	    int j = open ("/dev/tty", O_RDWR, 0);
  	    ioctl (j, TIOCNOTTY, 0);
  	    close (j);
+ #ifndef USG
+ 	    setpgrp (0, 0);
+ #endif
  	  }
  #endif /* TIOCNOTTY */
  
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vick Khera     Gradual Student          Department of Computer Science
ARPA:   khera@cs.duke.edu               Duke University
UUCP:   ...!mcnc!duke!khera             Durham, NC 27706       (919) 660-6528
Technical Details
Message-ID: <KHERA.90Sep28090457@thneed.cs.duke.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!mercury.cair.du.edu!pikes!uakari.primate.wisc.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!ncar!boulder!rutgers!mcnc!duke!khera
References: <19900827172514.1.BARMAR@OCCAM.THINK.COM> <394@clbull.cl.bull.fr>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,8689e0acc7df90f6
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-09-29 02:02:44 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!mercury.cair.du.edu!pikes!uakari.primate.wisc.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!ncar!boulder!rutgers!mcnc!duke!khera
From: khera@thneed.cs.duke.edu (Vick Khera)
Newsgroups: gnu.emacs.bug
Subject: Re: Shell mode in SunOS 4.1
Message-ID: <KHERA.90Sep28090457@thneed.cs.duke.edu>
Date: 28 Sep 90 13:04:57 GMT
References: <19900827172514.1.BARMAR@OCCAM.THINK.COM> <394@clbull.cl.bull.fr>
Sender: news@duke.cs.duke.edu
Distribution: gnu
Organization: Duke University CS Dept., Durham, NC
Lines: 100
Posted: Fri Sep 28 14:04:57 1990
Nntp-Posting-Host: thneed.cs.duke.edu
In-reply-to: frasq@cl.bull.fr's message of 18 Sep 90 12:27:20 GMT