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: Patches with independent changes Date: Sat, 25 Jan 2014 09:22:02 +0200 Message-ID: <83fvoccyqt.fsf@gnu.org> References: <8361pbg5vy.fsf@gnu.org> <52E08D31.3080801@cs.ucla.edu> <8338kffj7m.fsf@gnu.org> <52E0A0ED.4020601@cs.ucla.edu> <83y526el6z.fsf@gnu.org> <52E18EC0.7090302@cs.ucla.edu> <83lhy5ests.fsf@gnu.org> <52E2277B.9000205@cs.ucla.edu> <83bnz1eo1x.fsf@gnu.org> <52E29827.7060209@cs.ucla.edu> <83ha8tcb4z.fsf@gnu.org> <52E2EA7B.2080501@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1390634549 29216 80.91.229.3 (25 Jan 2014 07:22:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jan 2014 07:22:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 25 08:22:36 2014 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 1W6xZb-0005k8-8A for ged-emacs-devel@m.gmane.org; Sat, 25 Jan 2014 08:22:35 +0100 Original-Received: from localhost ([::1]:50168 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6xZa-0003rK-NM for ged-emacs-devel@m.gmane.org; Sat, 25 Jan 2014 02:22:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6xZT-0003r9-9F for emacs-devel@gnu.org; Sat, 25 Jan 2014 02:22:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6xZK-0003Mf-HU for emacs-devel@gnu.org; Sat, 25 Jan 2014 02:22:27 -0500 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:59502) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6xZK-0003MQ-4s for emacs-devel@gnu.org; Sat, 25 Jan 2014 02:22:18 -0500 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0MZY007003Q16J00@mtaout29.012.net.il> for emacs-devel@gnu.org; Sat, 25 Jan 2014 09:23:36 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MZY00ACV4JC1800@mtaout29.012.net.il>; Sat, 25 Jan 2014 09:23:36 +0200 (IST) In-reply-to: <52E2EA7B.2080501@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.185 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:169040 Archived-At: > Date: Fri, 24 Jan 2014 14:34:35 -0800 > From: Paul Eggert > CC: emacs-devel@gnu.org > > On 01/24/2014 01:39 PM, Eli Zaretskii wrote: > > > they both address the fact that fchmod is not available on Windows. > > One without the other would break the build on Windows. > > I wasn't referring to two hunks in the patch. I was referring to two of > the changes installed by that patch. One change worked around > WINDOWSNT's lack of fchmod, and the other replaced "!=" with "<".The > changes were independent and only the first change was needed to fix the > bug. There was no second change. There were 2 hunks in a single change that fixed a single problem: === modified file 'lib-src/update-game-score.c' --- lib-src/update-game-score.c 2014-01-22 19:02:41 +0000 +++ lib-src/update-game-score.c 2014-01-22 19:38:31 +0000 @@ -443,8 +443,10 @@ write_scores (const char *filename, cons fd = mkostemp (tempfile, 0); if (fd < 0) return -1; +#ifndef WINDOWSNT if (fchmod (fd, 0644) != 0) return -1; +#endif f = fdopen (fd, "w"); if (! f) return -1; @@ -457,6 +459,10 @@ write_scores (const char *filename, cons return -1; if (rename (tempfile, filename) != 0) return -1; +#ifdef WINDOWSNT + if (chmod (filename, 0644) < 0) + return -1; +#endif return 0; } I didn't change anything in the call to fchmod, except conditioning it on non-Windows build. The code that calls chmod instead was added, and it used < from the get-go. So there's no second change, the two hunks were strictly required to make the code compile on Windows. > > That I used < rather than != is immaterial > > You thought replacing "!=" with "<" was needed, so the intent of that > patch was to install multiple independent fixes. Which was fine. I didn't replace anything, the line with chmod was _added_ in its entirety. > Here's another example. Trunk bzr 116064 fixes a file name handling > failure on MS-Windows 9X. While it's in the neighborhood, it makes the > independent changes of removing initialization code for the variable > g_b_init_is_w9x, and of removing that variable's definition. These > independent changes weren't needed to fix the bug. Yes, they were needed: that variable was no longer used after the change. Removal of unused code is the same as changing commentary or whitespace: it is generally done when the related code changes. > This sort of thing is quite common, and there's nothing wrong with it. Indeed, there's nothing wrong with the changes you are trying to represent as examples. Your changes were different in kind, and that is what this discussion is about. > >> [retitling from "Changes in update-game-score.c"] > > [Why?] > > Others requested retitling and this seemed reasonable. Others were wrong, there's no reason to retitle. The discussion is still about changes in update-game-score.