X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/a971635315e259c076de020b3676c04d1dcc415e..80ddad17acad2466d0aa04f208d14f56a3fd2ff3:/lib-src/movemail.c diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 7f9026d89c..d452fd15a7 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -1,7 +1,7 @@ /* movemail foo bar -- move file foo to file bar, locking file foo the way /bin/mail respects. Copyright (C) 1986, 1992, 1993, 1994, 1996, 1999, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -341,6 +341,13 @@ main (argc, argv) close (desc); tem = link (tempname, lockname); + +#ifdef EPERM + if (tem < 0 && errno == EPERM) + fatal ("Unable to create hard link between %s and %s", + tempname, lockname); +#endif + unlink (tempname); if (tem >= 0) break; @@ -916,7 +923,7 @@ int mbx_delimit_begin (mbf) FILE *mbf; { - if (fputs ("\f\n0, unseen,,\n", mbf) == EOF) + if (fputs ("From movemail\n", mbf) == EOF) return (NOTOK); return (OK); } @@ -925,7 +932,7 @@ int mbx_delimit_end (mbf) FILE *mbf; { - if (putc ('\037', mbf) == EOF) + if (putc ('\n', mbf) == EOF) return (NOTOK); return (OK); }