diff options
author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2006-12-18 16:04:25 (GMT) |
---|---|---|
committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2006-12-18 16:04:25 (GMT) |
commit | b95f198348a7a5d357bfcdb8c37cac95b7d16e8c (patch) | |
tree | 813a1b156dce3b298c7138ca9f3b1cd336016faf /Source/kwsys/kwsys_ios_sstream.h.in | |
parent | ef8735a240ac1abb8917b031c64625a411aa890c (diff) | |
download | CMake-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/kwsys_ios_sstream.h.in')
-rw-r--r-- | Source/kwsys/kwsys_ios_sstream.h.in | 5 |
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); } |