From 4a3369807be6e501ec6452edf99a73514c24d861 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 8 Oct 2020 12:11:11 +0000 Subject: Eliminate warnings when compiling with -Wundef --- generic/tclAlloc.c | 2 +- generic/tclCkalloc.c | 2 +- generic/tclEvent.c | 2 +- generic/tclObj.c | 2 +- win/tclWinPort.h | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c index dd83385..cc683b6 100644 --- a/generic/tclAlloc.c +++ b/generic/tclAlloc.c @@ -24,7 +24,7 @@ #include "tclInt.h" #if !defined(TCL_THREADS) || !defined(USE_THREAD_ALLOC) -#if USE_TCLALLOC +#if defined(USE_TCLALLOC) && USE_TCLALLOC /* * We should really make use of AC_CHECK_TYPE(caddr_t) here, but it can wait diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index 0dc1dca..6d661f6 100644 --- a/generic/tclCkalloc.c +++ b/generic/tclCkalloc.c @@ -1324,7 +1324,7 @@ TclFinalizeMemorySubsystem(void) Tcl_MutexUnlock(ckallocMutexPtr); #endif -#if USE_TCLALLOC +#if defined(USE_TCLALLOC) && USE_TCLALLOC TclFinalizeAllocSubsystem(); #endif } diff --git a/generic/tclEvent.c b/generic/tclEvent.c index ae40850..d8f5119 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -1045,7 +1045,7 @@ TclInitSubsystems(void) TclInitThreadStorage(); /* Creates hash table for * thread local storage */ -#if USE_TCLALLOC +#if defined(USE_TCLALLOC) && USE_TCLALLOC TclInitAlloc(); /* Process wide mutex init */ #endif #ifdef TCL_MEM_DEBUG diff --git a/generic/tclObj.c b/generic/tclObj.c index 70b2b1e..2ec5eb8 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -161,7 +161,7 @@ typedef struct PendingObjData { static PendingObjData pendingObjData; #define ObjInitDeletionContext(contextPtr) \ PendingObjData *const contextPtr = &pendingObjData -#elif HAVE_FAST_TSD +#elif defined(HAVE_FAST_TSD) static __thread PendingObjData pendingObjData; #define ObjInitDeletionContext(contextPtr) \ PendingObjData *const contextPtr = &pendingObjData diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 3d61a39..8641e5e 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -297,7 +297,7 @@ typedef DWORD_PTR * PDWORD_PTR; * defined in header files above. */ -#if TCL_UNION_WAIT +#ifdef TCL_UNION_WAIT # define WAIT_STATUS_TYPE union wait #else # define WAIT_STATUS_TYPE int @@ -439,10 +439,10 @@ typedef DWORD_PTR * PDWORD_PTR; * Define pid_t and uid_t if they're not already defined. */ -#if ! TCL_PID_T +#if !defined(TCL_PID_T) # define pid_t int #endif /* !TCL_PID_T */ -#if ! TCL_UID_T +#if !defined(TCL_UID_T) # define uid_t int #endif /* !TCL_UID_T */ -- cgit v0.12