Boost C++ Libraries: Ticket #2675: Win32 threading selection in boost/detail/lightweight_mutex.hpp https://svn.boost.org/trac10/ticket/2675 <p> (See discussion at <a class="ext-link" href="http://lists.boost.org/Archives/boost/2008/12/146172.php"><span class="icon">​</span>http://lists.boost.org/Archives/boost/2008/12/146172.php</a>) </p> <p> Lines 31-40 of boost/detail/lightweight_mutex.hpp read like this: </p> <pre class="wiki">#if !defined(BOOST_HAS_THREADS) # include &lt;boost/detail/lwm_nop.hpp&gt; #elif defined(BOOST_HAS_PTHREADS) # include &lt;boost/detail/lwm_pthreads.hpp&gt; #elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) # include &lt;boost/detail/lwm_win32_cs.hpp&gt; #else // Use #define BOOST_DISABLE_THREADS to avoid the error # error Unrecognized threading platform #endif </pre><p> The conditions for selecting boost/detail/lwm_win32_cs.hpp are suboptimal because they're ruling out the case where the user's disabled Pthreads in cygwin/mingw by explicitly defining BOOST_HAS_WINTHREADS,a case covered by boost/config/platform/cygwin.hpp: in such a situation, Win32 threading is available but none of WIN32 and similar are defined by default (unless &lt;windows.h&gt; has been previously included, which makes boost/detail/lightweight_mutex.hpp context dependent). </p> <p> As per the discussion carried out in the list, I think the best resolution is to have the Win32 selection pp code changed to </p> <pre class="wiki">#elif defined(BOOST_HAS_WINTHREADS) ||\ defined(WIN32) || defined(_WIN32) || defined(__WIN32__) # include &lt;boost/detail/lwm_win32_cs.hpp&gt; #else </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2675 Trac 1.4.3 Peter Dimov Sat, 28 Feb 2009 17:07:02 GMT status, milestone changed https://svn.boost.org/trac10/ticket/2675#comment:1 https://svn.boost.org/trac10/ticket/2675#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.38.0</span> → <span class="trac-field-new">Boost 1.39.0</span> </li> </ul> Ticket Peter Dimov Sun, 01 Mar 2009 17:18:19 GMT <link>https://svn.boost.org/trac10/ticket/2675#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2675#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/51515" title="Refs #2675 (fixed in trunk.)">[51515]</a>) Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2675" title="#2675: Bugs: Win32 threading selection in boost/detail/lightweight_mutex.hpp (closed: fixed)">#2675</a> (fixed in trunk.) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Mon, 02 Mar 2009 16:37:33 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2675#comment:3 https://svn.boost.org/trac10/ticket/2675#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/51536" title="Merge [51515] to release. Closes #2675.">[51536]</a>) Merge <a class="changeset" href="https://svn.boost.org/trac10/changeset/51515" title="Refs #2675 (fixed in trunk.)">[51515]</a> to release. Closes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2675" title="#2675: Bugs: Win32 threading selection in boost/detail/lightweight_mutex.hpp (closed: fixed)">#2675</a>. </p> Ticket