aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-06-03 11:42:59 -0700
committerPaul Eggert2011-06-03 11:42:59 -0700
commitda908fa9a718745d426af0f69f88324b3023b7e4 (patch)
tree5ff9fb8e3845823cca8d3d6a76003fa0d0bc67ec /src
parent3c9d8b1ef814e03b5490c3ab3e28f2867ee9cf51 (diff)
downloademacs-da908fa9a718745d426af0f69f88324b3023b7e4.tar.gz
emacs-da908fa9a718745d426af0f69f88324b3023b7e4.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/dired.c10
-rw-r--r--src/termhooks.h4
3 files changed, 14 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 490f5428e3a..857600fda0c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,12 @@
12011-06-03 Paul Eggert <eggert@cs.ucla.edu> 12011-06-03 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Fix doc for machines with wider system times such as time_t.
4 On such machines, it's now safe to assume that EMACS_INT is as
5 wide as the system times, so that shifting right by 16 will
6 result in an integer that always fits in EMACS_INT.
7 * dired.c (Ffile_attributes): Document large inode number handling.
8 * termhooks.h: Fix comment for large time stamp handling.
9
3 * lisp.h (WIDE_EMACS_INT): Now defaults to 1. 10 * lisp.h (WIDE_EMACS_INT): Now defaults to 1.
4 11
5 * xselect.c: Use 'unsigned' more consistently. 12 * xselect.c: Use 'unsigned' more consistently.
diff --git a/src/dired.c b/src/dired.c
index 1e587353f6d..0fe2ead56ef 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -901,10 +901,10 @@ Elements of the attribute list are:
901 8. File modes, as a string of ten letters or dashes as in ls -l. 901 8. File modes, as a string of ten letters or dashes as in ls -l.
902 9. t if file's gid would change if file were deleted and recreated. 902 9. t if file's gid would change if file were deleted and recreated.
90310. inode number. If inode number is larger than what Emacs integer 90310. inode number. If inode number is larger than what Emacs integer
904 can hold, but still fits into a 32-bit number, this is a cons cell 904 can hold, but all but the bottom 16 bits still fits, this is a cons cell
905 containing two integers: first the high part, then the low 16 bits. 905 containing two integers: first the high part, then the low 16 bits.
906 If the inode number is wider than 32 bits, this is of the form 906 If the inode number is still wider, this is of the form
907 (HIGH MIDDLE . LOW): first the high 24 bits, then middle 24 bits, 907 (HIGH MIDDLE . LOW): first the high bits, then the middle 24 bits,
908 and finally the low 16 bits. 908 and finally the low 16 bits.
90911. Filesystem device number. If it is larger than what the Emacs 90911. Filesystem device number. If it is larger than what the Emacs
910 integer can hold, this is a cons cell, similar to the inode number. 910 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. */)
1008 make_number ((EMACS_INT)(s.st_ino & 0xffff))); 1008 make_number ((EMACS_INT)(s.st_ino & 0xffff)));
1009 else 1009 else
1010 { 1010 {
1011 /* To allow inode numbers beyond 32 bits, separate into 2 24-bit 1011 /* To allow inode numbers beyond what INTEGER_TO_CONS can handle,
1012 high parts and a 16-bit bottom part. 1012 separate into 2 24-bit high parts and a 16-bit bottom part.
1013 The code on the next line avoids a compiler warning on 1013 The code on the next line avoids a compiler warning on
1014 systems where st_ino is 32 bit wide. (bug#766). */ 1014 systems where st_ino is 32 bit wide. (bug#766). */
1015 EMACS_INT high_ino = s.st_ino >> 31 >> 1; 1015 EMACS_INT high_ino = s.st_ino >> 31 >> 1;
diff --git a/src/termhooks.h b/src/termhooks.h
index 6a58517a85a..81583e79d78 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -342,8 +342,8 @@ struct terminal
342 SELECTION-VALUE is the value that emacs owns for that selection. 342 SELECTION-VALUE is the value that emacs owns for that selection.
343 It may be any kind of Lisp object. 343 It may be any kind of Lisp object.
344 SELECTION-TIMESTAMP is the time at which emacs began owning this 344 SELECTION-TIMESTAMP is the time at which emacs began owning this
345 selection, as a cons of two 16-bit numbers (making a 32 bit 345 selection, as an Emacs integer; or if that doesn't fit, as a
346 time.) 346 cons of two 16-bit integers (making a 32 bit time.)
347 FRAME is the frame for which we made the selection. If there is 347 FRAME is the frame for which we made the selection. If there is
348 an entry in this alist, then it can be assumed that Emacs owns 348 an entry in this alist, then it can be assumed that Emacs owns
349 that selection. 349 that selection.