diff options
| author | Paul Eggert | 2011-06-12 23:34:04 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-12 23:34:04 -0700 |
| commit | 83c77d31ace0a54f6e0c0c384648f172f837c27b (patch) | |
| tree | f3a484419f762c7e16424e6ff1573145e0eaa4a7 /src | |
| parent | ee2079f16e33b20dc2330062c766eafee4db240d (diff) | |
| download | emacs-83c77d31ace0a54f6e0c0c384648f172f837c27b.tar.gz emacs-83c77d31ace0a54f6e0c0c384648f172f837c27b.zip | |
* dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/dired.c | 13 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9c7cf3cba9a..6562df06471 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2011-06-13 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-06-13 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts. | ||
| 4 | |||
| 3 | * unexelf.c (unexec): Don't assume BSS addr fits in unsigned. | 5 | * unexelf.c (unexec): Don't assume BSS addr fits in unsigned. |
| 4 | 6 | ||
| 5 | * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned. | 7 | * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned. |
diff --git a/src/dired.c b/src/dired.c index a95882060fb..3ab1ba8a900 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -978,11 +978,14 @@ so last access time will always be midnight of that day. */) | |||
| 978 | values[4] = make_time (s.st_atime); | 978 | values[4] = make_time (s.st_atime); |
| 979 | values[5] = make_time (s.st_mtime); | 979 | values[5] = make_time (s.st_mtime); |
| 980 | values[6] = make_time (s.st_ctime); | 980 | values[6] = make_time (s.st_ctime); |
| 981 | values[7] = make_fixnum_or_float (s.st_size); | 981 | |
| 982 | /* If the size is negative, and its type is long, convert it back to | 982 | /* If the file size is a 4-byte type, assume that files of sizes in |
| 983 | positive. */ | 983 | the 2-4 GiB range wrap around to negative values, as this is a |
| 984 | if (s.st_size < 0 && sizeof (s.st_size) == sizeof (long)) | 984 | common bug on older 32-bit platforms. */ |
| 985 | values[7] = make_float ((double) ((unsigned long) s.st_size)); | 985 | if (sizeof (s.st_size) == 4) |
| 986 | values[7] = make_fixnum_or_float (s.st_size & 0xffffffffu); | ||
| 987 | else | ||
| 988 | values[7] = make_fixnum_or_float (s.st_size); | ||
| 986 | 989 | ||
| 987 | filemodestring (&s, modes); | 990 | filemodestring (&s, modes); |
| 988 | values[8] = make_string (modes, 10); | 991 | values[8] = make_string (modes, 10); |