From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Tramp and fixnum (was: Making 'eq' == 'eql' in bignum branch) Date: Sun, 26 Aug 2018 19:06:54 +0300 Message-ID: <83sh315cyp.fsf@gnu.org> References: <29f933ac-a6bf-8742-66a7-0a9d6d3e5a88@disroot.org> <8e0320d9-e0d0-2b57-57cc-2df4399f133c@cs.ucla.edu> <87lgaio7xd.fsf@tromey.com> <877em1cb0i.fsf@tromey.com> <765767b2-d2e5-a9a6-f724-d58ecf4847bb@cs.ucla.edu> <76081b5d-8c10-0a37-2c97-d4864c0faa80@cs.ucla.edu> <09153aed-361d-4f82-d9ac-b502314769ae@cs.ucla.edu> <83lg91dqd4.fsf@gnu.org> <87pny59tz9.fsf_-_@gmx.de> <81bdf4a7-cfa7-40c6-af17-f4f6d6fd8518@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1535299544 25512 195.159.176.226 (26 Aug 2018 16:05:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 26 Aug 2018 16:05:44 +0000 (UTC) Cc: michael.albinus@gmx.de, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 26 18:05:40 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ftxXn-0006WM-Gi for ged-emacs-devel@m.gmane.org; Sun, 26 Aug 2018 18:05:39 +0200 Original-Received: from localhost ([::1]:49616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ftxZt-00063y-S7 for ged-emacs-devel@m.gmane.org; Sun, 26 Aug 2018 12:07:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ftxZD-00063i-KU for emacs-devel@gnu.org; Sun, 26 Aug 2018 12:07:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ftxZA-0005EH-DN for emacs-devel@gnu.org; Sun, 26 Aug 2018 12:07:07 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ftxZA-0005EB-9l; Sun, 26 Aug 2018 12:07:04 -0400 Original-Received: from [176.228.60.248] (port=4696 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ftxZ9-0003ho-A4; Sun, 26 Aug 2018 12:07:04 -0400 In-reply-to: <81bdf4a7-cfa7-40c6-af17-f4f6d6fd8518@cs.ucla.edu> (message from Paul Eggert on Sun, 26 Aug 2018 08:34:25 -0700) 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.21 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" Xref: news.gmane.org gmane.emacs.devel:228936 Archived-At: > From: Paul Eggert > Date: Sun, 26 Aug 2018 08:34:25 -0700 > Cc: emacs-devel@gnu.org > > > What do you mean with `list-attributes'? Maybe `file-attributes'? > > Yes, sorry, I meant 'file-attributes'. The fishy-looking code is in > tramp-convert-file-attributes. Here's one snippet: > > (when (and (floatp (nth 2 attr)) > (<= (nth 2 attr) most-positive-fixnum)) > (setcar (nthcdr 2 attr) (round (nth 2 attr)))) > > Although this snippet shouldn't hurt, it should be unnecessary once > file-attributes is fixed to not return floats. Fixed in what version of Emacs? Tramp wants to support more than just the latest master version. > The main offender is the inode converter in that function, which splits integers > into three parts, whereas it should simply keep the integers as-is since they > don't overflow any more. They do in older Emacs versions, AFAIR.