upgrade to screen 3.9.5; ok'd by turan@

This commit is contained in:
brad 1999-11-30 22:59:18 +00:00
parent 48c5567270
commit f393570b5b
10 changed files with 78 additions and 197 deletions

View File

@ -1,25 +1,20 @@
# $OpenBSD: Makefile,v 1.11 1999/11/12 19:14:40 turan Exp $
# $OpenBSD: Makefile,v 1.12 1999/11/30 22:59:18 brad Exp $
DISTNAME= screen-3.7.6
DISTNAME= screen-3.9.5
CATEGORIES= misc
MASTER_SITES= ftp://ftp.uni-erlangen.de/pub/utilities/screen/ \
${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= screen
MAINTAINER= Hannah Schroeter <uk1o@rz114s0-197.rz.uni-karlsruhe.de>
MAINTAINER= uk1o@rz114s0-197.rz.uni-karlsruhe.de
# The autoconf.in files are too old to use the latest autoconf and
# without the latest autoconf we cant say "GNU_CONFIGURE" because
# configure doesn't know about sysconfdir. So we do it this way
# instead
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX}
GNU_CONFIGURE= yes
pre-configure:
@rm -f ${WRKSRC}/doc/screen.info*
post-install:
@${MKDIR} ${PREFIX}/lib/screen
@if [ ! -f ${PREFIX}/info/dir ]; then \
${SED} -ne '1,/Menu:/p' /usr/share/info/dir > ${PREFIX}/info/dir; \
fi
@mkdir -p ${PREFIX}/lib/screen
@install-info ${PREFIX}/info/screen.info ${PREFIX}/info/dir
${INSTALL_DATA} ${WRKSRC}/etc/etcscreenrc ${PREFIX}/lib/screen/screenrc
${INSTALL_DATA} ${WRKSRC}/terminfo/screencap ${PREFIX}/lib/screen

View File

@ -1,3 +1,3 @@
MD5 (screen-3.7.6.tar.gz) = 9a353b828d79c3c143109265cae663a7
RMD160 (screen-3.7.6.tar.gz) = 6cb8479adb7b1aee0c1e661d6c96c2e9dececffe
SHA1 (screen-3.7.6.tar.gz) = 0f757cd0f67ca299892e40d7341d0203d7e5002b
MD5 (screen-3.9.5.tar.gz) = ac7dd525b0920bc98e4af75b0f73c73e
RMD160 (screen-3.9.5.tar.gz) = e061c787228b962b92d187740f292b183c63e87c
SHA1 (screen-3.9.5.tar.gz) = 47550db71fe9e386b96ef452ec195825f5ebaf79

View File

@ -1,6 +1,6 @@
--- Makefile.in.orig Mon Jun 23 23:05:42 1997
+++ Makefile.in Mon Jul 27 03:06:10 1998
@@ -20,7 +20,6 @@
--- Makefile.in.orig Tue Nov 9 21:23:15 1999
+++ Makefile.in Tue Nov 9 21:24:22 1999
@@ -21,7 +21,6 @@
ETCSCREENRC = `sed < config.h -n -e '/define ETCSCREENRC/s/^.*"\([^"]*\)"/\1/p'`
CC = @CC@
@ -8,21 +8,3 @@
LDFLAGS =
LIBS = @LIBS@
@@ -71,7 +70,7 @@
install_bin: screen
$(INSTALL_PROGRAM) screen $(bindir)/screen-$(VERSION)
- -chown root $(bindir)/screen-$(VERSION) && chmod 4755 $(bindir)/screen-$(VERSION)
+ -/usr/sbin/chown root $(bindir)/screen-$(VERSION) && chmod 4755 $(bindir)/screen-$(VERSION)
# This doesn't work if $(bindir)/screen is a symlink
-if [ -f $(bindir)/screen ] && [ ! -f $(bindir)/screen.old ]; then mv $(bindir)/screen $(bindir)/screen.old; fi
rm -f $(bindir)/screen
@@ -79,7 +78,7 @@
install: installdirs install_bin
cd doc ; $(MAKE) install
- -tic ${srcdir}/terminfo/screeninfo.src
+# -tic ${srcdir}/terminfo/screeninfo.src
# Better do this by hand. E.g. under RCS...
# cat ${srcdir}/terminfo/screencap >> /etc/termcap
@echo "termcap entry (${srcdir}/terminfo/screencap) should be installed manually."

View File

@ -1,32 +1,21 @@
*** doc/Makefile.in.orig Tue Jun 24 01:05:43 1997
--- doc/Makefile.in Mon Sep 15 23:56:34 1997
***************
*** 20,26 ****
$(TEXI2DVI) $(srcdir)/screen.texinfo
info screen.info: screen.texinfo
! $(MAKEINFO) $(srcdir)/screen.texinfo -o screen.info
install: installdirs
$(INSTALL_DATA) $(srcdir)/screen.1 $(mandir)/man1/screen.1
--- 20,27 ----
$(TEXI2DVI) $(srcdir)/screen.texinfo
info screen.info: screen.texinfo
! rm -f ./screen.info*
! $(MAKEINFO) --no-split $(srcdir)/screen.texinfo -o screen.info
install: installdirs
$(INSTALL_DATA) $(srcdir)/screen.1 $(mandir)/man1/screen.1
***************
*** 28,36 ****
-if test -f screen.info; then d=.; else d=$(srcdir); fi; \
if test -f $$d/screen.info; then \
for f in $$d/screen.info*; do $(INSTALL_DATA) $$f $(infodir);done; \
- if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
- install-info --info-dir=$(infodir) $$d/screen.info; \
- else true; fi; \
fi
uninstall:
--- 29,34 ----
--- doc/Makefile.in.orig Tue Nov 9 21:25:24 1999
+++ doc/Makefile.in Tue Nov 9 21:26:28 1999
@@ -9,7 +9,7 @@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
-MAKEINFO = makeinfo
+MAKEINFO = makeinfo --no-split
TEXI2DVI = texi2dvi
SHELL = /bin/sh
@@ -28,9 +28,6 @@
-if test -f screen.info; then d=.; else d=$(srcdir); fi; \
if test -f $$d/screen.info; then \
for f in $$d/screen.info*; do $(INSTALL_DATA) $$f $(infodir);done; \
- if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
- install-info --info-dir=$(infodir) $$d/screen.info; \
- else true; fi; \
fi
uninstall:

View File

@ -1,7 +1,7 @@
--- doc/screen.texinfo.orig Tue Nov 21 03:03:15 1995
+++ doc/screen.texinfo Mon Jun 16 15:16:36 1997
@@ -2,6 +2,9 @@
@c %**start of header
--- doc/screen.texinfo.orig Tue Nov 9 21:27:11 1999
+++ doc/screen.texinfo Tue Nov 9 21:28:07 1999
@@ -3,6 +3,9 @@
@c vi:set wm=5
@setfilename screen.info
@settitle Screen User's Manual
+@direntry

View File

@ -1,16 +1,14 @@
*** process.c.orig Sat Sep 27 17:55:26 1997
--- process.c Sat Sep 27 17:57:12 1997
***************
*** 3031,3036 ****
--- 3031,3041 ----
{
struct win **pp, *p;
+ #if defined(__OpenBSD__)
+ /* First try killing off the window's process group... */
+ killpg(wi->w_pid, SIGKILL);
+ #endif
+
display = wi->w_display;
if (display)
{
--- process.c.orig Tue Nov 9 21:30:23 1999
+++ process.c Tue Nov 9 21:50:11 1999
@@ -3615,6 +3615,11 @@
struct canvas *cv;
int gotone;
+#if defined(__OpenBSD__)
+ /* First try killing off the window's process group... */
+ killpg(wi->w_pid, SIGKILL);
+#endif
+
/*
* Remove window from linked list.
*/

View File

@ -1,33 +1,11 @@
--- configure.orig Fri Feb 19 17:04:35 1999
+++ configure Fri Feb 19 17:10:11 1999
@@ -2706,8 +2706,10 @@
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
--- configure.orig Tue Nov 9 21:52:13 1999
+++ configure Tue Nov 9 21:59:36 1999
@@ -3524,7 +3524,7 @@
+#include <machine/ansi.h>
+#include <machine/stdarg.h>
int main() { return 0; }
-int t() { vsprintf(0,0,0);; return 0; }
+int t() { va_list valist; vsprintf(0,0,valist);; return 0; }
if test -n "$prefix"; then
cat >> confdefs.h <<EOF
-#define ETCSCREENRC "$prefix/etc/screenrc"
+#define ETCSCREENRC "$sysconfdir/screenrc"
EOF
if eval $ac_compile; then
rm -rf conftest*
@@ -3114,12 +3116,12 @@
{
test -n "$verbose" && \
-echo " defining" ETCSCREENRC to be "\"$prefix/etc/screenrc\""
-echo "#define" ETCSCREENRC "\"$prefix/etc/screenrc\"" >> confdefs.h
-DEFS="$DEFS -DETCSCREENRC=\"$prefix/etc/screenrc\""
-ac_sed_defs="${ac_sed_defs}\${ac_dA}ETCSCREENRC\${ac_dB}ETCSCREENRC\${ac_dC}\"$prefix/etc/screenrc\"\${ac_dD}
-\${ac_uA}ETCSCREENRC\${ac_uB}ETCSCREENRC\${ac_uC}\"$prefix/etc/screenrc\"\${ac_uD}
-\${ac_eA}ETCSCREENRC\${ac_eB}ETCSCREENRC\${ac_eC}\"$prefix/etc/screenrc\"\${ac_eD}
+echo " defining" ETCSCREENRC to be "\"/etc/screenrc\""
+echo "#define" ETCSCREENRC "\"/etc/screenrc\"" >> confdefs.h
+DEFS="$DEFS -DETCSCREENRC=\"/etc/screenrc\""
+ac_sed_defs="${ac_sed_defs}\${ac_dA}ETCSCREENRC\${ac_dB}ETCSCREENRC\${ac_dC}\"/etc/screenrc\"\${ac_dD}
+\${ac_uA}ETCSCREENRC\${ac_uB}ETCSCREENRC\${ac_uC}\"/etc/screenrc\"\${ac_uD}
+\${ac_eA}ETCSCREENRC\${ac_eB}ETCSCREENRC\${ac_eC}\"/etc/screenrc\"\${ac_eD}
"
}
fi

View File

@ -1,32 +0,0 @@
--- window.c.orig Mon Aug 9 23:55:06 1999
+++ window.c Tue Aug 10 00:00:54 1999
@@ -447,15 +447,25 @@
return f;
#ifdef PTYGROUP
- (void) chown(*namep, real_uid, PTYGROUP);
+ if (chown(*namep, real_uid, PTYGROUP) && !eff_uid)
#else
- (void) chown(*namep, real_uid, real_gid);
+ if (chown(*namep, real_uid, real_gid) && !eff_uid)
#endif
+ {
+ Msg(errno, "chown tty");
+ close(f);
+ return -1;
+ }
#ifdef UTMPOK
- (void) chmod(*namep, lflag ? TtyMode : (TtyMode & ~022));
+ if (chmod(*namep, lflag ? TtyMode : (TtyMode & ~022)) && !eff_uid)
#else
- (void) chmod(*namep, TtyMode);
+ if (chmod(*namep, TtyMode) && !eff_uid)
#endif
+ {
+ Msg(errno, "chmod tty");
+ close(f);
+ return -1;
+ }
return f;
}

View File

@ -1,10 +1,10 @@
--- pty.c.orig Wed Nov 18 21:19:14 1998
+++ pty.c Sat Aug 21 13:12:06 1999
@@ -32,6 +32,24 @@
--- pty.c.orig Fri Aug 27 06:00:12 1999
+++ pty.c Tue Nov 9 22:49:52 1999
@@ -32,6 +32,23 @@
#include "config.h"
#include "screen.h"
+#if DIRENT
+#if HAVE_DIRENT_H
+# include <dirent.h>
+# define NAMLEN(dirent) strlen((dirent)->d_name)
+#else
@ -20,12 +20,11 @@
+# include <ndir.h>
+# endif
+#endif
+
+
#ifndef sun
#include <sys/ioctl.h>
# include <sys/ioctl.h>
#endif
@@ -292,26 +310,26 @@
@@ -315,25 +332,25 @@
OpenPTY(ttyn)
char **ttyn;
{
@ -34,8 +33,6 @@
+ DIR *devdir;
+ struct dirent *candidate;
+ int f;
+
+ debug("OpenPTY: Using BSD style ptys, dynamic range.\n");
- debug("OpenPTY: Using BSD style ptys.\n");
- strcpy(PtyName, PtyProto);
@ -45,55 +42,30 @@
- for (q = TtyName; *q != 'X'; q++)
- ;
- for (l = PTYRANGE0; (*p = *l) != '\0'; l++)
+ debug("OpenPTY: Using BSD style ptys, dynamic range.\n");
+
+ devdir = opendir("/dev");
+ if (!devdir)
+ return -1;
+ while (candidate = readdir(devdir))
{
- for (d = PTYRANGE1; (p[1] = *d) != '\0'; d++)
- {
- debug1("OpenPTY tries '%s'\n", PtyName);
- if ((f = open(PtyName, O_RDWR | O_NOCTTY)) == -1)
+ if (NAMLEN(candidate) == 5 && strncmp(candidate->d_name, "pty", 3) == 0)
+ {
+ sprintf(PtyName, "/dev/%s", candidate->d_name);
+ debug1("OpenPTY tries '%s'\n", PtyName);
+ if ((f = open(PtyName, O_RDWR | O_NOCTTY)) == -1)
{
+ sprintf(PtyName, "/dev/%s", candidate->d_name);
debug1("OpenPTY tries '%s'\n", PtyName);
if ((f = open(PtyName, O_RDWR | O_NOCTTY)) == -1)
continue;
- q[0] = *l;
- q[1] = *d;
- if (eff_uid && access(TtyName, R_OK | W_OK))
+ strcpy(TtyName, PtyName);
+ strcpy(TtyName, PtyName);
+ TtyName[5] = 't';
+ if (eff_uid && access(TtyName, R_OK | W_OK))
if (eff_uid && access(TtyName, R_OK | W_OK))
{
close(f);
continue;
@@ -320,22 +338,24 @@
/* Hack to ensure that the slave side of the pty is
* unused. May not work in anything other than SunOS4.1
*/
- {
- int pgrp;
+ {
+ int pgrp;
- /* tcgetpgrp does not work (uses TIOCGETPGRP)! */
- if (ioctl(f, TIOCGPGRP, (char *)&pgrp) != -1 || errno != EIO)
- {
- close(f);
- continue;
- }
- }
+ /* tcgetpgrp does not work (uses TIOCGETPGRP)! */
+ if (ioctl(f, TIOCGPGRP, (char *)&pgrp) != -1 || errno != EIO)
+ {
+ close(f);
+ continue;
+ }
+ }
@@ -356,9 +373,11 @@
#endif
initpty(f);
initmaster(f);
*ttyn = TtyName;
+ closedir(devdir);
return f;

View File

@ -1,10 +1,9 @@
bin/screen-3.7.6
bin/screen-3.9.5
@exec ln -sf %f %B/screen
@unexec rm -f %B/screen
man/man1/screen.1
@unexec install-info --delete %D/info/screen.info %D/info/dir
info/screen.info
@exec [ -f %D/info/dir ] || sed -ne '1,/Menu:/p' /usr/share/info/dir > %D/info/dir
@exec install-info %D/info/screen.info %D/info/dir
lib/screen/screencap
lib/screen/screenrc