stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: [PATCH] __rw_facet ctor/dtor ABI change with MSVC
Date Thu, 18 Oct 2007 15:59:53 GMT
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 ();
> 


Mime
View raw message