diff options
author | dgp <dgp@noemail.net> | 2004-11-25 01:31:53 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2004-11-25 01:31:53 (GMT) |
commit | 485638ea0eb54aac50f7cf381f8e8c2e4d529a69 (patch) | |
tree | 311156ce049d6fc49473ae9d095697c8d9a32bd4 /unix/tcl.m4 | |
parent | a0429f93c5ae01ba102f3d876e4ae7f79f6147dd (diff) | |
download | tcl-485638ea0eb54aac50f7cf381f8e8c2e4d529a69.zip tcl-485638ea0eb54aac50f7cf381f8e8c2e4d529a69.tar.gz tcl-485638ea0eb54aac50f7cf381f8e8c2e4d529a69.tar.bz2 |
* unix/tcl.m4 (SC_ENABLE_THREADS): Corrected failure to determine
the number of arguments for readdir_r on SunOS systems. [Bug 1071701]
* unix/configure: autoconf-2.13
FossilOrigin-Name: 6c8167568c76be4adf564764772e34c5bcc478d6
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r-- | unix/tcl.m4 | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4 index ba0dd66..2ebb13a 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -435,6 +435,9 @@ AC_DEFUN(SC_ENABLE_THREADS, [ # allocator that significantly reduces lock contention AC_DEFINE(USE_THREAD_ALLOC) AC_DEFINE(_REENTRANT) + if test "`uname -s`" = "SunOS" ; then + AC_DEFINE(_POSIX_PTHREAD_SEMANTICS) + fi AC_DEFINE(_THREAD_SAFE) AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no) if test "$tcl_ok" = "no"; then @@ -485,12 +488,24 @@ AC_DEFUN(SC_ENABLE_THREADS, [ AC_CACHE_VAL(tcl_cv_two_arg_readdir_r, AC_TRY_COMPILE([#include <stdlib.h> #include <sys/types.h> -#include <sys/dir.h>], [readdir_r(NULL, NULL);], +#ifdef NO_DIRENT_H +# include <sys/dir.h> /* logic from tcl/compat/dirent.h * +# define dirent direct * */ +#else +# include <dirent.h> +#endif +], [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 <stdlib.h> #include <sys/types.h> -#include <sys/dir.h>], [readdir_r(NULL, NULL, NULL);], +#ifdef NO_DIRENT_H +# include <sys/dir.h> /* logic from tcl/compat/dirent.h * +# define dirent direct * */ +#else +# include <dirent.h> +#endif +], [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]) |