This is an automated email from the ASF dual-hosted git repository.
swebb2066 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
The following commit(s) were added to refs/heads/master by this push:
new 24545c95 Remove the unused class helpers::ThreadLocal in the next ABI
version (#690)
24545c95 is described below
commit 24545c951178c4ebcd2ea1e7f2ee81b2c9df725a
Author: Stephen Webb <[email protected]>
AuthorDate: Wed May 27 12:44:04 2026 +1000
Remove the unused class helpers::ThreadLocal in the next ABI version (#690)
---
src/main/cpp/CMakeLists.txt | 8 ++++++--
src/main/cpp/threadlocal.cpp | 3 +++
src/main/include/log4cxx/helpers/threadlocal.h | 5 +++++
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/main/cpp/CMakeLists.txt b/src/main/cpp/CMakeLists.txt
index 92f04995..5a2d3d22 100644
--- a/src/main/cpp/CMakeLists.txt
+++ b/src/main/cpp/CMakeLists.txt
@@ -212,7 +212,6 @@ target_sources(log4cxx
system.cpp
systemerrwriter.cpp
systemoutwriter.cpp
- threadlocal.cpp
threadpatternconverter.cpp
threadusernamepatternconverter.cpp
threadspecificdata.cpp
@@ -229,7 +228,12 @@ target_sources(log4cxx
zipcompressaction.cpp
${extra_classes}
)
-
+if(${log4cxx_ABI_VER} LESS 16)
+ target_sources(log4cxx
+ PRIVATE
+ threadlocal.cpp
+ )
+endif()
if(LOG4CXX_EVENTS_AT_EXIT)
target_sources(log4cxx
PRIVATE atexitregistry.cpp
diff --git a/src/main/cpp/threadlocal.cpp b/src/main/cpp/threadlocal.cpp
index 5bc91711..9abb7612 100644
--- a/src/main/cpp/threadlocal.cpp
+++ b/src/main/cpp/threadlocal.cpp
@@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#if LOG4CXX_ABI_VERSION <= 15
#include "log4cxx/helpers/threadlocal.h"
#include "apr_thread_proc.h"
@@ -72,3 +73,5 @@ void* ThreadLocal::get()
#endif
return retval;
}
+
+#endif // LOG4CXX_ABI_VERSION <= 15
diff --git a/src/main/include/log4cxx/helpers/threadlocal.h
b/src/main/include/log4cxx/helpers/threadlocal.h
index abc54d7f..5c27a92b 100644
--- a/src/main/include/log4cxx/helpers/threadlocal.h
+++ b/src/main/include/log4cxx/helpers/threadlocal.h
@@ -17,6 +17,7 @@
#ifndef _LOG4CXX_HELPERS_THREAD_LOCAL_H
#define _LOG4CXX_HELPERS_THREAD_LOCAL_H
+#if LOG4CXX_ABI_VERSION <= 15
#include <log4cxx/log4cxx.h>
#include <log4cxx/helpers/pool.h>
@@ -40,6 +41,8 @@ namespace helpers
{
/**
+ * @deprecated This class is deprecated and will be removed in a future
version.
+ *
* This class provides thread-local variables. This class is similar in
function
* to java.lang.ThreadLocal.
*/
@@ -83,4 +86,6 @@ class LOG4CXX_EXPORT ThreadLocal
} // namespace helpers
} // namespace log4cxx
+#endif // LOG4CXX_ABI_VERSION <= 15
+
#endif //_LOG4CXX_HELPERS_THREAD_LOCAL_H