From b95f198348a7a5d357bfcdb8c37cac95b7d16e8c Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Mon, 18 Dec 2006 11:04:25 -0500 Subject: [PATCH] COMP: Fix compilation when VS6 is using the new ANSI stdlib --- Source/kwsys/kwsys_ios_sstream.h.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/kwsys/kwsys_ios_sstream.h.in b/Source/kwsys/kwsys_ios_sstream.h.in index dcd09753e..c8832a1ac 100644 --- a/Source/kwsys/kwsys_ios_sstream.h.in +++ b/Source/kwsys/kwsys_ios_sstream.h.in @@ -92,7 +92,12 @@ public: { stringstream_cleanup cleanup(*this); stringstream_cleanup::IgnoreUnusedVariable(cleanup); +// Visual Studio 6 has a strstream::pcount, but this is not rdbuf()->pcount() +#if (@KWSYS_NAMESPACE@_IOS_USE_STRSTREA_H) && defined(_MSC_VER) && (_MSC_VER == 1200) + int count = this->pcount(); +#else int count = this->rdbuf()->pcount(); +#endif const char* ptr = this->Superclass::str(); return kwsys_stl::string(ptr?ptr:"", count); }