aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2009-03-18 20:38:41 +0000
committerEli Zaretskii2009-03-18 20:38:41 +0000
commit78e7d1fe15521a560ee5dae698263ac5ad92b532 (patch)
tree119e35d61da5ee2535dee483582d0c520091ecca /src
parent7b1c38a4f233ce6eb249f0355d85d37f0c585946 (diff)
downloademacs-78e7d1fe15521a560ee5dae698263ac5ad92b532.tar.gz
emacs-78e7d1fe15521a560ee5dae698263ac5ad92b532.zip
(Ffile_attributes): Make sure UID and GID are always positive, even
if the value is too large for a positive EMACS_INT. Doc fix.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/dired.c16
2 files changed, 20 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e80dd578c13..7d2f75d2534 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12009-03-18 Eli Zaretskii <eliz@gnu.org>
2
3 * dired.c (Ffile_attributes): Make sure UID and GID are always
4 positive, even if the value is too large for a positive EMACS_INT.
5 Doc fix.
6
7 * editfns.c (Fuser_login_name): Support float arguments. Doc fix.
8
12009-03-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 92009-03-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2 10
3 * xmenu.c (xdialog_show): Move Fredisplay call ... 11 * xmenu.c (xdialog_show): Move Fredisplay call ...
diff --git a/src/dired.c b/src/dired.c
index 4beac6e50e4..7c7c7571a4a 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -906,8 +906,8 @@ ID-FORMAT if you use the returned uid or gid.
906Elements of the attribute list are: 906Elements of the attribute list are:
907 0. t for directory, string (name linked to) for symbolic link, or nil. 907 0. t for directory, string (name linked to) for symbolic link, or nil.
908 1. Number of links to file. 908 1. Number of links to file.
909 2. File uid as a string or an integer. If a string value cannot be 909 2. File uid as a string or a number. If a string value cannot be
910 looked up, the integer value is returned. 910 looked up, a numeric value, either an integer or a float, is returned.
911 3. File gid, likewise. 911 3. File gid, likewise.
912 4. Last access time, as a list of two integers. 912 4. Last access time, as a list of two integers.
913 First integer has high-order 16 bits of time, second has low 16 bits. 913 First integer has high-order 16 bits of time, second has low 16 bits.
@@ -980,8 +980,16 @@ which see. */)
980 gid = s.st_gid; 980 gid = s.st_gid;
981 if (NILP (id_format) || EQ (id_format, Qinteger)) 981 if (NILP (id_format) || EQ (id_format, Qinteger))
982 { 982 {
983 values[2] = make_fixnum_or_float (uid); 983 if (sizeof (s.st_uid) > sizeof (uid) || uid < 0
984 values[3] = make_fixnum_or_float (gid); 984 || FIXNUM_OVERFLOW_P (uid))
985 values[2] = make_float ((double)s.st_uid);
986 else
987 values[2] = make_number (uid);
988 if (sizeof (s.st_gid) > sizeof (gid) || gid < 0
989 || FIXNUM_OVERFLOW_P (gid))
990 values[3] = make_float ((double)s.st_gid);
991 else
992 values[3] = make_number (gid);
985 } 993 }
986 else 994 else
987 { 995 {