pkgsrc/x11/xview-lib/patches/patch-cl
tron 71146f333e Cleanup patch files:
- unified format
- only one patch per file
- no files gets patched twice
2001-12-20 09:19:53 +00:00

46 lines
1.4 KiB
Text

$NetBSD: patch-cl,v 1.1 2001/12/20 09:20:03 tron Exp $
--- lib/libxview/ttysw/tty_ntfy.c.orig Tue Jun 29 07:17:17 1993
+++ lib/libxview/ttysw/tty_ntfy.c Thu Dec 20 10:09:17 2001
@@ -171,10 +171,14 @@
* SIGWINCHes on resize.
*/
/* Notify process group that terminal has changed. */
+#if !(defined(BSD) && (BSD >= 199103))
if (ioctl(ttysw->ttysw_tty, TIOCGPGRP, &pgrp) == -1) {
perror(XV_MSG("ttysw_sigwinch, can't get tty process group"));
return;
}
+#else
+ pgrp = tcgetpgrp(ttysw->ttysw_pty);
+#endif
/*
* Only killpg when pgrp is not tool's. This is the case of haven't
* completed ttysw_fork yet (or even tried to do it yet).
@@ -204,7 +208,11 @@
return;
}
/* Send the signal to the process group of the controlling tty */
+#if !(defined(BSD) && (BSD >= 199103))
if (ioctl(ttysw->ttysw_tty, TIOCGPGRP, &control_pg) >= 0) {
+#else
+ if ((control_pg = tcgetpgrp(ttysw->ttysw_pty)) >= 0) {
+#endif
/*
* Flush our buffers of completed and partial commands. Be sure to do
* this BEFORE killpg, or we'll flush the prompt coming back from the
@@ -227,11 +235,11 @@
termsw->cmd_started = 0;
termsw->pty_owes_newline = 0;
}
-# if defined(XV_USE_SVR4_PTYS) || defined(sun)
+#if defined(XV_USE_SVR4_PTYS) || defined(sun)
(void) ioctl(ttysw->ttysw_pty, TIOCSIGNAL, &sig);;
-# else
+#else
(void) killpg(control_pg, sig);
-# endif
+#endif
} else
perror(XV_MSG("ioctl"));
}