*BSD News Article 11824


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA2239 ; Mon, 01 Mar 93 10:50:36 EST
Path: sserve!manuel.anu.edu.au!munnari.oz.au!mel.dit.csiro.au!merlin!bruce.cs.monash.edu.au!monu6!escargot!minyos.xx.rmit.OZ.AU!s902113
From: s902113@minyos.xx.rmit.OZ.AU (Luke Mewburn)
Newsgroups: comp.os.386bsd.bugs
Subject: Correct fix for screen3.2b & 386BSD
Date: 26 Feb 1993 16:52:56 GMT
Organization: RMIT Computer Centre
Lines: 203
Message-ID: <1mlht8INNt70@escargot.xx.rmit.OZ.AU>
NNTP-Posting-Host: minyos.xx.rmit.oz.au
Summary: fix of a fix for screen3.2b
Keywords: screen, bugfix, 386bsd


[
NOTE:
  Original bugfix was from Otto van der Linden <vdlinden@fwi.uva.nl>,
  posted 17 Jan 1993. I (Luke Mewburn <zak@rmit.edu.au>) have fixed
  one minor part of the bugfix - in screen.c it wouldn't setsid()
  unless BSDI was defined, and without that call, fgtty() couldn't
  set the pgrp and tcsh couldn't get proper access to the tty, so
  job control wouldn't work. Added check for __386BSD__ there.
     - Luke
(original note from Otto follows: )
]

 Hi,

 Here are some diffs to make screen 3.2b work for 386BSD:
1. #ifdef BSDI --> #if defined(BSDI) || defined(__386BSD__)
2. bcopy() check in configure had a small bug.
3. add check for /usr/lib/libutil in configure. This library
   has getloadavg().
4. add /usr/share/misc/termcap to the files checked for termcap
   in configure

Onno van der Linden          c/o           vdlinden@fwi.uva.nl

*** ansi.c.old	Sun Jan 17 12:09:06 1993
--- ansi.c	Sun Jan 17 13:45:57 1993
***************
*** 31,37 ****
  #include <stdio.h>
  #include <sys/types.h>
! #ifdef BSDI
  #include <sys/signal.h>
! #endif /* BSDI */
  #include <fcntl.h>
  #include "config.h"
--- 31,37 ----
  #include <stdio.h>
  #include <sys/types.h>
! #if defined(BSDI) || defined(__386BSD__)
  #include <sys/signal.h>
! #endif /* BSDI || __386BSD__ */
  #include <fcntl.h>
  #include "config.h"
*** configure.old	Wed Oct 28 17:12:32 1992
--- configure	Sun Jan 17 14:35:50 1993
***************
*** 318,322 ****
  
  echo checking for termcap or terminfo
! if test ! -f /etc/termcap && test ! -f /usr/share/lib/termcap; then
    DEFS="${DEFS}#define TERMINFO 1
  " LIBS="$LIBS -lcurses"
--- 318,323 ----
  
  echo checking for termcap or terminfo
! if test ! -f /etc/termcap && test ! -f /usr/share/lib/termcap && \
!    test ! -f /usr/share/misc/termcap; then
    DEFS="${DEFS}#define TERMINFO 1
  " LIBS="$LIBS -lcurses"
***************
*** 433,436 ****
--- 434,438 ----
  echo checking for libutils
  test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
+ test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
  for func in getloadavg
  do
***************
*** 591,595 ****
    char buf[10];
    strcpy(buf, "abcdefghi");
!   bcopy(buf, buf + 2, 3);
    if (!strncmp(buf, "ababcd", 6))
      exit(0); /* libc version works properly.  */
--- 593,597 ----
    char buf[10];
    strcpy(buf, "abcdefghi");
!   bcopy(buf, buf + 2, 4);
    if (!strncmp(buf, "ababcd", 6))
      exit(0); /* libc version works properly.  */
*** fileio.c.old	Sun Jan 17 12:14:10 1993
--- fileio.c	Sun Jan 17 13:56:54 1993
***************
*** 46,52 ****
  #include <fcntl.h>
  
! #ifdef BSDI
  # include <sys/signal.h>
! #endif /* BSDI */
  
  #include "config.h"
--- 46,52 ----
  #include <fcntl.h>
  
! #if defined(BSDI) || defined(__386BSD__)
  # include <sys/signal.h>
! #endif /* BSDI || __386BSD__ */
  
  #include "config.h"
***************
*** 143,149 ****
   */
  extern time_t time __P((time_t *));
! #if !defined(BSDI) && !defined(SVR4)
  extern char *getpass __P((char *));
! #endif /* !BSDI && !SVR4 */
  
  char *KeyNames[] = 
--- 143,149 ----
   */
  extern time_t time __P((time_t *));
! #if !defined(BSDI) && !defined(SVR4) && !defined(__386BSD__)
  extern char *getpass __P((char *));
! #endif /* !BSDI && !SVR4 && !__386BSD__ */
  
  char *KeyNames[] = 
*** help.c.old	Sun Jan 17 12:13:04 1993
--- help.c	Sun Jan 17 13:57:12 1993
***************
*** 40,46 ****
  #include <sys/types.h>
  
! #ifdef BSDI
  # include <sys/signal.h>
! #endif /* BSDI */
  
  #include "screen.h"
--- 40,46 ----
  #include <sys/types.h>
  
! #if defined(BSDI) || defined(__386BSD__)
  # include <sys/signal.h>
! #endif /* BSDI || __386BSD__ */
  
  #include "screen.h"
*** mark.c.old	Sun Jan 17 12:14:56 1993
--- mark.c	Sun Jan 17 13:47:10 1993
***************
*** 38,44 ****
  #include <sys/types.h>
  
! #ifdef BSD
  # include <sys/signal.h>
! #endif /* BSDI */
  
  #include "config.h"
--- 38,44 ----
  #include <sys/types.h>
  
! #if defined(BSDI) || defined(__386BSD__)
  # include <sys/signal.h>
! #endif /* BSDI || __386BSD__ */
  
  #include "config.h"
*** screen.h.old	Sun Jan 17 13:44:30 1993
--- screen.h	Sun Jan 17 14:47:41 1993
***************
*** 554,562 ****
  #  define UTMPFILE     UTMP_FILE
  # else
! #  ifdef BSDI
  #   define UTMPFILE    "/var/run/utmp"
  #  else
  #   define UTMPFILE     "/etc/utmp"
! #  endif /* BSDI */
  # endif
  #endif
--- 554,562 ----
  #  define UTMPFILE     UTMP_FILE
  # else
! #  if defined(BSDI) || defined(__386BSD__)
  #   define UTMPFILE    "/var/run/utmp"
  #  else
  #   define UTMPFILE     "/etc/utmp"
! #  endif /* BSDI || __386BSD__ */
  # endif
  #endif
*** screen.c.old	Fri Feb 26 19:26:04 1993
--- screen.c	Fri Feb 26 19:26:50 1993
***************
*** 388,397 ****
  
    mypid = getpid();
  
! # ifdef BSDI
    setsid();
    ioctl(0, TIOCSCTTY, 0);
! # endif /* BSDI */
  
  # ifdef POSIX
    if (tcsetpgrp(0, mypid))
--- 388,397 ----
  
    mypid = getpid();
  
! # if defined(BSDI) || defined(__386BSD__)
    setsid();
    ioctl(0, TIOCSCTTY, 0);
! # endif /* BSDI || __386BSD__ */
  
  # ifdef POSIX
    if (tcsetpgrp(0, mypid))