Boost C++ Libraries: Ticket #1243: ODR violation by boost::detail::lightweight_mutex https://svn.boost.org/trac10/ticket/1243 <p> boost/detail/flyweight_mutex.hpp implements a mutex class based on a Win32 CRITICAL_SECTION or using Pthreads according to the following pp logic: </p> <pre class="wiki">#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) // based on CRITICAL_SECTION #elif defined(BOOST_HAS_PTHREADS) // based on Pthreads </pre><p> which violates ODR on those environments, such as Cygwin, where WIN32 or similar is not a predefined macro but depends on the inclusion of &lt;windows.h&gt;. </p> <p> A more detailed discussion of the issue at: </p> <p> <a class="ext-link" href="http://lists.boost.org/Archives/boost/2007/09/127115.php"><span class="icon">​</span>http://lists.boost.org/Archives/boost/2007/09/127115.php</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1243 Trac 1.4.3 Peter Dimov Tue, 11 Sep 2007 20:55:53 GMT status, milestone changed https://svn.boost.org/trac10/ticket/1243#comment:1 https://svn.boost.org/trac10/ticket/1243#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">To Be Determined</span> → <span class="trac-field-new">Boost 1.35.0</span> </li> </ul> Ticket Peter Dimov Tue, 11 Sep 2007 20:58:20 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1243#comment:2 https://svn.boost.org/trac10/ticket/1243#comment:2 <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/39199" title="Fixes #1243">[39199]</a>) Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1243" title="#1243: Bugs: ODR violation by boost::detail::lightweight_mutex (closed: fixed)">#1243</a> </p> Ticket