diff --git a/kwsysPlatformTestsCXX.cxx b/kwsysPlatformTestsCXX.cxx
index 93d7d22dd30a50f26128911dcce38006dcd9ed8a..f0a2dfccbcfe84f6d5a9f8a44fbe3578980cc78a 100644
--- a/kwsysPlatformTestsCXX.cxx
+++ b/kwsysPlatformTestsCXX.cxx
@@ -29,7 +29,7 @@
 
 #ifdef TEST_KWSYS_STL_HAVE_STD
 #include <list>
-void f(std::list<int>*) {}
+void f(std ::list<int>*) {}
 int main() { return 0; }
 #endif
 
@@ -40,7 +40,7 @@ int main() { return 0; }
 
 #ifdef TEST_KWSYS_IOS_HAVE_STD
 #include <iosfwd>
-void f(std::ostream*) {}
+void f(std ::ostream*) {}
 int main() { return 0; }
 #endif
 
@@ -50,8 +50,8 @@ int main() { return 0; }
 # error "GCC 2.96 stringstream is buggy"
 #endif
 int main()
-{ 
-  std::ostringstream ostr;
+{
+  std ::ostringstream ostr;
   ostr << "hello";
   if(ostr.str().size() == 5)
     {