aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src/movemail.c
diff options
context:
space:
mode:
authorStefan Monnier2012-03-25 16:37:21 -0400
committerStefan Monnier2012-03-25 16:37:21 -0400
commit699c782b7668c44d0fa4446331b0590a6d5dac82 (patch)
tree5dcce364741d0761920a3d274b0fc8aba4103d45 /lib-src/movemail.c
parent98fb480ee31bf74cf554044f60f21df16566dd7f (diff)
parente99a9b8bdccadded1f6fae88ee7a2a93dfd4eacf (diff)
downloademacs-pending.tar.gz
emacs-pending.zip
Merge from trunkpending
Diffstat (limited to 'lib-src/movemail.c')
-rw-r--r--lib-src/movemail.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
index e8c09f090f3..9d19df32814 100644
--- a/lib-src/movemail.c
+++ b/lib-src/movemail.c
@@ -1,7 +1,7 @@
1/* movemail foo bar -- move file foo to file bar, 1/* movemail foo bar -- move file foo to file bar,
2 locking file foo the way /bin/mail respects. 2 locking file foo the way /bin/mail respects.
3 3
4Copyright (C) 1986, 1992-1994, 1996, 1999, 2001-2011 4Copyright (C) 1986, 1992-1994, 1996, 1999, 2001-2012
5 Free Software Foundation, Inc. 5 Free Software Foundation, Inc.
6 6
7This file is part of GNU Emacs. 7This file is part of GNU Emacs.
@@ -68,9 +68,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
68#ifdef HAVE_FCNTL_H 68#ifdef HAVE_FCNTL_H
69#include <fcntl.h> 69#include <fcntl.h>
70#endif 70#endif
71#ifdef HAVE_STRING_H
72#include <string.h> 71#include <string.h>
73#endif
74#include "syswait.h" 72#include "syswait.h"
75#ifdef MAIL_USE_POP 73#ifdef MAIL_USE_POP
76#include "pop.h" 74#include "pop.h"
@@ -185,8 +183,8 @@ main (int argc, char **argv)
185# define ARGSTR "p" 183# define ARGSTR "p"
186#endif /* MAIL_USE_POP */ 184#endif /* MAIL_USE_POP */
187 185
188 uid_t real_gid = getgid(); 186 uid_t real_gid = getgid ();
189 uid_t priv_gid = getegid(); 187 uid_t priv_gid = getegid ();
190 188
191#ifdef WINDOWSNT 189#ifdef WINDOWSNT
192 /* Ensure all file i/o is in binary mode. */ 190 /* Ensure all file i/o is in binary mode. */
@@ -327,11 +325,10 @@ main (int argc, char **argv)
327 if (desc < 0) 325 if (desc < 0)
328 { 326 {
329 int mkstemp_errno = errno; 327 int mkstemp_errno = errno;
330 char *message = (char *) xmalloc (strlen (tempname) + 50); 328 error ("error while creating what would become the lock file",
331 sprintf (message, "creating %s, which would become the lock file", 329 0, 0);
332 tempname);
333 errno = mkstemp_errno; 330 errno = mkstemp_errno;
334 pfatal_with_name (message); 331 pfatal_with_name (tempname);
335 } 332 }
336 close (desc); 333 close (desc);
337 334