From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Override Windows default Win-* key combinations when using Emacs Date: Mon, 29 Feb 2016 17:52:49 +0200 Message-ID: <83vb578qem.fsf@gnu.org> References: <568BBC58.50702@aprikoodi.fi> <83y4c43qkh.fsf@gnu.org> <5691667C.5000009@aprikoodi.fi> <838u3wkkvb.fsf@gnu.org> <5694E07E.8010005@aprikoodi.fi> <83fuy2kd2w.fsf@gnu.org> <56961607.2090504@aprikoodi.fi> <569634D6.6030404@aprikoodi.fi> <83oacpiial.fsf@gnu.org> <5697995B.5010306@aprikoodi.fi> <83mvs8gh7n.fsf@gnu.org> <83vb6tethb.fsf@gnu.org> <569A22D3.7070208@aprikoodi.fi> <56B207C0.3030304@aprikoodi.fi> <83mvrhyf4c.fsf@gnu.org> <838u27eo5p.fsf@gnu.org> <56D03005.3070809@aprikoodi.fi> <831t7ycrow.fsf@gnu.org> <56D2B300.80700@cs.ucla.edu> <83wppoal6o.fsf@gnu.org> <56D35297.9040507@cs.ucla.edu> <83bn70a94l.fsf@gnu.org> <56D38265.9000503@cs.ucla.edu> <83a8mk9oqd.fsf@gnu.org> <56D3EE3A.5090803@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1456761211 27965 80.91.229.3 (29 Feb 2016 15:53:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Feb 2016 15:53:31 +0000 (UTC) Cc: jussi@aprikoodi.fi, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 29 16:53:27 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aaQ8T-0006JY-Nn for ged-emacs-devel@m.gmane.org; Mon, 29 Feb 2016 16:53:25 +0100 Original-Received: from localhost ([::1]:37386 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaQ8T-0002Ao-Ap for ged-emacs-devel@m.gmane.org; Mon, 29 Feb 2016 10:53:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaQ8F-00029Q-7W for emacs-devel@gnu.org; Mon, 29 Feb 2016 10:53:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaQ8A-0001ml-UK for emacs-devel@gnu.org; Mon, 29 Feb 2016 10:53:11 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60887) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaQ8A-0001mh-RR; Mon, 29 Feb 2016 10:53:06 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4727 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aaQ87-0006jX-1m; Mon, 29 Feb 2016 10:53:06 -0500 In-reply-to: <56D3EE3A.5090803@cs.ucla.edu> (message from Paul Eggert on Sun, 28 Feb 2016 23:07:38 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:200815 Archived-At: > Cc: jussi@aprikoodi.fi, emacs-devel@gnu.org > From: Paul Eggert > Date: Sun, 28 Feb 2016 23:07:38 -0800 > > >> The Gnulib getaddrinfo module is supposed to work on MS-Windows. If Emacs used > >> >the Gnulib getaddrinfo module, the mainline Emacs code could be simplified by > >> >assuming that getaddrinfo works. > > > But the non-getaddrinfo parts are not conditioned on MS-Windows in any > > way. What about other systems that might be using them? > > Sorry, you've lost me. The non-getaddrinfo parts of Gnulib? Of Emacs? Of Emacs, of course. > For what it's worth, the Gnulib getaddrinfo module is supposed to work on a wide > variety of systems lacking getaddrinfo, not just on MS-Windows. I was talking about systems other than Windows. Do we know which ones of them still use the non-getaddrinfo code? I see that we have calls to something named res_init there, and we even have a configure-time test for that. What is that about? Gnulib doesn't have that, and it's certainly not for the MS-Windows build. > I'm sure you mean something straightforward, it's just that I'm not getting it. Sorry for being unclear. > What I was thinking was that we add the Gnulib getaddrinfo module, and apply > something like the attached (untested) patch. Thanks. I don't object to this, but I don't think we can use this on Windows. The current w32 code in Emacs wraps each network-related function with a wrapper that tracks sockets and file descriptors they use, translates socket errors to errno values, and does other important stuff. The code also arranges for dynamically loading the socket library only when actually needed. So replacing just one function will certainly not work well, and replacing them all sounds like a lot of work for very little gain. So I think a better way forward would be to implement getaddrinfo wrapper in w32.c, complete with the fallback we have in process.c (and maybe also borrowing some ideas from Gnulib). When this is done, we can install your patch for whatever other systems which still don't have getaddrinfo (if there are such systems that we still support). Writing such a getaddrinfo wrapper is easy, and I expect it to be done soon enough, so please wait with your patch until then.