From: Paul Eggert Date: Fri, 3 Jun 2011 18:42:59 +0000 (-0700) Subject: Fix doc for machines with wider system times such as time_t. X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~8^2~9 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/da908fa9a718745d426af0f69f88324b3023b7e4 Fix doc for machines with wider system times such as time_t. On such machines, it's now safe to assume that EMACS_INT is as wide as the system times, so that shifting right by 16 will result in an integer that always fits in EMACS_INT. * dired.c (Ffile_attributes): Document large inode number handling. * termhooks.h: Fix comment for large time stamp handling. --- diff --git a/src/ChangeLog b/src/ChangeLog index 490f5428e3..857600fda0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2011-06-03 Paul Eggert + Fix doc for machines with wider system times such as time_t. + On such machines, it's now safe to assume that EMACS_INT is as + wide as the system times, so that shifting right by 16 will + result in an integer that always fits in EMACS_INT. + * dired.c (Ffile_attributes): Document large inode number handling. + * termhooks.h: Fix comment for large time stamp handling. + * lisp.h (WIDE_EMACS_INT): Now defaults to 1. * xselect.c: Use 'unsigned' more consistently. diff --git a/src/dired.c b/src/dired.c index 1e587353f6..0fe2ead56e 100644 --- a/src/dired.c +++ b/src/dired.c @@ -901,10 +901,10 @@ Elements of the attribute list are: 8. File modes, as a string of ten letters or dashes as in ls -l. 9. t if file's gid would change if file were deleted and recreated. 10. inode number. If inode number is larger than what Emacs integer - can hold, but still fits into a 32-bit number, this is a cons cell + can hold, but all but the bottom 16 bits still fits, this is a cons cell containing two integers: first the high part, then the low 16 bits. - If the inode number is wider than 32 bits, this is of the form - (HIGH MIDDLE . LOW): first the high 24 bits, then middle 24 bits, + If the inode number is still wider, this is of the form + (HIGH MIDDLE . LOW): first the high bits, then the middle 24 bits, and finally the low 16 bits. 11. Filesystem device number. If it is larger than what the Emacs integer can hold, this is a cons cell, similar to the inode number. @@ -1008,8 +1008,8 @@ so last access time will always be midnight of that day. */) make_number ((EMACS_INT)(s.st_ino & 0xffff))); else { - /* To allow inode numbers beyond 32 bits, separate into 2 24-bit - high parts and a 16-bit bottom part. + /* To allow inode numbers beyond what INTEGER_TO_CONS can handle, + separate into 2 24-bit high parts and a 16-bit bottom part. The code on the next line avoids a compiler warning on systems where st_ino is 32 bit wide. (bug#766). */ EMACS_INT high_ino = s.st_ino >> 31 >> 1; diff --git a/src/termhooks.h b/src/termhooks.h index 6a58517a85..81583e79d7 100644 --- a/src/termhooks.h +++ b/src/termhooks.h @@ -342,8 +342,8 @@ struct terminal SELECTION-VALUE is the value that emacs owns for that selection. It may be any kind of Lisp object. SELECTION-TIMESTAMP is the time at which emacs began owning this - selection, as a cons of two 16-bit numbers (making a 32 bit - time.) + selection, as an Emacs integer; or if that doesn't fit, as a + cons of two 16-bit integers (making a 32 bit time.) FRAME is the frame for which we made the selection. If there is an entry in this alist, then it can be assumed that Emacs owns that selection.