diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-11-24 08:02:26 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-11-24 08:02:26 +0000 |
commit | cfdc57af95e091401a479aa49f37ed719df35f5f (patch) | |
tree | dc062677e4c3170a960be762e07ab4833e2f6233 | |
parent | 7a18f5c2af2b96251a501065a2c608c5abb66255 (diff) | |
download | emacs-cfdc57af95e091401a479aa49f37ed719df35f5f.tar.gz |
(closedir): Pass on the value from sys_closedir.
Do use this definition, if INTERRUPTIBLE_CLOSE.
-rw-r--r-- | src/sysdep.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index 47e6836d01d..ce457f63b71 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2989,12 +2989,15 @@ char *sys_siglist[NSIG + 1] = #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 @@ closedir (dirp) 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 |