diff options
| author | Jason Rumney | 2008-03-31 14:22:12 +0000 |
|---|---|---|
| committer | Jason Rumney | 2008-03-31 14:22:12 +0000 |
| commit | 3036dd26728554279576a1209f8a11588ee13027 (patch) | |
| tree | 8283e44e451377443681fa1b458f737d79369de6 /src | |
| parent | 5295bd50b5a645e404eff55571fc9f30bf7da191 (diff) | |
| download | emacs-3036dd26728554279576a1209f8a11588ee13027.tar.gz emacs-3036dd26728554279576a1209f8a11588ee13027.zip | |
(Ffile_attributes) [WINDOWSNT]: Cast uid and gid to unsigned.
Diffstat (limited to 'src')
| -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: | |||
| 976 | shorter than an int (e.g., `short'), GCC whines about comparison | 976 | shorter than an int (e.g., `short'), GCC whines about comparison |
| 977 | being always false due to limited range of data type. Fix by | 977 | being always false due to limited range of data type. Fix by |
| 978 | copying s.st_uid and s.st_gid into int variables. */ | 978 | copying s.st_uid and s.st_gid into int variables. */ |
| 979 | #ifdef WINDOWSNT | ||
| 980 | /* Windows uses signed short for the uid and gid in the stat structure, | ||
| 981 | but we use an int for getuid (limited to the range 0-60000). | ||
| 982 | So users with uid > 32767 need their uid patched back here. */ | ||
| 983 | uid = (unsigned short) s.st_uid; | ||
| 984 | gid = (unsigned short) s.st_gid; | ||
| 985 | #else | ||
| 979 | uid = s.st_uid; | 986 | uid = s.st_uid; |
| 980 | gid = s.st_gid; | 987 | gid = s.st_gid; |
| 988 | #endif | ||
| 981 | if (NILP (id_format) || EQ (id_format, Qinteger)) | 989 | if (NILP (id_format) || EQ (id_format, Qinteger)) |
| 982 | { | 990 | { |
| 983 | values[2] = make_fixnum_or_float (uid); | 991 | values[2] = make_fixnum_or_float (uid); |