aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdep.c
diff options
context:
space:
mode:
authorRichard M. Stallman1993-11-24 08:02:26 +0000
committerRichard M. Stallman1993-11-24 08:02:26 +0000
commitcfdc57af95e091401a479aa49f37ed719df35f5f (patch)
treedc062677e4c3170a960be762e07ab4833e2f6233 /src/sysdep.c
parent7a18f5c2af2b96251a501065a2c608c5abb66255 (diff)
downloademacs-cfdc57af95e091401a479aa49f37ed719df35f5f.tar.gz
emacs-cfdc57af95e091401a479aa49f37ed719df35f5f.zip
(closedir): Pass on the value from sys_closedir.
Do use this definition, if INTERRUPTIBLE_CLOSE.
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c11
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] =
2989 2989
2990#include <dirent.h> 2990#include <dirent.h>
2991 2991
2992#ifndef HAVE_CLOSEDIR 2992#if defined(INTERRUPTIBLE_CLOSE) || !defined(HAVE_CLOSEDIR)
2993
2993int 2994int
2994closedir (dirp) 2995closedir (dirp)
2995 register DIR *dirp; /* stream from opendir */ 2996 register DIR *dirp; /* stream from opendir */
2996{ 2997{
2997 sys_close (dirp->dd_fd); 2998 int rtnval;
2999
3000 rtnval = sys_close (dirp->dd_fd);
2998 3001
2999 /* Some systems (like Solaris) allocate the buffer and the DIR all 3002 /* Some systems (like Solaris) allocate the buffer and the DIR all
3000 in one block. Why in the world are we freeing this ourselves 3003 in one block. Why in the world are we freeing this ourselves
@@ -3003,8 +3006,10 @@ closedir (dirp)
3003 xfree ((char *) dirp->dd_buf); /* directory block defined in <dirent.h> */ 3006 xfree ((char *) dirp->dd_buf); /* directory block defined in <dirent.h> */
3004#endif 3007#endif
3005 xfree ((char *) dirp); 3008 xfree ((char *) dirp);
3009
3010 return rtnval;
3006} 3011}
3007#endif /* not HAVE_CLOSEDIR */ 3012#endif /* INTERRUPTIBLE_CLOSE or not HAVE_CLOSEDIR */
3008#endif /* SYSV_SYSTEM_DIR */ 3013#endif /* SYSV_SYSTEM_DIR */
3009 3014
3010#ifdef NONSYSTEM_DIR_LIBRARY 3015#ifdef NONSYSTEM_DIR_LIBRARY