Author: faridz
Date: Thu Nov 22 06:19:00 2007
New Revision: 597411

URL: http://svn.apache.org/viewvc?rev=597411&view=rev
Log:
2007-11-22 Farid Zaripov <[EMAIL PROTECTED]>

        * 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/branches/4.2.x/include/ansi/cwchar
    incubator/stdcxx/branches/4.2.x/include/rw/_config-msvcrt.h

Modified: incubator/stdcxx/branches/4.2.x/include/ansi/cwchar
URL: 
http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.x/include/ansi/cwchar?rev=597411&r1=597410&r2=597411&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.x/include/ansi/cwchar (original)
+++ incubator/stdcxx/branches/4.2.x/include/ansi/cwchar Thu Nov 22 06:19:00 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/branches/4.2.x/include/rw/_config-msvcrt.h
URL: 
http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.x/include/rw/_config-msvcrt.h?rev=597411&r1=597410&r2=597411&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.x/include/rw/_config-msvcrt.h (original)
+++ incubator/stdcxx/branches/4.2.x/include/rw/_config-msvcrt.h Thu Nov 22 
06:19:00 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


Reply via email to