summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--unix/tclUnixThrd.c6
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e37d797..5f3564c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-04-09 Jeff Hobbs <hobbs@scriptics.com>
+
+ * unix/tclUnixThrd.c (Tcl_CreateThread): moved TCL_THREADS ifdef
+ inside of func as it is declared for non-threads builds as well.
+ In the non-threads case, it always returns TCL_ERROR (couldn't
+ create thread).
+
2000-04-08 Andreas Kupries <a.kupries@westend.com>
* Overall change: Definition of a public API for the creation of
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index ca3e592..fb6e8cb 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -54,7 +54,6 @@ static pthread_mutex_t *allocLockPtr = &allocLock;
-#ifdef TCL_THREADS
/*
*----------------------------------------------------------------------
@@ -82,6 +81,7 @@ Tcl_CreateThread(idPtr, proc, clientData, stackSize, flags)
int flags; /* Flags controlling behaviour of
* the new thread */
{
+#ifdef TCL_THREADS
pthread_attr_t attr;
int result;
@@ -128,8 +128,12 @@ Tcl_CreateThread(idPtr, proc, clientData, stackSize, flags)
}
pthread_attr_destroy(&attr);
return result;
+#else
+ return TCL_ERROR;
+#endif /* TCL_THREADS */
}
+#ifdef TCL_THREADS
/*
*----------------------------------------------------------------------
*