summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2004-11-24 19:49:28 (GMT)
committerKevin B Kenny <kennykb@acm.org>2004-11-24 19:49:28 (GMT)
commitc65844feb7b671bd5048f36bf763d004947c3fc1 (patch)
tree28394ff3c4b08a3155341eb55e000e06cb0b0b3b /unix/tcl.m4
parent365126d4a4f8facef8165e398eb97402b286cc16 (diff)
downloadtcl-c65844feb7b671bd5048f36bf763d004947c3fc1.zip
tcl-c65844feb7b671bd5048f36bf763d004947c3fc1.tar.gz
tcl-c65844feb7b671bd5048f36bf763d004947c3fc1.tar.bz2
* unix/tcl.m4 (SC_ENABLE_THREADS): Corrected bad check for
3-argument readdir_r [Bug 1001325]. * unix/configure: Regenerated. * unix/tclUnixNotfy.c: Corrected all uses of 'select' to manage their masks using the FD_CLR, FD_ISSET, FD_SET, and FD_ZERO macros rather than bit-whacking that failed under Solaris-Sparc-64. [Bug 1071807]
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m49
1 files changed, 7 insertions, 2 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 197c83e..ba0dd66 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -479,19 +479,24 @@ AC_DEFUN(SC_ENABLE_THREADS, [
LIBS=$ac_saved_libs
AC_CHECK_FUNCS(readdir_r)
if test "x$ac_cv_func_readdir_r" = "xyes"; then
+ AC_MSG_CHECKING([how many args readdir_r takes])
# IRIX 5.3 has a 2 arg version of readdir_r
# while other systems have a 3 arg version.
AC_CACHE_VAL(tcl_cv_two_arg_readdir_r,
- AC_TRY_COMPILE([#include <sys/types.h>
+ AC_TRY_COMPILE([#include <stdlib.h>
+#include <sys/types.h>
#include <sys/dir.h>], [readdir_r(NULL, NULL);],
tcl_cv_two_arg_readdir_r=yes, tcl_cv_two_arg_readdir_r=no))
AC_CACHE_VAL(tcl_cv_three_arg_readdir_r,
- AC_TRY_COMPILE([#include <sys/types.h>
+ AC_TRY_COMPILE([#include <stdlib.h>
+#include <sys/types.h>
#include <sys/dir.h>], [readdir_r(NULL, NULL, NULL);],
tcl_cv_three_arg_readdir_r=yes, tcl_cv_three_arg_readdir_r=no))
if test "x$tcl_cv_two_arg_readdir_r" = "xyes" ; then
+ AC_MSG_RESULT([2])
AC_DEFINE(HAVE_TWO_ARG_READDIR_R)
elif test "x$tcl_cv_three_arg_readdir_r" = "xyes" ; then
+ AC_MSG_RESULT([3])
AC_DEFINE(HAVE_THREE_ARG_READDIR_R)
else
AC_MSG_ERROR([unknown number of args for readdir_r])