Author: faridz Date: Tue Oct 30 08:01:00 2007 New Revision: 590104 URL: http://svn.apache.org/viewvc?rev=590104&view=rev Log: 2007-10-30 Farid Zaripov Merged r586613 from branches/4.2.x * etc/config/windows/configure.wsf (configure): #define _RWSTD_NO_REENTRANT macro in config.h file for single-threaded builds for compatibility with prior versions of stdcxx on Windows (MSVC 7.x), i.e., in order to make 8s and 11s build types non-reentrant even when the compiler itself doesn't have a non-reentrant runtime (MSVC 8 and beyond). * include/rw/_config-msvcrt.h (_RWSTD_REENTRANT): #define macro only if #defined _MT and not #defined _RWSTD_NO_REENTRANT, for single-threaded builds with compilers that don't have a single-threaded CRT (i.e. MSVC 8, MSVC 9). Modified: incubator/stdcxx/trunk/etc/config/windows/configure.wsf incubator/stdcxx/trunk/include/rw/_config-msvcrt.h Modified: incubator/stdcxx/trunk/etc/config/windows/configure.wsf URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/configure.wsf?rev=590104&r1=590103&r2=590104&view=diff ============================================================================== --- incubator/stdcxx/trunk/etc/config/windows/configure.wsf (original) +++ incubator/stdcxx/trunk/etc/config/windows/configure.wsf Tue Oct 30 08:01:00 2007 @@ -265,6 +265,11 @@ // headers and functions check checkHeaders(); + if (confInfo.mt) + appendLineToOutFile("// #define _RWSTD_NO_REENTRANT"); + else + appendLineToOutFile("#define _RWSTD_NO_REENTRANT"); + // compile .lib.cpp s if (0 == compileLibs(confInfo.dll)) cleanQuit(1, exitmsg); Modified: incubator/stdcxx/trunk/include/rw/_config-msvcrt.h URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/rw/_config-msvcrt.h?rev=590104&r1=590103&r2=590104&view=diff ============================================================================== --- incubator/stdcxx/trunk/include/rw/_config-msvcrt.h (original) +++ incubator/stdcxx/trunk/include/rw/_config-msvcrt.h Tue Oct 30 08:01:00 2007 @@ -91,7 +91,7 @@ # define _WIN32 #endif -#ifdef _MT +#if defined (_MT) && !defined (_RWSTD_NO_REENTRANT) # ifndef _RWSTD_REENTRANT # define _RWSTD_REENTRANT 1 # endif // _RWSTD_REENTRANT @@ -102,11 +102,14 @@ # define _RWSTD_THREAD __declspec (thread) # endif // _RWSTD_THREAD # endif // _RWSTD_NO_TLS -#else // if !defined (_MT) +#else // if !defined (_MT) || defined (_RWSTD_NO_REENTRANT) +# ifdef _RWSTD_REENTRANT +# undef _RWSTD_REENTRANT +# endif // _RWSTD_REENTRANT # ifndef _RWSTD_THREAD # define _RWSTD_THREAD /* empty */ # endif // _RWSTD_THREAD -#endif //_MT +#endif // _MT && !_RWSTD_NO_REENTRANT #if defined (_CPPRTTI) // override in case library was configured with -GR-