diff options
author | Jason Rumney <jasonr@gnu.org> | 2008-03-31 14:22:12 +0000 |
---|---|---|
committer | Jason Rumney <jasonr@gnu.org> | 2008-03-31 14:22:12 +0000 |
commit | 3036dd26728554279576a1209f8a11588ee13027 (patch) | |
tree | 8283e44e451377443681fa1b458f737d79369de6 /src/dired.c | |
parent | 5295bd50b5a645e404eff55571fc9f30bf7da191 (diff) | |
download | emacs-3036dd26728554279576a1209f8a11588ee13027.tar.gz |
(Ffile_attributes) [WINDOWSNT]: Cast uid and gid to unsigned.
Diffstat (limited to 'src/dired.c')
-rw-r--r-- | src/dired.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dired.c b/src/dired.c index 0ccbfd85601..1a80a41633d 100644 --- a/src/dired.c +++ b/src/dired.c @@ -976,8 +976,16 @@ Elements of the attribute list are: shorter than an int (e.g., `short'), GCC whines about comparison being always false due to limited range of data type. Fix by copying s.st_uid and s.st_gid into int variables. */ +#ifdef WINDOWSNT + /* Windows uses signed short for the uid and gid in the stat structure, + but we use an int for getuid (limited to the range 0-60000). + So users with uid > 32767 need their uid patched back here. */ + uid = (unsigned short) s.st_uid; + gid = (unsigned short) s.st_gid; +#else uid = s.st_uid; gid = s.st_gid; +#endif if (NILP (id_format) || EQ (id_format, Qinteger)) { values[2] = make_fixnum_or_float (uid); |