From 640a1b84741ec3993707c36426cd50a79b5639ae Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 2 Apr 2011 23:31:27 +0000 Subject: [PATCH] Disable wxUSE_STD_CONTAINERS by default for MSVC6. This compiler can't compile its own standard headers with the default options as it overflows an internal heap. Disable the use of standard containers by default for it to avoid this problem and indicate that /Zm option must be used to avoid this. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/motif/setup0.h | 13 +++++++++++-- include/wx/msw/setup0.h | 13 +++++++++++-- include/wx/msw/wince/setup.h | 13 +++++++++++-- include/wx/os2/setup0.h | 13 +++++++++++-- include/wx/osx/setup0.h | 13 +++++++++++-- include/wx/palmos/setup0.h | 13 +++++++++++-- include/wx/setup_inc.h | 13 +++++++++++-- include/wx/univ/setup0.h | 13 +++++++++++-- setup.h.in | 6 +++++- 9 files changed, 93 insertions(+), 17 deletions(-) diff --git a/include/wx/motif/setup0.h b/include/wx/motif/setup0.h index 6b52b4b514..4f0758aa59 100644 --- a/include/wx/motif/setup0.h +++ b/include/wx/motif/setup0.h @@ -303,11 +303,20 @@ // usually more limited) implementations are used which allows to avoid the // dependency on the C++ run-time library. // -// Default is 1 if compiler supports it. +// Default is 1 if compiler supports it. Currently this means not one of the +// compilers mentioned in wxUSE_STD_DEFAULT comment and also not VC6 as it +// needs non-default options for such build to avoid getting "fatal error +// C1076: compiler limit : internal heap limit reached; use /Zm to specify a +// higher limit" in its own standard headers, so you need to ensure you do +// increase the heap size before enabling this option for this compiler. // // Recommended setting: 1 unless you use a system without good implementation // of STL. -#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#if defined(_MSC_VER) && _MSC_VER < 1300 + #define wxUSE_STD_CONTAINERS 0 +#else + #define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#endif // Use standard C++ streams if 1 instead of wx streams in some places. If // disabled, wx streams are used everywhere and wxWidgets doesn't depend on the diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index f5235f7a2a..1f640b4861 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -303,11 +303,20 @@ // usually more limited) implementations are used which allows to avoid the // dependency on the C++ run-time library. // -// Default is 1 if compiler supports it. +// Default is 1 if compiler supports it. Currently this means not one of the +// compilers mentioned in wxUSE_STD_DEFAULT comment and also not VC6 as it +// needs non-default options for such build to avoid getting "fatal error +// C1076: compiler limit : internal heap limit reached; use /Zm to specify a +// higher limit" in its own standard headers, so you need to ensure you do +// increase the heap size before enabling this option for this compiler. // // Recommended setting: 1 unless you use a system without good implementation // of STL. -#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#if defined(_MSC_VER) && _MSC_VER < 1300 + #define wxUSE_STD_CONTAINERS 0 +#else + #define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#endif // Use standard C++ streams if 1 instead of wx streams in some places. If // disabled, wx streams are used everywhere and wxWidgets doesn't depend on the diff --git a/include/wx/msw/wince/setup.h b/include/wx/msw/wince/setup.h index ed6bcacb99..372b9727c5 100644 --- a/include/wx/msw/wince/setup.h +++ b/include/wx/msw/wince/setup.h @@ -303,11 +303,20 @@ // usually more limited) implementations are used which allows to avoid the // dependency on the C++ run-time library. // -// Default is 1 if compiler supports it. +// Default is 1 if compiler supports it. Currently this means not one of the +// compilers mentioned in wxUSE_STD_DEFAULT comment and also not VC6 as it +// needs non-default options for such build to avoid getting "fatal error +// C1076: compiler limit : internal heap limit reached; use /Zm to specify a +// higher limit" in its own standard headers, so you need to ensure you do +// increase the heap size before enabling this option for this compiler. // // Recommended setting: 1 unless you use a system without good implementation // of STL. -#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#if defined(_MSC_VER) && _MSC_VER < 1300 + #define wxUSE_STD_CONTAINERS 0 +#else + #define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#endif // Use standard C++ streams if 1 instead of wx streams in some places. If // disabled, wx streams are used everywhere and wxWidgets doesn't depend on the diff --git a/include/wx/os2/setup0.h b/include/wx/os2/setup0.h index b0017a8b37..9312b3ecd5 100644 --- a/include/wx/os2/setup0.h +++ b/include/wx/os2/setup0.h @@ -303,11 +303,20 @@ // usually more limited) implementations are used which allows to avoid the // dependency on the C++ run-time library. // -// Default is 1 if compiler supports it. +// Default is 1 if compiler supports it. Currently this means not one of the +// compilers mentioned in wxUSE_STD_DEFAULT comment and also not VC6 as it +// needs non-default options for such build to avoid getting "fatal error +// C1076: compiler limit : internal heap limit reached; use /Zm to specify a +// higher limit" in its own standard headers, so you need to ensure you do +// increase the heap size before enabling this option for this compiler. // // Recommended setting: 1 unless you use a system without good implementation // of STL. -#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#if defined(_MSC_VER) && _MSC_VER < 1300 + #define wxUSE_STD_CONTAINERS 0 +#else + #define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#endif // Use standard C++ streams if 1 instead of wx streams in some places. If // disabled, wx streams are used everywhere and wxWidgets doesn't depend on the diff --git a/include/wx/osx/setup0.h b/include/wx/osx/setup0.h index 8025882c71..28d9a18a1d 100644 --- a/include/wx/osx/setup0.h +++ b/include/wx/osx/setup0.h @@ -304,11 +304,20 @@ // usually more limited) implementations are used which allows to avoid the // dependency on the C++ run-time library. // -// Default is 1 if compiler supports it. +// Default is 1 if compiler supports it. Currently this means not one of the +// compilers mentioned in wxUSE_STD_DEFAULT comment and also not VC6 as it +// needs non-default options for such build to avoid getting "fatal error +// C1076: compiler limit : internal heap limit reached; use /Zm to specify a +// higher limit" in its own standard headers, so you need to ensure you do +// increase the heap size before enabling this option for this compiler. // // Recommended setting: 1 unless you use a system without good implementation // of STL. -#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#if defined(_MSC_VER) && _MSC_VER < 1300 + #define wxUSE_STD_CONTAINERS 0 +#else + #define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#endif // Use standard C++ streams if 1 instead of wx streams in some places. If // disabled, wx streams are used everywhere and wxWidgets doesn't depend on the diff --git a/include/wx/palmos/setup0.h b/include/wx/palmos/setup0.h index d143dbfce1..de8d5c7998 100644 --- a/include/wx/palmos/setup0.h +++ b/include/wx/palmos/setup0.h @@ -303,11 +303,20 @@ // usually more limited) implementations are used which allows to avoid the // dependency on the C++ run-time library. // -// Default is 1 if compiler supports it. +// Default is 1 if compiler supports it. Currently this means not one of the +// compilers mentioned in wxUSE_STD_DEFAULT comment and also not VC6 as it +// needs non-default options for such build to avoid getting "fatal error +// C1076: compiler limit : internal heap limit reached; use /Zm to specify a +// higher limit" in its own standard headers, so you need to ensure you do +// increase the heap size before enabling this option for this compiler. // // Recommended setting: 1 unless you use a system without good implementation // of STL. -#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#if defined(_MSC_VER) && _MSC_VER < 1300 + #define wxUSE_STD_CONTAINERS 0 +#else + #define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#endif // Use standard C++ streams if 1 instead of wx streams in some places. If // disabled, wx streams are used everywhere and wxWidgets doesn't depend on the diff --git a/include/wx/setup_inc.h b/include/wx/setup_inc.h index fa24104f11..bcf7254b4f 100644 --- a/include/wx/setup_inc.h +++ b/include/wx/setup_inc.h @@ -299,11 +299,20 @@ // usually more limited) implementations are used which allows to avoid the // dependency on the C++ run-time library. // -// Default is 1 if compiler supports it. +// Default is 1 if compiler supports it. Currently this means not one of the +// compilers mentioned in wxUSE_STD_DEFAULT comment and also not VC6 as it +// needs non-default options for such build to avoid getting "fatal error +// C1076: compiler limit : internal heap limit reached; use /Zm to specify a +// higher limit" in its own standard headers, so you need to ensure you do +// increase the heap size before enabling this option for this compiler. // // Recommended setting: 1 unless you use a system without good implementation // of STL. -#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#if defined(_MSC_VER) && _MSC_VER < 1300 + #define wxUSE_STD_CONTAINERS 0 +#else + #define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#endif // Use standard C++ streams if 1 instead of wx streams in some places. If // disabled, wx streams are used everywhere and wxWidgets doesn't depend on the diff --git a/include/wx/univ/setup0.h b/include/wx/univ/setup0.h index 4e1cd85bec..0acafc89fa 100644 --- a/include/wx/univ/setup0.h +++ b/include/wx/univ/setup0.h @@ -302,11 +302,20 @@ // usually more limited) implementations are used which allows to avoid the // dependency on the C++ run-time library. // -// Default is 1 if compiler supports it. +// Default is 1 if compiler supports it. Currently this means not one of the +// compilers mentioned in wxUSE_STD_DEFAULT comment and also not VC6 as it +// needs non-default options for such build to avoid getting "fatal error +// C1076: compiler limit : internal heap limit reached; use /Zm to specify a +// higher limit" in its own standard headers, so you need to ensure you do +// increase the heap size before enabling this option for this compiler. // // Recommended setting: 1 unless you use a system without good implementation // of STL. -#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#if defined(_MSC_VER) && _MSC_VER < 1300 + #define wxUSE_STD_CONTAINERS 0 +#else + #define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#endif // Use standard C++ streams if 1 instead of wx streams in some places. If // disabled, wx streams are used everywhere and wxWidgets doesn't depend on the diff --git a/setup.h.in b/setup.h.in index 76e8e8d0c9..fe2e031afb 100644 --- a/setup.h.in +++ b/setup.h.in @@ -216,7 +216,11 @@ #define wxUSE_STD_DEFAULT 0 #endif -#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#if defined(_MSC_VER) && _MSC_VER < 1300 + #define wxUSE_STD_CONTAINERS 0 +#else + #define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT +#endif #define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT