Boost logo

Boost Users :

From: Glen Simmons (gsimmons_at_[hidden])
Date: 2004-09-28 09:26:18


On 28 Sep, 2004, at 4:58 AM, John Maddock wrote:

>> OK, it turns out that BOOST_HAS_THREADS *was* getting enabled, but
>> was later getting disabled in suffix.hpp because BOOST_HAS_PTHREADS
>> was not enabled. I believe that it should be enabled by the inclusion
>> of posix_features.hpp, but this is not happening because of this test
>> in macos.hpp:
>> # ifndef TARGET_CARBON
>> # include <boost/config/posix_features.hpp>
>> # endif
>> I'm building a Cocoa project in Xcode, which apparently defines
>> TARGET_CARBON for me. Why is posix_features.hpp only included if
>> TARGET_CARBON is not defined? You can use posix from a carbon target
>> just fine. Commenting out the #ifndef so posix_features.hpp is
>> included makes it build and work just fine. Is there some reason for
>> this that I'm not seeing? Is this a bug?
>
> I don't know enough (well anything really!) about MacOS targets, and
> what is and is not correct for them, searching the archives it appears
> that I added this check after a user request:
> http://lists.boost.org/MailArchives/boost-users/msg02664.php.
> Obviously we need a better way of doing things, so any suggestions
> welcome...

Ahh, that explains it. The problem is that testing for TARGET_CARBON is
too broad for the issue that Mr. Thomale was having. I'm sure there are
various macros defined by MSL that would be a better check. Or, (yet)
another flag to set in user.hpp indicating that the user is using the
MSL. Unfortunately, I am not familiar with MSL, so I can't suggest a
fix. For now, I've removed the test for TARGET_CARBON, which solves my
problem.

Thanks,
Glen


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net