changeset 80440:71c3cb311bff

(Ffile_attributes) [WINDOWSNT]: Force inode be positive.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 05 Apr 2008 19:08:44 +0000
parents 09d6e55e4476
children 4d9b7beea2ae
files src/dired.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/dired.c	Sat Apr 05 00:49:01 2008 +0000
+++ b/src/dired.c	Sat Apr 05 19:08:44 2008 +0000
@@ -1028,7 +1028,17 @@
   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.  */