diff options
author | MANTANI Nobutaka <nobutaka@FreeBSD.org> | 2004-02-08 14:44:26 +0000 |
---|---|---|
committer | MANTANI Nobutaka <nobutaka@FreeBSD.org> | 2004-02-08 14:44:26 +0000 |
commit | 8a2364714931d0d94ea3b0c30501b1bdacab8e9a (patch) | |
tree | 25b8b295a75f63be006c1fe0832d9e621289a0b9 /editors/emacs21 | |
parent | a143e720cb3e2e068d9d159243c82955a08f95bd (diff) | |
download | ports-8a2364714931d0d94ea3b0c30501b1bdacab8e9a.tar.gz ports-8a2364714931d0d94ea3b0c30501b1bdacab8e9a.zip |
Notes
Diffstat (limited to 'editors/emacs21')
-rw-r--r-- | editors/emacs21/Makefile | 2 | ||||
-rw-r--r-- | editors/emacs21/files/patch-src:process.c | 91 |
2 files changed, 92 insertions, 1 deletions
diff --git a/editors/emacs21/Makefile b/editors/emacs21/Makefile index 48c6b635e384..8f67c1ec17a2 100644 --- a/editors/emacs21/Makefile +++ b/editors/emacs21/Makefile @@ -7,7 +7,7 @@ PORTNAME= emacs PORTVERSION= 21.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= editors ipv6 MASTER_SITES= ${MASTER_SITE_GNU} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/editors/emacs21/files/patch-src:process.c b/editors/emacs21/files/patch-src:process.c new file mode 100644 index 000000000000..d55970c9bd02 --- /dev/null +++ b/editors/emacs21/files/patch-src:process.c @@ -0,0 +1,91 @@ +--- 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. + Likewise for immediate_quit. */ + break; + + immediate_quit = 0; + +- if (xerrno == EINTR) +- goto loop; ++#if 1 ++ if ( (errno == EINTR ) || (errno == EINPROGRESS)){ ++ fd_set fds; ++ int e; ++ struct timeval tv; ++ tv.tv_sec =60; ++ tv.tv_usec = 0; ++ FD_ZERO(&fds); ++ FD_SET(s, &fds); ++ resel: ++ e = select(s+1, NULL, &fds, NULL, &tv); ++ ++ if( e == -1){ ++ if(errno == EINTR) ++ goto resel; ++ else ++ xerrno = ETIMEDOUT; ++ } ++ else { ++ xerrno = 0; ++ break; ++ } ++ } ++#endif ++ + if (xerrno == EADDRINUSE && retry < 20) + { + /* A delay here is needed on some FreeBSD systems, +@@ -2000,11 +2025,30 @@ + && errno != EISCONN) + { + int xerrno = errno; +- ++ + immediate_quit = 0; + +- if (errno == EINTR) +- goto loop; ++#if 1 ++ if ( (errno == EINTR ) || (errno == EINPROGRESS)){ ++ fd_set fds; ++ int e; ++ struct timeval tv; ++ tv.tv_sec =60; ++ tv_tv_usec = 0; ++ FD_CLEAR(&fds); ++ FD_SET(s, &fds); ++ resel: ++ e = select(s+1, NULL, fds, NULL, &tv); ++ if( e != 0){ ++ if(errno == EINTR) ++ goto resel; ++ else ++ xerrno = ETIMEDOUT; ++ } ++ else ++ xerrno = 0; ++ } ++#endif + if (errno == EADDRINUSE && retry < 20) + { + /* A delay here is needed on some FreeBSD systems, |