From d1da1eb35928036b93823f964609d1a166ee0af6 Mon Sep 17 00:00:00 2001
From: David Hedbor <david@hedbor.org>
Date: Tue, 19 Nov 1996 02:04:32 -0800
Subject: [PATCH] committing

Rev: src/configure.in:1.22
Rev: src/machine.h.in:1.11
Rev: src/threads.c:1.12
---
 src/configure.in | 3 ++-
 src/machine.h.in | 4 ++++
 src/threads.c    | 4 +++-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/configure.in b/src/configure.in
index ef6caa3cc0..e0d3c1a322 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -1,4 +1,4 @@
-# $Id: configure.in,v 1.21 1996/11/18 23:09:40 hubbe Exp $
+# $Id: configure.in,v 1.22 1996/11/19 10:04:30 neotron Exp $
 
 AC_INIT(interpret.c)
 
@@ -374,6 +374,7 @@ if test $pike_cv_posix_threads = yes ; then
   AC_DEFINE(_REENTRANT)
   AC_DEFINE(_THREAD_SAFE)
   AC_DEFINE(_MIT_POSIX_THREADS)
+  AC_CHECK_FUNCS(pthread_attr_setstacksize)
 else
   AC_MSG_RESULT(no)
   LIBS="$OLDLIBS"
diff --git a/src/machine.h.in b/src/machine.h.in
index 46567089dd..496bc84a41 100644
--- a/src/machine.h.in
+++ b/src/machine.h.in
@@ -339,6 +339,10 @@
 #undef _THREAD_SAFE
 #undef _MIT_POSIX_THREADS
 
+/* Define this if you have pthread_attr_setstacksize() */
+#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE
+
+
 /* Define this if you have dlopen() */
 #undef HAVE_DLOPEN
 
diff --git a/src/threads.c b/src/threads.c
index f683cbe6cb..9e6c59d973 100644
--- a/src/threads.c
+++ b/src/threads.c
@@ -1,5 +1,5 @@
 #include "global.h"
-RCSID("$Id: threads.c,v 1.11 1996/11/17 01:57:49 hubbe Exp $");
+RCSID("$Id: threads.c,v 1.12 1996/11/19 10:04:29 neotron Exp $");
 
 int num_threads = 1;
 int threads_disabled = 0;
@@ -124,7 +124,9 @@ void th_init()
 {
   mt_lock( & interpreter_lock);
   pthread_attr_init(&pattr);
+#ifdef HAVE_PTHREAD_ATTR_SETSTACKSIZE
   pthread_attr_setstacksize(&pattr, 2 * 1024 * 1204);
+#endif
   pthread_attr_setdetachstate(&pattr, PTHREAD_CREATE_DETACHED);
 
   add_efun("thread_create",f_thread_create,"function(mixed ...:int)",OPT_SIDE_EFFECT);
-- 
GitLab