From 58d332cff948e96f4a0f554ebe7ab3b43724669b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 9 Oct 2018 21:13:42 +0000 Subject: Use TCL_THREADS in stead of defined(TCL_THREADS) everywhere, otherwise it will give unexpected results with TCL_THREADS=0 --- generic/tclZipfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index d8a3f84..e60d94d 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -183,7 +183,7 @@ static const char drvletters[] = * Mutex to protect localtime(3) when no reentrant version available. */ -#if !defined(_WIN32) && !defined(HAVE_LOCALTIME_R) && defined(TCL_THREADS) +#if !defined(_WIN32) && !defined(HAVE_LOCALTIME_R) && TCL_THREADS TCL_DECLARE_MUTEX(localtimeMutex) #endif /* !_WIN32 && !HAVE_LOCALTIME_R && TCL_THREADS */ @@ -477,7 +477,7 @@ static Tcl_ChannelType ZipChannelType = { TCL_DECLARE_MUTEX(ZipFSMutex) -#ifdef TCL_THREADS +#if TCL_THREADS static Tcl_Condition ZipFSCond; @@ -568,7 +568,7 @@ ToDosTime( { struct tm *tmp, tm; -#if !defined(TCL_THREADS) || defined(_WIN32) +#if !TCL_THREADS || defined(_WIN32) /* Not threaded, or on Win32 which uses thread local storage */ tmp = localtime(&when); tm = *tmp; @@ -592,7 +592,7 @@ ToDosDate( { struct tm *tmp, tm; -#if !defined(TCL_THREADS) || defined(_WIN32) +#if !TCL_THREADS || defined(_WIN32) /* Not threaded, or on Win32 which uses thread local storage */ tmp = localtime(&when); tm = *tmp; @@ -1498,7 +1498,7 @@ ZipFSCatalogFilesystem( static void ZipfsSetup(void) { -#ifdef TCL_THREADS +#if TCL_THREADS static const Tcl_Time t = { 0, 0 }; /* -- cgit v0.12