Modified: logging/log4cxx/trunk/src/writer.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/writer.cpp?rev=415764&r1=415763&r2=415764&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/writer.cpp (original)
+++ logging/log4cxx/trunk/src/writer.cpp Tue Jun 20 11:50:40 2006
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+#include <log4cxx/logstring.h>
 #include <log4cxx/helpers/writer.h>
 
 using namespace log4cxx::helpers;

Modified: logging/log4cxx/trunk/src/xmllayout.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/xmllayout.cpp?rev=415764&r1=415763&r2=415764&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/xmllayout.cpp (original)
+++ logging/log4cxx/trunk/src/xmllayout.cpp Tue Jun 20 11:50:40 2006
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+#include <log4cxx/logstring.h>
 #include <log4cxx/xml/xmllayout.h>
 #include <log4cxx/spi/loggingevent.h>
 #include <log4cxx/helpers/optionconverter.h>

Modified: logging/log4cxx/trunk/tests/src/customlogger/xlogger.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/tests/src/customlogger/xlogger.cpp?rev=415764&r1=415763&r2=415764&view=diff
==============================================================================
--- logging/log4cxx/trunk/tests/src/customlogger/xlogger.cpp (original)
+++ logging/log4cxx/trunk/tests/src/customlogger/xlogger.cpp Tue Jun 20 
11:50:40 2006
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
+#include <log4cxx/logstring.h>
 #include "xlogger.h"
 #include <log4cxx/level.h>
 #include <log4cxx/logmanager.h>

Modified: 
logging/log4cxx/trunk/tests/src/helpers/absolutetimedateformattestcase.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/tests/src/helpers/absolutetimedateformattestcase.cpp?rev=415764&r1=415763&r2=415764&view=diff
==============================================================================
--- logging/log4cxx/trunk/tests/src/helpers/absolutetimedateformattestcase.cpp 
(original)
+++ logging/log4cxx/trunk/tests/src/helpers/absolutetimedateformattestcase.cpp 
Tue Jun 20 11:50:40 2006
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
+#include <log4cxx/logstring.h>
 #include <log4cxx/helpers/absolutetimedateformat.h>
 #include <cppunit/extensions/HelperMacros.h>
 #include "../insertwide.h"

Modified: logging/log4cxx/trunk/tests/src/helpers/datetimedateformattestcase.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/tests/src/helpers/datetimedateformattestcase.cpp?rev=415764&r1=415763&r2=415764&view=diff
==============================================================================
--- logging/log4cxx/trunk/tests/src/helpers/datetimedateformattestcase.cpp 
(original)
+++ logging/log4cxx/trunk/tests/src/helpers/datetimedateformattestcase.cpp Tue 
Jun 20 11:50:40 2006
@@ -15,14 +15,13 @@
  */
 
 #define __STDC_CONSTANT_MACROS
+#include <log4cxx/logstring.h>
 #include <log4cxx/helpers/datetimedateformat.h>
 #include <cppunit/extensions/HelperMacros.h>
 #include <log4cxx/helpers/pool.h>
-#include <locale>
 #include "../insertwide.h"
 #include <apr.h>
 #include <apr_time.h>
-#include "localechanger.h"
 #include <sstream>
 
 using namespace log4cxx;
@@ -42,6 +41,8 @@
 
 
 #if LOG4CXX_HAS_STD_LOCALE
+#include <locale>
+#include "localechanger.h"
 #define MAKE_LOCALE(ptr, id)     \
 std::locale loco(id);            \
 std::locale* ptr = &loco;

Modified: logging/log4cxx/trunk/tests/src/helpers/iso8601dateformattestcase.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/tests/src/helpers/iso8601dateformattestcase.cpp?rev=415764&r1=415763&r2=415764&view=diff
==============================================================================
--- logging/log4cxx/trunk/tests/src/helpers/iso8601dateformattestcase.cpp 
(original)
+++ logging/log4cxx/trunk/tests/src/helpers/iso8601dateformattestcase.cpp Tue 
Jun 20 11:50:40 2006
@@ -13,10 +13,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
+#include <log4cxx/logstring.h>
 #include <log4cxx/helpers/iso8601dateformat.h>
 #include <cppunit/extensions/HelperMacros.h>
+#if LOG4CXX_HAS_STD_LOCALE
 #include <locale>
+#endif
 #include "../insertwide.h"
 #include <log4cxx/helpers/pool.h>
 #include <log4cxx/helpers/date.h>

Modified: logging/log4cxx/trunk/tests/src/helpers/localechanger.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/tests/src/helpers/localechanger.cpp?rev=415764&r1=415763&r2=415764&view=diff
==============================================================================
--- logging/log4cxx/trunk/tests/src/helpers/localechanger.cpp (original)
+++ logging/log4cxx/trunk/tests/src/helpers/localechanger.cpp Tue Jun 20 
11:50:40 2006
@@ -13,6 +13,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#define LOG4CXX_TEST
+#include <log4cxx/private/log4cxx_private.h>
+#if LOG4CXX_HAS_STD_LOCALE
 
 #include "localechanger.h"
 #include <stdexcept>
@@ -43,3 +46,4 @@
       }
   }
 
+#endif
\ No newline at end of file

Modified: logging/log4cxx/trunk/tests/src/helpers/optionconvertertestcase.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/tests/src/helpers/optionconvertertestcase.cpp?rev=415764&r1=415763&r2=415764&view=diff
==============================================================================
--- logging/log4cxx/trunk/tests/src/helpers/optionconvertertestcase.cpp 
(original)
+++ logging/log4cxx/trunk/tests/src/helpers/optionconvertertestcase.cpp Tue Jun 
20 11:50:40 2006
@@ -21,12 +21,14 @@
 #include <log4cxx/helpers/properties.h>
 #include <log4cxx/helpers/system.h>
 #include <log4cxx/helpers/transcoder.h>
+#include <log4cxx/helpers/pool.h>
 #include "../testchar.h"
 #include "../insertwide.h"
 #include <stdlib.h>
 #include <apr_pools.h>
 #include <apr_file_io.h>
 #include <apr_user.h>
+#include <apr_env.h>
 
 
 using namespace log4cxx;
@@ -68,14 +70,21 @@
    * before invoking tests.  ::putenv not reliable.
    */
    void envCheck() {
-     const char* toto = ::getenv("TOTO");
-     CPPUNIT_ASSERT(toto != NULL);
+     Pool p;
+     char* toto;
+     apr_status_t stat = apr_env_get(&toto, "TOTO", 
+         (apr_pool_t*) p.getAPRPool());
+     CPPUNIT_ASSERT_EQUAL(APR_SUCCESS, stat);
      CPPUNIT_ASSERT_EQUAL(std::string("wonderful"), (std::string) toto);
-     const char* key1 = ::getenv("key1");
-     CPPUNIT_ASSERT(key1 != NULL);
+     char* key1;
+     stat = apr_env_get(&key1, "key1", 
+         (apr_pool_t*) p.getAPRPool());
+     CPPUNIT_ASSERT_EQUAL(APR_SUCCESS, stat);
      CPPUNIT_ASSERT_EQUAL(std::string("value1"), (std::string) key1);
-     const char* key2 = ::getenv("key2");
-     CPPUNIT_ASSERT(key2 != NULL);
+     char* key2;
+     stat = apr_env_get(&key2, "key2", 
+         (apr_pool_t*) p.getAPRPool());
+     CPPUNIT_ASSERT_EQUAL(APR_SUCCESS, stat);
      CPPUNIT_ASSERT_EQUAL(std::string("value2"), (std::string) key2);
    }
 

Modified: 
logging/log4cxx/trunk/tests/src/helpers/relativetimedateformattestcase.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/tests/src/helpers/relativetimedateformattestcase.cpp?rev=415764&r1=415763&r2=415764&view=diff
==============================================================================
--- logging/log4cxx/trunk/tests/src/helpers/relativetimedateformattestcase.cpp 
(original)
+++ logging/log4cxx/trunk/tests/src/helpers/relativetimedateformattestcase.cpp 
Tue Jun 20 11:50:40 2006
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-
+#include <log4cxx/logstring.h>
 #include <log4cxx/helpers/relativetimedateformat.h>
 #include <log4cxx/spi/loggingevent.h>
 #include <cppunit/extensions/HelperMacros.h>

Modified: logging/log4cxx/trunk/tests/src/helpers/stringhelpertestcase.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/tests/src/helpers/stringhelpertestcase.cpp?rev=415764&r1=415763&r2=415764&view=diff
==============================================================================
--- logging/log4cxx/trunk/tests/src/helpers/stringhelpertestcase.cpp (original)
+++ logging/log4cxx/trunk/tests/src/helpers/stringhelpertestcase.cpp Tue Jun 20 
11:50:40 2006
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+#include <log4cxx/logstring.h>
 #include <log4cxx/helpers/stringhelper.h>
 #include <cppunit/extensions/HelperMacros.h>
 #include "../insertwide.h"

Modified: logging/log4cxx/trunk/tests/src/helpers/stringtokenizertestcase.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/tests/src/helpers/stringtokenizertestcase.cpp?rev=415764&r1=415763&r2=415764&view=diff
==============================================================================
--- logging/log4cxx/trunk/tests/src/helpers/stringtokenizertestcase.cpp 
(original)
+++ logging/log4cxx/trunk/tests/src/helpers/stringtokenizertestcase.cpp Tue Jun 
20 11:50:40 2006
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
+#include <log4cxx/logstring.h>
 #include <log4cxx/helpers/stringtokenizer.h>
 #include <cppunit/TestFixture.h>
 #include <cppunit/extensions/HelperMacros.h>

Modified: logging/log4cxx/trunk/tests/src/helpers/timezonetestcase.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/tests/src/helpers/timezonetestcase.cpp?rev=415764&r1=415763&r2=415764&view=diff
==============================================================================
--- logging/log4cxx/trunk/tests/src/helpers/timezonetestcase.cpp (original)
+++ logging/log4cxx/trunk/tests/src/helpers/timezonetestcase.cpp Tue Jun 20 
11:50:40 2006
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
+#include <log4cxx/logstring.h>
 #include <log4cxx/helpers/timezone.h>
 #include <cppunit/extensions/HelperMacros.h>
 #include "../insertwide.h"

Modified: logging/log4cxx/trunk/tests/src/main.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/tests/src/main.cpp?rev=415764&r1=415763&r2=415764&view=diff
==============================================================================
--- logging/log4cxx/trunk/tests/src/main.cpp (original)
+++ logging/log4cxx/trunk/tests/src/main.cpp Tue Jun 20 11:50:40 2006
@@ -51,9 +51,30 @@
 //
 log4cxx::LoggerPtr logger(log4cxx::Logger::getLogger("log4cxx_unittest"));
 
-int main( int argc, const char * const * argv)
-{
+#if defined(_WIN32_WCE)
+#define LOG4CXX_USE_WMAIN 1
+#endif
+
+#if defined(LOG4CXX_USE_WMAIN)
+int wmain(int argc, const wchar_t* const * wargv) {
+    char** argv = new char*[argc];
+    {
+        for(int i = 0; i < argc; i++) {
+            size_t len = wcslen(wargv[i]) + 1;
+            argv[i] = new char[len];
+            //
+            //   truncate characters since argument names should 
+            //      only be ASCII
+            for(size_t j = 0; j < len; j++) {
+                argv[i][j] = (char) wargv[i][j];
+            }
+        }
+    }
+    apr_app_initialize(&argc, (const char* const **) &argv, NULL);
+#else
+int main(int argc, const char* const * argv) {
         apr_app_initialize(&argc, &argv, NULL);
+#endif
         CppUnit::TextUi::TestRunner runner;
 
         CppUnit::TestFactoryRegistry &registry =
@@ -122,6 +143,12 @@
         }
 
         apr_terminate();
+#if defined(LOG4CXX_USE_WMAIN)
+    for(int i = 0; i < argc; i++) {
+        delete [] (argv[i]);
+    }
+    delete [] argv;
+#endif
         return wasSuccessful ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 #if LOG4CXX_HAS_WCHAR_T

Modified: logging/log4cxx/trunk/tests/src/nt/nteventlogappendertestcase.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/tests/src/nt/nteventlogappendertestcase.cpp?rev=415764&r1=415763&r2=415764&view=diff
==============================================================================
--- logging/log4cxx/trunk/tests/src/nt/nteventlogappendertestcase.cpp (original)
+++ logging/log4cxx/trunk/tests/src/nt/nteventlogappendertestcase.cpp Tue Jun 
20 11:50:40 2006
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#if defined(_WIN32)
+#if defined(_WIN32) && !defined(_WIN32_WCE)
 #include <cppunit/TestFixture.h>
 #include <cppunit/extensions/HelperMacros.h>
 #include <log4cxx/nt/nteventlogappender.h>

Modified: logging/log4cxx/trunk/tests/src/pattern/num343patternconverter.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/tests/src/pattern/num343patternconverter.cpp?rev=415764&r1=415763&r2=415764&view=diff
==============================================================================
--- logging/log4cxx/trunk/tests/src/pattern/num343patternconverter.cpp 
(original)
+++ logging/log4cxx/trunk/tests/src/pattern/num343patternconverter.cpp Tue Jun 
20 11:50:40 2006
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
+#include <log4cxx/logstring.h>
 #include "num343patternconverter.h"
 
 using namespace log4cxx;

Modified: logging/log4cxx/trunk/tests/src/streamtestcase.cpp
URL: 
http://svn.apache.org/viewvc/logging/log4cxx/trunk/tests/src/streamtestcase.cpp?rev=415764&r1=415763&r2=415764&view=diff
==============================================================================
--- logging/log4cxx/trunk/tests/src/streamtestcase.cpp (original)
+++ logging/log4cxx/trunk/tests/src/streamtestcase.cpp Tue Jun 20 11:50:40 2006
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
+#include <log4cxx/logstring.h>
 #include <log4cxx/stream.h>
 #include <cppunit/TestFixture.h>
 #include <cppunit/extensions/HelperMacros.h>


Reply via email to