Subject: bug#31 closed by Eli Zaretskii <[email-masked]> (Re: file-attributes returns negative integer for inode value)

From: [email-masked] (Emacs bug Tracking System)

This is an automatic notification regarding your bug report
which was filed against the emacs package:

#31: file-attributes returns negative integer for inode value

It has been closed by Eli Zaretskii <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Eli Zaretskii <[email-masked]> by
replying to this email.

-- 
31: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31
Emacs Bug Tracking System
Contact [email-masked] with problems
>From [email-masked] Wed Mar 19 11:06:08 2008
Resent-Message-ID: <[email-masked]>
Resent-To: [email-masked]
Resent-From: Stefan Monnier <[email-masked]>
Resent-Date: Wed, 19 Mar 2008 14:05:26 -0400
Date: Fri, 14 Mar 2008 19:31:47 +0200
From: Eli Zaretskii <[email-masked]>
To: [email-masked], [email-masked]
Cc: 
Subject: Re: file-attributes returns negative integer for inode value
Reply-To: Eli Zaretskii <[email-masked]>
Sender: emacs-devel-bounces+monnier=[email-masked]

> Date: Mon, 03 Mar 2008 06:25:42 +0200
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked], [email-masked]
> 
> 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.

(For some value of "soon".)

Done.

>From [email-masked] Sun Mar  2 19:09:57 2008
Resent-Message-ID: <[email-masked]>
Resent-To: [email-masked]
Resent-From: Stefan Monnier <[email-masked]>
Resent-Date: Sun, 02 Mar 2008 22:09:39 -0500
From: "Drew Adams" <[email-masked]>
To: <[email-masked]>
Date: Sun, 2 Mar 2008 14:46:09 -0800
Cc: 
Subject: file-attributes returns negative integer for inode value
Sender: emacs-devel-bounces+monnier=[email-masked]

emacs -Q
 
No reliable recipe to reproduce, but for me, some directories give a
negative inode number for file-attributes. For example:
 
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. The Elisp manual, however says that if
the integer is too large, then a cons is used for the inode value. Is
this a Windows-specific problem, perhaps?
 
Also, there is a typo in the doc string for `file-attributes':
 
  ...
  If inode number is larger than the Emacs integer,
  this is a cons cell containing two integers: first the high part,
  then the low 16 bits.
 
"the Emacs integer" should presumably be "the largest Emacs integer".

In GNU Emacs 22.1.90.1 (i386-mingw-nt5.1.2600)
 of 2008-01-30 on PRETEST
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/gnuwin32/include'