diff options
author | mdejong <mdejong@noemail.net> | 2004-11-22 22:48:24 (GMT) |
---|---|---|
committer | mdejong <mdejong@noemail.net> | 2004-11-22 22:48:24 (GMT) |
commit | ae49e7254f831db8aa9c148330c9c08df6ebdd60 (patch) | |
tree | 77a89b040355d776bdb439eb5a181f16e5d1254e /unix/tcl.m4 | |
parent | e902b658bbcafc316b21fd8f1b831dab0a9ed6b4 (diff) | |
download | tcl-ae49e7254f831db8aa9c148330c9c08df6ebdd60.zip tcl-ae49e7254f831db8aa9c148330c9c08df6ebdd60.tar.gz tcl-ae49e7254f831db8aa9c148330c9c08df6ebdd60.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]
FossilOrigin-Name: 63b8c61faa1688fff349142bdd64bd0e94fac7e3
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r-- | unix/tcl.m4 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4 index a1bdc5b..1cbc199 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -478,6 +478,25 @@ AC_DEFUN(SC_ENABLE_THREADS, [ AC_CHECK_FUNCS(pthread_atfork) LIBS=$ac_saved_libs AC_CHECK_FUNCS(readdir_r) + if test "x$ac_cv_func_readdir_r" = "xyes"; then + # 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> +#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> +#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_DEFINE(HAVE_TWO_ARG_READDIR_R) + elif test "x$tcl_cv_three_arg_readdir_r" = "xyes" ; then + AC_DEFINE(HAVE_THREE_ARG_READDIR_R) + else + AC_MSG_ERROR([unknown number of args for readdir_r]) + fi + fi else TCL_THREADS=0 AC_MSG_RESULT([no (default)]) |