Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2004-11-24 04:45:06


Richard Hadsell wrote:
> Markus Schöpflin wrote:
>
>> If you happen to know a way to distinguish the two versions on
>> preprocessor level, a fix would be easy.
>
> What about using _POSIX_VERSION? boost/config/posix_features.hpp sets
> macros for the availability of various headers. Perhaps there could be
> one for inttypes.h. It might be difficult to find out what
> _POSIX_VERSION number would be the best indicator, but it seems a likely
> place to start.
>
> All I can tell you is that my 4.0F system defines _POSIX_VERSION = 199506.

I have been grepping around a little on my 5.1 system and the right check
for inttypes.h on this OS seems to be

#if defined (_XOPEN_SOURCE) && (_XOPEN_SOURCE>=500)
#include <inttypes.h>
#endif

Unfortunately I don't have access to the Open Group Base Specification
Issue 5 which could tell me what exactly is promised to be present in that
header.

The current Issue 6 is aligned with ISO/IEC 9899:1999 and gives us all we
need, but of course we already have stdint.h on such a system.

>> I don't think that currently there is any distinction at all between
>> 4.x and 5.x, neither in boost nor in boost.build or in the toolset.
>
> If the preprocessor lets you down, and inttypes.h became available with
> 5.0, you could add a toolset option that sets an appropriate -D compiler
> flag to make the distinction between 4.x and 5.x. It would just be a
> bjam build option. (If this header is the only reason to distinguish
> between Tru64 versions, and it was introduced between 5.0c and 5.0d, for
> example, it seems a bit silly to have a toolset option just for this.)

Agreed.

>> What really amazes me is that you can use V6.5 on Tru64 4.x, I always
>> thought that V5.x was the latest compiler toolset for Tru64 4.x.
>
> I think that cxx 6.5 was ready before Tru64 5.0 was solid. Everyone was
> happy with 4.0F and they were unsure of 5.0, or they were not ready to
> support whatever source code changes it might entail. Yet they wanted
> the C++ improvements in 6.5.
>
> So when you installed the compiler, I think you had to select the
> version for 4.0 instead of the version for 5.0.

Unfortunately we are stuck here with DEC CXX V5.7-002 on Tru64 4.0F. That's
why there were no tests for this platform.

Markus


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk