diff --git a/CHANGES b/CHANGES index fa2702716d..901958f562 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +1496. [port] test for pthread_attr_setstacksize(). + 1495. [cleanup] Replace hash functions with universal hash. 1494. [security] Turn on RSA BLINDING as a precaution. diff --git a/acconfig.h b/acconfig.h index 41a195c50d..7f99dce83d 100644 --- a/acconfig.h +++ b/acconfig.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: acconfig.h,v 1.40 2003/04/01 05:18:21 marka Exp $ */ +/* $Id: acconfig.h,v 1.41 2003/07/25 05:08:50 marka Exp $ */ /*** *** This file is not to be included by any public header files, because @@ -133,6 +133,9 @@ int sigwait(const unsigned int *set, int *sig); /* define if pthread_attr_getstacksize() is available */ #undef HAVE_PTHREAD_ATTR_GETSTACKSIZE +/* define if pthread_attr_setstacksize() is available */ +#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE + /* define if you have strerror in the C library. */ #undef HAVE_STRERROR diff --git a/configure.in b/configure.in index 52505d3e3e..32d083b35c 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl esyscmd([sed "s/^/# /" COPYRIGHT])dnl AC_DIVERT_POP()dnl -AC_REVISION($Revision: 1.345 $) +AC_REVISION($Revision: 1.346 $) AC_INIT(lib/dns/name.c) AC_PREREQ(2.13) @@ -693,6 +693,9 @@ then AC_CHECK_FUNC(pthread_attr_getstacksize, AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),) + AC_CHECK_FUNC(pthread_attr_setstacksize, + AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE),) + # # Additional OS-specific issues related to pthreads and sigwait. # diff --git a/lib/isc/pthreads/thread.c b/lib/isc/pthreads/thread.c index 78ae4a5a64..de9c3c1827 100644 --- a/lib/isc/pthreads/thread.c +++ b/lib/isc/pthreads/thread.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: thread.c,v 1.10 2003/07/25 00:01:13 marka Exp $ */ +/* $Id: thread.c,v 1.11 2003/07/25 05:08:51 marka Exp $ */ #include @@ -36,7 +36,8 @@ isc_thread_create(isc_threadfunc_t func, isc_threadarg_t arg, pthread_attr_init(&attr); -#ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE +#if defined(HAVE_PTHREAD_ATTR_GETSTACKSIZE) && \ + defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE) ret = pthread_attr_getstacksize(&attr, &stacksize); if (ret != 0) return (ISC_R_UNEXPECTED);