Author: faridz
Date: Thu Nov 22 06:21:21 2007
New Revision: 597412
URL: http://svn.apache.org/viewvc?rev=597412&view=rev
Log:
2007-11-22 Farid Zaripov <[EMAIL PROTECTED]>
Merged r597411 from branches/4.2.x
* rw/_config_msvcrt.h: #define _RWSTD_NO_WCSTOK and
_RWSTD_NO_WCSTOK_IN_LIBC
macros since the MSVC has the non-standard prototype of the wcstok().
* ansi/cwchar [_MSC_VER >= 1400]: Define inline wcstok() function using
wcstok_s().
#undefine _RWSTD_NO_WCSTOK and _RWSTD_NO_WCSTOK_IN_LIBC macros.
Modified:
incubator/stdcxx/trunk/include/ansi/cwchar
incubator/stdcxx/trunk/include/rw/_config-msvcrt.h
Modified: incubator/stdcxx/trunk/include/ansi/cwchar
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/ansi/cwchar?rev=597412&r1=597411&r2=597412&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/ansi/cwchar (original)
+++ incubator/stdcxx/trunk/include/ansi/cwchar Thu Nov 22 06:21:21 2007
@@ -1074,6 +1074,22 @@
using ::wcstok;
# undef _RWSTD_NO_WCSTOK
+#elif defined (_MSC_VER) && 1400 <= _MSC_VER
+
+} // namespace std
+
+/* extern "C++" */ inline wchar_t*
+wcstok (wchar_t* __s1, const wchar_t* __s2, wchar_t** __ptr)
+{
+ return wcstok_s (__s1, __s2, __ptr);
+}
+
+namespace std {
+
+using ::wcstok;
+
+# undef _RWSTD_NO_WCSTOK
+# undef _RWSTD_NO_WCSTOK_IN_LIBC
#endif // _RWSTD_NO_WCSTOK[_IN_LIBC]
#ifndef _RWSTD_NO_WCSTOL
Modified: incubator/stdcxx/trunk/include/rw/_config-msvcrt.h
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/rw/_config-msvcrt.h?rev=597412&r1=597411&r2=597412&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/rw/_config-msvcrt.h (original)
+++ incubator/stdcxx/trunk/include/rw/_config-msvcrt.h Thu Nov 22 06:21:21 2007
@@ -54,6 +54,15 @@
# define _RWSTD_NO_DEPRECATED_C_HEADERS
#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
+#ifndef _RWSTD_NO_WCSTOK
+// MSVC CRT has incorrect prototype of the wcstok()
+# define _RWSTD_NO_WCSTOK
+#endif // _RWSTD_NO_WCSTOK
+
+#ifndef _RWSTD_NO_WCSTOK_IN_LIBC
+# define _RWSTD_NO_WCSTOK_IN_LIBC
+#endif // _RWSTD_NO_WCSTOK_IN_LIBC
+
// operator new and delete is not reliably replaceable across
// shared library boundaries, which includes the shared library
// version of the language support library