🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.emacs
Article #8064

Bug in Gnu Emacs 18.52 on 3b2

#8064
From: David Preisler
Date: Thu, 15 Dec 1988 02:35
74 lines
3013 bytes
While trying to install GnuEmacs 18.52 on a 3b2 700 running Unix V 3.2.1
with "s-usg5-3.h" and "m-att3b.h" defined in config.h encountered a series 
of syntax errors in src/sysdep.c: i.e. ws_row and ws_col undefined.

Solution: In file src/sysdep.c in the #ifdef HAVE_TERMIO definition you 
*must* #undef TIOCGWINSZ.

Fix goes in this segment:

          >   #ifdef HAVE_TERMIO
          >   #include <sys/termio.h>
          >   #undef TIOCGETP
          >   #define TIOCGETP TCGETA
          >   #undef TIOCSETN
          >   #define TIOCSETN TCSETA
          >   #undef TIOCSETP
          >   #define TIOCSETP TCSETAF
          >   #define TERMINAL struct termio
          >   #define OSPEED(str) (str.c_cflag & CBAUD)
          >   #define OSPEED(str) (str.c_cflag & CBAUD)
          >   #define SETOSPEED(str,new) (str.c_cflag = (str.c_cfl > [more]
          >   #define TABS_OK(str) ((str.c_oflag & TABDLY) != TAB3)
Fix here: >   #undef TIOCGWINSZ
          >   #endif /* HAVE_TERMIO */


Without the fix TIOCGSZ is defined, but not the way we think it is 
so the below defs are never made when they should be

          >                          
          >   /* Define the 4.3 names in terms of the Sun names
          >      if the latter exist and the former do not.  */
          >   
          >   #ifdef TIOCGSIZE
          >   #ifndef TIOCGWINSZ
          >   #define TIOCGWINSZ TIOCGSIZE
          >   #define winsize ttysize
          >   #define ws_row ts_lines
          >   #define ws_col ts_cols
          >   #endif
          >   #endif /* Sun */
          >       
          
As a result of the 'confusion' about TIOCGWINSZ when we try to 
use ws_row/col ( and others ) we get sytax errors in the code 
segment below.
          
          >
          >   /* Do it using the 4.3 names if possible.  */
          >      #ifdef TIOCGWINSZ
          >     struct winsize size;
          >     *heightp = 0;
          >     if (ioctl (0, TIOCGWINSZ, &size) < 0)
          >       return;
          >     if ((unsigned) size.ws_col > MScreenWidth
          >         || (unsigned) size.ws_row > MScreenLength)
          >       return;
          >     *widthp = size.ws_col;
          >     *heightp = size.ws_row;
          >   #else /* not TIOCGWNSIZ */
          >   #ifdef VMS
          >     .....



Thanks to all those who responded!!!

David William Preisler                                
  System Administrator     

AT&T Bell Laboratories     Email: att!mtune!dwp.ATT.COM
     200 Laurel Avenue
Middletown,  NJ  07748     Phone: (201) 957-2594
Technical Details
Message-ID: <7885@mtune.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!mailrus!ukma!rutgers!att!mtune!dwp

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!mailrus!ukma!rutgers!att!mtune!dwp
From: dwp@mtune.ATT.COM (David Preisler)
Newsgroups: comp.emacs,comp.bugs.sys5
Subject: Bug in Gnu Emacs 18.52 on 3b2
Keywords: Bug Gnu Emacs 3b2 700
Message-ID: <7885@mtune.ATT.COM>
Date: 15 Dec 88 02:35:05 GMT
Organization: AT&T ISL Middletown NJ USA
Lines: 73