Patch for BOOST_OLD_IOSTREAMS detection

Hi, Several places in Boost try to detect BOOST_OLD_IOSTREAMS using the following ifdefs: // support for pre 3.0 libstdc++ - thanks Phil Edwards! #if defined (__STL_CONFIG_H) && !defined (__STL_USE_NEW_IOSTREAMS) # define BOOST_OLD_IOSTREAMS #endif This incorrectly defines BOOST_OLD_IOSTREAMS for the Cray X1 C++ compiler. Could this be changed to include an && !defined(__crayx1) or something similar as in: #if defined (__STL_CONFIG_H) && !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) # define BOOST_OLD_IOSTREAMS #endif Three offending files are: boost/dynamic_bitset/config.hpp boost/range/iterator_range.hpp libs/dynamic_bitset/example/timing_tests.cpp Maybe it would be best to move this to the global config file? Best regards Matthias

Matthias Troyer wrote:
Hi,
Several places in Boost try to detect BOOST_OLD_IOSTREAMS using the following ifdefs:
// support for pre 3.0 libstdc++ - thanks Phil Edwards! #if defined (__STL_CONFIG_H) && !defined (__STL_USE_NEW_IOSTREAMS) # define BOOST_OLD_IOSTREAMS #endif
This incorrectly defines BOOST_OLD_IOSTREAMS for the Cray X1 C++ compiler. Could this be changed to include an && !defined(__crayx1) or something similar as in:
#if defined (__STL_CONFIG_H) && !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) # define BOOST_OLD_IOSTREAMS #endif
Three offending files are:
boost/dynamic_bitset/config.hpp boost/range/iterator_range.hpp
I just put that one there last week ;-)
libs/dynamic_bitset/example/timing_tests.cpp
You can add the iostreams library to your list. I copied the test from dynamic bitset, and am responsible for sticking it in Boost.Range.
Maybe it would be best to move this to the global config file?
I think last time it was suggested suggested to have a config macro for 'old' iostreams, John Maddock's view was that BOOST_NO_STD_LOCALE should be sufficient. However, this would incorrectly select old iostreams for Metrowerks with a dynamic runtime and Intel 7.1 with Dinkumware, and perhaps others. So I'd be in favor of having a config macro which the various libraries you mention could share. Regarding Cray X1 C++, how much of Boost does it compile? Jonathan

Maybe it would be best to move this to the global config file?
Yes indeed. may be finally we need to do something in this regard: http://thread.gmane.org/gmane.comp.lib.boost.devel/110201 Gennadiy

Matthias Troyer wrote:
Hi,
Several places in Boost try to detect BOOST_OLD_IOSTREAMS using the following ifdefs:
// support for pre 3.0 libstdc++ - thanks Phil Edwards! #if defined (__STL_CONFIG_H) && !defined (__STL_USE_NEW_IOSTREAMS) # define BOOST_OLD_IOSTREAMS #endif
This incorrectly defines BOOST_OLD_IOSTREAMS for the Cray X1 C++ compiler. Could this be changed to include an && !defined(__crayx1) or something similar as in:
#if defined (__STL_CONFIG_H) && !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) # define BOOST_OLD_IOSTREAMS #endif
Three offending files are:
boost/dynamic_bitset/config.hpp boost/range/iterator_range.hpp libs/dynamic_bitset/example/timing_tests.cpp
Maybe it would be best to move this to the global config file?
Best regards
Matthias
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Matthias Troyer wrote:
Hi,
Several places in Boost try to detect BOOST_OLD_IOSTREAMS using the following ifdefs:
<snip>
This incorrectly defines BOOST_OLD_IOSTREAMS for the Cray X1 C++ compiler. Could this be changed to include an && !defined(__crayx1) or something similar as in:
<snip>
boost/dynamic_bitset/config.hpp boost/range/iterator_range.hpp libs/dynamic_bitset/example/timing_tests.cpp
I applied your fix to iterator_range.hpp and to the iostreams library. Jonathan
participants (3)
-
Gennadiy Rozental
-
Jonathan Turkanis
-
Matthias Troyer