Author: grobmeier
Date: Tue Nov 27 09:39:18 2012
New Revision: 1414037

URL: http://svn.apache.org/viewvc?rev=1414037&view=rev
Log:
Applied patch for LOGCXX-400 LOGCXX-404 LOGCXX-402 LOGCXX-403 LOGCXX-401 thanks 
to Andrew Lazarus

Modified:
    logging/log4cxx/trunk/pom.xml
    logging/log4cxx/trunk/src/main/cpp/locationinfo.cpp
    logging/log4cxx/trunk/src/main/cpp/loggingevent.cpp
    logging/log4cxx/trunk/src/main/cpp/ndc.cpp
    logging/log4cxx/trunk/src/main/cpp/objectoutputstream.cpp
    logging/log4cxx/trunk/src/main/cpp/transcoder.cpp
    logging/log4cxx/trunk/src/main/include/log4cxx/helpers/object.h
    logging/log4cxx/trunk/src/main/include/log4cxx/helpers/simpledateformat.h
    logging/log4cxx/trunk/src/main/include/log4cxx/logstring.h

Modified: logging/log4cxx/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/pom.xml?rev=1414037&r1=1414036&r2=1414037&view=diff
==============================================================================
--- logging/log4cxx/trunk/pom.xml (original)
+++ logging/log4cxx/trunk/pom.xml Tue Nov 27 09:39:18 2012
@@ -55,6 +55,7 @@
 </organization>
 <build>
     <plugins>
+    <!--
       <plugin>
         <artifactId>maven-antrun-plugin</artifactId>
         <executions>
@@ -166,6 +167,7 @@
           </dependency>
         </dependencies>
       </plugin>  
+      -->
           <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <configuration>

Modified: logging/log4cxx/trunk/src/main/cpp/locationinfo.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/cpp/locationinfo.cpp?rev=1414037&r1=1414036&r2=1414037&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/cpp/locationinfo.cpp (original)
+++ logging/log4cxx/trunk/src/main/cpp/locationinfo.cpp Tue Nov 27 09:39:18 2012
@@ -153,8 +153,8 @@ void LocationInfo::write(ObjectOutputStr
          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, static_cast<char>(0xED), 
static_cast<char>(0x99), static_cast<char>(0xBB), 
+         static_cast<char>(0xE1), 0x4A, static_cast<char>(0x91), 
static_cast<char>(0xA5), 0x7C, 0x02, 0x00, 0x01, 
          0x4C, 0x00, 0x08, 0x66, 0x75, 0x6C, 0x6C, 0x49, 
          0x6E, 0x66, 0x6F, 
             0x74, 0x00, 0x12, 0x4C, 0x6A, 

Modified: logging/log4cxx/trunk/src/main/cpp/loggingevent.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/cpp/loggingevent.cpp?rev=1414037&r1=1414036&r2=1414037&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/cpp/loggingevent.cpp (original)
+++ logging/log4cxx/trunk/src/main/cpp/loggingevent.cpp Tue Nov 27 09:39:18 2012
@@ -242,7 +242,7 @@ void LoggingEvent::writeProlog(ObjectOut
         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, static_cast<char>(0xF3), static_cast<char>(0xF2), 
static_cast<char>(0xB9), 0x23, 0x74, 0x0B, static_cast<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, 

Modified: logging/log4cxx/trunk/src/main/cpp/ndc.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/cpp/ndc.cpp?rev=1414037&r1=1414036&r2=1414037&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/cpp/ndc.cpp (original)
+++ logging/log4cxx/trunk/src/main/cpp/ndc.cpp Tue Nov 27 09:39:18 2012
@@ -309,7 +309,7 @@ bool NDC::pop(CFStringRef& dst)
         Stack& stack = data->getStack();
         if(!stack.empty())
         {
-                dst = Transcoder::encode(stack.top().message);
+                dst = Transcoder::encode(getMessage(stack.top()));
                 stack.pop();
                 data->recycle();
                 return true;
@@ -326,7 +326,7 @@ bool NDC::peek(CFStringRef& dst)
         Stack& stack = data->getStack();
         if(!stack.empty())
         {
-                dst = Transcoder::encode(stack.top().message);
+                dst = Transcoder::encode(getMessage(stack.top()));
                 return true;
         }
         data->recycle();

Modified: logging/log4cxx/trunk/src/main/cpp/objectoutputstream.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/cpp/objectoutputstream.cpp?rev=1414037&r1=1414036&r2=1414037&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/cpp/objectoutputstream.cpp (original)
+++ logging/log4cxx/trunk/src/main/cpp/objectoutputstream.cpp Tue Nov 27 
09:39:18 2012
@@ -36,7 +36,7 @@ ObjectOutputStream::ObjectOutputStream(O
        objectHandle(0x7E0000),
        classDescriptions(new ClassDescriptionMap())
 {
-   char start[] = { 0xAC, 0xED, 0x00, 0x05 };
+   char start[] = { static_cast<char>(0xAC), static_cast<char>(0xED), 0x00, 
0x05 };
    ByteBuffer buf(start, sizeof(start));
    os->write(buf, p);
 }
@@ -85,7 +85,7 @@ void ObjectOutputStream::writeObject(con
         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, 
+        static_cast<char>(0xBB), 0x0F, 0x25, 0x21, 0x4A, 
static_cast<char>(0xE4), static_cast<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, 

Modified: logging/log4cxx/trunk/src/main/cpp/transcoder.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/cpp/transcoder.cpp?rev=1414037&r1=1414036&r2=1414037&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/cpp/transcoder.cpp (original)
+++ logging/log4cxx/trunk/src/main/cpp/transcoder.cpp Tue Nov 27 09:39:18 2012
@@ -356,7 +356,7 @@ static void encodeUTF16(unsigned int sv,
         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));
+        unsigned short ls = (0xDC00 + (sv & 0x3FF));
         dst.append(1, hs);
         dst.append(1, ls);
     }

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/helpers/object.h
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/helpers/object.h?rev=1414037&r1=1414036&r2=1414037&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/helpers/object.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/helpers/object.h Tue Nov 27 
09:39:18 2012
@@ -61,8 +61,8 @@ static const helpers::Class& getStaticCl
 static const log4cxx::helpers::ClassRegistration&  registerClass();
 
 #define IMPLEMENT_LOG4CXX_OBJECT(object)\
-const log4cxx::helpers::Class& object::getClass() const { return 
getStaticClass(); }\
-const log4cxx::helpers::Class& object::getStaticClass() { \
+const ::log4cxx::helpers::Class& object::getClass() const { return 
getStaticClass(); }\
+const ::log4cxx::helpers::Class& object::getStaticClass() { \
    static Clazz##object theClass;                         \
    return theClass;                                       \
 }                                                                      \
@@ -71,7 +71,7 @@ const log4cxx::helpers::ClassRegistratio
     return classReg; \
 }\
 namespace log4cxx { namespace classes { \
-const log4cxx::helpers::ClassRegistration& object##Registration = 
object::registerClass(); \
+const ::log4cxx::helpers::ClassRegistration& object##Registration = 
object::registerClass(); \
 } }
 
 

Modified: 
logging/log4cxx/trunk/src/main/include/log4cxx/helpers/simpledateformat.h
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/helpers/simpledateformat.h?rev=1414037&r1=1414036&r2=1414037&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/helpers/simpledateformat.h 
(original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/helpers/simpledateformat.h 
Tue Nov 27 09:39:18 2012
@@ -29,7 +29,9 @@
 #include <vector>
 #include <time.h>
 
-namespace std { class locale; }
+#include <locale>
+
+using std::locale;
 
 namespace log4cxx
 {

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/logstring.h
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/logstring.h?rev=1414037&r1=1414036&r2=1414037&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/logstring.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/logstring.h Tue Nov 27 
09:39:18 2012
@@ -27,7 +27,7 @@
 #include <string>
 #include <log4cxx/log4cxx.h>
 
-#if LOG4CXX_LOGCHAR_IS_WCHAR && LOG4CXX_LOGCHAR_IS_UTF8 && 
LOG4CXX_LOGCHAR_IS_UNICHAR
+#if (LOG4CXX_LOGCHAR_IS_WCHAR + LOG4CXX_LOGCHAR_IS_UTF8 + 
LOG4CXX_LOGCHAR_IS_UNICHAR)>1
 #error only one of LOG4CXX_LOGCHAR_IS_WCHAR, LOG4CXX_LOGCHAR_IS_UTF8 or 
LOG4CXX_LOGCHAR_IS_UNICHAR may be true
 #endif
 


Reply via email to