? mathieu.patch
? Utilities/vtkfreetype-old
Index: Common/vtkGarbageCollector.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Common/vtkGarbageCollector.cxx,v
retrieving revision 1.30
diff -u -3 -p -r1.30 vtkGarbageCollector.cxx
--- Common/vtkGarbageCollector.cxx	25 Nov 2005 20:10:58 -0000	1.30
+++ Common/vtkGarbageCollector.cxx	4 Sep 2006 00:48:46 -0000
@@ -21,6 +21,7 @@
 #include <vtkstd/queue>
 #include <vtkstd/stack>
 #include <vtkstd/vector>
+#include <vtksys/ios/sstream>
 
 // Leave the hashing version off for now.
 #define VTK_GARBAGE_COLLECTOR_HASH 0
@@ -610,14 +611,13 @@ void vtkGarbageCollectorImpl::Report(vtk
     if(this->Debug && vtkObject::GetGlobalWarningDisplay())
       {
       vtkObjectBase* current = this->Current->Object;
-      ostrstream msg;
+      vtksys_ios::ostringstream msg;
       msg << "Report: "
           << current->GetClassName() << "(" << current << ") "
           << (desc?desc:"")
           << " -> " << obj->GetClassName() << "(" << obj << ")";
       msg << ends;
-      vtkDebugMacro(<< msg.str());
-      msg.rdbuf()->freeze(0);
+      vtkDebugMacro(<< msg.str().c_str());
       }
 
     // Forward call to the internal implementation.
@@ -708,7 +708,7 @@ void vtkGarbageCollectorImpl::PrintCompo
 {
   if(this->Debug && vtkObject::GetGlobalWarningDisplay())
     {
-    ostrstream msg;
+    vtksys_ios::ostringstream msg;
     msg << "Identified strongly connected component "
         << c->Identifier << " with net reference count "
         << c->NetCount << ":";
@@ -721,8 +721,7 @@ void vtkGarbageCollectorImpl::PrintCompo
           << ((count == 1)? "reference" : "references");
       }
     msg << ends;
-    vtkDebugMacro(<< msg.str());
-    msg.rdbuf()->freeze(0);
+    vtkDebugMacro(<< msg.str().c_str());
     }
 }
 #else
Index: Common/vtkObjectBase.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Common/vtkObjectBase.cxx,v
retrieving revision 1.14
diff -u -3 -p -r1.14 vtkObjectBase.cxx
--- Common/vtkObjectBase.cxx	17 May 2005 13:12:30 -0000	1.14
+++ Common/vtkObjectBase.cxx	4 Sep 2006 00:48:47 -0000
@@ -17,6 +17,8 @@
 #include "vtkDebugLeaks.h"
 #include "vtkGarbageCollector.h"
 
+#include <vtksys/ios/sstream>
+
 #define vtkBaseDebugMacro(x)
 
 class vtkObjectBaseToGarbageCollectorFriendship
@@ -177,10 +179,10 @@ void vtkObjectBase::CollectRevisions(ost
 
 void vtkObjectBase::PrintRevisions(ostream& os)
 {
-  ostrstream revisions;
+  vtksys_ios::ostringstream revisions;
   this->CollectRevisions(revisions);
   revisions << ends;
-  const char* c = revisions.str();
+  const char* c = revisions.str().c_str();
   while(*c)
     {
     const char* beginClass = 0;
@@ -218,7 +220,6 @@ void vtkObjectBase::PrintRevisions(ostre
       ++c;
       }
     }
-  revisions.rdbuf()->freeze(0);
 }
 
 //----------------------------------------------------------------------------
Index: Common/vtkPythonUtil.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Common/vtkPythonUtil.cxx,v
retrieving revision 1.76
diff -u -3 -p -r1.76 vtkPythonUtil.cxx
--- Common/vtkPythonUtil.cxx	4 Aug 2005 16:19:14 -0000	1.76
+++ Common/vtkPythonUtil.cxx	4 Sep 2006 00:48:47 -0000
@@ -27,6 +27,7 @@
 
 #include <vtkstd/map>
 #include <vtkstd/string>
+#include <vtksys/ios/sstream>
 
 #if defined ( _MSC_VER )
 #  define vtkConvertPtrToLong(x) ((long)(PtrToUlong(x)))
@@ -100,11 +101,10 @@ static PyObject *PyVTKObject_PyString(Py
     }
   PyErr_Clear();
 
-  ostrstream vtkmsg_with_warning_C4701;
+  vtksys_ios::ostringstream vtkmsg_with_warning_C4701;
   self->vtk_ptr->Print(vtkmsg_with_warning_C4701);
   vtkmsg_with_warning_C4701.put('\0');
-  PyObject *res = PyString_FromString(vtkmsg_with_warning_C4701.str());
-  vtkmsg_with_warning_C4701.rdbuf()->freeze(0);
+  PyObject *res = PyString_FromString(vtkmsg_with_warning_C4701.str().c_str());
   return res;
 }
 
Index: Common/Testing/Cxx/otherArrays.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Common/Testing/Cxx/otherArrays.cxx,v
retrieving revision 1.24
diff -u -3 -p -r1.24 otherArrays.cxx
--- Common/Testing/Cxx/otherArrays.cxx	29 Jun 2005 14:07:30 -0000	1.24
+++ Common/Testing/Cxx/otherArrays.cxx	4 Sep 2006 00:48:47 -0000
@@ -26,6 +26,8 @@
 #include "vtkDoubleArray.h"
 #include "vtkIdTypeArray.h"
 
+#include <vtksys/ios/sstream>
+
 #define SIZE 1000
 
 template <class T, class A, class V>
@@ -666,7 +668,7 @@ int otherArraysTest(ostream& strm)
 
 int otherArrays(int, char *[])
 {
-  ostrstream vtkmsg_with_warning_C4701; 
+  vtksys_ios::ostringstream vtkmsg_with_warning_C4701; 
 //  return otherArraysTest(vtkmsg_with_warning_C4701);
   return otherArraysTest(cerr);
 
Index: Common/Testing/Cxx/otherByteSwap.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Common/Testing/Cxx/otherByteSwap.cxx,v
retrieving revision 1.10
diff -u -3 -p -r1.10 otherByteSwap.cxx
--- Common/Testing/Cxx/otherByteSwap.cxx	29 Jun 2005 14:07:30 -0000	1.10
+++ Common/Testing/Cxx/otherByteSwap.cxx	4 Sep 2006 00:48:47 -0000
@@ -20,6 +20,8 @@
 #include "vtkByteSwap.h"
 #include "vtkDebugLeaks.h"
 
+#include <vtksys/ios/sstream>
+
 int TestByteSwap(ostream& strm)
 {
   // actual test
@@ -154,6 +156,6 @@ int TestByteSwap(ostream& strm)
 
 int otherByteSwap(int,char *[])
 {
-  ostrstream vtkmsg_with_warning_C4701; 
+  vtksys_ios::ostringstream vtkmsg_with_warning_C4701; 
   return TestByteSwap(vtkmsg_with_warning_C4701);
 } 
Index: Common/Testing/Cxx/otherStringArray.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Common/Testing/Cxx/otherStringArray.cxx,v
retrieving revision 1.6
diff -u -3 -p -r1.6 otherStringArray.cxx
--- Common/Testing/Cxx/otherStringArray.cxx	5 Jan 2006 18:29:03 -0000	1.6
+++ Common/Testing/Cxx/otherStringArray.cxx	4 Sep 2006 00:48:47 -0000
@@ -19,6 +19,8 @@
 #include "vtkStringArray.h"
 #include "vtkIdList.h"
 
+#include <vtksys/ios/sstream>
+
 #define SIZE 1000
 
 int doStringArrayTest(ostream& strm, int size)
@@ -199,7 +201,7 @@ int otherStringArrayTest(ostream& strm)
 
 int otherStringArray(int, char *[])
 {
-  ostrstream vtkmsg_with_warning_C4701; 
+  vtksys_ios::ostringstream vtkmsg_with_warning_C4701; 
 //  return otherArraysTest(vtkmsg_with_warning_C4701);
   return otherStringArrayTest(cerr);
 
Index: Common/Testing/Cxx/otherTimerLog.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Common/Testing/Cxx/otherTimerLog.cxx,v
retrieving revision 1.22
diff -u -3 -p -r1.22 otherTimerLog.cxx
--- Common/Testing/Cxx/otherTimerLog.cxx	29 Jun 2005 14:07:30 -0000	1.22
+++ Common/Testing/Cxx/otherTimerLog.cxx	4 Sep 2006 00:48:47 -0000
@@ -20,6 +20,8 @@
 #include "vtkTimerLog.h"
 #include "vtkDebugLeaks.h"
 
+#include <vtksys/ios/sstream>
+
 // this is needed for the unlink call
 #if defined(__CYGWIN__)
 #include <sys/unistd.h>
@@ -68,7 +70,7 @@ void otherTimerLogTest(ostream& strm)
 
 int otherTimerLog(int,char *[])
 {
-  ostrstream vtkmsg_with_warning_C4701; 
+  vtksys_ios::ostringstream vtkmsg_with_warning_C4701; 
   otherTimerLogTest(vtkmsg_with_warning_C4701);
 
   return 0;
Index: Examples/MultiBlock/Cxx/MultiBlock.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Examples/MultiBlock/Cxx/MultiBlock.cxx,v
retrieving revision 1.3
diff -u -3 -p -r1.3 MultiBlock.cxx
--- Examples/MultiBlock/Cxx/MultiBlock.cxx	29 Mar 2005 20:35:15 -0000	1.3
+++ Examples/MultiBlock/Cxx/MultiBlock.cxx	4 Sep 2006 00:48:47 -0000
@@ -37,6 +37,8 @@
 #include "vtkTestUtilities.h"
 #include "vtkXMLStructuredGridReader.h"
 
+#include <vtksys/ios/sstream>
+
 int main(int argc, char* argv[])
 {
   // Standard rendering classes
@@ -60,9 +62,9 @@ int main(int argc, char* argv[])
     {
     // Here we load the three separate files (each containing
     // a structured grid dataset)
-    ostrstream fname;
+    vtksys_ios::ostringstream fname;
     fname << "Data/multicomb_" << i << ".vts" << ends;
-    char* fstr = fname.str();
+    const char* fstr = fname.str().c_str();
     char* cfname = 
       vtkTestUtilities::ExpandDataFileName(argc, argv, fstr);
     reader->SetFileName(cfname);
Index: Filtering/Testing/Cxx/otherCellArray.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Filtering/Testing/Cxx/otherCellArray.cxx,v
retrieving revision 1.1
diff -u -3 -p -r1.1 otherCellArray.cxx
--- Filtering/Testing/Cxx/otherCellArray.cxx	2 May 2006 17:29:41 -0000	1.1
+++ Filtering/Testing/Cxx/otherCellArray.cxx	4 Sep 2006 00:48:47 -0000
@@ -24,6 +24,8 @@
 #include "vtkIdTypeArray.h"
 #include "vtkQuad.h"
 
+#include <vtksys/ios/sstream>
+
 int TestCellArray(ostream& strm)
 {
   // actual test
@@ -81,6 +83,6 @@ int TestCellArray(ostream& strm)
 
 int otherCellArray(int,char *[])
 {
-  ostrstream vtkmsg_with_warning_C4701; 
+  vtksys_ios::ostringstream vtkmsg_with_warning_C4701; 
   return TestCellArray(vtkmsg_with_warning_C4701);
 } 
Index: Filtering/Testing/Cxx/otherCellBoundaries.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Filtering/Testing/Cxx/otherCellBoundaries.cxx,v
retrieving revision 1.1
diff -u -3 -p -r1.1 otherCellBoundaries.cxx
--- Filtering/Testing/Cxx/otherCellBoundaries.cxx	2 May 2006 17:29:41 -0000	1.1
+++ Filtering/Testing/Cxx/otherCellBoundaries.cxx	4 Sep 2006 00:48:47 -0000
@@ -36,6 +36,7 @@
 #include "vtkPentagonalPrism.h"
 #include "vtkHexagonalPrism.h"
 
+#include <vtksys/ios/sstream>
 
 int TestOCB(ostream& strm)
 {
@@ -494,6 +495,6 @@ int TestOCB(ostream& strm)
 
 int otherCellBoundaries(int, char *[])
 {
-  ostrstream vtkmsg_with_warning_C4701; 
+  vtksys_ios::ostringstream vtkmsg_with_warning_C4701; 
   return TestOCB(vtkmsg_with_warning_C4701);
 } 
Index: Filtering/Testing/Cxx/otherCellPosition.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Filtering/Testing/Cxx/otherCellPosition.cxx,v
retrieving revision 1.1
diff -u -3 -p -r1.1 otherCellPosition.cxx
--- Filtering/Testing/Cxx/otherCellPosition.cxx	2 May 2006 17:29:41 -0000	1.1
+++ Filtering/Testing/Cxx/otherCellPosition.cxx	4 Sep 2006 00:48:47 -0000
@@ -36,6 +36,8 @@
 #include "vtkPentagonalPrism.h"
 #include "vtkHexagonalPrism.h"
 
+#include <vtksys/ios/sstream>
+
 int TestOCP(ostream& strm)
 {
   // actual test
@@ -578,6 +580,6 @@ int TestOCP(ostream& strm)
 
 int otherCellPosition(int, char *[])
 {
-  ostrstream vtkmsg_with_warning_C4701; 
+  vtksys_ios::ostringstream vtkmsg_with_warning_C4701; 
   return TestOCP(vtkmsg_with_warning_C4701);
 } 
Index: Filtering/Testing/Cxx/otherColorTransferFunction.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Filtering/Testing/Cxx/otherColorTransferFunction.cxx,v
retrieving revision 1.15
diff -u -3 -p -r1.15 otherColorTransferFunction.cxx
--- Filtering/Testing/Cxx/otherColorTransferFunction.cxx	29 Jun 2005 14:07:30 -0000	1.15
+++ Filtering/Testing/Cxx/otherColorTransferFunction.cxx	4 Sep 2006 00:48:47 -0000
@@ -20,6 +20,8 @@
 #include "vtkColorTransferFunction.h"
 #include "vtkDebugLeaks.h"
 
+#include <vtksys/ios/sstream>
+
 int Test(ostream& strm)
 {
   int i, j, k;
@@ -147,6 +149,6 @@ int Test(ostream& strm)
 
 int otherColorTransferFunction(int, char *[])
 {
-  ostrstream vtkmsg_with_warning_C4701; 
+  vtksys_ios::ostringstream vtkmsg_with_warning_C4701; 
   return Test(vtkmsg_with_warning_C4701);
 } 
Index: Filtering/Testing/Cxx/otherEmptyCell.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Filtering/Testing/Cxx/otherEmptyCell.cxx,v
retrieving revision 1.1
diff -u -3 -p -r1.1 otherEmptyCell.cxx
--- Filtering/Testing/Cxx/otherEmptyCell.cxx	2 May 2006 17:29:41 -0000	1.1
+++ Filtering/Testing/Cxx/otherEmptyCell.cxx	4 Sep 2006 00:48:47 -0000
@@ -24,6 +24,8 @@
 
 #include "vtkDebugLeaks.h"
 
+#include <vtksys/ios/sstream>
+
 void TestOEC(ostream& strm)
 {
   vtkEmptyCell *cell = vtkEmptyCell::New();
@@ -93,7 +95,7 @@ void TestOEC(ostream& strm)
 
 int otherEmptyCell(int , char *[])
 {
-  ostrstream vtkmsg_with_warning_C4701; 
+  vtksys_ios::ostringstream vtkmsg_with_warning_C4701; 
   TestOEC(vtkmsg_with_warning_C4701);
 
   return 0;
Index: Filtering/Testing/Cxx/otherRectilinearGrid.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Filtering/Testing/Cxx/otherRectilinearGrid.cxx,v
retrieving revision 1.1
diff -u -3 -p -r1.1 otherRectilinearGrid.cxx
--- Filtering/Testing/Cxx/otherRectilinearGrid.cxx	2 May 2006 17:29:41 -0000	1.1
+++ Filtering/Testing/Cxx/otherRectilinearGrid.cxx	4 Sep 2006 00:48:47 -0000
@@ -28,6 +28,8 @@
 #include "vtkRectilinearGrid.h"
 #include "vtkShortArray.h"
 
+#include <vtksys/ios/sstream>
+
 int TestORG(ostream& strm)
 {
   int i, j, k;
@@ -597,6 +599,6 @@ int TestORG(ostream& strm)
 
 int otherRectilinearGrid(int,char *[])
 {
-  ostrstream vtkmsg_with_warning_C4701; 
+  vtksys_ios::ostringstream vtkmsg_with_warning_C4701; 
   return TestORG(vtkmsg_with_warning_C4701);
 } 
Index: Filtering/Testing/Cxx/otherStructuredGrid.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Filtering/Testing/Cxx/otherStructuredGrid.cxx,v
retrieving revision 1.1
diff -u -3 -p -r1.1 otherStructuredGrid.cxx
--- Filtering/Testing/Cxx/otherStructuredGrid.cxx	2 May 2006 17:29:41 -0000	1.1
+++ Filtering/Testing/Cxx/otherStructuredGrid.cxx	4 Sep 2006 00:48:47 -0000
@@ -28,6 +28,8 @@
 #include "vtkShortArray.h"
 #include "vtkStructuredGrid.h"
 
+#include <vtksys/ios/sstream>
+
 int TestOSG(ostream& strm)
 {
   int i, j, k;
@@ -629,6 +631,6 @@ int TestOSG(ostream& strm)
 
 int otherStructuredGrid(int,char *[])
 {
-  ostrstream vtkmsg_with_warning_C4701; 
+  vtksys_ios::ostringstream vtkmsg_with_warning_C4701; 
   return TestOSG(vtkmsg_with_warning_C4701);
 } 
Index: Filtering/Testing/Cxx/quadraticEvaluation.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Filtering/Testing/Cxx/quadraticEvaluation.cxx,v
retrieving revision 1.3
diff -u -3 -p -r1.3 quadraticEvaluation.cxx
--- Filtering/Testing/Cxx/quadraticEvaluation.cxx	31 Jul 2006 22:34:02 -0000	1.3
+++ Filtering/Testing/Cxx/quadraticEvaluation.cxx	4 Sep 2006 00:48:48 -0000
@@ -29,6 +29,8 @@
 #include "vtkQuadraticPyramid.h"
 #include "vtkPoints.h"
 
+#include <vtksys/ios/sstream>
+
 void  ComputeDataValues(vtkPoints *pts, double *edgeValues)
 {
   double x[3];
@@ -396,6 +398,6 @@ int TestQE(ostream& strm)
 
 int quadraticEvaluation(int,char *[])
 {
-  ostrstream vtkmsg_with_warning_C4701;
+  vtksys_ios::ostringstream vtkmsg_with_warning_C4701;
   return TestQE(vtkmsg_with_warning_C4701);
 }
Index: GenericFiltering/Testing/Cxx/otherCreation.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/GenericFiltering/Testing/Cxx/otherCreation.cxx,v
retrieving revision 1.12
diff -u -3 -p -r1.12 otherCreation.cxx
--- GenericFiltering/Testing/Cxx/otherCreation.cxx	4 Apr 2006 11:22:52 -0000	1.12
+++ GenericFiltering/Testing/Cxx/otherCreation.cxx	4 Sep 2006 00:48:48 -0000
@@ -1680,7 +1680,7 @@ int TestWithPointsAndCellsAndPointData(o
 int otherCreation(int vtkNotUsed(argc),
                   char *vtkNotUsed(argv)[])
 {
-  ostrstream vtkmsg_with_warning_C4701; 
+  vtksys_ios::ostringstream vtkmsg_with_warning_C4701; 
   
   if (TestEmpty(cout))
     {
Index: Hybrid/vtkFacetReader.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Hybrid/vtkFacetReader.cxx,v
retrieving revision 1.3
diff -u -3 -p -r1.3 vtkFacetReader.cxx
--- Hybrid/vtkFacetReader.cxx	22 Dec 2004 18:16:57 -0000	1.3
+++ Hybrid/vtkFacetReader.cxx	4 Sep 2006 00:48:48 -0000
@@ -33,12 +33,13 @@
 #include <sys/stat.h>
 #include <vtkstd/string>
 #include <vtkstd/vector>
+#include <vtksys/ios/sstream>
 
 vtkCxxRevisionMacro(vtkFacetReader, "$Revision: 1.3 $");
 vtkStandardNewMacro(vtkFacetReader);
 
 //------------------------------------------------------------------------------
-// Due to a buggy stream library on the HP and another on Mac OSX, we
+// Due to a buggy stream library on the HP and another on Mac OS X, we
 // need this very carefully written version of getline.  Returns true
 // if any data were read before the end-of-file was reached.
 // 
@@ -289,7 +290,7 @@ int vtkFacetReader::RequestData(
         }
       char* strPtr = &(*stringBuffer.begin());
       strcpy(strPtr, line.c_str());
-      istrstream lineStream(strPtr);
+      vtksys_ios::istringstream lineStream(strPtr);
       vtkIdType kk;
       int material = -1, relativePartNumber = -1;
       for ( kk = 0; kk < num_points_per_cell; kk ++ )
Index: Hybrid/vtkRIBExporter.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Hybrid/vtkRIBExporter.cxx,v
retrieving revision 1.63
diff -u -3 -p -r1.63 vtkRIBExporter.cxx
--- Hybrid/vtkRIBExporter.cxx	4 Jan 2005 20:56:39 -0000	1.63
+++ Hybrid/vtkRIBExporter.cxx	4 Sep 2006 00:48:48 -0000
@@ -40,6 +40,8 @@
 #include "vtkTIFFWriter.h"
 #include "vtkTexture.h"
 
+#include <vtksys/ios/sstream>
+
 vtkCxxRevisionMacro(vtkRIBExporter, "$Revision: 1.63 $");
 vtkStandardNewMacro(vtkRIBExporter);
 
@@ -837,7 +839,7 @@ void vtkRIBExporter::WritePolygons (vtkP
       if ( pointData )
         {
         int cc, aa;      
-        ostrstream str_with_warning_C4701;
+        vtksys_ios::ostringstream str_with_warning_C4701;
         for ( cc = 0; cc < pointData->GetNumberOfArrays(); cc ++ )
           {
           vtkDataArray *array = pointData->GetArray(cc);
@@ -856,14 +858,13 @@ void vtkRIBExporter::WritePolygons (vtkP
           str_with_warning_C4701 << "] ";
           }
         str_with_warning_C4701 << ends;
-        fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
-        str_with_warning_C4701.rdbuf()->freeze(0);      
+        fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str().c_str() );
         }
 
       if ( cellData )
         {
         int cc, aa;
-        ostrstream str_with_warning_C4701;
+        vtksys_ios::ostringstream str_with_warning_C4701;
         for ( cc = 0; cc < cellData->GetNumberOfArrays(); cc ++ )
           {
           vtkDataArray *array = cellData->GetArray(cc);
@@ -882,14 +883,13 @@ void vtkRIBExporter::WritePolygons (vtkP
           str_with_warning_C4701 << "] ";
           }
         str_with_warning_C4701 << ends;
-        fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
-        str_with_warning_C4701.rdbuf()->freeze(0);      
+        fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str().c_str() );
         }
 
       if ( fieldData )
         {
         int cc, aa;
-        ostrstream str_with_warning_C4701;
+        vtksys_ios::ostringstream str_with_warning_C4701;
 
         for ( cc = 0; cc < fieldData->GetNumberOfArrays(); cc ++ )
           {
@@ -909,8 +909,7 @@ void vtkRIBExporter::WritePolygons (vtkP
           str_with_warning_C4701 << "] ";
           }
         str_with_warning_C4701 << ends;
-        fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
-        str_with_warning_C4701.rdbuf()->freeze(0);      
+        fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str().c_str() );
         }
       }
 
@@ -1093,7 +1092,7 @@ void vtkRIBExporter::WriteStrips (vtkPol
         if ( pointData )
           {
           int cc, aa;
-          ostrstream str_with_warning_C4701;
+          vtksys_ios::ostringstream str_with_warning_C4701;
           for ( cc = 0; cc < pointData->GetNumberOfArrays(); cc ++ )
             {
             vtkDataArray *array = pointData->GetArray(cc);
@@ -1112,14 +1111,13 @@ void vtkRIBExporter::WriteStrips (vtkPol
             str_with_warning_C4701 << "] ";
             }
           str_with_warning_C4701 << ends;
-          fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
-          str_with_warning_C4701.rdbuf()->freeze(0);      
+          fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str().c_str() );
           }
 
         if ( cellData )
           {
           int cc, aa;
-          ostrstream str_with_warning_C4701;
+          vtksys_ios::ostringstream str_with_warning_C4701;
           for ( cc = 0; cc < cellData->GetNumberOfArrays(); cc ++ )
             {
             vtkDataArray *array = cellData->GetArray(cc);
@@ -1138,14 +1136,13 @@ void vtkRIBExporter::WriteStrips (vtkPol
             str_with_warning_C4701 << "] ";
             }
           str_with_warning_C4701 << ends;
-          fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
-          str_with_warning_C4701.rdbuf()->freeze(0);      
+          fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str().c_str() );
           }
 
         if ( fieldData )
           {
           int cc, aa;
-          ostrstream str_with_warning_C4701;
+          vtksys_ios::ostringstream str_with_warning_C4701;
           for ( cc = 0; cc < fieldData->GetNumberOfArrays(); cc ++ )
             {
             vtkDataArray *array = fieldData->GetArray(cc);
@@ -1164,8 +1161,7 @@ void vtkRIBExporter::WriteStrips (vtkPol
             str_with_warning_C4701 << "] ";
             }
           str_with_warning_C4701 << ends;
-          fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
-          str_with_warning_C4701.rdbuf()->freeze(0);      
+          fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str().c_str() );
           }
         }
       fprintf (this->FilePtr, "\n");
Index: IO/vtkDataReader.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/IO/vtkDataReader.cxx,v
retrieving revision 1.135
diff -u -3 -p -r1.135 vtkDataReader.cxx
--- IO/vtkDataReader.cxx	8 May 2006 18:37:11 -0000	1.135
+++ IO/vtkDataReader.cxx	4 Sep 2006 00:48:48 -0000
@@ -41,6 +41,7 @@
 
 #include <ctype.h>
 #include <sys/stat.h>
+#include <vtksys/ios/sstream>
 
 vtkCxxRevisionMacro(vtkDataReader, "$Revision: 1.135 $");
 vtkStandardNewMacro(vtkDataReader);
@@ -364,15 +365,17 @@ int vtkDataReader::OpenVTKFile()
     if (this->InputArray)
       {
       vtkDebugMacro(<< "Reading from InputArray");
-      this->IS = new istrstream(this->InputArray->GetPointer(0), 
-                                this->InputArray->GetNumberOfTuples()*
-        this->InputArray->GetNumberOfComponents());
+      this->IS = new vtksys_ios::istringstream(
+        vtkstd::string(this->InputArray->GetPointer(0), 
+          this->InputArray->GetNumberOfTuples()*
+          this->InputArray->GetNumberOfComponents()));
       return 1;
       }
     else if (this->InputString)
       {
       vtkDebugMacro(<< "Reading from InputString");
-      this->IS = new istrstream(this->InputString, this->InputStringLength);
+      this->IS = new vtksys_ios::istringstream( 
+        vtkstd::string(this->InputString, this->InputStringLength) );
       return 1;
       }
     }
@@ -2327,7 +2330,7 @@ void vtkDataReader::DecodeArrayName(char
     return;
     }
   //strcpy(resname, name);
-  ostrstream str;
+  vtksys_ios::ostringstream str;
   int cc = 0;
   unsigned int ch;
   int len = static_cast<int>(strlen(name));
@@ -2353,6 +2356,5 @@ void vtkDataReader::DecodeArrayName(char
     cc ++;
     }
   str << ends;
-  strcpy(resname, str.str());
-  str.rdbuf()->freeze(0);
+  strcpy(resname, str.str().c_str());
 }
Index: IO/vtkDataWriter.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/IO/vtkDataWriter.cxx,v
retrieving revision 1.111
diff -u -3 -p -r1.111 vtkDataWriter.cxx
--- IO/vtkDataWriter.cxx	9 May 2006 14:30:13 -0000	1.111
+++ IO/vtkDataWriter.cxx	4 Sep 2006 00:48:48 -0000
@@ -36,6 +36,8 @@
 #include "vtkUnsignedLongArray.h"
 #include "vtkUnsignedShortArray.h"
 
+#include <vtksys/ios/sstream>
+
 vtkCxxRevisionMacro(vtkDataWriter, "$Revision: 1.111 $");
 vtkStandardNewMacro(vtkDataWriter);
 
@@ -163,9 +165,9 @@ ostream *vtkDataWriter::OpenVTKFile()
     this->OutputStringAllocatedLength = (int) (500 
       + 1000 * input->GetActualMemorySize());
     this->OutputString = new char[this->OutputStringAllocatedLength];
-
-    fptr = new ostrstream(this->OutputString, 
-                          this->OutputStringAllocatedLength);
+    fptr = new vtksys_ios::ostringstream(
+      vtkstd::string (this->OutputString, 
+        this->OutputStringAllocatedLength));
     }
   else 
     {
@@ -1151,16 +1153,17 @@ void vtkDataWriter::CloseVTKFile(ostream
     {
     if (this->WriteToOutputString)
       {
-      char *tmp;
-      ostrstream *ostr = (ostrstream*)(fp);
-      this->OutputStringLength = ostr->pcount();
+      const char *tmp;
+      vtksys_ios::ostringstream *ostr = 
+        dynamic_cast<vtksys_ios::ostringstream*>(fp);
+      this->OutputStringLength = ostr.str().size();
 
       if (this->OutputStringLength == this->OutputStringAllocatedLength)
         {
         vtkErrorMacro("OutputString was not long enough.");
         }
       // Sanity check.
-      tmp = ostr->str();
+      tmp = ostr->str().c_str();
       if (tmp != this->OutputString)
         {
         vtkErrorMacro("String mismatch");
Index: IO/vtkParticleReader.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/IO/vtkParticleReader.cxx,v
retrieving revision 1.28
diff -u -3 -p -r1.28 vtkParticleReader.cxx
--- IO/vtkParticleReader.cxx	24 May 2005 01:06:42 -0000	1.28
+++ IO/vtkParticleReader.cxx	4 Sep 2006 00:48:49 -0000
@@ -31,6 +31,7 @@
 #include <vtkstd/algorithm>
 #include <vtkstd/vector>
 #include <vtkstd/string>
+#include <vtksys/ios/sstream>
 
 vtkCxxRevisionMacro(vtkParticleReader, "$Revision: 1.28 $");
 vtkStandardNewMacro(vtkParticleReader);
@@ -93,7 +94,7 @@ namespace {
       vtkstd::replace(s.begin(),s.end(),',','\t');
 
       // We have data.
-      strstream is;
+      vtksys_ios::stringstream is;
       is << s.c_str() << ends;// no istringstream in VTK
       is >> val[0] >> val[1] >> val[2] >> val[3];
 
Index: IO/vtkWriter.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/IO/vtkWriter.cxx,v
retrieving revision 1.43
diff -u -3 -p -r1.43 vtkWriter.cxx
--- IO/vtkWriter.cxx	19 Jan 2005 18:00:09 -0000	1.43
+++ IO/vtkWriter.cxx	4 Sep 2006 00:48:49 -0000
@@ -21,6 +21,8 @@
 #include "vtkInformation.h"
 #include "vtkInformationVector.h"
 
+#include <vtksys/ios/sstream>
+
 vtkCxxRevisionMacro(vtkWriter, "$Revision: 1.43 $");
 
 // Construct with no start and end write methods or arguments.
@@ -169,7 +171,7 @@ void vtkWriter::EncodeArrayName(char* re
     return;
     }
   int cc = 0;
-  ostrstream str;
+  vtksys_ios::ostringstream str;
 
   char buffer[10];
 
@@ -190,6 +192,5 @@ void vtkWriter::EncodeArrayName(char* re
     cc++;
     }
   str << ends;
-  strcpy(resname, str.str());
-  str.rdbuf()->freeze(0);
+  strcpy(resname, str.str().c_str());
 }
Index: IO/vtkXMLDataElement.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/IO/vtkXMLDataElement.cxx,v
retrieving revision 1.26
diff -u -3 -p -r1.26 vtkXMLDataElement.cxx
--- IO/vtkXMLDataElement.cxx	5 Jan 2006 18:29:04 -0000	1.26
+++ IO/vtkXMLDataElement.cxx	4 Sep 2006 00:48:49 -0000
@@ -19,6 +19,7 @@
 #include "vtkXMLUtilities.h"
 
 #include <ctype.h>
+#include <vtksys/ios/sstream>
 
 vtkCxxRevisionMacro(vtkXMLDataElement, "$Revision: 1.26 $");
 vtkStandardNewMacro(vtkXMLDataElement);
@@ -107,12 +108,11 @@ void vtkXMLDataElement::ReadXMLAttribute
         }
       else
         {
-        ostrstream str;
+        vtksys_ios::ostringstream str;
         vtkXMLUtilities::EncodeString(
           atts[i+1], VTK_ENCODING_UTF_8, str, this->GetAttributeEncoding(), 0);
         str << ends;
-        this->SetAttribute(atts[i], str.str());
-        str.rdbuf()->freeze(0);
+        this->SetAttribute(atts[i], str.str().c_str());
         }
       }
     }
@@ -565,7 +565,7 @@ template <class T>
 int vtkXMLDataElementVectorAttributeParse(const char* str, int length, T* data)
 {
   if(!str || !length || !data) { return 0; }
-  strstream vstr;
+  vtksys_ios::stringstream vstr;
   vstr << str << ends;  
   int i;
   for(i=0;i < length;++i)
@@ -834,15 +834,14 @@ void vtkXMLDataElementVectorAttributeSet
     { 
     return; 
     }
-  strstream vstr;
+  vtksys_ios::stringstream vstr;
   vstr << data[0];
   for(int i = 1; i < length; ++i)
     {
     vstr << ' ' << data[i];
     }
   vstr << ends;
-  elem->SetAttribute(name, vstr.str());
-  vstr.rdbuf()->freeze(0);
+  elem->SetAttribute(name, vstr.str().c_str());
 }
 
 //----------------------------------------------------------------------------
Index: IO/vtkXMLMultiGroupDataWriter.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/IO/vtkXMLMultiGroupDataWriter.cxx,v
retrieving revision 1.4
diff -u -3 -p -r1.4 vtkXMLMultiGroupDataWriter.cxx
--- IO/vtkXMLMultiGroupDataWriter.cxx	28 Aug 2006 17:47:55 -0000	1.4
+++ IO/vtkXMLMultiGroupDataWriter.cxx	4 Sep 2006 00:48:49 -0000
@@ -48,6 +48,7 @@
 
 #include <vtkstd/string>
 #include <vtkstd/vector>
+#include <vtksys/ios/sstream>
 
 //----------------------------------------------------------------------------
 vtkStandardNewMacro(vtkXMLMultiGroupDataWriter);
@@ -224,13 +225,13 @@ int vtkXMLMultiGroupDataWriter::RequestD
     unsigned int numLevels = hdBoxInput->GetNumberOfLevels();
     for (unsigned int levelId=0; levelId<numLevels-1; levelId++)
       {
-      ostrstream entry_with_warning_C4701;
+      vtksys_ios::ostringstream entry_with_warning_C4701;
       entry_with_warning_C4701
         << "<RefinementRatio level=\"" << levelId << "\""
         << " refinement=\"" << hdBoxInput->GetRefinementRatio(levelId) << "\""
         << "/>" << ends;
-      this->AppendEntry(entry_with_warning_C4701.str());
-      delete[] entry_with_warning_C4701.str();
+      this->AppendEntry(entry_with_warning_C4701.str().c_str());
+      delete[] entry_with_warning_C4701.str().c_str();
       }
     }
 
@@ -252,7 +253,7 @@ int vtkXMLMultiGroupDataWriter::RequestD
       // Set the file name.
       vtkstd::string fname = this->Internal->CreatePieceFileName(i);
       // Create the entry for the collection file.
-      ostrstream entry_with_warning_C4701;
+      vtksys_ios::ostringstream entry_with_warning_C4701;
       entry_with_warning_C4701
         << "<DataSet group=\"" << groupId << "\" dataset=\"" << dataSetId << "\"";
       if (hdBoxInput)
@@ -270,8 +271,8 @@ int vtkXMLMultiGroupDataWriter::RequestD
         }
       entry_with_warning_C4701
         << " file=\"" << fname.c_str() << "\"/>" << ends;
-      this->AppendEntry(entry_with_warning_C4701.str());
-      delete[] entry_with_warning_C4701.str();
+      this->AppendEntry(entry_with_warning_C4701.str().c_str());
+      delete[] entry_with_warning_C4701.str().c_str();
       
       vtkDataObject* dobj = hdInput->GetDataSet(groupId, dataSetId);
       vtkDataSet* ds = vtkDataSet::SafeDownCast(dobj);
@@ -683,13 +684,12 @@ void vtkXMLMultiGroupDataWriter::DeleteA
 vtkstd::string vtkXMLMultiGroupDataWriterInternals::CreatePieceFileName(int index)
 {
   vtkstd::string fname;
-  ostrstream fn_with_warning_C4701;
+  vtksys_ios::ostringstream fn_with_warning_C4701;
   fn_with_warning_C4701
     << this->FilePrefix.c_str() << "/"
     << this->FilePrefix.c_str() << "_" << index << "."
     << this->Writers[index]->GetDefaultFileExtension() << ends;
-  fname = fn_with_warning_C4701.str();
-  fn_with_warning_C4701.rdbuf()->freeze(0);
+  fname = fn_with_warning_C4701.str().c_str();
   return fname;
 }
 
Index: IO/vtkXMLPDataReader.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/IO/vtkXMLPDataReader.cxx,v
retrieving revision 1.18
diff -u -3 -p -r1.18 vtkXMLPDataReader.cxx
--- IO/vtkXMLPDataReader.cxx	5 Jan 2006 18:29:04 -0000	1.18
+++ IO/vtkXMLPDataReader.cxx	4 Sep 2006 00:48:49 -0000
@@ -26,6 +26,8 @@
 #include "vtkInformation.h"
 #include "vtkStreamingDemandDrivenPipeline.h"
 
+#include <vtksys/ios/sstream>
+
 vtkCxxRevisionMacro(vtkXMLPDataReader, "$Revision: 1.18 $");
 
 //----------------------------------------------------------------------------
@@ -432,13 +434,14 @@ int vtkXMLPDataReader::CanReadPiece(int 
 //----------------------------------------------------------------------------
 char* vtkXMLPDataReader::CreatePieceFileName(const char* fileName)
 {
-  ostrstream fn_with_warning_C4701;
+  // FIXME
+  vtksys_ios::ostringstream fn_with_warning_C4701;
   if(this->PathName)
     {
     fn_with_warning_C4701 << this->PathName;
     }
   fn_with_warning_C4701 << fileName << ends;
-  return fn_with_warning_C4701.str();
+  return const_cast<char*>(fn_with_warning_C4701.str().c_str());
 }
 
 //----------------------------------------------------------------------------
Index: IO/vtkXMLPDataWriter.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/IO/vtkXMLPDataWriter.cxx,v
retrieving revision 1.15
diff -u -3 -p -r1.15 vtkXMLPDataWriter.cxx
--- IO/vtkXMLPDataWriter.cxx	26 May 2005 17:26:41 -0000	1.15
+++ IO/vtkXMLPDataWriter.cxx	4 Sep 2006 00:48:49 -0000
@@ -18,6 +18,8 @@
 #include "vtkDataSet.h"
 #include "vtkErrorCode.h"
 
+#include <vtksys/ios/sstream>
+
 vtkCxxRevisionMacro(vtkXMLPDataWriter, "$Revision: 1.15 $");
 
 //----------------------------------------------------------------------------
@@ -259,15 +261,16 @@ void vtkXMLPDataWriter::SplitFileName()
 //----------------------------------------------------------------------------
 char* vtkXMLPDataWriter::CreatePieceFileName(int index, const char* path)
 {
-  ostrstream fn_with_warning_C4701;
+  // FIXME
+  vtksys_ios::ostringstream fn_with_warning_C4701;
   if(path) { fn_with_warning_C4701 << path; }
   fn_with_warning_C4701 << this->FileNameBase << "_" << index;
   if(this->PieceFileNameExtension) 
-  { fn_with_warning_C4701 << this->PieceFileNameExtension; }
+    { fn_with_warning_C4701 << this->PieceFileNameExtension; }
   //if(this->FileNameExtension) 
   //{ fn_with_warning_C4701 << this->FileNameExtension; }
-  fn_with_warning_C4701 << ends;
-  return fn_with_warning_C4701.str();
+  fn_with_warning_C4701;
+  return const_cast<char*>(fn_with_warning_C4701.str().c_str());
 }
 
 //----------------------------------------------------------------------------
Index: IO/vtkXMLPStructuredDataReader.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/IO/vtkXMLPStructuredDataReader.cxx,v
retrieving revision 1.22
diff -u -3 -p -r1.22 vtkXMLPStructuredDataReader.cxx
--- IO/vtkXMLPStructuredDataReader.cxx	3 Aug 2005 21:57:50 -0000	1.22
+++ IO/vtkXMLPStructuredDataReader.cxx	4 Sep 2006 00:48:49 -0000
@@ -23,6 +23,8 @@
 #include "vtkXMLDataElement.h"
 #include "vtkXMLStructuredDataReader.h"
 
+#include <vtksys/ios/sstream>
+
 vtkCxxRevisionMacro(vtkXMLPStructuredDataReader, "$Revision: 1.22 $");
 
 //----------------------------------------------------------------------------
@@ -430,7 +432,7 @@ int vtkXMLPStructuredDataReader::Compute
   if(!this->ExtentSplitter->ComputeSubExtents())
     {
     // A portion of the extent is not available.
-    ostrstream e_with_warning_C4701;
+    vtksys_ios::ostringstream e_with_warning_C4701;
     e_with_warning_C4701
       << "No available piece provides data for the following extents:\n";    
     for(i=0; i < this->ExtentSplitter->GetNumberOfSubExtents(); ++i)
@@ -447,8 +449,7 @@ int vtkXMLPStructuredDataReader::Compute
         }
       }
     e_with_warning_C4701 << "The UpdateExtent cannot be filled." << ends;
-    vtkErrorMacro(<< e_with_warning_C4701.str());
-    e_with_warning_C4701.rdbuf()->freeze(0);
+    vtkErrorMacro(<< e_with_warning_C4701.str().c_str());
     return 0;
     }
   
Index: IO/vtkXMLReader.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/IO/vtkXMLReader.cxx,v
retrieving revision 1.44
diff -u -3 -p -r1.44 vtkXMLReader.cxx
--- IO/vtkXMLReader.cxx	18 Aug 2006 14:16:48 -0000	1.44
+++ IO/vtkXMLReader.cxx	4 Sep 2006 00:48:49 -0000
@@ -31,6 +31,7 @@
 
 #include <sys/stat.h>
 #include <assert.h>
+#include <vtksys/ios/sstream>
 
 vtkCxxRevisionMacro(vtkXMLReader, "$Revision: 1.44 $");
 
@@ -679,7 +680,7 @@ int vtkXMLReader::CanReadFileVersionStri
   
   if(s > begin)
     {
-    strstream str;
+    vtksys_ios::stringstream str;
     str.write(begin, s-begin);
     str << ends;
     str >> major;
@@ -690,7 +691,7 @@ int vtkXMLReader::CanReadFileVersionStri
     }
   if(++s < end)
     {
-    strstream str;
+    vtksys_ios::stringstream str;
     str.write(s, end-s);
     str << ends;
     str >> minor;
@@ -870,10 +871,9 @@ void vtkXMLReader::SetDataArraySelection
       }
     else
       {
-      ostrstream ostr_with_warning_C4701;
+      vtksys_ios::ostringstream ostr_with_warning_C4701;
       ostr_with_warning_C4701 << "Array " << i << ends;
-      sel->AddArray( ostr_with_warning_C4701.str() );
-      ostr_with_warning_C4701.rdbuf()->freeze(0);
+      sel->AddArray( ostr_with_warning_C4701.str().c_str() );
       }
     }
 }
Index: IO/vtkXMLUtilities.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/IO/vtkXMLUtilities.cxx,v
retrieving revision 1.7
diff -u -3 -p -r1.7 vtkXMLUtilities.cxx
--- IO/vtkXMLUtilities.cxx	22 Nov 2005 21:03:42 -0000	1.7
+++ IO/vtkXMLUtilities.cxx	4 Sep 2006 00:48:49 -0000
@@ -25,6 +25,7 @@
 #endif
 
 #include <vtkstd/vector>
+#include <vtksys/ios/sstream>
 
 typedef vtkstd::vector<vtkXMLDataElement*> vtkXMLUtilitiesDataElementContainer;
 
@@ -418,11 +419,10 @@ vtkXMLUtilities::ReadElementFromString(c
     return 0;
     }
 
-  strstream strstr;
+  vtksys_ios::stringstream strstr;
   strstr << str;
   vtkXMLDataElement *res = 
     vtkXMLUtilities::ReadElementFromStream(strstr, encoding);
-  strstr.rdbuf()->freeze(0);
   return res;
 }
 
@@ -584,13 +584,13 @@ int vtkXMLUtilities::FactorElementsInter
   char buffer[5];
   sprintf(buffer, "%02d_", pool->GetNumberOfNestedElements());
 
-  ostrstream id;
+  vtksys_ios::ostringstream id;
   id << buffer << tree->GetName() << ends;
     
   vtkXMLDataElement *factored = vtkXMLDataElement::New();
   factored->SetName(VTK_XML_UTILITIES_FACTORED_NAME);
   factored->SetAttributeEncoding(pool->GetAttributeEncoding());
-  factored->SetAttribute("Id", id.str());
+  factored->SetAttribute("Id", id.str().c_str());
   pool->AddNestedElement(factored);
   factored->Delete();
 
@@ -604,16 +604,14 @@ int vtkXMLUtilities::FactorElementsInter
     similar_trees[i]->RemoveAllAttributes();
     similar_trees[i]->RemoveAllNestedElements();
     similar_trees[i]->SetName(VTK_XML_UTILITIES_FACTORED_REF_NAME);
-    similar_trees[i]->SetAttribute("Id", id.str());
+    similar_trees[i]->SetAttribute("Id", id.str().c_str());
     }
 
   tree->RemoveAllAttributes();
   tree->RemoveAllNestedElements();
   tree->SetName(VTK_XML_UTILITIES_FACTORED_REF_NAME);
-  tree->SetAttribute("Id", id.str());
+  tree->SetAttribute("Id", id.str().c_str());
     
-  id.rdbuf()->freeze(0);
-
   delete [] similar_trees;
 
   return 1;
Index: Rendering/vtkCocoaRenderWindow.mm
===================================================================
RCS file: /cvsroot/VTK/VTK/Rendering/vtkCocoaRenderWindow.mm,v
retrieving revision 1.34
diff -u -3 -p -r1.34 vtkCocoaRenderWindow.mm
--- Rendering/vtkCocoaRenderWindow.mm	25 Jul 2006 23:38:33 -0000	1.34
+++ Rendering/vtkCocoaRenderWindow.mm	4 Sep 2006 00:48:50 -0000
@@ -20,6 +20,8 @@
 #import "vtkRendererCollection.h"
 #import "vtkCocoaGLView.h"
 
+#include <vtksys/ios/sstream>
+
 #ifndef MAC_OS_X_VERSION_10_4
 #define MAC_OS_X_VERSION_10_4 1040
 #endif
@@ -204,7 +206,7 @@ const char* vtkCocoaRenderWindow::Report
   const char* glVersion = (const char*) glGetString(GL_VERSION);
   const char* glExtensions = (const char*) glGetString(GL_EXTENSIONS);
 
-  ostrstream strm;
+  vtksys_ios::ostringstream strm;
   strm << "OpenGL vendor string:  " << glVendor
        << "\nOpenGL renderer string:  " << glRenderer
        << "\nOpenGL version string:  " << glVersion
@@ -246,8 +248,8 @@ const char* vtkCocoaRenderWindow::Report
 
   strm << ends;
   delete[] this->Capabilities;
-  this->Capabilities = new char[strlen(strm.str()) + 1];
-  strcpy(this->Capabilities, strm.str());
+  this->Capabilities = new char[strlen(strm.str().c_str()) + 1];
+  strcpy(this->Capabilities, strm.str().c_str());
   return this->Capabilities;
 }
 
Index: Rendering/vtkInteractorEventRecorder.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Rendering/vtkInteractorEventRecorder.cxx,v
retrieving revision 1.10
diff -u -3 -p -r1.10 vtkInteractorEventRecorder.cxx
--- Rendering/vtkInteractorEventRecorder.cxx	30 Dec 2005 15:53:36 -0000	1.10
+++ Rendering/vtkInteractorEventRecorder.cxx	4 Sep 2006 00:48:50 -0000
@@ -17,6 +17,9 @@
 #include "vtkObjectFactory.h"
 #include "vtkRenderWindowInteractor.h"
 
+#include <vtksys/stl/string>
+#include <vtksys/ios/sstream>
+
 vtkCxxRevisionMacro(vtkInteractorEventRecorder, "$Revision: 1.10 $");
 vtkStandardNewMacro(vtkInteractorEventRecorder);
 
@@ -155,7 +158,8 @@ void vtkInteractorEventRecorder::Play()
         vtkErrorMacro(<< "No input string specified");
         return;
         }
-      this->InputStream = new istrstream(this->InputString, len);
+      this->InputStream = new vtksys_ios::istringstream(
+        vtkstd::string(this->InputString, len));
       if (this->InputStream->fail())
         {
         vtkErrorMacro(<< "Unable to read from string");
Index: Rendering/vtkWin32OpenGLRenderWindow.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Rendering/vtkWin32OpenGLRenderWindow.cxx,v
retrieving revision 1.133
diff -u -3 -p -r1.133 vtkWin32OpenGLRenderWindow.cxx
--- Rendering/vtkWin32OpenGLRenderWindow.cxx	31 Mar 2006 21:05:36 -0000	1.133
+++ Rendering/vtkWin32OpenGLRenderWindow.cxx	4 Sep 2006 00:48:50 -0000
@@ -28,6 +28,7 @@
 #include "vtkWin32RenderWindowInteractor.h"
 
 #include <math.h>
+#include <vtksys/ios/sstream>
 
 #if defined(_MSC_VER) || defined (__BORLANDC__)
 # include "vtkWindows.h"
@@ -393,7 +394,7 @@ const char* vtkWin32OpenGLRenderWindow::
   const char *glVersion = (const char *) glGetString(GL_VERSION);
   const char *glExtensions = (const char *) glGetString(GL_EXTENSIONS);
 
-  ostrstream strm;
+  vtksys_ios::ostringstream strm;
   strm << "OpenGL vendor string:  " << glVendor << endl;
   strm << "OpenGL renderer string:  " << glRenderer << endl;
   strm << "OpenGL version string:  " << glVersion << endl;
@@ -441,7 +442,7 @@ const char* vtkWin32OpenGLRenderWindow::
 
   strm << ends;
   delete[] this->Capabilities;
-  this->Capabilities = strm.str();
+  this->Capabilities = strm.str().c_str();
   return this->Capabilities;
 }
 
Index: Rendering/vtkXOpenGLRenderWindow.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Rendering/vtkXOpenGLRenderWindow.cxx,v
retrieving revision 1.73
diff -u -3 -p -r1.73 vtkXOpenGLRenderWindow.cxx
--- Rendering/vtkXOpenGLRenderWindow.cxx	8 Jul 2006 16:34:16 -0000	1.73
+++ Rendering/vtkXOpenGLRenderWindow.cxx	4 Sep 2006 00:48:50 -0000
@@ -45,6 +45,8 @@
 #include <X11/Xutil.h>
 #include <X11/cursorfont.h>
 
+#include <vtksys/ios/sstream>
+
 class vtkXOpenGLRenderWindow;
 class vtkRenderWindow;
 class vtkXOpenGLRenderWindowInternal
@@ -1543,7 +1545,7 @@ const char* vtkXOpenGLRenderWindow::Repo
   const char *glVersion = (const char *) glGetString(GL_VERSION);
   const char *glExtensions = (const char *) glGetString(GL_EXTENSIONS);
 
-  ostrstream strm;
+  vtksys_ios::ostringstream strm;
   strm << "server glx vendor string:  " << serverVendor << endl;
   strm << "server glx version string:  " << serverVersion << endl;
   strm << "server glx extensions:  " << serverExtensions << endl;
@@ -1569,8 +1571,9 @@ const char* vtkXOpenGLRenderWindow::Repo
       }
     }
   strm << ends;
+  // FIXME
   delete[] this->Capabilities;
-  this->Capabilities = strm.str();
+  this->Capabilities = strm.str().c_str();
   return this->Capabilities;
 }
 
Index: Rendering/Testing/Cxx/otherCoordinate.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Rendering/Testing/Cxx/otherCoordinate.cxx,v
retrieving revision 1.11
diff -u -3 -p -r1.11 otherCoordinate.cxx
--- Rendering/Testing/Cxx/otherCoordinate.cxx	29 Jun 2005 14:07:33 -0000	1.11
+++ Rendering/Testing/Cxx/otherCoordinate.cxx	4 Sep 2006 00:48:50 -0000
@@ -24,6 +24,8 @@
 
 #include "vtkDebugLeaks.h"
 
+#include <vtksys/ios/sstream>
+
 void ToAll (ostream& strm, vtkCoordinate *c1, vtkViewport *ren1, 
             double *from)
 {
@@ -168,7 +170,7 @@ int Test(ostream& strm)
 
 int otherCoordinate(int,char *[])
 {
-  ostrstream vtkmsg_with_warning_C4701; 
+  vtksys_ios::ostringstream vtkmsg_with_warning_C4701; 
   return Test(vtkmsg_with_warning_C4701);
 }
 
Index: Utilities/MaterialLibrary/ProcessShader.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Utilities/MaterialLibrary/ProcessShader.cxx,v
retrieving revision 1.3
diff -u -3 -p -r1.3 ProcessShader.cxx
--- Utilities/MaterialLibrary/ProcessShader.cxx	5 Dec 2005 21:26:13 -0000	1.3
+++ Utilities/MaterialLibrary/ProcessShader.cxx	4 Sep 2006 00:48:50 -0000
@@ -20,6 +20,7 @@
 #include <vtksys/SystemTools.hxx>
 #include <vtksys/RegularExpression.hxx>
 #include <vtksys/ios/fstream>
+#include <vtksys/ios/sstream>
 
 class Output
 {
@@ -31,11 +32,10 @@ public:
     }
   ~Output()
     {
-    this->Stream.rdbuf()->freeze(0);
     }
   Output(const Output&){}
   void operator=(const Output&){}
-  ostrstream Stream;
+  vtksys_ios::ostringstream Stream;
 
   int MaxLen;
   long CurrentPosition;
@@ -193,8 +193,8 @@ int main(int argc, char* argv[])
       return 1;
       }
     int kk;
-    ostrstream createstring;
-    ostrstream lenstr;
+    vtksys_ios::ostringstream createstring;
+    vtksys_ios::ostringstream lenstr;
     for ( kk = 0; kk < num; kk ++ )
       {
       lenstr << endl 
@@ -227,7 +227,7 @@ int main(int argc, char* argv[])
     cout << "Cannot open output file: " << output.c_str() << endl;
     return 1;
     }
-  fprintf(fp, "%s", ot.Stream.str());
+  fprintf(fp, "%s", ot.Stream.str().c_str());
   fclose(fp);
   return 0;
 }
Index: VolumeRendering/vtkVREncodeString.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/VolumeRendering/vtkVREncodeString.cxx,v
retrieving revision 1.3
diff -u -3 -p -r1.3 vtkVREncodeString.cxx
--- VolumeRendering/vtkVREncodeString.cxx	29 Aug 2005 21:36:54 -0000	1.3
+++ VolumeRendering/vtkVREncodeString.cxx	4 Sep 2006 00:48:50 -0000
@@ -1,6 +1,7 @@
 #include "vtkObject.h"
 
 #include <vtkstd/string> 
+#include <vtksys/ios/sstream>
 
 class Output
 {
@@ -12,9 +13,8 @@ public:
   void operator=(const Output&);
   ~Output()
     {
-    this->Stream.rdbuf()->freeze(0);
     }
-  ostrstream Stream;
+  vtksys_ios::ostringstream Stream;
 
   int ProcessFile(const char* file, const char* title)
     {
@@ -89,7 +89,7 @@ int main(int argc, char* argv[])
     cout << "Cannot open output file: " << output.c_str() << endl;
     return 1;
     }
-  fprintf(fp, "%s", ot.Stream.str());
+  fprintf(fp, "%s", ot.Stream.str().c_str());
   fclose(fp);
   return 0;
 }
