Boost logo

Boost :

From: Darin Adler (darin_at_[hidden])
Date: 2002-01-27 19:40:05


On 1/27/02 4:26 PM, "Douglas Gregor" <gregod_at_[hidden]> wrote:

> I suggest the following patch to
> boost/config/suffix.hpp, which has been successfully tested on the
> aforementioned platform.

I'd like to see this change in bsd.hpp rather than in suffix.hpp. Even
though this does theoretically apply for one other platform (macos.hpp with
__MACH__ defined, which is a FreeBSD-derived platform), it's going against
the flow of the design of the config library to put a
compiler-and-platform-specific check into suffix.hpp.

If we want to be pedantic about keeping compiler details in the compiler
headers, we could do this by to inventing a private symbol for config, such
as BOOST_HAS_CTYPE_MACRO_WORKAROUND, define it appropriately in gcc.hpp, and
then check it in both bsd.hpp and macos.hpp.

Another idea is that we might want to share the common bits between bsd.hpp
and macos.hpp. One way to do this would be to have macos.hpp include bsd.hpp
if __MACH__ is true. This would require only a small change to bsd.hpp to
avoid the #error at the top of the file. Another way would be to move the
guts of bsd.hpp into a header named something like bsd_family.hpp and have
bsd.hpp include it and macos.hpp include it when appropriate.

    -- Darin


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