* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: acconfig.h,v 1.29 2000/09/22 18:52:32 bwelling Exp $ */
+/* $Id: acconfig.h,v 1.30 2000/12/22 20:50:01 bwelling Exp $ */
/***
*** This file is not to be included by any public header files, because
/* define if the system has a random number generating device */
#undef PATH_RANDOMDEV
+
+/* define if pthread_attr_getstacksize() is available */
+#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: config.h.in,v 1.38 2000/09/22 18:52:34 bwelling Exp $ */
+/* $Id: config.h.in,v 1.39 2000/12/22 20:50:02 bwelling Exp $ */
/***
*** This file is not to be included by any public header files, because
/* define if the system has a random number generating device */
#undef PATH_RANDOMDEV
+/* define if pthread_attr_getstacksize() is available */
+#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE
+
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
-AC_REVISION($Revision: 1.199 $)
+AC_REVISION($Revision: 1.200 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.13)
;;
*)
AC_CHECK_LIB(pthread, pthread_create,,
- AC_CHECK_LIB(pthread, __pthread_create)
- AC_CHECK_LIB(pthread, __pthread_create_system)
- AC_CHECK_LIB(pthreads, pthread_create))
+ AC_CHECK_LIB(pthread, __pthread_create,,
+ AC_CHECK_LIB(pthread, __pthread_create_system,,
+ use_threads=false)))
;;
esac
+fi
+#
+# We may have failed to find libpthread, so check again.
+#
+if $use_threads
+then
#
# We'd like to use sigwait() too
#
AC_DEFINE(HAVE_SIGWAIT),))
)
+ AC_CHECK_FUNC(pthread_attr_getstacksize,
+ AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
+
#
# Additional OS-specific issues related to pthreads and sigwait.
#
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: thread.c,v 1.7 2000/08/01 01:31:01 tale Exp $ */
+/* $Id: thread.c,v 1.8 2000/12/22 20:50:05 bwelling Exp $ */
#include <config.h>
pthread_attr_init(&attr);
+#ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE
ret = pthread_attr_getstacksize(&attr, &stacksize);
if (ret != 0)
return (ISC_R_UNEXPECTED);
if (ret != 0)
return (ISC_R_UNEXPECTED);
}
+#endif
ret = pthread_create(thread, &attr, func, arg);
if (ret != 0)