Fix WinCE issues.

[SVN r41170]
This commit is contained in:
John Maddock
2007-11-17 12:17:05 +00:00
parent 326f120ffd
commit 217c317219

View File

@ -157,7 +157,7 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW*
{
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 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW*
{
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 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW*
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);