From: Eli Zaretskii Date: Fri, 14 Mar 2008 17:31:09 +0000 (+0000) Subject: (Ffile_attributes) [WINDOWSNT]: Force inode be positive. X-Git-Tag: emacs-pretest-23.0.90~7145 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=294f1153b56701321c2dd9ef1aa2483b17dc4bf8;p=emacs.git (Ffile_attributes) [WINDOWSNT]: Force inode be positive. --- diff --git a/src/ChangeLog b/src/ChangeLog index 1f429c49dc7..c9dd5c1535e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2008-03-14 Eli Zaretskii + * dired.c (Ffile_attributes) [WINDOWSNT]: Force inode be positive. + * w32fns.c (globals_of_w32fns, Fx_create_frame): Fix last change. 2008-03-14 Jason Rumney 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. */