You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Martin Sebor <se...@roguewave.com> on 2007/10/18 00:30:10 UTC
[PATCH] __rw_facet ctor/dtor ABI change with MSVC
This patch attempts to fix the binary incompatibility of __rw_facet
ctor and dtor when compiled with MSVC on Windows, introduced while
fixing STDCXX-469 (MSVC mangles the access specifier into the names
of class members):
https://issues.apache.org/jira/browse/STDCXX-469
I considered limiting the patch to MSVC 7.1 and prior since MSVC 8
wasn't supported in 4.1.3 but doing so wouldn't take into account
the possibility of linking programs compiled with MSVC 7.x with
4.2.0 built with MSVC 8.0.
Index: include/loc/_facet.h
===================================================================
--- include/loc/_facet.h (revision 585584)
+++ include/loc/_facet.h (working copy)
@@ -25,7 +25,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2007 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -56,8 +56,12 @@
// of standard types by the library
typedef __rw_facet* (_C_ctor_t)(_RWSTD_SIZE_T, const char*);
+#ifndef _MSC_VER
+
protected:
+#endif // !MSVC
+
_EXPLICIT __rw_facet (_RWSTD_SIZE_T = 0);
virtual ~__rw_facet ();
Re: [PATCH] __rw_facet ctor/dtor ABI change with MSVC
Posted by Martin Sebor <se...@roguewave.com>.
This is in, both on 4.2.0 and trunk:
http://svn.apache.org/viewvc?rev=586016&view=rev
http://svn.apache.org/viewvc?rev=586017&view=rev
Martin Sebor wrote:
> Martin Sebor wrote:
>> This patch attempts to fix the binary incompatibility of __rw_facet
>> ctor and dtor when compiled with MSVC on Windows, introduced while
>> fixing STDCXX-469 (MSVC mangles the access specifier into the names
>> of class members):
>>
>> https://issues.apache.org/jira/browse/STDCXX-469
>>
>> I considered limiting the patch to MSVC 7.1 and prior since MSVC 8
>> wasn't supported in 4.1.3 but doing so wouldn't take into account
>> the possibility of linking programs compiled with MSVC 7.x with
>> 4.2.0 built with MSVC 8.0.
>
> Here's a better patch that automatically enables the fix even
> for MSVC once we get to stdcxx 5.0 (inspired by the same code
> in _config.h that we just discussed Re: [PATCH] Re: stdcxx
> 4.2.0/4.1.3 binary incompatibility on Linux).
>
> Martin
>
> Index: include/loc/_facet.h
> ===================================================================
> --- include/loc/_facet.h (revision 585584)
> +++ include/loc/_facet.h (working copy)
> @@ -25,7 +25,7 @@
> * implied. See the License for the specific language governing
> * permissions and limitations under the License.
> *
> - * Copyright 1994-2006 Rogue Wave Software.
> + * Copyright 1994-2007 Rogue Wave Software, Inc.
> *
>
> **************************************************************************/
>
> @@ -56,8 +56,14 @@
> // of standard types by the library
> typedef __rw_facet* (_C_ctor_t)(_RWSTD_SIZE_T, const char*);
>
> +#if !defined (_MSC_VER) || 5 <= _RWSTD_VER_MAJOR
> +
> + // disabled for binary compatibility with stdcxx 4.1.x for MSVC
> + // (the compiler mangles access specifiers into class members)
> protected:
>
> +#endif // !MSVC || 5 <= stdcxx version
> +
> _EXPLICIT __rw_facet (_RWSTD_SIZE_T = 0);
>
> virtual ~__rw_facet ();
>
Re: [PATCH] __rw_facet ctor/dtor ABI change with MSVC
Posted by Martin Sebor <se...@roguewave.com>.
Martin Sebor wrote:
> This patch attempts to fix the binary incompatibility of __rw_facet
> ctor and dtor when compiled with MSVC on Windows, introduced while
> fixing STDCXX-469 (MSVC mangles the access specifier into the names
> of class members):
>
> https://issues.apache.org/jira/browse/STDCXX-469
>
> I considered limiting the patch to MSVC 7.1 and prior since MSVC 8
> wasn't supported in 4.1.3 but doing so wouldn't take into account
> the possibility of linking programs compiled with MSVC 7.x with
> 4.2.0 built with MSVC 8.0.
Here's a better patch that automatically enables the fix even
for MSVC once we get to stdcxx 5.0 (inspired by the same code
in _config.h that we just discussed Re: [PATCH] Re: stdcxx
4.2.0/4.1.3 binary incompatibility on Linux).
Martin
Index: include/loc/_facet.h
===================================================================
--- include/loc/_facet.h (revision 585584)
+++ include/loc/_facet.h (working copy)
@@ -25,7 +25,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2007 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -56,8 +56,14 @@
// of standard types by the library
typedef __rw_facet* (_C_ctor_t)(_RWSTD_SIZE_T, const char*);
+#if !defined (_MSC_VER) || 5 <= _RWSTD_VER_MAJOR
+
+ // disabled for binary compatibility with stdcxx 4.1.x for MSVC
+ // (the compiler mangles access specifiers into class members)
protected:
+#endif // !MSVC || 5 <= stdcxx version
+
_EXPLICIT __rw_facet (_RWSTD_SIZE_T = 0);
virtual ~__rw_facet ();