Xref: utzoo comp.emacs:4874 comp.bugs.sys5:709 Path: 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 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 > #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