This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51906] thread lock test failures on darwin11 under Xcode 4.2
- From: "iains at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 03 Feb 2012 08:22:56 +0000
- Subject: [Bug libstdc++/51906] thread lock test failures on darwin11 under Xcode 4.2
- Auto-submitted: auto-generated
- References: <bug-51906-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51906
--- Comment #39 from Iain Sandoe <iains at gcc dot gnu.org> 2012-02-03 08:22:56 UTC ---
(In reply to comment #37)
> (In reply to comment #36)
> You would probably have to use Availability.h and something like...
This is not required, (and likely undesirable).
Use the " __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__" macro - which is
provided by GCC and clang for all versions that produce OSX code (I would
imagine that any compiler would need to implement it - since the system headers
depend on it heavily).
thus:
#if defined (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \
&& (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1070) \
/* && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < fixed-version) */
... code for buggy Lion ...
#else
... the rest
#endif