summaryrefslogtreecommitdiff
path: root/src/dired.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2008-03-14 17:30:35 +0000
committerEli Zaretskii <eliz@gnu.org>2008-03-14 17:30:35 +0000
commit941ed8536d5387e0bd7b59f24c87cfee8a98cec1 (patch)
tree4510fee4d55af8fe974a0442ba3b3eb399de92ef /src/dired.c
parentd30c6e7baa115a3480060ca20654d9a305cf83c8 (diff)
downloademacs-941ed8536d5387e0bd7b59f24c87cfee8a98cec1.tar.gz
(Ffile_attributes) [WINDOWSNT]: Force inode be positive.
Diffstat (limited to 'src/dired.c')
-rw-r--r--src/dired.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dired.c b/src/dired.c
index 27292e91bff..36324519fff 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -1021,7 +1021,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. */