(XDrawLine) [USE_MAC_IMAGE_IO]: Remove spurious return.
[bpt/emacs.git] / src / dired.c
index 31b7e19..ef6c3e3 100644 (file)
@@ -374,7 +374,9 @@ If MATCH is non-nil, mention only file names that match the regexp MATCH.
 If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
  NOSORT is useful if you plan to sort the result yourself.
 ID-FORMAT specifies the preferred format of attributes uid and gid, see
-`file-attributes' for further documentation. */)
+`file-attributes' for further documentation.
+On MS-Windows, performance depends on `w32-get-true-file-attributes',
+which see.  */)
      (directory, full, match, nosort, id_format)
      Lisp_Object directory, full, match, nosort, id_format;
 {
@@ -921,7 +923,10 @@ Elements of the attribute list are:
   this is a cons cell containing two integers: first the high part,
   then the low 16 bits.
 11. Device number.  If it is larger than the Emacs integer, this is
-  a cons cell, similar to the inode number.  */)
+  a cons cell, similar to the inode number.
+
+On MS-Windows, performance depends on `w32-get-true-file-attributes',
+which see.  */)
      (filename, id_format)
      Lisp_Object filename, id_format;
 {
@@ -1048,8 +1053,11 @@ Elements of the attribute list are:
     /* But keep the most common cases as integers.  */
     values[10] = make_number (ino);
 
-  /* Likewise for device.  */
-  if (FIXNUM_OVERFLOW_P (s.st_dev))
+  /* Likewise for device, but don't let it become negative.  We used
+     to use FIXNUM_OVERFLOW_P here, but that won't catch large
+     positive numbers such as 0xFFEEDDCC.  */
+  if ((EMACS_INT)s.st_dev < 0
+      || (EMACS_INT)s.st_dev > MOST_POSITIVE_FIXNUM)
     values[11] = Fcons (make_number (s.st_dev >> 16),
                        make_number (s.st_dev & 0xffff));
   else