stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r673648 - in /stdcxx/trunk: ./ etc/config/src/ etc/config/windows/ include/ include/rw/ tests/regress/ util/
Date Thu, 03 Jul 2008 10:36:23 GMT
Author: faridz
Date: Thu Jul  3 03:36:21 2008
New Revision: 673648

URL: http://svn.apache.org/viewvc?rev=673648&view=rev
Log:
2008-07-03  Farid Zaripov  <faridz@apache.org>

	Merged r671433, r671542, r671547, r671833, r671835, r671890,
	r673060, r673067, r673109, r673122, r673125, r673156, r673604
	from 4.2.x branch.


	2008-06-25  Farid Zaripov  <faridz@apache.org>
	STDCXX-969
	* include/fstream.cc (close): Reset input/output sequences to prevent
	any subsequent I/O attempts on closed file.


	2008-06-25  Farid Zaripov  <farid_zaripov@epam.com>
	STDCXX-152
	* include/rw/_tree.h (_rb_tree): Rewrite typedefs to allow instantiate
	map and set containers on incomplete type.


	2008-06-25  Farid Zaripov  <farid_zaripov@epam.com>
	* include/rw/_mutex.h: #define WIN32_LEAN_AND_MEAN before #including
	<windows.h> to prevent #including unneeded headers, especially
	<winsock.h>, that causes an "WinSock.h has already been included"
	errors when <winsock2.h> has been #included after <rw/_mutex.h>.


	2008-06-26  Farid Zaripov  <faridz@apache.com>
	* tests/regress/23.containers.stdcxx-152.cpp: New regression test for
	STDCXX-152 issue.


	2008-06-26  Farid Zaripov  <faridz@apache.com>
	* tests/regress/23.vector.stdcxx-972.cpp: New regression test for
	STDCXX-972 issue.


	2008-06-26  Farid Zaripov  <faridz@apache.com>
	* tests/regress/27.filebuf.close.stdcxx-969.cpp: New regression test
	for STDCXX-969 issue.


	2008-07-01  Farid Zaripov  <faridz@apache.com>
	STDCXX-339
	* README: Removed description of the outdated
	_RWSTD_NO_INLINE_MEMBER_TEMPLATES config macro.
	* etc/config/src/INLINE_MEMBER_TEMPLATES.cpp:
	Deleted corresponding configuration test.


	2008-07-01  Farid Zaripov  <faridz@apache.com>
	* include/rw/_config-msvcrt.h [_WIN64]: Don't #define
	_RWSTD_NO_FWD_DECLARATIONS since the present forward
	declarations are working fine on _WIN64.
	* include/rw/_mutex.h [_WIN32 && _RWSTD_NO_FWD_DECLARATIONS]:
	Reverted changes from r671547.


	2008-07-01  Farid Zaripov  <faridz@apache.com>
	STDCXX-339
	* etc/config/src/EXTERN_MEMBER_TEMPLATE.cpp: Removed dependency
	on deleted config test. Corrected name of the config macro
	_RWSTD_NO_MEMBER_TEMPLATES. Replaced NO_MEMBER_TEMPLATE to
	NO_MEMBER_TEMPLATES for consistency.
	* etc/config/src/extern_template_imp.cpp: Ditto.
	* etc/config/src/extern_template_imp.h: Removed using of the
	NO_INLINE_MEMBER_TEMPLATE macro. Replaced NO_MEMBER_TEMPLATE to
	NO_MEMBER_TEMPLATES for consistency.
	* etc/config/src/MEMBER_TEMPLATES.cpp: Removed inclusion of the
	deleted config test.


	2008-07-01  Farid Zaripov  <faridz@apache.com>
	* etc/config/src/ATOMIC_OPS.cpp: Restored config test file, deleted
	in rev. 614212.
	* include/rw/_mutex.h: Define new macro _RWSTD_CRITICAL_SECTION
	defined as _CRITICAL_SECTION on gcc/MinGW and _RTL_CRITICAL_SECTION 
	on other Windows compilers.
	[_RWSTD_INTERLOCKED_T && !_MSC_VER] Added declarations of Win32 API
	InterlockedXXX() functions. Added definitions of the inline
	_InterlockedXXX() functions for consistency with MSVC's intinsics.
	Use __try/__except on MSVC (and ICC/Windows) only.


	2008-07-01  Farid Zaripov  <faridz@apache.com>
	* etc/config/windows/configure.wsf (checkArchitecture):
	Corrected regular expression's.
	(checkDependencies): Updated regular expression to find
	the macros, that exactly matches to the required dependency.


	2008-07-01  Farid Zaripov  <faridz@apache.com>
	* etc/config/src/libc_decl.sh: Echo linker's command line as well.


	2008-07-03  Farid Zaripov  <faridz@apache.com>
	* util/gencat.cpp (main): Added code for generating
	message catalogs on MinGW.

Added:
    stdcxx/trunk/etc/config/src/ATOMIC_OPS.cpp
      - copied unchanged from r673122, stdcxx/branches/4.2.x/etc/config/src/ATOMIC_OPS.cpp
    stdcxx/trunk/tests/regress/23.containers.stdcxx-152.cpp
      - copied unchanged from r671833, stdcxx/branches/4.2.x/tests/regress/23.containers.stdcxx-152.cpp
    stdcxx/trunk/tests/regress/23.vector.stdcxx-972.cpp
      - copied unchanged from r671835, stdcxx/branches/4.2.x/tests/regress/23.vector.stdcxx-972.cpp
    stdcxx/trunk/tests/regress/27.filebuf.close.stdcxx-969.cpp
      - copied unchanged from r671890, stdcxx/branches/4.2.x/tests/regress/27.filebuf.close.stdcxx-969.cpp
Removed:
    stdcxx/trunk/etc/config/src/INLINE_MEMBER_TEMPLATES.cpp
Modified:
    stdcxx/trunk/README
    stdcxx/trunk/etc/config/src/EXTERN_MEMBER_TEMPLATE.cpp
    stdcxx/trunk/etc/config/src/MEMBER_TEMPLATES.cpp
    stdcxx/trunk/etc/config/src/extern_template_imp.cpp
    stdcxx/trunk/etc/config/src/extern_template_imp.h
    stdcxx/trunk/etc/config/src/libc_decl.sh
    stdcxx/trunk/etc/config/windows/configure.wsf
    stdcxx/trunk/include/fstream.cc
    stdcxx/trunk/include/rw/_config-msvcrt.h
    stdcxx/trunk/include/rw/_mutex.h
    stdcxx/trunk/include/rw/_tree.h
    stdcxx/trunk/util/gencat.cpp

Modified: stdcxx/trunk/README
URL: http://svn.apache.org/viewvc/stdcxx/trunk/README?rev=673648&r1=673647&r2=673648&view=diff
==============================================================================
--- stdcxx/trunk/README (original)
+++ stdcxx/trunk/README Thu Jul  3 03:36:21 2008
@@ -1008,12 +1008,6 @@
      #defined at  configuration time  according to the  declaration of
      the POSIX function iconv().
 
-  o  _RWSTD_NO_INLINE_MEMBER_TEMPLATES [auto, lib, over]
-
-     #defined  at  configuration  time  for C++  implementations  that
-     reject member templates completely defined within the body of the
-     class or template of which they are a member.
-
   o  _RWSTD_NO_INSTANTIATE_DEFAULT_ARGS [auto, over]
 
      #defined  at  configuration  time  for C++  implementations  that

Modified: stdcxx/trunk/etc/config/src/EXTERN_MEMBER_TEMPLATE.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/src/EXTERN_MEMBER_TEMPLATE.cpp?rev=673648&r1=673647&r2=673648&view=diff
==============================================================================
--- stdcxx/trunk/etc/config/src/EXTERN_MEMBER_TEMPLATE.cpp (original)
+++ stdcxx/trunk/etc/config/src/EXTERN_MEMBER_TEMPLATE.cpp Thu Jul  3 03:36:21 2008
@@ -27,13 +27,9 @@
 // establish dependencies on the config tests and define config
 // macros used in the header below (the are not autodetected
 // in headers)
-#ifdef _RWSTD_NO_INLINE_MEMBER_TEMPLATE
-#  define NO_INLINE_MEMBER_TEMPLATE
-#endif   // _RWSTD_NO_INLINE_MEMBER_TEMPLATE
-
-#ifdef _RWSTD_NO_MEMBER_TEMPLATE
-#  define NO_MEMBER_TEMPLATE
-#endif   // _RWSTD_NO_MEMBER_TEMPLATE
+#ifdef _RWSTD_NO_MEMBER_TEMPLATES
+#  define NO_MEMBER_TEMPLATES
+#endif   // _RWSTD_NO_MEMBER_TEMPLATES
 
 // include a file containing the definition of a template
 // and an extern template directive referencing an explicit

Modified: stdcxx/trunk/etc/config/src/MEMBER_TEMPLATES.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/src/MEMBER_TEMPLATES.cpp?rev=673648&r1=673647&r2=673648&view=diff
==============================================================================
--- stdcxx/trunk/etc/config/src/MEMBER_TEMPLATES.cpp (original)
+++ stdcxx/trunk/etc/config/src/MEMBER_TEMPLATES.cpp Thu Jul  3 03:36:21 2008
@@ -22,9 +22,6 @@
  * 
  **************************************************************************/
 
-// both tests must successfully compile
-#include "INLINE_MEMBER_TEMPLATES.cpp"
-
 struct C
 {
     template <class T>

Modified: stdcxx/trunk/etc/config/src/extern_template_imp.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/src/extern_template_imp.cpp?rev=673648&r1=673647&r2=673648&view=diff
==============================================================================
--- stdcxx/trunk/etc/config/src/extern_template_imp.cpp (original)
+++ stdcxx/trunk/etc/config/src/extern_template_imp.cpp Thu Jul  3 03:36:21 2008
@@ -26,13 +26,9 @@
 // establish dependencies on the config tests and define config
 // macros used in the header below (the are not autodetected
 // in headers)
-#ifdef _RWSTD_NO_INLINE_MEMBER_TEMPLATE
-#  define NO_INLINE_MEMBER_TEMPLATE
-#endif   // _RWSTD_NO_INLINE_MEMBER_TEMPLATE
-
-#ifndef _RWSTD_NO_MEMBER_TEMPLATE
-#  define NO_MEMBER_TEMPLATE
-#endif   // _RWSTD_NO_MEMBER_TEMPLATE
+#ifndef _RWSTD_NO_MEMBER_TEMPLATES
+#  define NO_MEMBER_TEMPLATES
+#endif   // _RWSTD_NO_MEMBER_TEMPLATES
 
 // explicitly instantiate the template defined in the header
 #define INSTANTIATE

Modified: stdcxx/trunk/etc/config/src/extern_template_imp.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/src/extern_template_imp.h?rev=673648&r1=673647&r2=673648&view=diff
==============================================================================
--- stdcxx/trunk/etc/config/src/extern_template_imp.h (original)
+++ stdcxx/trunk/etc/config/src/extern_template_imp.h Thu Jul  3 03:36:21 2008
@@ -47,33 +47,27 @@
         return bar ();
     }
 
-#if defined (NO_INLINE_MEMBER_TEMPLATE)
+#if defined (NO_MEMBER_TEMPLATES)
 
     int inline_member_template (int) const {
         return 0;
     }
 
-#else   // if !defined (NO_INLINE_MEMBER_TEMPLATE)
+    int member_template (int) const {
+        return 0;
+    }
+
+#else   // if !defined (NO_MEMBER_TEMPLATES)
 
     template <class U>
     U inline_member_template (U) const {
         return U ();
     }
 
-#endif   // NO_INLINE_MEMBER_TEMPLATE
-
-#if defined (NO_MEMBER_TEMPLATE)
-
-    int member_template (int) const {
-        return 0;
-    }
-
-#else   // if !defined (NO_MEMBER_TEMPLATE)
-
     template <class U>
     U member_template (U) const;
 
-#endif   // NO_MEMBER_TEMPLATE
+#endif   // NO_MEMBER_TEMPLATES
 
 };
 
@@ -93,7 +87,7 @@
 #endif   // INSTANTIATE
 }
 
-#if !defined (NO_MEMBER_TEMPLATE)
+#if !defined (NO_MEMBER_TEMPLATES)
 
 template <class T>
 template <class U>
@@ -102,7 +96,7 @@
     return U ();
 }
 
-#endif   // NO_MEMBER_TEMPLATE
+#endif   // NO_MEMBER_TEMPLATES
 
 
 #if defined (INSTANTIATE)

Modified: stdcxx/trunk/etc/config/src/libc_decl.sh
URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/src/libc_decl.sh?rev=673648&r1=673647&r2=673648&view=diff
==============================================================================
--- stdcxx/trunk/etc/config/src/libc_decl.sh (original)
+++ stdcxx/trunk/etc/config/src/libc_decl.sh Thu Jul  3 03:36:21 2008
@@ -348,7 +348,8 @@
         echo "$CXX -c -DCHECK_DECL $CXXFLAGS $WARNFLAGS "   \
              "-DHDRNAME=\"<$hdrname>\" -DFUNNAME=$funname " \
              "-DFUN=$f -DTAKE_ADDR=$take_addr "             \
-             "$tmpsrc -o $tmpobj" >>$logfile 2>&1
+             "$tmpsrc -o $tmpobj"                           \
+             "&& $LD $tmpobj $LDFLAGS -l$lib" >>$logfile 2>&1
 
         # spell out all arguments just like above, being careful
         # about quoting HDRNAME

Modified: stdcxx/trunk/etc/config/windows/configure.wsf
URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/windows/configure.wsf?rev=673648&r1=673647&r2=673648&view=diff
==============================================================================
--- stdcxx/trunk/etc/config/windows/configure.wsf (original)
+++ stdcxx/trunk/etc/config/windows/configure.wsf Thu Jul  3 03:36:21 2008
@@ -391,11 +391,11 @@
             sizes += "-";
         }
     }
-    var rxLP32 = /24?4/;
-    var rxILP32 = /44?4/;
-    var rxILP64 = /88?8/;
+    var rxLP32 = /24.4/;
+    var rxILP32 = /44.4/;
+    var rxILP64 = /88.8/;
     var rxLLP64 = /4488/;
-    var rxLP64 = /48?8/;
+    var rxLP64 = /48.8/;
     var arch;
     if (rxLP32.test(sizes))
     {
@@ -920,7 +920,7 @@
         var dep = /_RWSTD_(?:NO_)?(\S+)/.exec(deps[i])[1];
         // remove _IN_LIBC | _IN_LIBM from dependency string
         dep = dep.replace(/_IN_LIB[CM]/, "");
-        var rx = new RegExp("_RWSTD_NO_" + dep);
+        var rx = new RegExp("\\s+_RWSTD_NO_" + dep + "\\s+");
         if (!rx.test(configText))
         {
             if (dumpUnresolved)

Modified: stdcxx/trunk/include/fstream.cc
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/fstream.cc?rev=673648&r1=673647&r2=673648&view=diff
==============================================================================
--- stdcxx/trunk/include/fstream.cc (original)
+++ stdcxx/trunk/include/fstream.cc Thu Jul  3 03:36:21 2008
@@ -106,6 +106,10 @@
             _C_file    = 0;
             _C_cur_pos = _C_beg_pos = pos_type (off_type (-1));
 
+            // reset input/output sequences to prevent any
+            // subsequent I/O attempts on closed file
+            this->setg (0, 0, 0);
+            this->setp (0, 0);
         }
 
         // rethrow the caught exception
@@ -119,6 +123,11 @@
         // zero out the file pointer except when detaching fd
         _C_file    = 0;
         _C_cur_pos = _C_beg_pos = pos_type (off_type (-1));
+
+        // reset input/output sequences to prevent any
+        // subsequent I/O attempts on closed file
+        this->setg (0, 0, 0);
+        this->setp (0, 0);
     }
 
     return __retval;

Modified: stdcxx/trunk/include/rw/_config-msvcrt.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_config-msvcrt.h?rev=673648&r1=673647&r2=673648&view=diff
==============================================================================
--- stdcxx/trunk/include/rw/_config-msvcrt.h (original)
+++ stdcxx/trunk/include/rw/_config-msvcrt.h Thu Jul  3 03:36:21 2008
@@ -93,11 +93,6 @@
 #  define _RWSTD_LONG_LONG __int64
 #endif   // _MSC_VER <= 1300 || _RWSTD_NO_LONG_LONG
 
-#if defined (_WIN64)
-     // FIXME: handle by forward declaring fuctions in <rw/_mutex.h>
-#  define _RWSTD_NO_FWD_DECLARATIONS
-#endif   // _WIN64
-
 #if defined (WIN32) && !defined(_WIN32)
 #  define _WIN32
 #endif

Modified: stdcxx/trunk/include/rw/_mutex.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_mutex.h?rev=673648&r1=673647&r2=673648&view=diff
==============================================================================
--- stdcxx/trunk/include/rw/_mutex.h (original)
+++ stdcxx/trunk/include/rw/_mutex.h Thu Jul  3 03:36:21 2008
@@ -122,12 +122,21 @@
 
 #elif defined (_WIN32)
 
+#  ifdef __MINGW32__
+#    define _RWSTD_CRITICAL_SECTION _CRITICAL_SECTION
+#  else
+#    define _RWSTD_CRITICAL_SECTION _RTL_CRITICAL_SECTION
+#  endif
+
 #  ifdef _RWSTD_NO_FWD_DECLARATIONS
 
+     // #including <windows.h> without WIN32_LEAN_AND_MEAN macro defined
+     // may cause an errors "WinSock.h has already been included"
+     // when <winsock2.h> has been included after this header
 #    include <windows.h>
-#    define _RWSTD_MUTEX_T _RTL_CRITICAL_SECTION
+#    define _RWSTD_MUTEX_T _RWSTD_CRITICAL_SECTION
 
-#  else   // if defined (_RWSTD_NO_FWD_DECLARATIONS)
+#  else   // if !defined (_RWSTD_NO_FWD_DECLARATIONS)
 
    // avoid #including this header (MFC doesn't like it)
    // #  include <windows.h>
@@ -135,19 +144,32 @@
 extern "C" {
 
 // but rather declare these globals here
-struct _RTL_CRITICAL_SECTION;
+struct _RWSTD_CRITICAL_SECTION;
 
 __declspec (dllimport) void __stdcall
-InitializeCriticalSection (_RTL_CRITICAL_SECTION*);
+InitializeCriticalSection (_RWSTD_CRITICAL_SECTION*);
 
 __declspec (dllimport) void __stdcall
-EnterCriticalSection (_RTL_CRITICAL_SECTION*);
+EnterCriticalSection (_RWSTD_CRITICAL_SECTION*);
 
 __declspec (dllimport) void __stdcall
-LeaveCriticalSection (_RTL_CRITICAL_SECTION*);
+LeaveCriticalSection (_RWSTD_CRITICAL_SECTION*);
 
 __declspec (dllimport) void __stdcall
-DeleteCriticalSection (_RTL_CRITICAL_SECTION*);
+DeleteCriticalSection (_RWSTD_CRITICAL_SECTION*);
+
+#    if defined (_RWSTD_INTERLOCKED_T) && !defined (_MSC_VER)
+
+__declspec (dllimport) long __stdcall
+InterlockedIncrement (_RWSTD_INTERLOCKED_T*);
+
+__declspec (dllimport) long __stdcall
+InterlockedDecrement (_RWSTD_INTERLOCKED_T*);
+
+__declspec (dllimport) long __stdcall
+InterlockedExchange (_RWSTD_INTERLOCKED_T*, long);
+
+#    endif   // _RWSTD_INTERLOCKED_T && !_MSC_VER
 
 }   // extern "C"
 
@@ -199,15 +221,40 @@
 #        pragma intrinsic (_InterlockedExchange64)
 #      endif   // _RWSTD_MSVC
 #    endif   // _M_X64
+#  elif defined (_RWSTD_INTERLOCKED_T)
+
+inline long _InterlockedIncrement (volatile long *__x)
+{
+    return InterlockedIncrement (
+        _RWSTD_CONST_CAST (_RWSTD_INTERLOCKED_T*, __x));
+}
+
+inline long _InterlockedDecrement (volatile long *__x)
+{
+    return InterlockedDecrement (
+        _RWSTD_CONST_CAST (_RWSTD_INTERLOCKED_T*, __x));
+}
+
+inline long _InterlockedExchange (volatile long *__x, long __y)
+{
+    return InterlockedExchange (
+        _RWSTD_CONST_CAST (_RWSTD_INTERLOCKED_T*, __x), __y);
+}
+
 #  endif   // _MSC_VER
 
 
 _RWSTD_NAMESPACE (__rw) { 
 
+#  ifndef _MSC_VER
+#    define __try               if (1)
+#    define __except(ignore)    else if (0)
+#  endif   // _MSC_VER
+
 // Win32/64 throws non-C++ exceptions rather than returning error status
 // from some system calls like most other operating systems do
 
-inline int __rw_mutex_init (_RTL_CRITICAL_SECTION *__mutex)
+inline int __rw_mutex_init (_RWSTD_CRITICAL_SECTION *__mutex)
 {
     __try {
         InitializeCriticalSection (__mutex);
@@ -218,7 +265,7 @@
     return 0;
 }
 
-inline int __rw_mutex_destroy (_RTL_CRITICAL_SECTION *__mutex)
+inline int __rw_mutex_destroy (_RWSTD_CRITICAL_SECTION *__mutex)
 {
     __try {
         DeleteCriticalSection (__mutex);
@@ -229,7 +276,7 @@
     return 0;
 }
 
-inline int __rw_mutex_lock (_RTL_CRITICAL_SECTION *__mutex)
+inline int __rw_mutex_lock (_RWSTD_CRITICAL_SECTION *__mutex)
 {
     __try {
         EnterCriticalSection (__mutex);
@@ -240,7 +287,7 @@
     return 0;
 }
 
-inline int __rw_mutex_unlock (_RTL_CRITICAL_SECTION *__mutex)
+inline int __rw_mutex_unlock (_RWSTD_CRITICAL_SECTION *__mutex)
 {
     __try {
         LeaveCriticalSection (__mutex);
@@ -252,13 +299,18 @@
 }
 
 #  define _RWSTD_MUTEX_INIT(mutex)      \
-   __rw_mutex_init (_RWSTD_REINTERPRET_CAST (_RTL_CRITICAL_SECTION*, &mutex))
+   __rw_mutex_init (_RWSTD_REINTERPRET_CAST (_RWSTD_CRITICAL_SECTION*, &mutex))
 #  define _RWSTD_MUTEX_DESTROY(mutex)   \
-   __rw_mutex_destroy (_RWSTD_REINTERPRET_CAST (_RTL_CRITICAL_SECTION*, &mutex))
+   __rw_mutex_destroy (_RWSTD_REINTERPRET_CAST (_RWSTD_CRITICAL_SECTION*, &mutex))
 #  define _RWSTD_MUTEX_LOCK(mutex)      \
-   __rw_mutex_lock (_RWSTD_REINTERPRET_CAST (_RTL_CRITICAL_SECTION*, &mutex))
+   __rw_mutex_lock (_RWSTD_REINTERPRET_CAST (_RWSTD_CRITICAL_SECTION*, &mutex))
 #  define _RWSTD_MUTEX_UNLOCK(mutex)    \
-   __rw_mutex_unlock (_RWSTD_REINTERPRET_CAST (_RTL_CRITICAL_SECTION*, &mutex))
+   __rw_mutex_unlock (_RWSTD_REINTERPRET_CAST (_RWSTD_CRITICAL_SECTION*, &mutex))
+
+#  ifndef _MSC_VER
+#    undef __try
+#    undef __except
+#  endif   // _MSC_VER
 
 }   // namespace __rw
 

Modified: stdcxx/trunk/include/rw/_tree.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_tree.h?rev=673648&r1=673647&r2=673648&view=diff
==============================================================================
--- stdcxx/trunk/include/rw/_tree.h (original)
+++ stdcxx/trunk/include/rw/_tree.h Thu Jul  3 03:36:21 2008
@@ -261,9 +261,9 @@
     
     typedef __rw_rb_tree_node<_Alloc,_Val,_Key,_KeyOf> _C_node_t; 
     typedef _RWSTD_ALLOC_TYPE (_Alloc,_Val)            _C_val_alloc_t;
-    typedef _TYPENAME _C_node_t::_C_key_alloc_t        _C_key_alloc_t;
-    typedef _TYPENAME _C_node_t::_C_node_alloc_t       _C_node_alloc_t;
-    typedef _TYPENAME _C_node_t::_C_link_t             _C_link_t;
+    typedef _RWSTD_REBIND (_Alloc, _Key)               _C_key_alloc_t;
+    typedef _RWSTD_REBIND (_Alloc, _C_node_t)          _C_node_alloc_t;
+    typedef _TYPENAME _C_node_alloc_t::pointer         _C_link_t;
 
 public:
     

Modified: stdcxx/trunk/util/gencat.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/gencat.cpp?rev=673648&r1=673647&r2=673648&view=diff
==============================================================================
--- stdcxx/trunk/util/gencat.cpp (original)
+++ stdcxx/trunk/util/gencat.cpp Thu Jul  3 03:36:21 2008
@@ -114,11 +114,7 @@
 
 #ifdef _WIN32
 
-#  ifndef _WIN64
-#    define PLATFORM "X86"
-#  else   // _WIN64
-#    define PLATFORM "X64"
-#  endif  // _WIN64
+#  ifndef __MINGW32__
 
     const char* const env_vars [] = {
         "VS90COMNTOOLS", "VS80COMNTOOLS",
@@ -138,14 +134,35 @@
         cmd.push_back ('\"');
     }
 
+    if (!cmd.empty ())
+        cmd += " && ";
+
+#  endif   // !__MINGW32__
+
     const char* const dll_name = argv [0];
     const char* const rc_name = argv [1];
 
     std::string res_name (rc_name);
     change_ext (res_name, ".res");
 
-    if (!cmd.empty ())
-        cmd += " && ";
+#  ifdef __MINGW32__
+
+    cmd += "windres -O coff -i ";
+    cmd += rc_name;
+    cmd += " -o ";
+    cmd += res_name;
+    cmd += " && gcc -shared -o ";
+    cmd += dll_name;
+    cmd += ' ';
+    cmd += res_name;
+
+#  else
+
+#    ifndef _WIN64
+#      define PLATFORM "X86"
+#    else   // _WIN64
+#      define PLATFORM "X64"
+#    endif  // _WIN64
 
     cmd += "rc ";
     cmd += rc_name;
@@ -154,6 +171,8 @@
     cmd += ' ';
     cmd += res_name;
     
+#  endif   // __MINGW32__
+
     const int ret = std::system (cmd.c_str ());
 
     std::remove (res_name.c_str ());



Mime
View raw message