summaryrefslogtreecommitdiffstats
path: root/generic/tcl.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-05-17 18:53:29 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-05-17 18:53:29 (GMT)
commit4f1ea4779be85d8837f3a133b52d3b5aa9e53fda (patch)
tree401339ab1470b40cccd1bec272ac42427c694d92 /generic/tcl.h
parent4e12ee1bc4fe5d4c49f614f7e18c6df1c8ea0e40 (diff)
parentf44e7c1795fe27f3f37e692f275545e3fe73ebd6 (diff)
downloadtcl-4f1ea4779be85d8837f3a133b52d3b5aa9e53fda.zip
tcl-4f1ea4779be85d8837f3a133b52d3b5aa9e53fda.tar.gz
tcl-4f1ea4779be85d8837f3a133b52d3b5aa9e53fda.tar.bz2
TIP #491 implementation: Threading Support: phasing out non-threaded builds
Diffstat (limited to 'generic/tcl.h')
-rw-r--r--generic/tcl.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index a5f85df..ff82bd6 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -91,6 +91,10 @@ extern "C" {
#endif
#endif /* !TCL_NO_DEPRECATED */
+#ifndef TCL_THREADS
+# define TCL_THREADS 1
+#endif
+
/*
* A special definition used to allow this header file to be included from
* windows resource files so that they can obtain version information.
@@ -107,7 +111,7 @@ extern "C" {
* using threads.
*/
-#ifdef TCL_THREADS
+#if !defined(TCL_THREADS) || TCL_THREADS
#define TCL_DECLARE_MUTEX(name) static Tcl_Mutex name;
#else
#define TCL_DECLARE_MUTEX(name)
@@ -2561,7 +2565,7 @@ EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr);
* when compiling without thread support.
*/
-#ifndef TCL_THREADS
+#if defined(TCL_THREADS) && !TCL_THREADS
#undef Tcl_MutexLock
#define Tcl_MutexLock(mutexPtr)
#undef Tcl_MutexUnlock
@@ -2574,7 +2578,7 @@ EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr);
#define Tcl_ConditionWait(condPtr, mutexPtr, timePtr)
#undef Tcl_ConditionFinalize
#define Tcl_ConditionFinalize(condPtr)
-#endif /* TCL_THREADS */
+#endif /* !TCL_THREADS */
/*
*----------------------------------------------------------------------------