pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

tcl-expect: Sync patch-exp__chan.c with pkgsrc



Module Name:	pkgsrc-wip
Committed By:	Greg Troxel <gdt%lexort.com@localhost>
Pushed By:	gdt
Date:		Sun Jun 19 18:26:33 2022 -0400
Changeset:	69565e71c9f20fa76fae8031109ca70884a3e5d8

Modified Files:
	tcl-expect/distinfo
	tcl-expect/patches/patch-exp__chan.c

Log Message:
tcl-expect: Sync patch-exp__chan.c with pkgsrc

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=69565e71c9f20fa76fae8031109ca70884a3e5d8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 tcl-expect/distinfo                  |  2 +-
 tcl-expect/patches/patch-exp__chan.c | 18 ++++++++++++------
 2 files changed, 13 insertions(+), 7 deletions(-)

diffs:
diff --git a/tcl-expect/distinfo b/tcl-expect/distinfo
index f5ed86518e..fdd20c7d77 100644
--- a/tcl-expect/distinfo
+++ b/tcl-expect/distinfo
@@ -5,6 +5,6 @@ SHA512 (expect5.45.4.tar.gz) = a8dc25e8175f67e029e15cbcfca1705165c1c4cb2dd37eaaa
 Size (expect5.45.4.tar.gz) = 632363 bytes
 SHA1 (patch-Makefile.in) = da70955bf923e1cd1074a4988a52452400072796
 SHA1 (patch-configure) = 1a26a361931ce5a3b3d9c88ab0ac2c7cd1c07cac
-SHA1 (patch-exp__chan.c) = 3c5a2eb9cd93c9eecd55f998476165769eafc6ee
+SHA1 (patch-exp__chan.c) = 8dbb1b1abea73858cc9eba05d4662976edf664f5
 SHA1 (patch-retoglob.c) = 4406f9e5d7622f393e35e7a1f70a700a98d6e981
 SHA1 (patch-tclconfig_tcl.m4) = 8da471800dcc5f110858dd0af36ad5e924232976
diff --git a/tcl-expect/patches/patch-exp__chan.c b/tcl-expect/patches/patch-exp__chan.c
index 47b5710de0..9c683a64f1 100644
--- a/tcl-expect/patches/patch-exp__chan.c
+++ b/tcl-expect/patches/patch-exp__chan.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-exp__chan.c,v 1.2 2022/06/19 14:43:28 gdt Exp $
+$NetBSD: patch-exp__chan.c,v 1.3 2022/06/19 22:22:22 gdt Exp $
 
 Add hack to work around deadlock situation that occurs on Solaris and
 Linux. See PR 34442.
@@ -11,29 +11,34 @@ cause problems, we can wrap it in ifdefs.
 
 \todo File changes upstream (but upstream is not functioning).
 
---- exp_chan.c.orig	2018-02-02 12:15:52.000000000 -0700
-+++ exp_chan.c	2022-06-17 15:37:14.620875137 -0600
-@@ -7,6 +7,7 @@
+--- exp_chan.c.orig	2018-02-02 19:15:52.000000000 +0000
++++ exp_chan.c
+@@ -7,6 +7,9 @@
   */
  
  #include <sys/types.h>
++#if defined(linux) || defined(sunos)
 +#include <sys/poll.h>
++#endif
  #include <stdio.h>
  #include <signal.h>
  #include <errno.h>
-@@ -205,6 +206,8 @@
+@@ -205,6 +208,10 @@ ExpInputProc(instanceData, buf, toRead, 
      ExpState *esPtr = (ExpState *) instanceData;
      int bytesRead;			/* How many bytes were actually
                                           * read from the input device? */
++#if defined(linux) || defined(sunos)
 +    struct pollfd fds[1];
 +    int pollResult;
++#endif
  
      *errorCodePtr = 0;
      
-@@ -215,6 +218,18 @@
+@@ -215,6 +222,20 @@ ExpInputProc(instanceData, buf, toRead, 
       * nonblocking, the read will never block.
       */
  
++#if defined(linux) || defined(sunos)
 +    /* Update: there isn't always, which can lead to hangs. See PR 34442. */
 +    fds[0].fd = esPtr->fdin;
 +    fds[0].events = POLLIN | POLLERR | POLLHUP | POLLNVAL;
@@ -45,6 +50,7 @@ cause problems, we can wrap it in ifdefs.
 +        *errorCodePtr = EBADF;
 +	return -1;
 +    }
++#endif
 +
      bytesRead = read(esPtr->fdin, buf, (size_t) toRead);
      /*printf("ExpInputProc: read(%d,,) = %d\r\n",esPtr->fdin,bytesRead);*/


Home | Main Index | Thread Index | Old Index