diff options
author | sumikawa <sumikawa@FreeBSD.org> | 2004-02-11 06:43:17 +0800 |
---|---|---|
committer | sumikawa <sumikawa@FreeBSD.org> | 2004-02-11 06:43:17 +0800 |
commit | 2b8f8a2d01af23eb8f4889515c8c10c831a20ea5 (patch) | |
tree | 961fae8de2c78c32a349e252124a4a16dd09b881 | |
parent | 3edc2a01dabc7e3d79ed8a27439ef8d1d22f8c1f (diff) | |
download | freebsd-ports-gnome-2b8f8a2d01af23eb8f4889515c8c10c831a20ea5.tar.gz freebsd-ports-gnome-2b8f8a2d01af23eb8f4889515c8c10c831a20ea5.tar.zst freebsd-ports-gnome-2b8f8a2d01af23eb8f4889515c8c10c831a20ea5.zip |
Sync with editors/emacs21:
Add patch-src:process.c.
Due to the change in src/sys/kern/uipc_syscalls.c between rev. 1.153 and 1.154,
connectiton attempt fails with EALREADY after connect (2) is interrupted.
The patch fixes this problem.
Obtained from: http://www.init-main.com/d/resource/process.c.diff
Patch author: takawata
Reviewed by: nakaji@jp.freebsd.org
-rw-r--r-- | japanese/emacs-emcws/Makefile | 2 | ||||
-rw-r--r-- | japanese/emacs-emcws/files/patch-src:process.c | 91 | ||||
-rw-r--r-- | japanese/emacs21-emcws/Makefile | 2 | ||||
-rw-r--r-- | japanese/emacs21-emcws/files/patch-src:process.c | 91 |
4 files changed, 184 insertions, 2 deletions
diff --git a/japanese/emacs-emcws/Makefile b/japanese/emacs-emcws/Makefile index dc8d2f169cda..df4e99b3aabb 100644 --- a/japanese/emacs-emcws/Makefile +++ b/japanese/emacs-emcws/Makefile @@ -7,7 +7,7 @@ PORTNAME= emcws PORTVERSION= ${EMACS_VER} -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= japanese editors ipv6 MASTER_SITES= ${MASTER_SITE_GNU} MASTER_SITE_SUBDIR= emacs diff --git a/japanese/emacs-emcws/files/patch-src:process.c b/japanese/emacs-emcws/files/patch-src:process.c new file mode 100644 index 000000000000..d55970c9bd02 --- /dev/null +++ b/japanese/emacs-emcws/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, diff --git a/japanese/emacs21-emcws/Makefile b/japanese/emacs21-emcws/Makefile index dc8d2f169cda..df4e99b3aabb 100644 --- a/japanese/emacs21-emcws/Makefile +++ b/japanese/emacs21-emcws/Makefile @@ -7,7 +7,7 @@ PORTNAME= emcws PORTVERSION= ${EMACS_VER} -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= japanese editors ipv6 MASTER_SITES= ${MASTER_SITE_GNU} MASTER_SITE_SUBDIR= emacs diff --git a/japanese/emacs21-emcws/files/patch-src:process.c b/japanese/emacs21-emcws/files/patch-src:process.c new file mode 100644 index 000000000000..d55970c9bd02 --- /dev/null +++ b/japanese/emacs21-emcws/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, |