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] _config-msvc.h
Date Fri, 24 Nov 2006 21:05:54 GMT
Farid Zaripov wrote:
>   I see that some #defines in _config-msvc.h (i.e. #define 
> _RWSTD_NO_NL_LANGINFO) duplicates #defines from config.h produced by 
> configure.wsf script. And some #defines contradict with #defines from 
> config.h (i.e. #define _RWSTD_NO_MBRLEN is undefined on MSVC 8).
> 
>   I think that #defines should be moved to #if _MSC_VER <= 1200 / #endif 
> because we don't have configuration infrastructure for MSVC 6 and earlier.
> 
>   The proposed patch is attached.
> 
>   ChangeLog:
>   * _config-msvc.h: All definitions which duplicates or contradict
>   with config.h are moved to #if _MSC_VER <= 1200 / #endif

OK to commit assuming it doesn't break anything with the versions
of MSVC we currently support (including 7.0).

Martin

> 
> Farid.
> 
> 
> ------------------------------------------------------------------------
> 
> Index: _config-msvc.h
> ===================================================================
> --- _config-msvc.h	(revision 478181)
> +++ _config-msvc.h	(working copy)
> @@ -32,7 +32,6 @@
>  #endif   // MSVC <= 7.1
>  
>  #if _MSC_VER <= 1300   // MSVC <= 7.0
> -#  define _RWSTD_NO_TYPENAME
>  #  define _RWSTD_EXCEPTION_HANDLER_IN_STD
>  #  define _RWSTD_NO_STATIC_DEF3
>  #  define _RWSTD_NO_PTR_VALUE_TEMPLATE_OVERLOAD
> @@ -52,6 +51,99 @@
>  #endif   // MSVC <= 7.0
>  
>  #if _MSC_VER <= 1200   // MSVC <= 6.0
> +#  define _RWSTD_NO_TYPENAME
> +
> +   // static data members of cass templates aren't properly collapsed
> +   // (compiler emits one copy per each translation unit that contains
> +   // the definition of the template member, and the linker fails to
> +   // multiple copies that reside in shared libraries)
> +#ifndef _RWSTD_NO_COLLAPSE_TEMPLATE_STATICS
> +#  define _RWSTD_NO_COLLAPSE_TEMPLATE_STATICS
> +#endif   // _RWSTD_NO_COLLAPSE_TEMPLATE_STATICS
> +
> +   // not declared/defined in libc
> +#if !defined (_RWSTD_NO_STRTOLL_IN_LIBC)
> +#  define _RWSTD_NO_STRTOLL_IN_LIBC
> +#endif   // _RWSTD_NO_STRTOLL_IN_LIBC
> +
> +#if !defined (_RWSTD_NO_STRTOULL_IN_LIBC)
> +#  define _RWSTD_NO_STRTOULL_IN_LIBC
> +#endif   // _RWSTD_NO_STRTOULL_IN_LIBC
> +
> +#ifndef _RWSTD_NO_EXPORT
> +     // not implemented
> +#  define _RWSTD_NO_EXPORT
> +#endif   // _RWSTD_NO_EXPORT
> +
> +#define _RWSTD_NO_NL_LANGINFO
> +
> +   // functions are defined in MSVC's msvcprt.lib and msvcprtd.lib
> +   // which include the compiler's implementation of the C++ Standard
> +   // library and with which we (obviously) cannot use
> +#ifndef _RWSTD_NO_WCTOB
> +#  define _RWSTD_NO_WCTOB
> +#endif   // _RWSTD_NO_WCTOB
> +
> +#ifndef _RWSTD_NO_WCTOB_IN_LIBC
> +#  define _RWSTD_NO_WCTOB_IN_LIBC
> +#endif   // _RWSTD_NO_WCTOB_IN_LIBC
> +
> +#ifndef _RWSTD_NO_MBRTOWC
> +#  define _RWSTD_NO_MBRTOWC
> +#endif   // _RWSTD_NO_MBRTOWC
> +
> +#ifndef _RWSTD_NO_MBRTOWC_IN_LIBC
> +#  define _RWSTD_NO_MBRTOWC_IN_LIBC
> +#endif   // _RWSTD_NO_MBRTOWC_IN_LIBC
> +
> +#ifndef _RWSTD_NO_WCRTOMB
> +#  define _RWSTD_NO_WCRTOMB
> +#endif   // _RWSTD_NO_WCRTOMB
> +
> +#ifndef _RWSTD_NO_WCRTOMB_IN_LIBC
> +#  define _RWSTD_NO_WCRTOMB_IN_LIBC
> +#endif   // _RWSTD_NO_WCRTOMB_IN_LIBC
> +
> +#ifndef _RWSTD_NO_MBSTOWCS
> +#  define _RWSTD_NO_MBSTOWCS
> +#endif   // _RWSTD_NO_MBSTOWCS
> +
> +#ifndef _RWSTD_NO_MBSTOWCS_IN_LIBC
> +#  define _RWSTD_NO_MBSTOWCS_IN_LIBC
> +#endif   // _RWSTD_NO_MBSTOWCS_IN_LIBC
> +
> +#ifndef _RWSTD_NO_MBRLEN
> +#  define _RWSTD_NO_MBRLEN
> +#endif   // _RWSTD_NO_MBRLEN
> +
> +#ifndef _RWSTD_NO_MBRLEN_IN_LIBC
> +#  define _RWSTD_NO_MBRLEN_IN_LIBC
> +#endif   // _RWSTD_NO_MBRLEN_IN_LIBC
> +
> +#ifndef _RWSTD_NO_WCSRTOMBS
> +#  define _RWSTD_NO_WCSRTOMBS
> +#endif   // _RWSTD_NO_WCSRTOMBS
> +
> +#ifndef _RWSTD_NO_WCSRTOMBS_IN_LIBC
> +#  define _RWSTD_NO_WCSRTOMBS_IN_LIBC
> +#endif   // _RWSTD_NO_WCSRTOMBS_IN_LIBC
> +
> +#ifndef _RWSTD_NO_BTOWC
> +#  define _RWSTD_NO_BTOWC
> +#endif   // _RWSTD_NO_BTOWC
> +
> +#ifndef _RWSTD_NO_BTOWC_IN_LIBC
> +#  define _RWSTD_NO_BTOWC_IN_LIBC
> +#endif   // _RWSTD_NO_BTOWC_IN_LIBC
> +
> +#ifndef _RWSTD_NO_MBSRTOWCS
> +#  define _RWSTD_NO_MBSRTOWCS
> +#endif   // _RWSTD_NO_MBSRTOWCS
> +
> +#ifndef _RWSTD_NO_MBSRTOWCS_IN_LIBC
> +#  define _RWSTD_NO_MBSRTOWCS_IN_LIBC
> +#endif   // _RWSTD_NO_MBSRTOWCS_IN_LIBC
> +
>  #endif   // MSVC <= 6.0
>  
>     // enable the <cxxx> form of libc headers
> @@ -73,14 +165,6 @@
>  #  define _RWSTD_NO_DEPRECATED_C_HEADERS
>  #endif   // _RWSTD_NO_DEPRECATED_C_HEADERS
>  
> -   // static data members of cass templates aren't properly collapsed
> -   // (compiler emits one copy per each translation unit that contains
> -   // the definition of the template member, and the linker fails to
> -   // multiple copies that reside in shared libraries)
> -#ifndef _RWSTD_NO_COLLAPSE_TEMPLATE_STATICS
> -#  define _RWSTD_NO_COLLAPSE_TEMPLATE_STATICS
> -#endif   // _RWSTD_NO_COLLAPSE_TEMPLATE_STATICS
> -
>     // operator new and delete is not reliably replaceable across
>     // shared library boundaries, which includes the shared library
>     // version of the language support library
> @@ -105,15 +189,6 @@
>     // enable iostream and locale support for long long integers
>  #define _RWSTD_LONG_LONG __int64
>  
> -   // not declared/defined in libc
> -#if !defined (_RWSTD_NO_STRTOLL_IN_LIBC)
> -#  define _RWSTD_NO_STRTOLL_IN_LIBC
> -#endif   // _RWSTD_NO_STRTOLL_IN_LIBC
> -
> -#if !defined (_RWSTD_NO_STRTOULL_IN_LIBC)
> -#  define _RWSTD_NO_STRTOULL_IN_LIBC
> -#endif   // _RWSTD_NO_STRTOULL_IN_LIBC
> -
>  #if defined (_WIN64)
>       // FIXME: handle by forward declaring fuctions in <rw/_mutex.h>
>  #  define _RWSTD_NO_FWD_DECLARATIONS
> @@ -157,13 +232,7 @@
>  #  define _RWSTD_NO_PURE_C_HEADERS
>  #endif   // _RWSTD_NO_PURE_C_HEADERS
>  
> -#ifndef _RWSTD_NO_EXPORT
> -     // not implemented
> -#  define _RWSTD_NO_EXPORT
> -#endif   // _RWSTD_NO_EXPORT
> -
>  #define _RWSTD_MUNMAP_ARG1_T void*
> -#define _RWSTD_NO_NL_LANGINFO
>  
>  #if defined (_CPPRTTI)
>       // override in case library was configured with -GR-
> @@ -181,70 +250,3 @@
>  typedef unsigned short wchar_t;
>  
>  #endif   // _NATIVE_WCHAR_T_DEFINED
> -
> -   // functions are defined in MSVC's msvcprt.lib and msvcprtd.lib
> -   // which include the compiler's implementation of the C++ Standard
> -   // library and with which we (obviously) cannot use
> -#ifndef _RWSTD_NO_WCTOB
> -#  define _RWSTD_NO_WCTOB
> -#endif   // _RWSTD_NO_WCTOB
> -
> -#ifndef _RWSTD_NO_WCTOB_IN_LIBC
> -#  define _RWSTD_NO_WCTOB_IN_LIBC
> -#endif   // _RWSTD_NO_WCTOB_IN_LIBC
> -
> -#ifndef _RWSTD_NO_MBRTOWC
> -#  define _RWSTD_NO_MBRTOWC
> -#endif   // _RWSTD_NO_MBRTOWC
> -
> -#ifndef _RWSTD_NO_MBRTOWC_IN_LIBC
> -#  define _RWSTD_NO_MBRTOWC_IN_LIBC
> -#endif   // _RWSTD_NO_MBRTOWC_IN_LIBC
> -
> -#ifndef _RWSTD_NO_WCRTOMB
> -#  define _RWSTD_NO_WCRTOMB
> -#endif   // _RWSTD_NO_WCRTOMB
> -
> -#ifndef _RWSTD_NO_WCRTOMB_IN_LIBC
> -#  define _RWSTD_NO_WCRTOMB_IN_LIBC
> -#endif   // _RWSTD_NO_WCRTOMB_IN_LIBC
> -
> -#ifndef _RWSTD_NO_MBSTOWCS
> -#  define _RWSTD_NO_MBSTOWCS
> -#endif   // _RWSTD_NO_MBSTOWCS
> -
> -#ifndef _RWSTD_NO_MBSTOWCS_IN_LIBC
> -#  define _RWSTD_NO_MBSTOWCS_IN_LIBC
> -#endif   // _RWSTD_NO_MBSTOWCS_IN_LIBC
> -
> -#ifndef _RWSTD_NO_MBRLEN
> -#  define _RWSTD_NO_MBRLEN
> -#endif   // _RWSTD_NO_MBRLEN
> -
> -#ifndef _RWSTD_NO_MBRLEN_IN_LIBC
> -#  define _RWSTD_NO_MBRLEN_IN_LIBC
> -#endif   // _RWSTD_NO_MBRLEN_IN_LIBC
> -
> -#ifndef _RWSTD_NO_WCSRTOMBS
> -#  define _RWSTD_NO_WCSRTOMBS
> -#endif   // _RWSTD_NO_WCSRTOMBS
> -
> -#ifndef _RWSTD_NO_WCSRTOMBS_IN_LIBC
> -#  define _RWSTD_NO_WCSRTOMBS_IN_LIBC
> -#endif   // _RWSTD_NO_WCSRTOMBS_IN_LIBC
> -
> -#ifndef _RWSTD_NO_BTOWC
> -#  define _RWSTD_NO_BTOWC
> -#endif   // _RWSTD_NO_BTOWC
> -
> -#ifndef _RWSTD_NO_BTOWC_IN_LIBC
> -#  define _RWSTD_NO_BTOWC_IN_LIBC
> -#endif   // _RWSTD_NO_BTOWC_IN_LIBC
> -
> -#ifndef _RWSTD_NO_MBSRTOWCS
> -#  define _RWSTD_NO_MBSRTOWCS
> -#endif   // _RWSTD_NO_MBSRTOWCS
> -
> -#ifndef _RWSTD_NO_MBSRTOWCS_IN_LIBC
> -#  define _RWSTD_NO_MBSRTOWCS_IN_LIBC
> -#endif   // _RWSTD_NO_MBSRTOWCS_IN_LIBC


Mime
View raw message