Mercurial > emacs
changeset 5158:035f80625c5e
(closedir): Pass on the value from sys_closedir.
Do use this definition, if INTERRUPTIBLE_CLOSE.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 24 Nov 1993 08:02:26 +0000 |
parents | d39a061f984a |
children | 484e65abfdea |
files | src/sysdep.c |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/sysdep.c Wed Nov 24 06:46:26 1993 +0000 +++ b/src/sysdep.c Wed Nov 24 08:02:26 1993 +0000 @@ -2989,12 +2989,15 @@ #include <dirent.h> -#ifndef HAVE_CLOSEDIR +#if defined(INTERRUPTIBLE_CLOSE) || !defined(HAVE_CLOSEDIR) + int closedir (dirp) register DIR *dirp; /* stream from opendir */ { - sys_close (dirp->dd_fd); + int rtnval; + + rtnval = sys_close (dirp->dd_fd); /* Some systems (like Solaris) allocate the buffer and the DIR all in one block. Why in the world are we freeing this ourselves @@ -3003,8 +3006,10 @@ xfree ((char *) dirp->dd_buf); /* directory block defined in <dirent.h> */ #endif xfree ((char *) dirp); + + return rtnval; } -#endif /* not HAVE_CLOSEDIR */ +#endif /* INTERRUPTIBLE_CLOSE or not HAVE_CLOSEDIR */ #endif /* SYSV_SYSTEM_DIR */ #ifdef NONSYSTEM_DIR_LIBRARY