diff -nur apache-log4cxx-0.10.0-distrib/src/examples/cpp/console.cpp apache-log4cxx-0.10.0/src/examples/cpp/console.cpp
--- apache-log4cxx-0.10.0-distrib/src/examples/cpp/console.cpp	Mon Mar 31 18:34:52 2008
+++ apache-log4cxx-0.10.0/src/examples/cpp/console.cpp	Tue May 19 11:59:58 2009
@@ -22,6 +22,8 @@
 #include <log4cxx/logmanager.h>
 #include <iostream>
 #include <locale.h>
+#include <cstdio>
+#include <cstring>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
@@ -55,26 +57,26 @@
 {
     setlocale(LC_ALL, "");
     if (argc <= 1) {
-        puts("Console test program\nUsage: console [-err] [ puts | putws | cout | wcout | configure | log | wide | byte ]*\n");  
+        std::puts("Console test program\nUsage: console [-err] [ puts | putws | cout | wcout | configure | log | wide | byte ]*\n");  
     }
     bool configured = false;
     bool err = false;
     for (int i = 1; i < argc; i++) {
-        if (strcmp("-err", argv[i]) == 0) {
+        if (std::strcmp("-err", argv[i]) == 0) {
             err = true;
-        } else if (strcmp("puts", argv[i]) == 0) {
-            fputs("Hello, fputs\n", err ? stderr : stdout);
+        } else if (std::strcmp("puts", argv[i]) == 0) {
+            std::fputs("Hello, fputs\n", err ? stderr : stdout);
 #if LOG4CXX_WCHAR_T_API
-        } else if (strcmp("putws", argv[i]) == 0) {
-            fputws(L"Hello, fputws\n", err ? stderr : stdout);
+        } else if (std::strcmp("putws", argv[i]) == 0) {
+            std::fputws(L"Hello, fputws\n", err ? stderr : stdout);
 #endif
-        } else if (strcmp("cout", argv[i]) == 0) {
+        } else if (std::strcmp("cout", argv[i]) == 0) {
             if (err) {
                 std::cerr << "Hello, cout" << std::endl;
             } else {
                 std::cout << "Hello, cout" << std::endl;
             }
-        } else if (strcmp("wcout", argv[i]) == 0) {
+        } else if (std::strcmp("wcout", argv[i]) == 0) {
             if (err) {
             #if LOG4CXX_HAS_STD_WCOUT
                 std::wcerr << L"Hello, wcout" << std::endl;
@@ -88,10 +90,10 @@
                 std::cout << "Log4cxx has not wcout" << std::endl;
             #endif
             }
-        } else if (strcmp("configure", argv[i]) == 0) {
+        } else if (std::strcmp("configure", argv[i]) == 0) {
             configure(err);
             configured = true;
-        } else if (strcmp("log", argv[i]) == 0) {
+        } else if (std::strcmp("log", argv[i]) == 0) {
             if (!configured) {
                 configure(err);
                 configured = true;
@@ -98,16 +100,16 @@
             }
             log4cxx::Logger::getRootLogger()->info("Hello, log4cxx");
 #if LOG4CXX_WCHAR_T_API
-        } else if (strcmp("wide", argv[i]) == 0) {
-            fwide(err ? stderr : stdout, 1);
-        } else if (strcmp("byte", argv[i]) == 0) {
-            fwide(err ? stderr : stdout, -1);
+        } else if (std::strcmp("wide", argv[i]) == 0) {
+            std::fwide(err ? stderr : stdout, 1);
+        } else if (std::strcmp("byte", argv[i]) == 0) {
+            std::fwide(err ? stderr : stdout, -1);
 #endif
         } else {
-            fputs("Unrecognized option: ", stderr);
-            fputs(argv[i], stderr);
-            fputs("\n", stderr);
-            fflush(stderr);
+            std::fputs("Unrecognized option: ", stderr);
+            std::fputs(argv[i], stderr);
+            std::fputs("\n", stderr);
+            std::fflush(stderr);
         }
     }
     return 0;
diff -nur apache-log4cxx-0.10.0-distrib/src/main/cpp/inputstreamreader.cpp apache-log4cxx-0.10.0/src/main/cpp/inputstreamreader.cpp
--- apache-log4cxx-0.10.0-distrib/src/main/cpp/inputstreamreader.cpp	Mon Mar 31 18:34:10 2008
+++ apache-log4cxx-0.10.0/src/main/cpp/inputstreamreader.cpp	Tue May 19 12:00:47 2009
@@ -20,6 +20,7 @@
 #include <log4cxx/helpers/exception.h>
 #include <log4cxx/helpers/pool.h>
 #include <log4cxx/helpers/bytebuffer.h>
+#include <cstring>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
@@ -63,7 +64,7 @@
              throw IOException(stat);
          }
          if (buf.remaining() > 0) {
-             memmove(buf.data(), buf.current(), buf.remaining());
+             std::memmove(buf.data(), buf.current(), buf.remaining());
              buf.limit(buf.remaining());
          } else {
              buf.clear();
diff -nur apache-log4cxx-0.10.0-distrib/src/main/cpp/socketoutputstream.cpp apache-log4cxx-0.10.0/src/main/cpp/socketoutputstream.cpp
--- apache-log4cxx-0.10.0-distrib/src/main/cpp/socketoutputstream.cpp	Mon Mar 31 18:34:10 2008
+++ apache-log4cxx-0.10.0/src/main/cpp/socketoutputstream.cpp	Tue May 19 12:01:01 2009
@@ -19,6 +19,7 @@
 #include <log4cxx/helpers/socketoutputstream.h>
 #include <log4cxx/helpers/socket.h>
 #include <log4cxx/helpers/bytebuffer.h>
+#include <cstring>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
@@ -49,7 +50,7 @@
   if (buf.remaining() > 0) {
     size_t sz = array.size();
     array.resize(sz + buf.remaining());
-    memcpy(&array[sz], buf.current(), buf.remaining());
+    std::memcpy(&array[sz], buf.current(), buf.remaining());
     buf.position(buf.limit());
   }
 }
diff -nur apache-log4cxx-0.10.0-distrib/src/main/cpp/stringhelper.cpp apache-log4cxx-0.10.0/src/main/cpp/stringhelper.cpp
--- apache-log4cxx-0.10.0-distrib/src/main/cpp/stringhelper.cpp	Mon Mar 31 18:34:10 2008
+++ apache-log4cxx-0.10.0/src/main/cpp/stringhelper.cpp	Tue May 19 11:44:44 2009
@@ -28,6 +28,7 @@
 #endif
 #include <log4cxx/private/log4cxx_private.h>
 #include <cctype>
+#include <cstdio>
 #include <apr.h>
 
 
@@ -94,7 +95,7 @@
 int StringHelper::toInt(const LogString& s) {
     std::string as;
     Transcoder::encode(s, as);
-    return atoi(as.c_str());
+    return std::atoi(as.c_str());
 }
 
 log4cxx_int64_t StringHelper::toInt64(const LogString& s) {
diff -nur apache-log4cxx-0.10.0-distrib/src/main/cpp/systemerrwriter.cpp apache-log4cxx-0.10.0/src/main/cpp/systemerrwriter.cpp
--- apache-log4cxx-0.10.0-distrib/src/main/cpp/systemerrwriter.cpp	Mon Mar 31 18:34:10 2008
+++ apache-log4cxx-0.10.0/src/main/cpp/systemerrwriter.cpp	Tue May 19 12:02:40 2009
@@ -23,6 +23,7 @@
 #define LOG4CXX 1
 #endif
 #include <log4cxx/private/log4cxx_private.h>
+#include <cstdio>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
@@ -60,7 +61,7 @@
 #if LOG4CXX_WCHAR_T_API
     if (isWide()) {
       LOG4CXX_ENCODE_WCHAR(msg, str);
-        fputws(msg.c_str(), stderr);
+        std::fputws(msg.c_str(), stderr);
       return;
     }
 #endif
diff -nur apache-log4cxx-0.10.0-distrib/src/main/cpp/systemoutwriter.cpp apache-log4cxx-0.10.0/src/main/cpp/systemoutwriter.cpp
--- apache-log4cxx-0.10.0-distrib/src/main/cpp/systemoutwriter.cpp	Mon Mar 31 18:34:10 2008
+++ apache-log4cxx-0.10.0/src/main/cpp/systemoutwriter.cpp	Tue May 19 12:03:08 2009
@@ -23,6 +23,7 @@
 #define LOG4CXX 1
 #endif
 #include <log4cxx/private/log4cxx_private.h>
+#include <cstdio>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
@@ -61,7 +62,7 @@
 #if LOG4CXX_WCHAR_T_API
     if (isWide()) {
       LOG4CXX_ENCODE_WCHAR(msg, str);
-        fputws(msg.c_str(), stdout);
+        std::fputws(msg.c_str(), stdout);
       return;
     }
 #endif
diff -nur apache-log4cxx-0.10.0-distrib/src/test/cpp/helpers/messagebuffertest.cpp apache-log4cxx-0.10.0/src/test/cpp/helpers/messagebuffertest.cpp
--- apache-log4cxx-0.10.0-distrib/src/test/cpp/helpers/messagebuffertest.cpp	Mon Mar 31 18:33:10 2008
+++ apache-log4cxx-0.10.0/src/test/cpp/helpers/messagebuffertest.cpp	Tue May 19 11:54:41 2009
@@ -20,6 +20,7 @@
 #include "../insertwide.h"
 #include "../logunit.h"
 #include <log4cxx/logstring.h>
+#include <cstring>
 
 #if LOG4CXX_CFSTRING_API
 #include <CoreFoundation/CFString.h>
@@ -140,9 +141,9 @@
         MessageBuffer buf;
         std::wstring greeting(L"Hello, World");
        wchar_t* part1 = (wchar_t*) malloc(10*sizeof(wchar_t));
-       wcscpy(part1, L"Hello");
+       std::wcscpy(part1, L"Hello");
        wchar_t* part2 = (wchar_t*) malloc(10*sizeof(wchar_t));
-       wcscpy(part2, L", World");
+       std::wcscpy(part2, L", World");
         WideMessageBuffer& retval = buf << part1 << part2;
        free(part1);
        free(part2);
