|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54031 - trunk/libs/detail
From: bdawes_at_[hidden]
Date: 2009-06-17 18:40:15
Author: bemandawes
Date: 2009-06-17 18:40:14 EDT (Wed, 17 Jun 2009)
New Revision: 54031
URL: http://svn.boost.org/trac/boost/changeset/54031
Log:
Fix ticket #2986 patch for VC++ 7.1 and earlier; workaround WCHAR_MAX bug
Text files modified:
trunk/libs/detail/utf8_codecvt_facet.cpp | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
Modified: trunk/libs/detail/utf8_codecvt_facet.cpp
==============================================================================
--- trunk/libs/detail/utf8_codecvt_facet.cpp (original)
+++ trunk/libs/detail/utf8_codecvt_facet.cpp 2009-06-17 18:40:14 EDT (Wed, 17 Jun 2009)
@@ -248,8 +248,11 @@
// should be enough to get WCHAR_MAX defined.
#if !defined(WCHAR_MAX)
# error WCHAR_MAX not defined!
-#endif
-#if WCHAR_MAX > 0x10000
+#endif
+ // cope with VC++ 7.1 or earlier having invalid WCHAR_MAX
+#if defined(_MSC_VER) && _MSC_VER <= 1310 // 7.1 or earlier
+ return 2;
+#elif WCHAR_MAX > 0x10000
if (word < 0x10000) {
return 2;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk