You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rm...@apache.org on 2021/07/09 02:42:00 UTC

[logging-log4cxx] branch LOGCXX-528 created (now 533f5b3)

This is an automated email from the ASF dual-hosted git repository.

rmiddleton pushed a change to branch LOGCXX-528
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git.


      at 533f5b3  Ensure that we can compile with GCC with standard C++11

This branch includes the following new commits:

     new 59ee7e3  Fix check for boost::shared_mutex
     new b16e752  Added mutex include to several files
     new 533f5b3  Ensure that we can compile with GCC with standard C++11

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[logging-log4cxx] 03/03: Ensure that we can compile with GCC with standard C++11

Posted by rm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rmiddleton pushed a commit to branch LOGCXX-528
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git

commit 533f5b3ec3184fd09f032a79e5bab7729e98850b
Author: Robert Middleton <ro...@rm5248.com>
AuthorDate: Thu Jul 8 22:40:53 2021 -0400

    Ensure that we can compile with GCC with standard C++11
---
 CMakeLists.txt             | 3 +++
 src/main/cpp/hierarchy.cpp | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5b44ef..bb5a5df 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,6 +41,9 @@ if( NOT "${CMAKE_CXX_STANDARD}")
     set(CMAKE_CXX_STANDARD 17)
 endif()
 
+# Don't allow for compiler-specific extensions
+set(CMAKE_CXX_EXTENSIONS OFF)
+
 # Building
 add_subdirectory(src)
 
diff --git a/src/main/cpp/hierarchy.cpp b/src/main/cpp/hierarchy.cpp
index 4f51744..c70d39d 100644
--- a/src/main/cpp/hierarchy.cpp
+++ b/src/main/cpp/hierarchy.cpp
@@ -223,7 +223,7 @@ LoggerPtr Hierarchy::getLogger(const LogString& name,
 	else
 	{
 		LoggerPtr logger(factory->makeNewLoggerInstance(pool, name));
-		logger->setHierarchy(weak_from_this());
+		logger->setHierarchy(shared_from_this());
 		loggers->insert(LoggerMap::value_type(name, logger));
 
 		ProvisionNodeMap::iterator it2 = provisionNodes->find(name);
@@ -423,6 +423,6 @@ void Hierarchy::configureRoot(){
 	// LOGCXX-322 we need to turn the repositroy into a weak_ptr, and we
 	// can't use weak_from_this() in the constructor.
 	if( !root->getLoggerRepository().lock() ){
-		root->setHierarchy(weak_from_this());
+		root->setHierarchy(shared_from_this());
 	}
 }

[logging-log4cxx] 01/03: Fix check for boost::shared_mutex

Posted by rm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rmiddleton pushed a commit to branch LOGCXX-528
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git

commit 59ee7e3d51dfc6599a81a9f3aefc73b41117da44
Author: Robert Middleton <ro...@rm5248.com>
AuthorDate: Thu Jul 8 22:13:08 2021 -0400

    Fix check for boost::shared_mutex
---
 src/cmake/boost-fallback/boost-fallback.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cmake/boost-fallback/boost-fallback.cmake b/src/cmake/boost-fallback/boost-fallback.cmake
index a8d7d44..66434ff 100644
--- a/src/cmake/boost-fallback/boost-fallback.cmake
+++ b/src/cmake/boost-fallback/boost-fallback.cmake
@@ -62,7 +62,7 @@ try_compile(Boost_MUTEX_FOUND "${CMAKE_BINARY_DIR}/boost-fallback-compile-tests"
     "${CMAKE_CURRENT_LIST_DIR}/test-boostmutex.cpp")
 try_compile(Boost_SHARED_MUTEX_FOUND "${CMAKE_BINARY_DIR}/boost-fallback-compile-tests"
     "${CMAKE_CURRENT_LIST_DIR}/test-boostsharedmutex.cpp"
-    LINK_LIBRARIES Threads::Threads
+    LINK_LIBRARIES Threads::Threads Boost::thread
 )
 try_compile(Boost_ATOMIC_FOUND "${CMAKE_BINARY_DIR}/boost-fallback-compile-tests"
     "${CMAKE_CURRENT_LIST_DIR}/test-boostatomic.cpp")

[logging-log4cxx] 02/03: Added mutex include to several files

Posted by rm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rmiddleton pushed a commit to branch LOGCXX-528
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git

commit b16e7528483d66709238eb097c649d3c78e29fbf
Author: Robert Middleton <ro...@rm5248.com>
AuthorDate: Thu Jul 8 22:23:19 2021 -0400

    Added mutex include to several files
---
 src/main/include/log4cxx/helpers/appenderattachableimpl.h | 1 +
 src/main/include/log4cxx/helpers/aprinitializer.h         | 1 +
 src/main/include/log4cxx/helpers/loglog.h                 | 1 +
 src/main/include/log4cxx/helpers/serversocket.h           | 1 +
 src/main/include/log4cxx/level.h                          | 1 +
 src/main/include/log4cxx/rolling/action.h                 | 1 +
 6 files changed, 6 insertions(+)

diff --git a/src/main/include/log4cxx/helpers/appenderattachableimpl.h b/src/main/include/log4cxx/helpers/appenderattachableimpl.h
index 40e77d9..b80b5aa 100644
--- a/src/main/include/log4cxx/helpers/appenderattachableimpl.h
+++ b/src/main/include/log4cxx/helpers/appenderattachableimpl.h
@@ -28,6 +28,7 @@
 #include <log4cxx/helpers/object.h>
 #include <log4cxx/helpers/pool.h>
 #include <log4cxx/log4cxx.h>
+#include <mutex>
 
 namespace log4cxx
 {
diff --git a/src/main/include/log4cxx/helpers/aprinitializer.h b/src/main/include/log4cxx/helpers/aprinitializer.h
index 6f3f550..fccd18e 100644
--- a/src/main/include/log4cxx/helpers/aprinitializer.h
+++ b/src/main/include/log4cxx/helpers/aprinitializer.h
@@ -30,6 +30,7 @@ extern "C" {
 }
 
 #include <apr_time.h>
+#include <mutex>
 
 namespace log4cxx
 {
diff --git a/src/main/include/log4cxx/helpers/loglog.h b/src/main/include/log4cxx/helpers/loglog.h
index d54785d..a4c9241 100644
--- a/src/main/include/log4cxx/helpers/loglog.h
+++ b/src/main/include/log4cxx/helpers/loglog.h
@@ -20,6 +20,7 @@
 
 #include <log4cxx/logstring.h>
 #include <exception>
+#include <mutex>
 
 namespace log4cxx
 {
diff --git a/src/main/include/log4cxx/helpers/serversocket.h b/src/main/include/log4cxx/helpers/serversocket.h
index e6e6d47..7da75b9 100644
--- a/src/main/include/log4cxx/helpers/serversocket.h
+++ b/src/main/include/log4cxx/helpers/serversocket.h
@@ -19,6 +19,7 @@
 #define _LOG4CXX_HELPERS_SERVER_SOCKET_H
 
 #include <log4cxx/helpers/socket.h>
+#include <mutex>
 
 namespace log4cxx
 {
diff --git a/src/main/include/log4cxx/level.h b/src/main/include/log4cxx/level.h
index 4ca4bf2..7848c90 100644
--- a/src/main/include/log4cxx/level.h
+++ b/src/main/include/log4cxx/level.h
@@ -22,6 +22,7 @@
 #include <log4cxx/logstring.h>
 #include <limits.h>
 #include <log4cxx/helpers/object.h>
+#include <mutex>
 
 #if defined(_MSC_VER)
 	#pragma warning ( push )
diff --git a/src/main/include/log4cxx/rolling/action.h b/src/main/include/log4cxx/rolling/action.h
index 0e8d55f..fc44978 100644
--- a/src/main/include/log4cxx/rolling/action.h
+++ b/src/main/include/log4cxx/rolling/action.h
@@ -21,6 +21,7 @@
 #include <log4cxx/portability.h>
 #include <log4cxx/helpers/object.h>
 #include <log4cxx/helpers/pool.h>
+#include <mutex>
 
 namespace log4cxx
 {