aboutsummaryrefslogtreecommitdiffstats
path: root/src/dired.c
diff options
context:
space:
mode:
authorPaul Eggert2012-11-26 21:17:07 -0800
committerPaul Eggert2012-11-26 21:17:07 -0800
commit22626a856b520e4b092b2e4132f57adf8aaf7227 (patch)
treeabc3470fbae12b661ff438341ae52f829421afc1 /src/dired.c
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 'src/dired.c')
-rw-r--r--src/dired.c42
1 files changed, 18 insertions, 24 deletions
diff --git a/src/dired.c b/src/dired.c
index 3530b74ecb4..54bdc083f70 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -193,19 +193,15 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full,
193 193
194 errno = 0; 194 errno = 0;
195 dp = readdir (d); 195 dp = readdir (d);
196 196 if (!dp)
197 if (dp == NULL && (0 197 {
198#ifdef EAGAIN 198 if (errno == EAGAIN || errno == EINTR)
199 || errno == EAGAIN 199 {
200#endif 200 QUIT;
201#ifdef EINTR 201 continue;
202 || errno == EINTR 202 }
203#endif 203 break;
204 )) 204 }
205 { QUIT; continue; }
206
207 if (dp == NULL)
208 break;
209 205
210 len = dirent_namelen (dp); 206 len = dirent_namelen (dp);
211 name = finalname = make_unibyte_string (dp->d_name, len); 207 name = finalname = make_unibyte_string (dp->d_name, len);
@@ -480,17 +476,15 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag,
480 476
481 errno = 0; 477 errno = 0;
482 dp = readdir (d); 478 dp = readdir (d);
483 if (dp == NULL && (0 479 if (!dp)
484# ifdef EAGAIN 480 {
485 || errno == EAGAIN 481 if (errno == EAGAIN || errno == EINTR)
486# endif 482 {
487# ifdef EINTR 483 QUIT;
488 || errno == EINTR 484 continue;
489# endif 485 }
490 )) 486 break;
491 { QUIT; continue; } 487 }
492
493 if (!dp) break;
494 488
495 len = dirent_namelen (dp); 489 len = dirent_namelen (dp);
496 490