diff options
Diffstat (limited to 'lib-src/movemail.c')
| -rw-r--r-- | lib-src/movemail.c | 15 |
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 | ||
| 4 | Copyright (C) 1986, 1992-1994, 1996, 1999, 2001-2011 | 4 | Copyright (C) 1986, 1992-1994, 1996, 1999, 2001-2012 |
| 5 | Free Software Foundation, Inc. | 5 | Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | This file is part of GNU Emacs. | 7 | This 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 | ||