You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by ca...@apache.org on 2005/10/13 01:36:09 UTC

svn commit: r315077 - in /logging/log4cxx/trunk/src: charsetdecoder.cpp charsetencoder.cpp hierarchy.cpp unicodehelper.cpp

Author: carnold
Date: Wed Oct 12 16:35:55 2005
New Revision: 315077

URL: http://svn.apache.org/viewcvs?rev=315077&view=rev
Log:
LOGCXX-107: compile failure with has.wchar_t=0 on Windows

Modified:
    logging/log4cxx/trunk/src/charsetdecoder.cpp
    logging/log4cxx/trunk/src/charsetencoder.cpp
    logging/log4cxx/trunk/src/hierarchy.cpp
    logging/log4cxx/trunk/src/unicodehelper.cpp

Modified: logging/log4cxx/trunk/src/charsetdecoder.cpp
URL: http://svn.apache.org/viewcvs/logging/log4cxx/trunk/src/charsetdecoder.cpp?rev=315077&r1=315076&r2=315077&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/charsetdecoder.cpp (original)
+++ logging/log4cxx/trunk/src/charsetdecoder.cpp Wed Oct 12 16:35:55 2005
@@ -424,8 +424,10 @@
      return new USASCIICharsetDecoder();
 #elif LOG4CXX_HAS_WCHAR_T
     return new MbstowcsCharsetDecoder();
-#else
+#elif APR_HAS_XLATE
     return new APRCharsetDecoder(APR_LOCALE_CHARSET);
+#else
+#error No default charset decoder available
 #endif
 }
 

Modified: logging/log4cxx/trunk/src/charsetencoder.cpp
URL: http://svn.apache.org/viewcvs/logging/log4cxx/trunk/src/charsetencoder.cpp?rev=315077&r1=315076&r2=315077&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/charsetencoder.cpp (original)
+++ logging/log4cxx/trunk/src/charsetencoder.cpp Wed Oct 12 16:35:55 2005
@@ -476,8 +476,10 @@
    return new USASCIICharsetEncoder();
 #elif LOG4CXX_HAS_WCHAR_T
   return new WcstombsCharsetEncoder();
-#else
+#elif APR_HAS_XLATE
   return new APRCharsetEncoder(APR_LOCALE_CHARSET);
+#else
+#error No default encoder available
 #endif
 }
 

Modified: logging/log4cxx/trunk/src/hierarchy.cpp
URL: http://svn.apache.org/viewcvs/logging/log4cxx/trunk/src/hierarchy.cpp?rev=315077&r1=315076&r2=315077&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/hierarchy.cpp (original)
+++ logging/log4cxx/trunk/src/hierarchy.cpp Wed Oct 12 16:35:55 2005
@@ -101,9 +101,9 @@
         {
                 thresholdInt = l->toInt();
                 threshold = l;
-				if (thresholdInt != Level::ALL_INT) {
-					setConfigured(true);
-				}
+            if (thresholdInt != Level::ALL_INT) {
+               setConfigured(true);
+            }
         }
 }
 

Modified: logging/log4cxx/trunk/src/unicodehelper.cpp
URL: http://svn.apache.org/viewcvs/logging/log4cxx/trunk/src/unicodehelper.cpp?rev=315077&r1=315076&r2=315077&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/unicodehelper.cpp (original)
+++ logging/log4cxx/trunk/src/unicodehelper.cpp Wed Oct 12 16:35:55 2005
@@ -91,7 +91,7 @@
 }
 
 
-
+#if LOG4CXX_HAS_WCHAR_T
 #if defined(_WIN32)
 unsigned int UnicodeHelper::decodeWide(const wchar_t*& src, const wchar_t* srcEnd) {
     unsigned int sv = *(src++);
@@ -140,7 +140,7 @@
 #endif
 
 
-#if LOG4CXX_HAS_WCHAR_T && defined(__STDC_ISO_10646__)
+#if defined(__STDC_ISO_10646__)
 int UnicodeHelper::encodeWide(unsigned int ch, wchar_t* dst) {
    *dst = ch;
    return 1;
@@ -164,7 +164,7 @@
 }
 
 #endif
-
+#endif
 
 
 int UnicodeHelper::encodeUTF8(unsigned int ch, char* dst) {