Assume POSIX 1003.1-1988 or later for grp.h, pwd.h.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 27 Nov 2012 05:38:42 +0000 (21:38 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 27 Nov 2012 05:38:42 +0000 (21:38 -0800)
* dired.c (stat_uname, stat_gname):
* fileio.c (Fexpand_file_name): Remove no-longer-needed casts.

src/ChangeLog
src/dired.c
src/fileio.c

index 0594f73..8e53053 100644 (file)
@@ -1,8 +1,13 @@
 2012-11-27  Paul Eggert  <eggert@cs.ucla.edu>
 
+       Assume POSIX 1003.1-1988 or later for grp.h, pwd.h.
+       * dired.c (stat_uname, stat_gname):
+       * fileio.c (Fexpand_file_name): Remove no-longer-needed casts.
+
        Assume POSIX 1003.1-1988 or later for errno.h (Bug#12968).
        * dired.c (directory_files_internal, file_name_completion):
        Assume EAGAIN and EINTR are defined.
+
        * fileio.c (Fcopy_file): Assume EISDIR is defined.
        * gmalloc.c (ENOMEM, EINVAL): Assume they're defined.
        * gnutls.c (emacs_gnutls_write): Assume EAGAIN is defined.
index 54bdc08..bdb71c4 100644 (file)
@@ -820,7 +820,7 @@ stat_uname (struct stat *st)
 #ifdef WINDOWSNT
   return st->st_uname;
 #else
-  struct passwd *pw = (struct passwd *) getpwuid (st->st_uid);
+  struct passwd *pw = getpwuid (st->st_uid);
 
   if (pw)
     return pw->pw_name;
@@ -835,7 +835,7 @@ stat_gname (struct stat *st)
 #ifdef WINDOWSNT
   return st->st_gname;
 #else
-  struct group *gr = (struct group *) getgrgid (st->st_gid);
+  struct group *gr = getgrgid (st->st_gid);
 
   if (gr)
     return gr->gr_name;
index 98b2703..48dbf20 100644 (file)
@@ -1042,7 +1042,7 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
          o [p - nm] = 0;
 
          block_input ();
-         pw = (struct passwd *) getpwnam (o + 1);
+         pw = getpwnam (o + 1);
          unblock_input ();
          if (pw)
            {