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: Sat, 16 Jan 2016 11:58:24 +0200 Message-ID: <83vb6tethb.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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1452938328 24429 80.91.229.3 (16 Jan 2016 09:58:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Jan 2016 09:58:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: jussi@aprikoodi.fi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 16 10:58:43 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 1aKNd4-0005Il-AM for ged-emacs-devel@m.gmane.org; Sat, 16 Jan 2016 10:58:42 +0100 Original-Received: from localhost ([::1]:50214 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKNd3-0003Yn-QT for ged-emacs-devel@m.gmane.org; Sat, 16 Jan 2016 04:58:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKNcs-0003Ye-Qm for emacs-devel@gnu.org; Sat, 16 Jan 2016 04:58:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKNcp-0007BU-KE for emacs-devel@gnu.org; Sat, 16 Jan 2016 04:58:30 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKNcp-0007BQ-H5; Sat, 16 Jan 2016 04:58:27 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2238 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aKNcm-0003j1-Su; Sat, 16 Jan 2016 04:58:25 -0500 In-reply-to: <83mvs8gh7n.fsf@gnu.org> (message from Eli Zaretskii on Thu, 14 Jan 2016 20:15:56 +0200) 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:198189 Archived-At: > Date: Thu, 14 Jan 2016 20:15:56 +0200 > From: Eli Zaretskii > Cc: emacs-devel@gnu.org > > > I investigated the problem and found out that it resulted from NT4's > > MultiByteToWideChar function not supporting the MB_ERR_INVALID_CHARS > > flags. I made the flag conditional on the OS version, after which Emacs > > runs just fine on NT4. I'm attaching a patch that contains this fix, > > and the conditional use of _resetstkoflw (which is also not supported on > > NT4) as well. > > Thanks, I will push these to the emacs-25 branch soon. Done now. Note one gotcha with calling functions that might not be available at run time: you cannot rely on a static function pointer to be NULL when Emacs starts. That's because when Emacs is dumped, the value of the pointer from the system where Emacs is built is (or could be) recorded in the dumped binary, and is non-NULL. So you must explicitly zero it out every Emacs startup; see the various globals_of_w32* functions which do this for several such pointers. I added a line to reset the resetstkovflw pointer when Emacs starts. > > Also, I noticed that addpm.exe fails to load on a out-of-the-box NT4SP6, > > due to its dependency to a Shell32.dll version that ships with IE4. > > After installing IE4, addpm works. It's worth noting that directly > > installing IE6 on NT4 does NOT make addpm functional, as IE6 does not > > contain the shell update. > > Thanks, I will mention this in some place, although addpm is > semi-obsolescent nowadays. Added an entry in etc/PROBLEMS about this. Thanks. P.S. These patches all but exhaust your grace limit of contributed code we can accept without your assigning copyright, so I hope your legal paperwork is well under way, and we will be able to accept your contributions soon.