# HG changeset patch # User Jason Rumney # Date 1206973332 0 # Node ID 780cad93de3d69bc09045fafde1cc2b7cf2bb972 # Parent 1a844d29f8e38105895c6f225ba58d6587427071 (Ffile_attributes) [WINDOWSNT]: Cast uid and gid to unsigned. diff -r 1a844d29f8e3 -r 780cad93de3d src/dired.c --- a/src/dired.c Sat Mar 29 19:37:56 2008 +0000 +++ b/src/dired.c Mon Mar 31 14:22:12 2008 +0000 @@ -976,8 +976,16 @@ 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);