From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: MS-Windows build broken in Fmake_network_process Date: Sat, 27 Mar 2010 09:51:56 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <83634jglab.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: dough.gmane.org 1269651147 12893 80.91.229.12 (27 Mar 2010 00:52:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 27 Mar 2010 00:52:27 +0000 (UTC) Cc: Helmut Eller , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 27 01:52:22 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NvKGE-0006Hy-6s for ged-emacs-devel@m.gmane.org; Sat, 27 Mar 2010 01:52:22 +0100 Original-Received: from localhost ([127.0.0.1]:43723 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NvKGD-0007VB-Bk for ged-emacs-devel@m.gmane.org; Fri, 26 Mar 2010 20:52:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NvKG7-0007Rk-5o for emacs-devel@gnu.org; Fri, 26 Mar 2010 20:52:15 -0400 Original-Received: from [140.186.70.92] (port=38633 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NvKG3-0007Mf-9i for emacs-devel@gnu.org; Fri, 26 Mar 2010 20:52:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NvKFx-0007eD-06 for emacs-devel@gnu.org; Fri, 26 Mar 2010 20:52:10 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:51717) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NvKFs-0007dM-Db; Fri, 26 Mar 2010 20:52:00 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 6B94DC0557; Sat, 27 Mar 2010 09:51:56 +0900 (JST) In-Reply-To: <83634jglab.fsf@gnu.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by eggs.gnu.org: NetBSD 3.0 (DF) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:122747 Archived-At: >>>>> On Fri, 26 Mar 2010 18:22:36 +0300, Eli Zaretskii said: > This change: > revno: 99750 > author: Helmut Eller > committer: YAMAMOTO Mitsuharu > branch nick: trunk > timestamp: Thu 2010-03-25 17:48:52 +0900 > message: > Call `select' for interrupted `connect' rather than creating new socket (Bug#5173). > breaks the MS-Windows build: (snip) > The linker error is because we would need to link against yet another > library to get this function. But I don't think we should do that. > I'm actually bewildered why this code: > int len = sizeof xerrno; > eassert (FD_ISSET (s, &fdset)); > if (getsockopt (s, SOL_SOCKET, SO_ERROR, &xerrno, &len) == -1) > report_file_error ("getsockopt failed", Qnil); > was used unconditionally when a very similar code in > wait_reading_process_output is clearly marked with a comment saying > not to use it except on GNU/Linux: > #ifdef GNU_LINUX > /* getsockopt(,,SO_ERROR,,) is said to hang on some systems. > So only use it on systems where it is known to work. */ > { > int xlen = sizeof(xerrno); > if (getsockopt(channel, SOL_SOCKET, SO_ERROR, &xerrno, &xlen)) > xerrno = errno; > } > #else Actually I was aware of the above part when I committed the change in question. But the code above was added in 2002, and I doubted whether it is still the case for the systems that are supported by Emacs 24.0.50. So I didn't copy the above code for Fmake_network_process. Can normal (i.e., blocking) `connect' in Windows be interrupted by a POSIX signal counterpart? If not, then we can disable the whole added code for Windows in the first place. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp