diff options
author | nobutaka <nobutaka@FreeBSD.org> | 2004-05-24 14:11:16 +0000 |
---|---|---|
committer | nobutaka <nobutaka@FreeBSD.org> | 2004-05-24 14:11:16 +0000 |
commit | a8c74683562bad28b226b4dc1611b960a09f7e56 (patch) | |
tree | 2fa1aed9423525f25a7b9c07913d0cd2954c373a /editors | |
parent | 6393d8399c41a13499f21edc5a9680bc4d562511 (diff) | |
download | FreeBSD-ports-a8c74683562bad28b226b4dc1611b960a09f7e56.zip FreeBSD-ports-a8c74683562bad28b226b4dc1611b960a09f7e56.tar.gz |
Enable interruption with C-g key while opening network connection.
PR: ports/65910
Submitted by: NIIMI Satoshi <sa2c@sa2c.net>
Diffstat (limited to 'editors')
-rw-r--r-- | editors/emacs/Makefile | 2 | ||||
-rw-r--r-- | editors/emacs/files/patch-src:process.c | 45 | ||||
-rw-r--r-- | editors/emacs22/Makefile | 2 | ||||
-rw-r--r-- | editors/emacs22/files/patch-src:process.c | 45 | ||||
-rw-r--r-- | editors/emacs23/Makefile | 2 | ||||
-rw-r--r-- | editors/emacs23/files/patch-src:process.c | 45 |
6 files changed, 42 insertions, 99 deletions
diff --git a/editors/emacs/Makefile b/editors/emacs/Makefile index 74fde68..862df58 100644 --- a/editors/emacs/Makefile +++ b/editors/emacs/Makefile @@ -7,7 +7,7 @@ PORTNAME= emacs PORTVERSION= 21.3 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= editors ipv6 MASTER_SITES= ${MASTER_SITE_GNU} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/editors/emacs/files/patch-src:process.c b/editors/emacs/files/patch-src:process.c index d55970c..884d06d 100644 --- a/editors/emacs/files/patch-src:process.c +++ b/editors/emacs/files/patch-src:process.c @@ -1,32 +1,9 @@ --- src/process.c.orig Mon Mar 17 07:06:56 2003 -+++ src/process.c Tue Aug 12 01:17:12 2003 -@@ -1850,6 +1850,7 @@ - for (lres = res; lres; lres = lres->ai_next) - { - s = socket (lres->ai_family, lres->ai_socktype, lres->ai_protocol); -+ - if (s < 0) - { - xerrno = errno; -@@ -1882,19 +1883,43 @@ - It'd be nice to be able to control the connect timeout - though. Would non-blocking connect calls be portable? */ - turn_on_atimers (0); -+ - ret = connect (s, lres->ai_addr, lres->ai_addrlen); - xerrno = errno; - turn_on_atimers (1); - -- if (ret == 0 || xerrno == EISCONN) -+ if (ret == 0 || xerrno == EISCONN ) - /* The unwind-protect will be discarded afterwards. ++++ src/process.c Fri Apr 23 19:28:58 2004 +@@ -1891,10 +1891,34 @@ Likewise for immediate_quit. */ break; - immediate_quit = 0; - -- if (xerrno == EINTR) -- goto loop; +#if 1 + if ( (errno == EINTR ) || (errno == EINPROGRESS)){ + fd_set fds; @@ -37,6 +14,7 @@ + FD_ZERO(&fds); + FD_SET(s, &fds); + resel: ++ QUIT; + e = select(s+1, NULL, &fds, NULL, &tv); + + if( e == -1){ @@ -52,19 +30,17 @@ + } +#endif + + immediate_quit = 0; + +- if (xerrno == EINTR) +- goto loop; if (xerrno == EADDRINUSE && retry < 20) { /* A delay here is needed on some FreeBSD systems, -@@ -2000,11 +2025,30 @@ - && errno != EISCONN) +@@ -2001,10 +2025,30 @@ { int xerrno = errno; -- -+ - immediate_quit = 0; -- if (errno == EINTR) -- goto loop; +#if 1 + if ( (errno == EINTR ) || (errno == EINPROGRESS)){ + fd_set fds; @@ -75,6 +51,7 @@ + FD_CLEAR(&fds); + FD_SET(s, &fds); + resel: ++ QUIT; + e = select(s+1, NULL, fds, NULL, &tv); + if( e != 0){ + if(errno == EINTR) @@ -86,6 +63,10 @@ + xerrno = 0; + } +#endif + immediate_quit = 0; + +- if (errno == EINTR) +- goto loop; if (errno == EADDRINUSE && retry < 20) { /* A delay here is needed on some FreeBSD systems, diff --git a/editors/emacs22/Makefile b/editors/emacs22/Makefile index 74fde68..862df58 100644 --- a/editors/emacs22/Makefile +++ b/editors/emacs22/Makefile @@ -7,7 +7,7 @@ PORTNAME= emacs PORTVERSION= 21.3 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= editors ipv6 MASTER_SITES= ${MASTER_SITE_GNU} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/editors/emacs22/files/patch-src:process.c b/editors/emacs22/files/patch-src:process.c index d55970c..884d06d 100644 --- a/editors/emacs22/files/patch-src:process.c +++ b/editors/emacs22/files/patch-src:process.c @@ -1,32 +1,9 @@ --- src/process.c.orig Mon Mar 17 07:06:56 2003 -+++ src/process.c Tue Aug 12 01:17:12 2003 -@@ -1850,6 +1850,7 @@ - for (lres = res; lres; lres = lres->ai_next) - { - s = socket (lres->ai_family, lres->ai_socktype, lres->ai_protocol); -+ - if (s < 0) - { - xerrno = errno; -@@ -1882,19 +1883,43 @@ - It'd be nice to be able to control the connect timeout - though. Would non-blocking connect calls be portable? */ - turn_on_atimers (0); -+ - ret = connect (s, lres->ai_addr, lres->ai_addrlen); - xerrno = errno; - turn_on_atimers (1); - -- if (ret == 0 || xerrno == EISCONN) -+ if (ret == 0 || xerrno == EISCONN ) - /* The unwind-protect will be discarded afterwards. ++++ src/process.c Fri Apr 23 19:28:58 2004 +@@ -1891,10 +1891,34 @@ Likewise for immediate_quit. */ break; - immediate_quit = 0; - -- if (xerrno == EINTR) -- goto loop; +#if 1 + if ( (errno == EINTR ) || (errno == EINPROGRESS)){ + fd_set fds; @@ -37,6 +14,7 @@ + FD_ZERO(&fds); + FD_SET(s, &fds); + resel: ++ QUIT; + e = select(s+1, NULL, &fds, NULL, &tv); + + if( e == -1){ @@ -52,19 +30,17 @@ + } +#endif + + immediate_quit = 0; + +- if (xerrno == EINTR) +- goto loop; if (xerrno == EADDRINUSE && retry < 20) { /* A delay here is needed on some FreeBSD systems, -@@ -2000,11 +2025,30 @@ - && errno != EISCONN) +@@ -2001,10 +2025,30 @@ { int xerrno = errno; -- -+ - immediate_quit = 0; -- if (errno == EINTR) -- goto loop; +#if 1 + if ( (errno == EINTR ) || (errno == EINPROGRESS)){ + fd_set fds; @@ -75,6 +51,7 @@ + FD_CLEAR(&fds); + FD_SET(s, &fds); + resel: ++ QUIT; + e = select(s+1, NULL, fds, NULL, &tv); + if( e != 0){ + if(errno == EINTR) @@ -86,6 +63,10 @@ + xerrno = 0; + } +#endif + immediate_quit = 0; + +- if (errno == EINTR) +- goto loop; if (errno == EADDRINUSE && retry < 20) { /* A delay here is needed on some FreeBSD systems, diff --git a/editors/emacs23/Makefile b/editors/emacs23/Makefile index 74fde68..862df58 100644 --- a/editors/emacs23/Makefile +++ b/editors/emacs23/Makefile @@ -7,7 +7,7 @@ PORTNAME= emacs PORTVERSION= 21.3 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= editors ipv6 MASTER_SITES= ${MASTER_SITE_GNU} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/editors/emacs23/files/patch-src:process.c b/editors/emacs23/files/patch-src:process.c index d55970c..884d06d 100644 --- a/editors/emacs23/files/patch-src:process.c +++ b/editors/emacs23/files/patch-src:process.c @@ -1,32 +1,9 @@ --- src/process.c.orig Mon Mar 17 07:06:56 2003 -+++ src/process.c Tue Aug 12 01:17:12 2003 -@@ -1850,6 +1850,7 @@ - for (lres = res; lres; lres = lres->ai_next) - { - s = socket (lres->ai_family, lres->ai_socktype, lres->ai_protocol); -+ - if (s < 0) - { - xerrno = errno; -@@ -1882,19 +1883,43 @@ - It'd be nice to be able to control the connect timeout - though. Would non-blocking connect calls be portable? */ - turn_on_atimers (0); -+ - ret = connect (s, lres->ai_addr, lres->ai_addrlen); - xerrno = errno; - turn_on_atimers (1); - -- if (ret == 0 || xerrno == EISCONN) -+ if (ret == 0 || xerrno == EISCONN ) - /* The unwind-protect will be discarded afterwards. ++++ src/process.c Fri Apr 23 19:28:58 2004 +@@ -1891,10 +1891,34 @@ Likewise for immediate_quit. */ break; - immediate_quit = 0; - -- if (xerrno == EINTR) -- goto loop; +#if 1 + if ( (errno == EINTR ) || (errno == EINPROGRESS)){ + fd_set fds; @@ -37,6 +14,7 @@ + FD_ZERO(&fds); + FD_SET(s, &fds); + resel: ++ QUIT; + e = select(s+1, NULL, &fds, NULL, &tv); + + if( e == -1){ @@ -52,19 +30,17 @@ + } +#endif + + immediate_quit = 0; + +- if (xerrno == EINTR) +- goto loop; if (xerrno == EADDRINUSE && retry < 20) { /* A delay here is needed on some FreeBSD systems, -@@ -2000,11 +2025,30 @@ - && errno != EISCONN) +@@ -2001,10 +2025,30 @@ { int xerrno = errno; -- -+ - immediate_quit = 0; -- if (errno == EINTR) -- goto loop; +#if 1 + if ( (errno == EINTR ) || (errno == EINPROGRESS)){ + fd_set fds; @@ -75,6 +51,7 @@ + FD_CLEAR(&fds); + FD_SET(s, &fds); + resel: ++ QUIT; + e = select(s+1, NULL, fds, NULL, &tv); + if( e != 0){ + if(errno == EINTR) @@ -86,6 +63,10 @@ + xerrno = 0; + } +#endif + immediate_quit = 0; + +- if (errno == EINTR) +- goto loop; if (errno == EADDRINUSE && retry < 20) { /* A delay here is needed on some FreeBSD systems, |