HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca
[bpt/emacs.git]
/
lib-src
/
movemail.c
diff --git
a/lib-src/movemail.c
b/lib-src/movemail.c
index
0a88066
..
616cbde
100644
(file)
--- a/
lib-src/movemail.c
+++ b/
lib-src/movemail.c
@@
-65,9
+65,7
@@
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <getopt.h>
#include <unistd.h>
#include <getopt.h>
#include <unistd.h>
-#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#include <fcntl.h>
-#endif
#include <string.h>
#include "syswait.h"
#ifdef MAIL_USE_POP
#include <string.h>
#include "syswait.h"
#ifdef MAIL_USE_POP
@@
-98,13
+96,6
@@
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <fcntl.h>
#endif /* WINDOWSNT */
#include <fcntl.h>
#endif /* WINDOWSNT */
-#ifndef F_OK
-#define F_OK 0
-#define X_OK 1
-#define W_OK 2
-#define R_OK 4
-#endif
-
#ifdef WINDOWSNT
#include <sys/locking.h>
#endif
#ifdef WINDOWSNT
#include <sys/locking.h>
#endif
@@
-337,11
+328,8
@@
main (int argc, char **argv)
tem = link (tempname, lockname);
tem = link (tempname, lockname);
-#ifdef EPERM
- if (tem < 0 && errno == EPERM)
- fatal ("Unable to create hard link between %s and %s",
- tempname, lockname);
-#endif
+ if (tem < 0 && errno != EEXIST)
+ pfatal_with_name (lockname);
unlink (tempname);
if (tem >= 0)
unlink (tempname);
if (tem >= 0)
@@
-442,22
+430,10
@@
main (int argc, char **argv)
for certain failure codes. */
if (status < 0)
{
for certain failure codes. */
if (status < 0)
{
- if (++lockcount <= 5)
+ if (++lockcount <= 5
&& (errno == EAGAIN || errno == EBUSY)
)
{
{
-#ifdef EAGAIN
- if (errno == EAGAIN)
- {
- sleep (1);
- goto retry_lock;
- }
-#endif
-#ifdef EBUSY
- if (errno == EBUSY)
- {
- sleep (1);
- goto retry_lock;
- }
-#endif
+ sleep (1);
+ goto retry_lock;
}
pfatal_with_name (inname);
}
pfatal_with_name (inname);