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 2022/11/12 00:43:19 UTC

[logging-log4cxx] branch fix-cpp11 created (now dc69cf34)

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

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


      at dc69cf34 Compile log4cxx in C++11 mode

This branch includes the following new commits:

     new dc69cf34 Compile log4cxx in C++11 mode

The 1 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] 01/01: Compile log4cxx in C++11 mode

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

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

commit dc69cf34cb40e2cd22e72961bd0c54d22a319244
Author: Robert Middleton <ro...@rm5248.com>
AuthorDate: Fri Nov 11 19:43:02 2022 -0500

    Compile log4cxx in C++11 mode
---
 CMakeLists.txt                                           |  2 ++
 src/cmake/boost-fallback/boost-fallback.cmake            |  3 +++
 src/cmake/boost-fallback/boost-std-configuration.h.cmake |  1 +
 src/cmake/boost-fallback/test-make-unique.cpp            |  6 ++++++
 src/main/cpp/action.cpp                                  |  1 +
 src/main/cpp/andfilter.cpp                               |  1 +
 src/main/cpp/appenderattachableimpl.cpp                  |  1 +
 src/main/cpp/appenderskeleton.cpp                        |  1 +
 src/main/cpp/aprdatagramsocket.cpp                       |  1 +
 src/main/cpp/aprserversocket.cpp                         |  1 +
 src/main/cpp/aprsocket.cpp                               |  1 +
 src/main/cpp/asyncappender.cpp                           |  1 +
 src/main/cpp/bufferedwriter.cpp                          |  1 +
 src/main/cpp/bytearrayinputstream.cpp                    |  1 +
 src/main/cpp/bytebuffer.cpp                              |  1 +
 src/main/cpp/cacheddateformat.cpp                        |  1 +
 src/main/cpp/consoleappender.cpp                         |  1 +
 src/main/cpp/cyclicbuffer.cpp                            |  1 +
 src/main/cpp/datagrampacket.cpp                          |  1 +
 src/main/cpp/datagramsocket.cpp                          |  1 +
 src/main/cpp/datepatternconverter.cpp                    |  1 +
 src/main/cpp/defaultrepositoryselector.cpp               |  1 +
 src/main/cpp/domconfigurator.cpp                         |  1 +
 src/main/cpp/fallbackerrorhandler.cpp                    |  1 +
 src/main/cpp/fileappender.cpp                            |  1 +
 src/main/cpp/fileinputstream.cpp                         |  1 +
 src/main/cpp/fileoutputstream.cpp                        |  1 +
 src/main/cpp/filerenameaction.cpp                        |  1 +
 src/main/cpp/filewatchdog.cpp                            |  1 +
 src/main/cpp/filter.cpp                                  |  1 +
 src/main/cpp/fixedwindowrollingpolicy.cpp                |  1 +
 src/main/cpp/formattinginfo.cpp                          |  1 +
 src/main/cpp/gzcompressaction.cpp                        |  1 +
 src/main/cpp/hierarchy.cpp                               |  1 +
 src/main/cpp/htmllayout.cpp                              |  1 +
 src/main/cpp/levelmatchfilter.cpp                        |  1 +
 src/main/cpp/levelrangefilter.cpp                        |  1 +
 src/main/cpp/literalpatternconverter.cpp                 |  1 +
 src/main/cpp/locale.cpp                                  |  1 +
 src/main/cpp/loggermatchfilter.cpp                       |  1 +
 src/main/cpp/mapfilter.cpp                               |  1 +
 src/main/cpp/namepatternconverter.cpp                    |  1 +
 src/main/cpp/objectoutputstream.cpp                      |  1 +
 src/main/cpp/outputstreamwriter.cpp                      |  1 +
 src/main/cpp/patternconverter.cpp                        |  1 +
 src/main/cpp/patternlayout.cpp                           |  1 +
 src/main/cpp/propertiespatternconverter.cpp              |  1 +
 src/main/cpp/rollingfileappender.cpp                     |  1 +
 src/main/cpp/rollingpolicybase.cpp                       |  1 +
 src/main/cpp/serversocket.cpp                            |  1 +
 src/main/cpp/socket.cpp                                  |  1 +
 src/main/cpp/socketappenderskeleton.cpp                  |  1 +
 src/main/cpp/sockethubappender.cpp                       |  1 +
 src/main/cpp/socketoutputstream.cpp                      |  1 +
 src/main/cpp/stringmatchfilter.cpp                       |  1 +
 src/main/cpp/syslogwriter.cpp                            |  1 +
 src/main/cpp/telnetappender.cpp                          |  1 +
 src/main/cpp/threadspecificdata.cpp                      |  1 +
 src/main/cpp/throwableinformationpatternconverter.cpp    |  1 +
 src/main/cpp/timebasedrollingpolicy.cpp                  |  1 +
 src/main/cpp/writerappender.cpp                          |  1 +
 src/main/cpp/xmllayout.cpp                               |  1 +
 src/main/cpp/xmlsocketappender.cpp                       |  1 +
 src/main/cpp/zipcompressaction.cpp                       |  1 +
 src/main/include/CMakeLists.txt                          |  8 ++++++++
 src/main/include/log4cxx/private/log4cxx_private.h.in    | 11 +++++++++++
 66 files changed, 91 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 891c6784..74d38ab1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -189,6 +189,7 @@ get_directory_property( MUTEX_IMPL DIRECTORY src/main/include DEFINITION MUTEX_I
 get_directory_property( SHARED_MUTEX_IMPL DIRECTORY src/main/include DEFINITION SHARED_MUTEX_IMPL )
 get_directory_property( ATOMIC_IMPL DIRECTORY src/main/include DEFINITION ATOMIC_IMPL )
 get_directory_property( FILESYSTEM_IMPL DIRECTORY src/main/include DEFINITION FILESYSTEM_IMPL )
+get_directory_property( STD_MAKE_UNIQUE_IMPL DIRECTORY src/main/include DEFINITION STD_MAKE_UNIQUE_IMPL )
 
 foreach(varName HAS_STD_LOCALE  HAS_ODBC  HAS_MBSRTOWCS  HAS_WCSTOMBS  HAS_FWIDE  HAS_LIBESMTP  HAS_SYSLOG)
   if(${varName} EQUAL 0)
@@ -269,6 +270,7 @@ message(STATUS "  shared_ptr implementation ....... : ${SMART_PTR_IMPL}")
 message(STATUS "  shared_mutex implementation ..... : ${SHARED_MUTEX_IMPL}")
 message(STATUS "  atomic implementation ........... : ${ATOMIC_IMPL}")
 message(STATUS "  filesystem implementation ....... : ${FILESYSTEM_IMPL}")
+message(STATUS "  std::make_unique found? ......... : ${STD_MAKE_UNIQUE_IMPL}")
 
 if(BUILD_TESTING)
 message(STATUS "Applications required for tests:")
diff --git a/src/cmake/boost-fallback/boost-fallback.cmake b/src/cmake/boost-fallback/boost-fallback.cmake
index 8de5f314..8473721f 100644
--- a/src/cmake/boost-fallback/boost-fallback.cmake
+++ b/src/cmake/boost-fallback/boost-fallback.cmake
@@ -64,6 +64,8 @@ try_compile(STD_FILESYSTEM_FOUND "${CMAKE_BINARY_DIR}/boost-fallback-compile-tes
     "${CMAKE_CURRENT_LIST_DIR}/test-stdfilesystem.cpp")
 try_compile(STD_EXPERIMENTAL_FILESYSTEM_FOUND "${CMAKE_BINARY_DIR}/boost-fallback-compile-tests"
     "${CMAKE_CURRENT_LIST_DIR}/test-stdexpfilesystem.cpp")
+try_compile(STD_MAKE_UNIQUE_FOUND "${CMAKE_BINARY_DIR}/boost-fallback-compile-tests"
+    "${CMAKE_CURRENT_LIST_DIR}/test-make-unique.cpp")
 
 # We need to have all three boost components in order to run our tests
 # Boost thread requires chrono and atomic to work
@@ -86,6 +88,7 @@ if( ${Boost_FOUND} )
         "${CMAKE_CURRENT_LIST_DIR}/test-boostfilesystem.cpp")
 endif( ${Boost_FOUND} )
 
+
 # Link the target with the appropriate boost libraries(if required)
 function(boostfallback_link target)
     if(NOT ${STD_THREAD_FOUND})
diff --git a/src/cmake/boost-fallback/boost-std-configuration.h.cmake b/src/cmake/boost-fallback/boost-std-configuration.h.cmake
index 9ccf8fd9..453bc422 100644
--- a/src/cmake/boost-fallback/boost-std-configuration.h.cmake
+++ b/src/cmake/boost-fallback/boost-std-configuration.h.cmake
@@ -6,6 +6,7 @@
 #cmakedefine01 STD_FILESYSTEM_FOUND
 #cmakedefine01 Boost_FILESYSTEM_FOUND
 #cmakedefine01 STD_EXPERIMENTAL_FILESYSTEM_FOUND
+#cmakedefine01 STD_MAKE_UNIQUE_FOUND
 
 #if STD_SHARED_MUTEX_FOUND
 #include <shared_mutex>
diff --git a/src/cmake/boost-fallback/test-make-unique.cpp b/src/cmake/boost-fallback/test-make-unique.cpp
new file mode 100644
index 00000000..380cfdad
--- /dev/null
+++ b/src/cmake/boost-fallback/test-make-unique.cpp
@@ -0,0 +1,6 @@
+#include <memory>
+
+int main(int argc, char** argv){
+	std::make_unique<int>(5);
+	return 0;
+}
diff --git a/src/main/cpp/action.cpp b/src/main/cpp/action.cpp
index 6c37f0a1..c18d534d 100644
--- a/src/main/cpp/action.cpp
+++ b/src/main/cpp/action.cpp
@@ -17,6 +17,7 @@
 #include <log4cxx/logstring.h>
 #include <log4cxx/rolling/action.h>
 #include <log4cxx/private/action_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 #include <mutex>
 #include <memory>
 
diff --git a/src/main/cpp/andfilter.cpp b/src/main/cpp/andfilter.cpp
index bc434f14..71ceec77 100644
--- a/src/main/cpp/andfilter.cpp
+++ b/src/main/cpp/andfilter.cpp
@@ -20,6 +20,7 @@
 #include <log4cxx/helpers/stringhelper.h>
 #include <log4cxx/helpers/optionconverter.h>
 #include <log4cxx/private/filter_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::filter;
diff --git a/src/main/cpp/appenderattachableimpl.cpp b/src/main/cpp/appenderattachableimpl.cpp
index d936d9c6..7be16a91 100644
--- a/src/main/cpp/appenderattachableimpl.cpp
+++ b/src/main/cpp/appenderattachableimpl.cpp
@@ -20,6 +20,7 @@
 #include <log4cxx/spi/loggingevent.h>
 #include <algorithm>
 #include <log4cxx/helpers/pool.h>
+#include <log4cxx/private/log4cxx_private.h>
 #include <mutex>
 
 using namespace log4cxx;
diff --git a/src/main/cpp/appenderskeleton.cpp b/src/main/cpp/appenderskeleton.cpp
index fdc489cb..908aa6df 100644
--- a/src/main/cpp/appenderskeleton.cpp
+++ b/src/main/cpp/appenderskeleton.cpp
@@ -22,6 +22,7 @@
 #include <log4cxx/level.h>
 #include <log4cxx/helpers/stringhelper.h>
 #include <log4cxx/private/appenderskeleton_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 #include <mutex>
 
 using namespace log4cxx;
diff --git a/src/main/cpp/aprdatagramsocket.cpp b/src/main/cpp/aprdatagramsocket.cpp
index f337736f..8cb79391 100644
--- a/src/main/cpp/aprdatagramsocket.cpp
+++ b/src/main/cpp/aprdatagramsocket.cpp
@@ -18,6 +18,7 @@
 #include <log4cxx/private/aprdatagramsocket.h>
 #include <log4cxx/private/datagramsocket_priv.h>
 #include <log4cxx/helpers/transcoder.h>
+#include <log4cxx/private/log4cxx_private.h>
 #include <apr_network_io.h>
 
 using log4cxx::helpers::APRDatagramSocket;
diff --git a/src/main/cpp/aprserversocket.cpp b/src/main/cpp/aprserversocket.cpp
index 797b5a1b..c2d6dbf3 100644
--- a/src/main/cpp/aprserversocket.cpp
+++ b/src/main/cpp/aprserversocket.cpp
@@ -18,6 +18,7 @@
 #include <log4cxx/private/aprserversocket.h>
 #include <log4cxx/private/serversocket_priv.h>
 #include <log4cxx/private/aprsocket.h>
+#include <log4cxx/private/log4cxx_private.h>
 #include "apr_network_io.h"
 #include "apr_pools.h"
 #include "apr_poll.h"
diff --git a/src/main/cpp/aprsocket.cpp b/src/main/cpp/aprsocket.cpp
index e212c689..9a045c95 100644
--- a/src/main/cpp/aprsocket.cpp
+++ b/src/main/cpp/aprsocket.cpp
@@ -19,6 +19,7 @@
 #include <log4cxx/private/socket_priv.h>
 #include <log4cxx/helpers/bytebuffer.h>
 #include <log4cxx/helpers/transcoder.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 #include "apr_network_io.h"
 #include "apr_signal.h"
diff --git a/src/main/cpp/asyncappender.cpp b/src/main/cpp/asyncappender.cpp
index 20ff3cd8..571405ef 100644
--- a/src/main/cpp/asyncappender.cpp
+++ b/src/main/cpp/asyncappender.cpp
@@ -29,6 +29,7 @@
 #include <log4cxx/helpers/optionconverter.h>
 #include <log4cxx/helpers/threadutility.h>
 #include <log4cxx/private/appenderskeleton_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/main/cpp/bufferedwriter.cpp b/src/main/cpp/bufferedwriter.cpp
index ad77e9db..518edd16 100644
--- a/src/main/cpp/bufferedwriter.cpp
+++ b/src/main/cpp/bufferedwriter.cpp
@@ -17,6 +17,7 @@
 #include <log4cxx/logstring.h>
 #include <log4cxx/helpers/bufferedwriter.h>
 #include <log4cxx/helpers/pool.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/main/cpp/bytearrayinputstream.cpp b/src/main/cpp/bytearrayinputstream.cpp
index ff51d55d..79dd3dd0 100644
--- a/src/main/cpp/bytearrayinputstream.cpp
+++ b/src/main/cpp/bytearrayinputstream.cpp
@@ -19,6 +19,7 @@
 #include <log4cxx/helpers/exception.h>
 #include <log4cxx/helpers/bytebuffer.h>
 #include <log4cxx/helpers/transcoder.h>
+#include <log4cxx/private/log4cxx_private.h>
 #include <algorithm>
 #include <cstring>
 
diff --git a/src/main/cpp/bytebuffer.cpp b/src/main/cpp/bytebuffer.cpp
index 84d09d81..1c708bfd 100644
--- a/src/main/cpp/bytebuffer.cpp
+++ b/src/main/cpp/bytebuffer.cpp
@@ -18,6 +18,7 @@
 #include <log4cxx/helpers/bytebuffer.h>
 #include <log4cxx/helpers/exception.h>
 #include <log4cxx/helpers/pool.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/main/cpp/cacheddateformat.cpp b/src/main/cpp/cacheddateformat.cpp
index b51aeffc..21ff1368 100644
--- a/src/main/cpp/cacheddateformat.cpp
+++ b/src/main/cpp/cacheddateformat.cpp
@@ -24,6 +24,7 @@
 #include <log4cxx/helpers/pool.h>
 #include <limits>
 #include <log4cxx/helpers/exception.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/main/cpp/consoleappender.cpp b/src/main/cpp/consoleappender.cpp
index 7d2287dc..2fbe01df 100644
--- a/src/main/cpp/consoleappender.cpp
+++ b/src/main/cpp/consoleappender.cpp
@@ -23,6 +23,7 @@
 #include <log4cxx/layout.h>
 #include <log4cxx/private/appenderskeleton_priv.h>
 #include <log4cxx/private/writerappender_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/main/cpp/cyclicbuffer.cpp b/src/main/cpp/cyclicbuffer.cpp
index 1aabd1dc..c5b82d1b 100644
--- a/src/main/cpp/cyclicbuffer.cpp
+++ b/src/main/cpp/cyclicbuffer.cpp
@@ -20,6 +20,7 @@
 #include <log4cxx/helpers/exception.h>
 #include <log4cxx/helpers/pool.h>
 #include <log4cxx/helpers/stringhelper.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/main/cpp/datagrampacket.cpp b/src/main/cpp/datagrampacket.cpp
index 6db63ffc..8fd90573 100644
--- a/src/main/cpp/datagrampacket.cpp
+++ b/src/main/cpp/datagrampacket.cpp
@@ -17,6 +17,7 @@
 
 #include <log4cxx/logstring.h>
 #include <log4cxx/helpers/datagrampacket.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx::helpers;
 
diff --git a/src/main/cpp/datagramsocket.cpp b/src/main/cpp/datagramsocket.cpp
index ac71ecbe..d7b8784f 100644
--- a/src/main/cpp/datagramsocket.cpp
+++ b/src/main/cpp/datagramsocket.cpp
@@ -21,6 +21,7 @@
 #include <log4cxx/helpers/transcoder.h>
 #include <log4cxx/private/datagramsocket_priv.h>
 #include <log4cxx/private/aprdatagramsocket.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 #include "apr_network_io.h"
 #include "apr_lib.h"
diff --git a/src/main/cpp/datepatternconverter.cpp b/src/main/cpp/datepatternconverter.cpp
index e05947c9..44c12033 100644
--- a/src/main/cpp/datepatternconverter.cpp
+++ b/src/main/cpp/datepatternconverter.cpp
@@ -32,6 +32,7 @@
 #include <log4cxx/helpers/loglog.h>
 #include <log4cxx/helpers/date.h>
 #include <log4cxx/private/patternconverter_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::pattern;
diff --git a/src/main/cpp/defaultrepositoryselector.cpp b/src/main/cpp/defaultrepositoryselector.cpp
index 421c98a8..dce885b2 100644
--- a/src/main/cpp/defaultrepositoryselector.cpp
+++ b/src/main/cpp/defaultrepositoryselector.cpp
@@ -16,6 +16,7 @@
  */
 
 #include <log4cxx/spi/defaultrepositoryselector.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::spi;
diff --git a/src/main/cpp/domconfigurator.cpp b/src/main/cpp/domconfigurator.cpp
index 4786e842..3aabfba6 100644
--- a/src/main/cpp/domconfigurator.cpp
+++ b/src/main/cpp/domconfigurator.cpp
@@ -45,6 +45,7 @@
 #include <log4cxx/net/smtpappender.h>
 #include <log4cxx/helpers/messagebuffer.h>
 #include <log4cxx/helpers/threadutility.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 #define LOG4CXX 1
 #include <log4cxx/helpers/aprinitializer.h>
diff --git a/src/main/cpp/fallbackerrorhandler.cpp b/src/main/cpp/fallbackerrorhandler.cpp
index df650d0a..ba3c5ab8 100644
--- a/src/main/cpp/fallbackerrorhandler.cpp
+++ b/src/main/cpp/fallbackerrorhandler.cpp
@@ -24,6 +24,7 @@
 #include <log4cxx/spi/loggingevent.h>
 #include <log4cxx/hierarchy.h>
 #include <log4cxx/logmanager.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/main/cpp/fileappender.cpp b/src/main/cpp/fileappender.cpp
index 38814855..9427d35c 100644
--- a/src/main/cpp/fileappender.cpp
+++ b/src/main/cpp/fileappender.cpp
@@ -27,6 +27,7 @@
 #include <log4cxx/helpers/bytebuffer.h>
 #include <log4cxx/private/writerappender_priv.h>
 #include <log4cxx/private/fileappender_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 #include <mutex>
 
 using namespace log4cxx;
diff --git a/src/main/cpp/fileinputstream.cpp b/src/main/cpp/fileinputstream.cpp
index 99a7b3b3..67fe1a04 100644
--- a/src/main/cpp/fileinputstream.cpp
+++ b/src/main/cpp/fileinputstream.cpp
@@ -25,6 +25,7 @@
 	#define LOG4CXX 1
 #endif
 #include <log4cxx/helpers/aprinitializer.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/main/cpp/fileoutputstream.cpp b/src/main/cpp/fileoutputstream.cpp
index dcfe8384..6366908b 100644
--- a/src/main/cpp/fileoutputstream.cpp
+++ b/src/main/cpp/fileoutputstream.cpp
@@ -25,6 +25,7 @@
 	#define LOG4CXX 1
 #endif
 #include <log4cxx/helpers/aprinitializer.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/main/cpp/filerenameaction.cpp b/src/main/cpp/filerenameaction.cpp
index 9343aa80..4df0584c 100644
--- a/src/main/cpp/filerenameaction.cpp
+++ b/src/main/cpp/filerenameaction.cpp
@@ -18,6 +18,7 @@
 #include <log4cxx/logstring.h>
 #include <log4cxx/rolling/filerenameaction.h>
 #include <log4cxx/private/action_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::rolling;
diff --git a/src/main/cpp/filewatchdog.cpp b/src/main/cpp/filewatchdog.cpp
index edd9443e..0c183d9a 100644
--- a/src/main/cpp/filewatchdog.cpp
+++ b/src/main/cpp/filewatchdog.cpp
@@ -25,6 +25,7 @@
 #include <log4cxx/helpers/threadutility.h>
 #include <log4cxx/helpers/stringhelper.h>
 #include <functional>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/main/cpp/filter.cpp b/src/main/cpp/filter.cpp
index 2574fa42..f922ba9b 100644
--- a/src/main/cpp/filter.cpp
+++ b/src/main/cpp/filter.cpp
@@ -18,6 +18,7 @@
 #include <log4cxx/logstring.h>
 #include <log4cxx/spi/filter.h>
 #include <log4cxx/private/filter_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::spi;
diff --git a/src/main/cpp/fixedwindowrollingpolicy.cpp b/src/main/cpp/fixedwindowrollingpolicy.cpp
index 8534c5df..fbc67f07 100644
--- a/src/main/cpp/fixedwindowrollingpolicy.cpp
+++ b/src/main/cpp/fixedwindowrollingpolicy.cpp
@@ -28,6 +28,7 @@
 #include <log4cxx/rolling/zipcompressaction.h>
 #include <log4cxx/pattern/integerpatternconverter.h>
 #include <log4cxx/private/rollingpolicybase_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::rolling;
diff --git a/src/main/cpp/formattinginfo.cpp b/src/main/cpp/formattinginfo.cpp
index c75a387c..fa14a85b 100644
--- a/src/main/cpp/formattinginfo.cpp
+++ b/src/main/cpp/formattinginfo.cpp
@@ -18,6 +18,7 @@
 #include <log4cxx/logstring.h>
 #include <log4cxx/pattern/formattinginfo.h>
 #include <limits.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::pattern;
diff --git a/src/main/cpp/gzcompressaction.cpp b/src/main/cpp/gzcompressaction.cpp
index f01d2a7f..563d9425 100644
--- a/src/main/cpp/gzcompressaction.cpp
+++ b/src/main/cpp/gzcompressaction.cpp
@@ -21,6 +21,7 @@
 #include <log4cxx/helpers/exception.h>
 #include <log4cxx/helpers/transcoder.h>
 #include <log4cxx/private/action_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::rolling;
diff --git a/src/main/cpp/hierarchy.cpp b/src/main/cpp/hierarchy.cpp
index 98c4ba6c..9763abef 100644
--- a/src/main/cpp/hierarchy.cpp
+++ b/src/main/cpp/hierarchy.cpp
@@ -35,6 +35,7 @@
 #include <log4cxx/spi/rootlogger.h>
 #include <mutex>
 #include <apr.h>
+#include <log4cxx/private/log4cxx_private.h>
 #include "assert.h"
 
 
diff --git a/src/main/cpp/htmllayout.cpp b/src/main/cpp/htmllayout.cpp
index 53631ca4..a5bcc929 100644
--- a/src/main/cpp/htmllayout.cpp
+++ b/src/main/cpp/htmllayout.cpp
@@ -25,6 +25,7 @@
 #include <log4cxx/helpers/stringhelper.h>
 #include <log4cxx/helpers/transcoder.h>
 #include <log4cxx/helpers/date.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 #include <apr_strings.h>
 #include <string.h>
diff --git a/src/main/cpp/levelmatchfilter.cpp b/src/main/cpp/levelmatchfilter.cpp
index 7e67db2f..f6eec886 100644
--- a/src/main/cpp/levelmatchfilter.cpp
+++ b/src/main/cpp/levelmatchfilter.cpp
@@ -22,6 +22,7 @@
 #include <log4cxx/helpers/optionconverter.h>
 #include <log4cxx/level.h>
 #include <log4cxx/private/filter_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::filter;
diff --git a/src/main/cpp/levelrangefilter.cpp b/src/main/cpp/levelrangefilter.cpp
index dcdf6c98..547dbbc3 100644
--- a/src/main/cpp/levelrangefilter.cpp
+++ b/src/main/cpp/levelrangefilter.cpp
@@ -22,6 +22,7 @@
 #include <log4cxx/helpers/optionconverter.h>
 #include <log4cxx/level.h>
 #include <log4cxx/private/filter_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::filter;
diff --git a/src/main/cpp/literalpatternconverter.cpp b/src/main/cpp/literalpatternconverter.cpp
index 901ca182..427247c8 100644
--- a/src/main/cpp/literalpatternconverter.cpp
+++ b/src/main/cpp/literalpatternconverter.cpp
@@ -23,6 +23,7 @@
 #include <log4cxx/spi/loggingevent.h>
 #include <log4cxx/spi/location/locationinfo.h>
 #include <log4cxx/private/patternconverter_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::pattern;
diff --git a/src/main/cpp/locale.cpp b/src/main/cpp/locale.cpp
index 4997cc90..977508b5 100644
--- a/src/main/cpp/locale.cpp
+++ b/src/main/cpp/locale.cpp
@@ -16,6 +16,7 @@
  */
 
 #include <log4cxx/helpers/locale.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/main/cpp/loggermatchfilter.cpp b/src/main/cpp/loggermatchfilter.cpp
index c1dcc5c0..3b30906a 100644
--- a/src/main/cpp/loggermatchfilter.cpp
+++ b/src/main/cpp/loggermatchfilter.cpp
@@ -21,6 +21,7 @@
 #include <log4cxx/helpers/stringhelper.h>
 #include <log4cxx/helpers/optionconverter.h>
 #include <log4cxx/private/filter_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::filter;
diff --git a/src/main/cpp/mapfilter.cpp b/src/main/cpp/mapfilter.cpp
index 1665aca4..33cf29d3 100644
--- a/src/main/cpp/mapfilter.cpp
+++ b/src/main/cpp/mapfilter.cpp
@@ -21,6 +21,7 @@
 #include <log4cxx/helpers/stringhelper.h>
 #include <log4cxx/helpers/optionconverter.h>
 #include <log4cxx/private/filter_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::filter;
diff --git a/src/main/cpp/namepatternconverter.cpp b/src/main/cpp/namepatternconverter.cpp
index 99f79bc2..12fccbcd 100644
--- a/src/main/cpp/namepatternconverter.cpp
+++ b/src/main/cpp/namepatternconverter.cpp
@@ -24,6 +24,7 @@
 #include <log4cxx/pattern/nameabbreviator.h>
 #include <log4cxx/spi/loggingevent.h>
 #include <log4cxx/private/patternconverter_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::pattern;
diff --git a/src/main/cpp/objectoutputstream.cpp b/src/main/cpp/objectoutputstream.cpp
index ab9a85b1..283428d4 100644
--- a/src/main/cpp/objectoutputstream.cpp
+++ b/src/main/cpp/objectoutputstream.cpp
@@ -23,6 +23,7 @@
 #include <log4cxx/helpers/bytebuffer.h>
 #include <log4cxx/helpers/outputstream.h>
 #include <log4cxx/helpers/charsetencoder.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/main/cpp/outputstreamwriter.cpp b/src/main/cpp/outputstreamwriter.cpp
index 90d19931..7dd8162a 100644
--- a/src/main/cpp/outputstreamwriter.cpp
+++ b/src/main/cpp/outputstreamwriter.cpp
@@ -21,6 +21,7 @@
 #include <log4cxx/helpers/charsetencoder.h>
 #include <log4cxx/helpers/bytebuffer.h>
 #include <log4cxx/helpers/stringhelper.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/main/cpp/patternconverter.cpp b/src/main/cpp/patternconverter.cpp
index 6e0e0666..93f05c36 100644
--- a/src/main/cpp/patternconverter.cpp
+++ b/src/main/cpp/patternconverter.cpp
@@ -22,6 +22,7 @@
 #include <log4cxx/pattern/patternconverter.h>
 #include <log4cxx/helpers/transcoder.h>
 #include <log4cxx/private/patternconverter_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::pattern;
diff --git a/src/main/cpp/patternlayout.cpp b/src/main/cpp/patternlayout.cpp
index 1a3e9650..7b4e4b81 100644
--- a/src/main/cpp/patternlayout.cpp
+++ b/src/main/cpp/patternlayout.cpp
@@ -26,6 +26,7 @@
 #include <log4cxx/helpers/stringhelper.h>
 #include <log4cxx/helpers/pool.h>
 #include <log4cxx/helpers/optionconverter.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 #include <log4cxx/pattern/loggerpatternconverter.h>
 #include <log4cxx/pattern/colorendpatternconverter.h>
diff --git a/src/main/cpp/propertiespatternconverter.cpp b/src/main/cpp/propertiespatternconverter.cpp
index c90fde2a..753331e9 100644
--- a/src/main/cpp/propertiespatternconverter.cpp
+++ b/src/main/cpp/propertiespatternconverter.cpp
@@ -24,6 +24,7 @@
 #include <log4cxx/spi/loggingevent.h>
 #include <log4cxx/spi/location/locationinfo.h>
 #include <log4cxx/private/patternconverter_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 #include <iterator>
 
diff --git a/src/main/cpp/rollingfileappender.cpp b/src/main/cpp/rollingfileappender.cpp
index a9c776a9..f097f4d3 100644
--- a/src/main/cpp/rollingfileappender.cpp
+++ b/src/main/cpp/rollingfileappender.cpp
@@ -31,6 +31,7 @@
 #include <log4cxx/rolling/sizebasedtriggeringpolicy.h>
 #include <log4cxx/helpers/transcoder.h>
 #include <log4cxx/private/fileappender_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 #include <mutex>
 
 using namespace log4cxx;
diff --git a/src/main/cpp/rollingpolicybase.cpp b/src/main/cpp/rollingpolicybase.cpp
index c22a36a4..398541f9 100644
--- a/src/main/cpp/rollingpolicybase.cpp
+++ b/src/main/cpp/rollingpolicybase.cpp
@@ -30,6 +30,7 @@
 #include <log4cxx/pattern/datepatternconverter.h>
 #include <log4cxx/helpers/optionconverter.h>
 #include <log4cxx/private/rollingpolicybase_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::rolling;
diff --git a/src/main/cpp/serversocket.cpp b/src/main/cpp/serversocket.cpp
index cb81a141..9e31e476 100644
--- a/src/main/cpp/serversocket.cpp
+++ b/src/main/cpp/serversocket.cpp
@@ -18,6 +18,7 @@
 #include <log4cxx/helpers/serversocket.h>
 #include <log4cxx/private/serversocket_priv.h>
 #include <log4cxx/private/aprserversocket.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx::helpers;
 
diff --git a/src/main/cpp/socket.cpp b/src/main/cpp/socket.cpp
index d27e4924..14e1b419 100644
--- a/src/main/cpp/socket.cpp
+++ b/src/main/cpp/socket.cpp
@@ -17,6 +17,7 @@
 #include <log4cxx/helpers/socket.h>
 #include <log4cxx/helpers/bytebuffer.h>
 #include <log4cxx/helpers/transcoder.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 #include <log4cxx/private/socket_priv.h>
 #include <log4cxx/private/aprsocket.h>
diff --git a/src/main/cpp/socketappenderskeleton.cpp b/src/main/cpp/socketappenderskeleton.cpp
index 67e607c3..c06e8f11 100644
--- a/src/main/cpp/socketappenderskeleton.cpp
+++ b/src/main/cpp/socketappenderskeleton.cpp
@@ -29,6 +29,7 @@
 #include <log4cxx/helpers/threadutility.h>
 #include <log4cxx/private/appenderskeleton_priv.h>
 #include <log4cxx/private/socketappenderskeleton_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 #include <functional>
 
 using namespace log4cxx;
diff --git a/src/main/cpp/sockethubappender.cpp b/src/main/cpp/sockethubappender.cpp
index 62e5ea75..7f1fc92b 100644
--- a/src/main/cpp/sockethubappender.cpp
+++ b/src/main/cpp/sockethubappender.cpp
@@ -32,6 +32,7 @@
 #include <log4cxx/helpers/exception.h>
 #include <log4cxx/helpers/threadutility.h>
 #include <log4cxx/private/appenderskeleton_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 #include <mutex>
 
 namespace log4cxx
diff --git a/src/main/cpp/socketoutputstream.cpp b/src/main/cpp/socketoutputstream.cpp
index da325225..168d2453 100644
--- a/src/main/cpp/socketoutputstream.cpp
+++ b/src/main/cpp/socketoutputstream.cpp
@@ -19,6 +19,7 @@
 #include <log4cxx/helpers/socketoutputstream.h>
 #include <log4cxx/helpers/socket.h>
 #include <log4cxx/helpers/bytebuffer.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 #include <cstdio>
 #include <cstring>
diff --git a/src/main/cpp/stringmatchfilter.cpp b/src/main/cpp/stringmatchfilter.cpp
index b0e05bb2..c6b4e9d7 100644
--- a/src/main/cpp/stringmatchfilter.cpp
+++ b/src/main/cpp/stringmatchfilter.cpp
@@ -21,6 +21,7 @@
 #include <log4cxx/helpers/stringhelper.h>
 #include <log4cxx/helpers/optionconverter.h>
 #include <log4cxx/private/filter_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::filter;
diff --git a/src/main/cpp/syslogwriter.cpp b/src/main/cpp/syslogwriter.cpp
index 5ab1ba5e..f5f104c6 100644
--- a/src/main/cpp/syslogwriter.cpp
+++ b/src/main/cpp/syslogwriter.cpp
@@ -25,6 +25,7 @@
 #include <log4cxx/helpers/datagramsocket.h>
 #include <log4cxx/helpers/datagrampacket.h>
 #include <log4cxx/helpers/transcoder.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/main/cpp/telnetappender.cpp b/src/main/cpp/telnetappender.cpp
index 0c72a809..6bf32be1 100644
--- a/src/main/cpp/telnetappender.cpp
+++ b/src/main/cpp/telnetappender.cpp
@@ -26,6 +26,7 @@
 #include <log4cxx/helpers/bytebuffer.h>
 #include <log4cxx/helpers/threadutility.h>
 #include <log4cxx/private/appenderskeleton_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 #include <mutex>
 
 using namespace log4cxx;
diff --git a/src/main/cpp/threadspecificdata.cpp b/src/main/cpp/threadspecificdata.cpp
index d6405d0e..c4cd8843 100644
--- a/src/main/cpp/threadspecificdata.cpp
+++ b/src/main/cpp/threadspecificdata.cpp
@@ -23,6 +23,7 @@
 	#define LOG4CXX 1
 #endif
 #include <log4cxx/helpers/aprinitializer.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/main/cpp/throwableinformationpatternconverter.cpp b/src/main/cpp/throwableinformationpatternconverter.cpp
index 8a06c3a1..bd37a54c 100644
--- a/src/main/cpp/throwableinformationpatternconverter.cpp
+++ b/src/main/cpp/throwableinformationpatternconverter.cpp
@@ -26,6 +26,7 @@
 #include <log4cxx/spi/location/locationinfo.h>
 #include <log4cxx/helpers/stringhelper.h>
 #include <log4cxx/private/patternconverter_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::pattern;
diff --git a/src/main/cpp/timebasedrollingpolicy.cpp b/src/main/cpp/timebasedrollingpolicy.cpp
index bb78514a..a8c06a0f 100644
--- a/src/main/cpp/timebasedrollingpolicy.cpp
+++ b/src/main/cpp/timebasedrollingpolicy.cpp
@@ -34,6 +34,7 @@
 #include <log4cxx/boost-std-configuration.h>
 #include <iostream>
 #include <apr_mmap.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::rolling;
diff --git a/src/main/cpp/writerappender.cpp b/src/main/cpp/writerappender.cpp
index ada3bd89..c464c8cf 100644
--- a/src/main/cpp/writerappender.cpp
+++ b/src/main/cpp/writerappender.cpp
@@ -21,6 +21,7 @@
 #include <log4cxx/helpers/stringhelper.h>
 #include <log4cxx/private/appenderskeleton_priv.h>
 #include <log4cxx/private/writerappender_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 #include <mutex>
 
 using namespace log4cxx;
diff --git a/src/main/cpp/xmllayout.cpp b/src/main/cpp/xmllayout.cpp
index 987e8704..eb7406dd 100644
--- a/src/main/cpp/xmllayout.cpp
+++ b/src/main/cpp/xmllayout.cpp
@@ -25,6 +25,7 @@
 #include <log4cxx/helpers/stringhelper.h>
 #include <log4cxx/helpers/transcoder.h>
 #include <log4cxx/ndc.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 
 using namespace log4cxx;
diff --git a/src/main/cpp/xmlsocketappender.cpp b/src/main/cpp/xmlsocketappender.cpp
index 594b5905..3555c33e 100644
--- a/src/main/cpp/xmlsocketappender.cpp
+++ b/src/main/cpp/xmlsocketappender.cpp
@@ -28,6 +28,7 @@
 #include <log4cxx/helpers/socketoutputstream.h>
 #include <log4cxx/private/appenderskeleton_priv.h>
 #include <log4cxx/private/socketappenderskeleton_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/main/cpp/zipcompressaction.cpp b/src/main/cpp/zipcompressaction.cpp
index 75206751..e7b33a21 100644
--- a/src/main/cpp/zipcompressaction.cpp
+++ b/src/main/cpp/zipcompressaction.cpp
@@ -21,6 +21,7 @@
 #include <log4cxx/helpers/exception.h>
 #include <log4cxx/helpers/transcoder.h>
 #include <log4cxx/private/action_priv.h>
+#include <log4cxx/private/log4cxx_private.h>
 
 using namespace log4cxx;
 using namespace log4cxx::rolling;
diff --git a/src/main/include/CMakeLists.txt b/src/main/include/CMakeLists.txt
index 8b7a3af9..3b235249 100644
--- a/src/main/include/CMakeLists.txt
+++ b/src/main/include/CMakeLists.txt
@@ -232,6 +232,14 @@ else()
 	set( FILESYSTEM_IMPL "NONE" )
 endif()
 
+if( ${STD_MAKE_UNIQUE_FOUND} )
+    set(STD_MAKE_UNIQUE_IMPL "std::make_unique")
+    set(STD_MAKE_UNIQUE_FOUND 1)
+else()
+    set(STD_MAKE_UNIQUE_IMPL "log4cxx std::make_unique")
+    set(STD_MAKE_UNIQUE_FOUND 0)
+endif()
+
 # Configure both our private header and our public header
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/log4cxx/private/log4cxx_private.h.in
                ${CMAKE_CURRENT_BINARY_DIR}/log4cxx/private/log4cxx_private.h
diff --git a/src/main/include/log4cxx/private/log4cxx_private.h.in b/src/main/include/log4cxx/private/log4cxx_private.h.in
index 9eb5ec23..f074aab0 100644
--- a/src/main/include/log4cxx/private/log4cxx_private.h.in
+++ b/src/main/include/log4cxx/private/log4cxx_private.h.in
@@ -63,5 +63,16 @@
 #define LOG4CXX_HAS_SETTHREADDESCRIPTION @HAS_SETTHREADDESCRIPTION@
 #define LOG4CXX_HAS_GETTHREADDESCRIPTION @HAS_GETTHREADDESCRIPTION@
 #define LOG4CXX_HAS_THREAD_LOCAL @HAS_THREAD_LOCAL@
+#define LOG4CXX_HAS_STD_MAKE_UNIQUE @STD_MAKE_UNIQUE_FOUND@
+
+#if LOG4CXX_HAS_STD_MAKE_UNIQUE == 0
+namespace std{
+template<typename T, typename ...Args>
+std::unique_ptr<T> make_unique( Args&& ...args )
+{
+    return std::unique_ptr<T>( new T( std::forward<Args>(args)... ) );
+}
+}
+#endif
 
 #endif