diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-libs/log4cxx/files | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-libs/log4cxx/files')
4 files changed, 224 insertions, 0 deletions
diff --git a/dev-libs/log4cxx/files/log4cxx-0.10.0-fix-c++14.patch b/dev-libs/log4cxx/files/log4cxx-0.10.0-fix-c++14.patch new file mode 100644 index 000000000000..86ebdcccd5b8 --- /dev/null +++ b/dev-libs/log4cxx/files/log4cxx-0.10.0-fix-c++14.patch @@ -0,0 +1,100 @@ +Fix building with C++14, which errors out due to narrowing conversions. +See also: https://bugs.gentoo.org/show_bug.cgi?id=593874 + +--- a/src/main/cpp/locationinfo.cpp ++++ b/src/main/cpp/locationinfo.cpp +@@ -153,8 +153,8 @@ + 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2E, 0x6C, + 0x6F, 0x67, 0x34, 0x6A, 0x2E, 0x73, 0x70, 0x69, + 0x2E, 0x4C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, +- 0x6E, 0x49, 0x6E, 0x66, 0x6F, 0xED, 0x99, 0xBB, +- 0xE1, 0x4A, 0x91, 0xA5, 0x7C, 0x02, 0x00, 0x01, ++ 0x6E, 0x49, 0x6E, 0x66, 0x6F, (char)0xED, (char)0x99, (char)0xBB, ++ (char)0xE1, 0x4A, (char)0x91, (char)0xA5, 0x7C, 0x02, 0x00, 0x01, + 0x4C, 0x00, 0x08, 0x66, 0x75, 0x6C, 0x6C, 0x49, + 0x6E, 0x66, 0x6F, + 0x74, 0x00, 0x12, 0x4C, 0x6A, +--- a/src/main/cpp/loggingevent.cpp ++++ b/src/main/cpp/loggingevent.cpp +@@ -242,7 +242,7 @@ + 0x68, 0x65, 0x2E, 0x6C, 0x6F, 0x67, 0x34, 0x6A, + 0x2E, 0x73, 0x70, 0x69, 0x2E, 0x4C, 0x6F, 0x67, + 0x67, 0x69, 0x6E, 0x67, 0x45, 0x76, 0x65, 0x6E, +- 0x74, 0xF3, 0xF2, 0xB9, 0x23, 0x74, 0x0B, 0xB5, ++ 0x74, (char)0xF3, (char)0xF2, (char)0xB9, 0x23, 0x74, 0x0B, (char)0xB5, + 0x3F, 0x03, 0x00, 0x0A, 0x5A, 0x00, 0x15, 0x6D, + 0x64, 0x63, 0x43, 0x6F, 0x70, 0x79, 0x4C, 0x6F, + 0x6F, 0x6B, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, +--- a/src/main/cpp/objectoutputstream.cpp ++++ b/src/main/cpp/objectoutputstream.cpp +@@ -36,7 +36,7 @@ + objectHandle(0x7E0000), + classDescriptions(new ClassDescriptionMap()) + { +- char start[] = { 0xAC, 0xED, 0x00, 0x05 }; ++ char start[] = { (char)0xAC, (char)0xED, 0x00, 0x05 }; + ByteBuffer buf(start, sizeof(start)); + os->write(buf, p); + } +@@ -85,7 +85,7 @@ + 0x72, 0x00, 0x13, 0x6A, 0x61, 0x76, 0x61, + 0x2E, 0x75, 0x74, 0x69, 0x6C, 0x2E, 0x48, 0x61, + 0x73, 0x68, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x13, +- 0xBB, 0x0F, 0x25, 0x21, 0x4A, 0xE4, 0xB8, 0x03, ++ (char)0xBB, 0x0F, 0x25, 0x21, 0x4A, (char)0xE4, (char)0xB8, 0x03, + 0x00, 0x02, 0x46, 0x00, 0x0A, 0x6C, 0x6F, 0x61, + 0x64, 0x46, 0x61, 0x63, 0x74, 0x6F, 0x72, 0x49, + 0x00, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, +--- a/src/main/cpp/synchronized.cpp ++++ b/src/main/cpp/synchronized.cpp +@@ -38,6 +38,9 @@ + } + + synchronized::~synchronized() ++#if __cplusplus >= 201103L ++ noexcept(false) ++#endif + { + #if APR_HAS_THREADS + apr_status_t stat = apr_thread_mutex_unlock( +--- a/src/main/include/log4cxx/helpers/synchronized.h ++++ b/src/main/include/log4cxx/helpers/synchronized.h +@@ -29,7 +29,11 @@ + { + public: + synchronized(const Mutex& mutex); +- ~synchronized(); ++ ~synchronized() ++#if __cplusplus >= 201103L ++ noexcept(false) ++#endif ++; + + + private: +--- a/src/test/cpp/xml/domtestcase.cpp ++++ b/src/test/cpp/xml/domtestcase.cpp +@@ -190,9 +190,9 @@ + DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase3.xml")); + LOG4CXX_INFO(logger, "File name is expected to end with a superscript 3"); + #if LOG4CXX_LOGCHAR_IS_UTF8 +- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xC2, 0xB3, 0 }; ++ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, (logchar)0xC2, (logchar)0xB3, 0 }; + #else +- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xB3, 0 }; ++ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, (logchar)0xB3, 0 }; + #endif + File file; + file.setPath(fname); +@@ -209,9 +209,9 @@ + DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase4.xml")); + LOG4CXX_INFO(logger, "File name is expected to end with an ideographic 4"); + #if LOG4CXX_LOGCHAR_IS_UTF8 +- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xE3, 0x86, 0x95, 0 }; ++ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, (logchar)0xE3, (logchar)0x86, (logchar)0x95, 0 }; + #else +- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0x3195, 0 }; ++ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, (logchar)0x3195, 0 }; + #endif + File file; + file.setPath(fname); diff --git a/dev-libs/log4cxx/files/log4cxx-0.10.0-gcc44.patch b/dev-libs/log4cxx/files/log4cxx-0.10.0-gcc44.patch new file mode 100644 index 000000000000..854d34a17492 --- /dev/null +++ b/dev-libs/log4cxx/files/log4cxx-0.10.0-gcc44.patch @@ -0,0 +1,12 @@ +Fix for gcc-4.4 +--- apache-log4cxx-0.10.0-orig/src/examples/cpp/console.cpp 2009-06-12 13:01:06.000000000 +0200 ++++ apache-log4cxx-0.10.0/src/examples/cpp/console.cpp 2009-06-12 13:07:05.000000000 +0200 +@@ -15,6 +15,7 @@ + * limitations under the License. + */ + ++#include <cstdio> + #include <cstdlib> + #include <cstring> + #include <log4cxx/logger.h> + diff --git a/dev-libs/log4cxx/files/log4cxx-0.10.0-missing_includes.patch b/dev-libs/log4cxx/files/log4cxx-0.10.0-missing_includes.patch new file mode 100644 index 000000000000..78a57916bde0 --- /dev/null +++ b/dev-libs/log4cxx/files/log4cxx-0.10.0-missing_includes.patch @@ -0,0 +1,37 @@ +diff -Naur apache-log4cxx-0.10.0.orig/src/examples/cpp/console.cpp apache-log4cxx-0.10.0/src/examples/cpp/console.cpp +--- apache-log4cxx-0.10.0.orig/src/examples/cpp/console.cpp 2008-04-01 00:34:52.000000000 +0200 ++++ apache-log4cxx-0.10.0/src/examples/cpp/console.cpp 2008-05-06 05:40:52.000000000 +0200 +@@ -15,7 +15,8 @@ + * limitations under the License. + */ + +-#include <stdlib.h> ++#include <cstdlib> ++#include <cstring> + #include <log4cxx/logger.h> + #include <log4cxx/consoleappender.h> + #include <log4cxx/simplelayout.h> +diff -Naur apache-log4cxx-0.10.0.orig/src/main/cpp/inputstreamreader.cpp apache-log4cxx-0.10.0/src/main/cpp/inputstreamreader.cpp +--- apache-log4cxx-0.10.0.orig/src/main/cpp/inputstreamreader.cpp 2008-04-01 00:34:09.000000000 +0200 ++++ apache-log4cxx-0.10.0/src/main/cpp/inputstreamreader.cpp 2008-05-06 05:32:31.000000000 +0200 +@@ -21,6 +21,8 @@ + #include <log4cxx/helpers/pool.h> + #include <log4cxx/helpers/bytebuffer.h> + ++#include <cstring> ++ + using namespace log4cxx; + using namespace log4cxx::helpers; + +diff -Naur apache-log4cxx-0.10.0.orig/src/main/cpp/socketoutputstream.cpp apache-log4cxx-0.10.0/src/main/cpp/socketoutputstream.cpp +--- apache-log4cxx-0.10.0.orig/src/main/cpp/socketoutputstream.cpp 2008-04-01 00:34:09.000000000 +0200 ++++ apache-log4cxx-0.10.0/src/main/cpp/socketoutputstream.cpp 2008-05-06 05:35:55.000000000 +0200 +@@ -20,6 +20,8 @@ + #include <log4cxx/helpers/socket.h> + #include <log4cxx/helpers/bytebuffer.h> + ++#include <cstring> ++ + using namespace log4cxx; + using namespace log4cxx::helpers; + diff --git a/dev-libs/log4cxx/files/log4cxx-0.10.0-unixODBC.patch b/dev-libs/log4cxx/files/log4cxx-0.10.0-unixODBC.patch new file mode 100644 index 000000000000..cedca2ccdf42 --- /dev/null +++ b/dev-libs/log4cxx/files/log4cxx-0.10.0-unixODBC.patch @@ -0,0 +1,75 @@ +http://issues.apache.org/jira/browse/LOGCXX-299 +http://bugs.gentoo.org/show_bug.cgi?id=254920 + +diff -ur apache-log4cxx-0.10.0.orig/src/main/cpp/odbcappender.cpp apache-log4cxx-0.10.0/src/main/cpp/odbcappender.cpp +--- apache-log4cxx-0.10.0.orig/src/main/cpp/odbcappender.cpp 2008-04-01 01:34:09.000000000 +0300 ++++ apache-log4cxx-0.10.0/src/main/cpp/odbcappender.cpp 2010-02-24 14:39:37.000000000 +0200 +@@ -167,7 +167,8 @@ + throw SQLException( SQL_HANDLE_DBC, con, "Failed to allocate sql handle.", p); + } + +- SQLWCHAR* wsql = Transcoder::wencode(sql, p); ++ SQLWCHAR* wsql; ++ encode(&wsql, sql, p); + ret = SQLExecDirectW(stmt, wsql, SQL_NTS); + + if (ret < 0) +@@ -237,9 +238,10 @@ + } + + +- SQLWCHAR* wURL = Transcoder::wencode(databaseURL, p); ++ SQLWCHAR* wURL; ++ encode(&wURL, databaseURL, p); + +- wchar_t szOutConnectionString[1024]; ++ SQLWCHAR szOutConnectionString[1024]; + SQLSMALLINT nOutConnctionLength = 0; + + ret = SQLDriverConnectW( connection, NULL, +@@ -331,3 +333,31 @@ + } + } + } ++ ++void ODBCAppender::encode(wchar_t** dest, const LogString& src, Pool& p) { ++ *dest = Transcoder::wencode(src, p); ++} ++ ++void ODBCAppender::encode(unsigned short** dest, ++ const LogString& src, Pool& p) { ++ // worst case double number of characters from UTF-8 or wchar_t ++ *dest = (unsigned short*) ++ p.palloc((src.size() + 1) * 2 * sizeof(unsigned short)); ++ unsigned short* current = *dest; ++ for(LogString::const_iterator i = src.begin(); ++ i != src.end();) { ++ unsigned int sv = Transcoder::decode(src, i); ++ if (sv < 0x10000) { ++ *current++ = (unsigned short) sv; ++ } else { ++ unsigned char u = (unsigned char) (sv >> 16); ++ unsigned char w = (unsigned char) (u - 1); ++ unsigned short hs = (0xD800 + ((w & 0xF) << 6) + ((sv & 0xFFFF) >> 10)); ++ unsigned short ls = (0xDC00 + (sv && 0x3FF)); ++ *current++ = (unsigned short) hs; ++ *current++ = (unsigned short) ls; ++ } ++ } ++ *current = 0; ++} ++ +diff -ur apache-log4cxx-0.10.0.orig/src/main/include/log4cxx/db/odbcappender.h apache-log4cxx-0.10.0/src/main/include/log4cxx/db/odbcappender.h +--- apache-log4cxx-0.10.0.orig/src/main/include/log4cxx/db/odbcappender.h 2008-04-01 01:34:09.000000000 +0300 ++++ apache-log4cxx-0.10.0/src/main/include/log4cxx/db/odbcappender.h 2010-02-24 14:39:39.000000000 +0200 +@@ -279,6 +279,10 @@ + private: + ODBCAppender(const ODBCAppender&); + ODBCAppender& operator=(const ODBCAppender&); ++ static void encode(wchar_t** dest, const LogString& src, ++ log4cxx::helpers::Pool& p); ++ static void encode(unsigned short** dest, const LogString& src, ++ log4cxx::helpers::Pool& p); + }; // class ODBCAppender + LOG4CXX_PTR_DEF(ODBCAppender); + |