Accepting request 437929 from home:cbosdonnat:branches:devel:libraries:c_c++
- Fix build with GCC6. gcc6.patch. https://issues.apache.org/jira/browse/LOGCXX-463 OBS-URL: https://build.opensuse.org/request/show/437929 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/log4cxx?expand=0&rev=7
This commit is contained in:
parent
2ee54639d4
commit
1f2abc008a
79
gcc6.patch
Normal file
79
gcc6.patch
Normal file
@ -0,0 +1,79 @@
|
||||
Index: src/main/cpp/objectoutputstream.cpp
|
||||
===================================================================
|
||||
--- src/main/cpp/objectoutputstream.cpp.orig
|
||||
+++ src/main/cpp/objectoutputstream.cpp
|
||||
@@ -36,8 +36,8 @@ ObjectOutputStream::ObjectOutputStream(O
|
||||
objectHandle(0x7E0000),
|
||||
classDescriptions(new ClassDescriptionMap())
|
||||
{
|
||||
- char start[] = { 0xAC, 0xED, 0x00, 0x05 };
|
||||
- ByteBuffer buf(start, sizeof(start));
|
||||
+ unsigned char start[] = { 0xAC, 0xED, 0x00, 0x05 };
|
||||
+ ByteBuffer buf((char*) start, sizeof(start));
|
||||
os->write(buf, p);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ void ObjectOutputStream::writeObject(con
|
||||
//
|
||||
// TC_OBJECT and the classDesc for java.util.Hashtable
|
||||
//
|
||||
- char prolog[] = {
|
||||
+ unsigned char prolog[] = {
|
||||
0x72, 0x00, 0x13, 0x6A, 0x61, 0x76, 0x61,
|
||||
0x2E, 0x75, 0x74, 0x69, 0x6C, 0x2E, 0x48, 0x61,
|
||||
0x73, 0x68, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x13,
|
||||
@@ -90,7 +90,7 @@ void ObjectOutputStream::writeObject(con
|
||||
0x64, 0x46, 0x61, 0x63, 0x74, 0x6F, 0x72, 0x49,
|
||||
0x00, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68,
|
||||
0x6F, 0x6C, 0x64, 0x78, 0x70 };
|
||||
- writeProlog("java.util.Hashtable", 1, prolog, sizeof(prolog), p);
|
||||
+ writeProlog("java.util.Hashtable", 1, (char*) prolog, sizeof(prolog), p);
|
||||
//
|
||||
// loadFactor = 0.75, threshold = 5, blockdata start, buckets.size = 7
|
||||
char data[] = { 0x3F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
|
||||
Index: src/main/cpp/loggingevent.cpp
|
||||
===================================================================
|
||||
--- src/main/cpp/loggingevent.cpp.orig
|
||||
+++ src/main/cpp/loggingevent.cpp
|
||||
@@ -236,7 +236,7 @@ void LoggingEvent::setProperty(const Log
|
||||
|
||||
|
||||
void LoggingEvent::writeProlog(ObjectOutputStream& os, Pool& p) {
|
||||
- char classDesc[] = {
|
||||
+ unsigned char classDesc[] = {
|
||||
0x72, 0x00, 0x21,
|
||||
0x6F, 0x72, 0x67, 0x2E, 0x61, 0x70, 0x61, 0x63,
|
||||
0x68, 0x65, 0x2E, 0x6C, 0x6F, 0x67, 0x34, 0x6A,
|
||||
@@ -291,8 +291,8 @@ void LoggingEvent::writeProlog(ObjectOut
|
||||
0x6F, 0x72, 0x6D, 0x61, 0x74, 0x69, 0x6F, 0x6E,
|
||||
0x3B, 0x78, 0x70 };
|
||||
|
||||
- os.writeProlog("org.apache.log4j.spi.LoggingEvent",
|
||||
- 8, classDesc, sizeof(classDesc), p);
|
||||
+ os.writeProlog("org.apache.log4j.spi.LoggingEvent",
|
||||
+ 8, (char*) classDesc, sizeof(classDesc), p);
|
||||
}
|
||||
|
||||
void LoggingEvent::write(helpers::ObjectOutputStream& os, Pool& p) const {
|
||||
Index: src/main/cpp/locationinfo.cpp
|
||||
===================================================================
|
||||
--- src/main/cpp/locationinfo.cpp.orig
|
||||
+++ src/main/cpp/locationinfo.cpp
|
||||
@@ -148,7 +148,7 @@ void LocationInfo::write(ObjectOutputStr
|
||||
if (lineNumber == -1 && fileName == NA && methodName == NA_METHOD) {
|
||||
os.writeNull(p);
|
||||
} else {
|
||||
- char prolog[] = {
|
||||
+ unsigned char prolog[] = {
|
||||
0x72, 0x00, 0x21, 0x6F, 0x72, 0x67, 0x2E,
|
||||
0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2E, 0x6C,
|
||||
0x6F, 0x67, 0x34, 0x6A, 0x2E, 0x73, 0x70, 0x69,
|
||||
@@ -161,7 +161,7 @@ void LocationInfo::write(ObjectOutputStr
|
||||
0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67,
|
||||
0x2F, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x3B,
|
||||
0x78, 0x70 };
|
||||
- os.writeProlog("org.apache.log4j.spi.LocationInfo", 2, prolog, sizeof(prolog), p);
|
||||
+ os.writeProlog("org.apache.log4j.spi.LocationInfo", 2, (char*) prolog, sizeof(prolog), p);
|
||||
char* line = p.itoa(lineNumber);
|
||||
//
|
||||
// construct Java-like fullInfo (replace "::" with ".")
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 30 18:07:20 UTC 2016 - cbosdonnat@suse.com
|
||||
|
||||
- Fix build with GCC6. gcc6.patch.
|
||||
https://issues.apache.org/jira/browse/LOGCXX-463
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 20 14:09:43 UTC 2012 - jengelh@medozas.de
|
||||
|
||||
|
@ -26,6 +26,8 @@ Group: Development/Libraries/C and C++
|
||||
Source: apache-log4cxx-%{version}.tar.bz2
|
||||
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
||||
Patch0: %{name}-fix_duplicate_entries.patch
|
||||
# PATH-UPSTREAM -- fix gcc6 build
|
||||
Patch1: gcc6.patch
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: graphviz
|
||||
@ -103,6 +105,7 @@ Log4cxx is a port to C++ of the log4j logging library.
|
||||
%prep
|
||||
%setup -qn apache-log4cxx-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p0
|
||||
|
||||
%build
|
||||
./autogen.sh
|
||||
|
Loading…
x
Reference in New Issue
Block a user