summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixThrd.c
diff options
context:
space:
mode:
authormdejong <mdejong>2004-11-22 22:40:31 (GMT)
committermdejong <mdejong>2004-11-22 22:40:31 (GMT)
commitef4b091cbe98d05b7498a99ef0e793e55986e3e2 (patch)
tree3758dcfd85bf95084418f687dbd39900c691434b /unix/tclUnixThrd.c
parent586e32dd0e46d891670556611f65277053f070c3 (diff)
downloadtcl-ef4b091cbe98d05b7498a99ef0e793e55986e3e2.zip
tcl-ef4b091cbe98d05b7498a99ef0e793e55986e3e2.tar.gz
tcl-ef4b091cbe98d05b7498a99ef0e793e55986e3e2.tar.bz2
* unix/configure: Regen.
* unix/tcl.m4 (SC_ENABLE_THREADS): Check for a 2 argument version of readdir_r that is known to exists under IRIX 5.3. * unix/tclUnixThrd.c (TclpReaddir): Use either 2 arg or 3 arg version of readdir_r. [Bug 1001325]
Diffstat (limited to 'unix/tclUnixThrd.c')
-rw-r--r--unix/tclUnixThrd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index b79442f..17130a7 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -883,8 +883,12 @@ TclpReaddir(DIR * dir)
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
#ifdef HAVE_READDIR_R
- ent = &tsdPtr->rdbuf.ent;
+ ent = &tsdPtr->rdbuf.ent;
+# ifdef HAVE_TWO_ARG_READDIR_R
+ if (TclOSreaddir_r(dir, ent) != 0) {
+# else /* HAVE_THREE_ARG_READDIR_R */
if (TclOSreaddir_r(dir, ent, &ent) != 0) {
+# endif /* HAVE_TWO_ARG_READDIR_R */
ent = NULL;
}