From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: file-attributes returns negative integer for inode value Date: Mon, 03 Mar 2008 06:25:42 +0200 Message-ID: References: <003e01c87cb7$35d17d00$0600a8c0@us.oracle.com> <004d01c87cc3$571881f0$0600a8c0@us.oracle.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1204518371 24786 80.91.229.12 (3 Mar 2008 04:26:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Mar 2008 04:26:11 +0000 (UTC) Cc: schwab@suse.de, emacs-pretest-bug@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 03 05:26:37 2008 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.50) id 1JW2G4-0005MJ-An for ged-emacs-devel@m.gmane.org; Mon, 03 Mar 2008 05:26:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JW2FX-00039Q-Ff for ged-emacs-devel@m.gmane.org; Sun, 02 Mar 2008 23:26:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JW2FT-00039B-GZ for emacs-devel@gnu.org; Sun, 02 Mar 2008 23:25:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JW2FR-00038z-1G for emacs-devel@gnu.org; Sun, 02 Mar 2008 23:25:58 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JW2FQ-00038w-RA for emacs-devel@gnu.org; Sun, 02 Mar 2008 23:25:56 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JW2FQ-0007cQ-Fw for emacs-devel@gnu.org; Sun, 02 Mar 2008 23:25:56 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JW2FQ-00016D-9I for emacs-pretest-bug@gnu.org; Sun, 02 Mar 2008 23:25:56 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JW2FN-0007bo-7M for emacs-pretest-bug@gnu.org; Sun, 02 Mar 2008 23:25:56 -0500 Original-Received: from nitzan.inter.net.il ([213.8.233.22]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JW2FM-0007be-S9 for emacs-pretest-bug@gnu.org; Sun, 02 Mar 2008 23:25:53 -0500 Original-Received: from HOME-C4E4A596F7 (IGLD-84-229-213-171.inter.net.il [84.229.213.171]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id JJF31528 (AUTH halo1); Mon, 3 Mar 2008 06:23:18 +0200 (IST) In-reply-to: <004d01c87cc3$571881f0$0600a8c0@us.oracle.com> (drew.adams@oracle.com) X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:91147 gmane.emacs.pretest.bugs:21390 Archived-At: > From: "Drew Adams" > Date: Sun, 2 Mar 2008 16:12:59 -0800 > Cc: emacs-pretest-bug@gnu.org > > > > M-x (file-attributes "c:/drews-lisp-20/Screenshots") gives: > > > > > > (t 1 5 5 (18378 24192) (18123 40338) (18123 40337) 0 > > > "drwxrwxrwx" nil -3082 240391127) > > > > > > The inode value here is -3082. > > > > And what's the real ino? > > Dunno. How do I tell that on Windows? One way is to run "ls -i" on that file. You will need ls.exe from the GnuWin32 port of Coreutils. Note that the w32 emulation of `stat' in the Windows port of Emacs does not use the real inode value verbatim, it mangles it with bit-shift and XOR operations. This is because the inode is a 48-bit value, while sys/stat.h on Windows says the inode is a 16-bit field. > But I doubt you need that info to discover the problem, anyway. I suspect it > is a problem on Windows in the code that detects a too-large integer and > returns a cons in its place. The problem is a little bit different: obviously, a 16-bit value cannot overflow ab EMACS_INT. The problem is we don't keep the value positive. I will work on this soon.