aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorPaul Eggert2012-11-26 21:17:07 -0800
committerPaul Eggert2012-11-26 21:17:07 -0800
commit22626a856b520e4b092b2e4132f57adf8aaf7227 (patch)
treeabc3470fbae12b661ff438341ae52f829421afc1 /lib-src
parent5c9cf0a3f9817220ed0f907637951f5cdf1a9614 (diff)
downloademacs-22626a856b520e4b092b2e4132f57adf8aaf7227.tar.gz
emacs-22626a856b520e4b092b2e4132f57adf8aaf7227.zip
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')
-rw-r--r--lib-src/ChangeLog5
-rw-r--r--lib-src/movemail.c18
2 files changed, 8 insertions, 15 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index b85ba12a5b2..a74d4b90b9f 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,8 @@
12012-11-27 Paul Eggert <eggert@cs.ucla.edu>
2
3 Assume POSIX 1003.1-1988 or later for errno.h (Bug#12968).
4 * movemail.c (main): Assume EAGAIN and EBUSY.
5
12012-11-23 Paul Eggert <eggert@cs.ucla.edu> 62012-11-23 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 movemail: treat EACCES etc. failures as permanent 8 movemail: treat EACCES etc. failures as permanent
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)
430 for certain failure codes. */ 430 for certain failure codes. */
431 if (status < 0) 431 if (status < 0)
432 { 432 {
433 if (++lockcount <= 5) 433 if (++lockcount <= 5 && (errno == EAGAIN || errno == EBUSY))
434 { 434 {
435#ifdef EAGAIN 435 sleep (1);
436 if (errno == EAGAIN) 436 goto retry_lock;
437 {
438 sleep (1);
439 goto retry_lock;
440 }
441#endif
442#ifdef EBUSY
443 if (errno == EBUSY)
444 {
445 sleep (1);
446 goto retry_lock;
447 }
448#endif
449 } 437 }
450 438
451 pfatal_with_name (inname); 439 pfatal_with_name (inname);