summaryrefslogtreecommitdiff
path: root/lib-src/movemail.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-11-26 21:17:07 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2012-11-26 21:17:07 -0800
commit22626a856b520e4b092b2e4132f57adf8aaf7227 (patch)
treeabc3470fbae12b661ff438341ae52f829421afc1 /lib-src/movemail.c
parent5c9cf0a3f9817220ed0f907637951f5cdf1a9614 (diff)
downloademacs-22626a856b520e4b092b2e4132f57adf8aaf7227.tar.gz
Assume POSIX 1003.1-1988 or later for errno.h.
* lib-src/movemail.c (main): Assume EAGAIN and EBUSY. * src/dired.c (directory_files_internal, file_name_completion): Assume EAGAIN and EINTR are defined. * src/fileio.c (Fcopy_file): Assume EISDIR is defined. * src/gmalloc.c (ENOMEM, EINVAL): Assume they're defined. * src/gnutls.c (emacs_gnutls_write): Assume EAGAIN is defined. * src/lread.c (readbyte_from_file): Assume EINTR is defined. * src/process.c (wait_reading_process_output, send_process) [subprocesses]: Assume EIO and EAGAIN are defined. * src/unexcoff.c (write_segment): Assume EFAULT is defined. Fixes: debbugs:12968
Diffstat (limited to 'lib-src/movemail.c')
-rw-r--r--lib-src/movemail.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
index 264b3d292c6..f2b2484c8e3 100644
--- a/lib-src/movemail.c
+++ b/lib-src/movemail.c
@@ -430,22 +430,10 @@ main (int argc, char **argv)
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);