[patch] GCC 3.4 removed __GLIBCPP__ macro

Hi, The version of libstdc++ that ships with GCC 3.4 has changed a number of macro names, so the boost/config/stdlib/libstdcpp3.hpp file no longer works. __GLIBCPP__ -> __GLIBCXX__ _GLIBCPP_USE_WCHAR_T -> _GLIBCXX_USE_WCHAR_T _GLIBCPP_USE_LONG_LONG -> _GLIBCXX_USE_LONG_LONG The attached patch adds a check for __GLIBCXX__ to select_stdlib_config.hpp and includes a new libstdcxx3.hpp file if it's defined. That new file is also attached. If noone's already working on this, is my approach the best one? jon -- "Surrealism aims at the total transformation of the mind and all that resembles it" - Breton

On Wed, Apr 28, 2004 at 03:57:00PM +0100, Jonathan Wakely wrote:
The version of libstdc++ that ships with GCC 3.4 has changed a number of macro names, so the boost/config/stdlib/libstdcpp3.hpp file no longer works.
I should have pointed out that before making any changes I couldn't use Boost with GCC 3.4 on FreeBSD 4.x. FreeBSD 4 does not support wchar_t (and therefore doesn't support std::wstring or std::wstreambuf) but Boost was failing to detect this because the select_stdlib_config.hpp file didn't match __GLIBCPP__ and so didn't include libstdcpp3.hpp. An alternative approach to the patches I sent would be to include the same libstdcpp3.hpp file for both __GLIBCPP__ and __GLIBCXX__ and make that file handle both cases. I don't know which is preferred. Another related patch is attached to this mail, changing the file libs/config/test/config_info.cpp so it calls PRINT_MACRO with the new GLIBCXX macro names as well as the old GLIBCPP ones. jon -- "It is seldom that liberty of any kind is lost all at once." - David Hume

An alternative approach to the patches I sent would be to include the same libstdcpp3.hpp file for both __GLIBCPP__ and __GLIBCXX__ and make that file handle both cases. I don't know which is preferred.
That's the approach I've taken.
Another related patch is attached to this mail, changing the file libs/config/test/config_info.cpp so it calls PRINT_MACRO with the new GLIBCXX macro names as well as the old GLIBCPP ones.
Thanks, those patches are in cvs now. John.

The version of libstdc++ that ships with GCC 3.4 has changed a number of macro names, so the boost/config/stdlib/libstdcpp3.hpp file no longer works.
__GLIBCPP__ -> __GLIBCXX__ _GLIBCPP_USE_WCHAR_T -> _GLIBCXX_USE_WCHAR_T _GLIBCPP_USE_LONG_LONG -> _GLIBCXX_USE_LONG_LONG
The attached patch adds a check for __GLIBCXX__ to select_stdlib_config.hpp and includes a new libstdcxx3.hpp file if it's defined. That new file is also attached.
If noone's already working on this, is my approach the best one?
Probably the best way is to direct the compiler to the existing config header, I'll look into it, thanks for bringing this up, John.
participants (2)
-
John Maddock
-
Jonathan Wakely