Boost logo

Boost-Commit :

From: john_at_[hidden]
Date: 2007-11-17 07:17:06


Author: johnmaddock
Date: 2007-11-17 07:17:05 EST (Sat, 17 Nov 2007)
New Revision: 41170
URL: http://svn.boost.org/trac/boost/changeset/41170

Log:
Fix WinCE issues.
Text files modified:
   trunk/libs/regex/src/wide_posix_api.cpp | 14 +++++++++++---
   1 files changed, 11 insertions(+), 3 deletions(-)

Modified: trunk/libs/regex/src/wide_posix_api.cpp
==============================================================================
--- trunk/libs/regex/src/wide_posix_api.cpp (original)
+++ trunk/libs/regex/src/wide_posix_api.cpp 2007-11-17 07:17:05 EST (Sat, 17 Nov 2007)
@@ -157,7 +157,7 @@
       {
          result = std::wcslen(wnames[code]) + 1;
          if(buf_size >= result)
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE)
             ::wcscpy_s(buf, buf_size, wnames[code]);
 #else
             std::wcscpy(buf, wnames[code]);
@@ -176,9 +176,13 @@
       {
          if(std::wcscmp(e->re_endp, wnames[i]) == 0)
          {
+#if defined(_WIN32_WCE)
+ (std::swprintf)(localbuf, L"%d", i);
+#else
             (std::swprintf)(localbuf, 5, L"%d", i);
+#endif
             if(std::wcslen(localbuf) < buf_size)
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE)
                ::wcscpy_s(buf, buf_size, localbuf);
 #else
                std::wcscpy(buf, localbuf);
@@ -186,9 +190,13 @@
             return std::wcslen(localbuf) + 1;
          }
       }
+#if defined(_WIN32_WCE)
+ (std::swprintf)(localbuf, L"%d", 0);
+#else
       (std::swprintf)(localbuf, 5, L"%d", 0);
+#endif
       if(std::wcslen(localbuf) < buf_size)
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE)
          ::wcscpy_s(buf, buf_size, localbuf);
 #else
          std::wcscpy(buf, localbuf);


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