From 8bb9d852a382513f3b7f3ddd89b9616420dcbc2a Mon Sep 17 00:00:00 2001 From: Michael Wetherell Date: Wed, 8 Nov 2006 00:09:15 +0000 Subject: [PATCH] Move the #if disabling wxUSE_STD_STRING for watcom/dmc/vc5 into setup.h so that users can edit them easily. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/mac/setup0.h | 16 +++++++++++++++- include/wx/motif/setup0.h | 16 +++++++++++++++- include/wx/msw/setup0.h | 16 +++++++++++++++- include/wx/msw/wince/setup.h | 16 +++++++++++++++- include/wx/os2/setup0.h | 16 +++++++++++++++- include/wx/palmos/setup0.h | 16 +++++++++++++++- include/wx/setup_inc.h | 16 +++++++++++++++- include/wx/string.h | 11 ----------- include/wx/univ/setup0.h | 17 +++++++++++++++++ setup.h.in | 7 ++++++- 10 files changed, 128 insertions(+), 19 deletions(-) diff --git a/include/wx/mac/setup0.h b/include/wx/mac/setup0.h index e07e586a33..039bc25dd7 100644 --- a/include/wx/mac/setup0.h +++ b/include/wx/mac/setup0.h @@ -273,7 +273,21 @@ #define wxUSE_STD_IOSTREAM 0 // Enable conversion to standard C++ string if 1. -#define wxUSE_STD_STRING 1 +// +// Default is 1 for most compilers. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library header, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_STRING 0 +#else + #define wxUSE_STD_STRING 1 +#endif // Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. // Note that if the system's implementation does not support positional diff --git a/include/wx/motif/setup0.h b/include/wx/motif/setup0.h index 9a053b45ea..a180c44414 100644 --- a/include/wx/motif/setup0.h +++ b/include/wx/motif/setup0.h @@ -272,7 +272,21 @@ #define wxUSE_STD_IOSTREAM 0 // Enable conversion to standard C++ string if 1. -#define wxUSE_STD_STRING 1 +// +// Default is 1 for most compilers. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library header, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_STRING 0 +#else + #define wxUSE_STD_STRING 1 +#endif // Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. // Note that if the system's implementation does not support positional diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index 897bcfe109..280c9f3380 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -272,7 +272,21 @@ #define wxUSE_STD_IOSTREAM 0 // Enable conversion to standard C++ string if 1. -#define wxUSE_STD_STRING 1 +// +// Default is 1 for most compilers. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library header, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_STRING 0 +#else + #define wxUSE_STD_STRING 1 +#endif // Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. // Note that if the system's implementation does not support positional diff --git a/include/wx/msw/wince/setup.h b/include/wx/msw/wince/setup.h index 74f9897b3b..da0e4dfaea 100644 --- a/include/wx/msw/wince/setup.h +++ b/include/wx/msw/wince/setup.h @@ -272,7 +272,21 @@ #define wxUSE_STD_IOSTREAM 0 // Enable conversion to standard C++ string if 1. -#define wxUSE_STD_STRING 1 +// +// Default is 1 for most compilers. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library header, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_STRING 0 +#else + #define wxUSE_STD_STRING 1 +#endif // Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. // Note that if the system's implementation does not support positional diff --git a/include/wx/os2/setup0.h b/include/wx/os2/setup0.h index a220c9a1c9..5ab9487c38 100644 --- a/include/wx/os2/setup0.h +++ b/include/wx/os2/setup0.h @@ -272,7 +272,21 @@ #define wxUSE_STD_IOSTREAM 0 // Enable conversion to standard C++ string if 1. -#define wxUSE_STD_STRING 1 +// +// Default is 1 for most compilers. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library header, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_STRING 0 +#else + #define wxUSE_STD_STRING 1 +#endif // Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. // Note that if the system's implementation does not support positional diff --git a/include/wx/palmos/setup0.h b/include/wx/palmos/setup0.h index 32bb67f86e..06880364d8 100644 --- a/include/wx/palmos/setup0.h +++ b/include/wx/palmos/setup0.h @@ -272,7 +272,21 @@ #define wxUSE_STD_IOSTREAM 0 // Enable conversion to standard C++ string if 1. -#define wxUSE_STD_STRING 1 +// +// Default is 1 for most compilers. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library header, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_STRING 0 +#else + #define wxUSE_STD_STRING 1 +#endif // Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. // Note that if the system's implementation does not support positional diff --git a/include/wx/setup_inc.h b/include/wx/setup_inc.h index ae2ea280f3..623023fe07 100644 --- a/include/wx/setup_inc.h +++ b/include/wx/setup_inc.h @@ -268,7 +268,21 @@ #define wxUSE_STD_IOSTREAM 0 // Enable conversion to standard C++ string if 1. -#define wxUSE_STD_STRING 1 +// +// Default is 1 for most compilers. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library header, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_STRING 0 +#else + #define wxUSE_STD_STRING 1 +#endif // Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. // Note that if the system's implementation does not support positional diff --git a/include/wx/string.h b/include/wx/string.h index 0db91472e0..fb73ad8757 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -169,17 +169,6 @@ inline int Stricmp(const char *psz1, const char *psz2) // deal with STL/non-STL/non-STL-but-wxUSE_STD_STRING // ---------------------------------------------------------------------------- -#if wxUSE_STL || wxUSE_STD_STRING - // these compilers come without standard C++ library headers by default, - // remove the tests here if you do have them (e.g. from STLPort) - #if defined(__DMC__) || defined(__WATCOMC__) - #undef wxUSE_STL - #undef wxUSE_STD_STRING - #define wxUSE_STL 0 - #define wxUSE_STD_STRING 0 - #endif -#endif // wxUSE_STL || wxUSE_STD_STRING - // in both cases we need to define wxStdString #if wxUSE_STL || wxUSE_STD_STRING diff --git a/include/wx/univ/setup0.h b/include/wx/univ/setup0.h index bfd0e24022..10c4288ac2 100644 --- a/include/wx/univ/setup0.h +++ b/include/wx/univ/setup0.h @@ -258,6 +258,23 @@ #define wxUSE_STD_IOSTREAM 0 #endif +// Enable conversion to standard C++ string if 1. +// +// Default is 1 for most compilers. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library header, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_STRING 0 +#else + #define wxUSE_STD_STRING 1 +#endif + // Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. // Note that if the system's implementation does not support positional // parameters, setting this to 1 forces the use of the wxWidgets implementation diff --git a/setup.h.in b/setup.h.in index 3fd5256d51..9819817a86 100644 --- a/setup.h.in +++ b/setup.h.in @@ -203,7 +203,12 @@ #define wxUSE_STD_IOSTREAM 0 -#define wxUSE_STD_STRING 0 +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_STRING 0 +#else + #define wxUSE_STD_STRING 0 +#endif #define wxUSE_PRINTF_POS_PARAMS 0 -- 2.45.2