summaryrefslogtreecommitdiffstats
path: root/Source/kwsys
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2006-12-18 16:04:25 (GMT)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2006-12-18 16:04:25 (GMT)
commitb95f198348a7a5d357bfcdb8c37cac95b7d16e8c (patch)
tree813a1b156dce3b298c7138ca9f3b1cd336016faf /Source/kwsys
parentef8735a240ac1abb8917b031c64625a411aa890c (diff)
downloadCMake-b95f198348a7a5d357bfcdb8c37cac95b7d16e8c.zip
CMake-b95f198348a7a5d357bfcdb8c37cac95b7d16e8c.tar.gz
CMake-b95f198348a7a5d357bfcdb8c37cac95b7d16e8c.tar.bz2
COMP: Fix compilation when VS6 is using the new ANSI stdlib
Diffstat (limited to 'Source/kwsys')
-rw-r--r--Source/kwsys/kwsys_ios_sstream.h.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/kwsys/kwsys_ios_sstream.h.in b/Source/kwsys/kwsys_ios_sstream.h.in
index dcd0975..c8832a1 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);
}