You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2007/10/19 23:05:27 UTC

svn commit: r586616 - in /incubator/stdcxx/branches/4.2.0: etc/config/windows/configure.wsf include/rw/_config-msvcrt.h

Author: sebor
Date: Fri Oct 19 14:05:26 2007
New Revision: 586616

URL: http://svn.apache.org/viewvc?rev=586616&view=rev
Log:
2007-10-19 Farid Zaripov <fa...@epam.com>

	Merged rev 586613 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).
--This line, iid those below, will be ignored--

M    include/rw/_config-msvcrt.h
M    etc/config/windows/configure.wsf

Modified:
    incubator/stdcxx/branches/4.2.0/etc/config/windows/configure.wsf
    incubator/stdcxx/branches/4.2.0/include/rw/_config-msvcrt.h

Modified: incubator/stdcxx/branches/4.2.0/etc/config/windows/configure.wsf
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/etc/config/windows/configure.wsf?rev=586616&r1=586615&r2=586616&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/etc/config/windows/configure.wsf (original)
+++ incubator/stdcxx/branches/4.2.0/etc/config/windows/configure.wsf Fri Oct 19 14:05:26 2007
@@ -278,6 +278,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/branches/4.2.0/include/rw/_config-msvcrt.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/rw/_config-msvcrt.h?rev=586616&r1=586615&r2=586616&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/rw/_config-msvcrt.h (original)
+++ incubator/stdcxx/branches/4.2.0/include/rw/_config-msvcrt.h Fri Oct 19 14:05:26 2007
@@ -185,7 +185,7 @@
 #  define _WIN32
 #endif
 
-#ifdef _MT
+#if defined (_MT) && !defined (_RWSTD_NO_REENTRANT)
 #  ifndef _RWSTD_REENTRANT
 #    define _RWSTD_REENTRANT 1
 #  endif   // _RWSTD_REENTRANT
@@ -196,11 +196,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-