From: Eli Zaretskii Date: Sat, 5 Apr 2008 19:10:08 +0000 (+0000) Subject: (Ffile_attributes) [WINDOWSNT]: Force inode be positive. X-Git-Tag: emacs-pretest-22.2.90~239 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f3a3640be894d647b4f27d04e2ec2b8604472d26;p=emacs.git (Ffile_attributes) [WINDOWSNT]: Force inode be positive. --- diff --git a/src/ChangeLog b/src/ChangeLog index d1528cbfe4e..e41f04ef6ff 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-04-05 Eli Zaretskii + + * dired.c (Ffile_attributes) [WINDOWSNT]: Force inode be positive. + 2008-03-31 Chong Yidong * xdisp.c (next_overlay_string): Don't set diff --git a/src/dired.c b/src/dired.c index 1a80a41633d..31b7e19ddae 100644 --- a/src/dired.c +++ b/src/dired.c @@ -1028,7 +1028,17 @@ Elements of the attribute list are: values[9] = (gid != getegid ()) ? Qt : Qnil; #endif /* BSD4_2 (or BSD4_3) */ /* Shut up GCC warnings in FIXNUM_OVERFLOW_P below. */ +#ifdef WINDOWSNT + { + /* The bit-shuffling we do in w32.c:stat can turn on the MSB, which + will produce negative inode numbers. People don't like that, so + force a positive inode instead. */ + unsigned short tem = s.st_ino; + ino = tem; + } +#else ino = s.st_ino; +#endif if (FIXNUM_OVERFLOW_P (ino)) /* To allow inode numbers larger than VALBITS, separate the bottom 16 bits. */