<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 62: _PTHREADS should not be #defined with gcc 3.x</title><link>https://sourceforge.net/p/log4cpp/bugs/62/</link><description>Recent changes to 62: _PTHREADS should not be #defined with gcc 3.x</description><atom:link href="https://sourceforge.net/p/log4cpp/bugs/62/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 18 Mar 2003 19:49:50 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/log4cpp/bugs/62/feed.rss" rel="self" type="application/rss+xml"/><item><title>_PTHREADS should not be #defined with gcc 3.x</title><link>https://sourceforge.net/p/log4cpp/bugs/62/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;_PTHREADS is now forced-defined into config.h&lt;br /&gt;
by aclocal.m4 (and configure) for&lt;br /&gt;
&amp;amp;quot;configure --with-pthreads&amp;amp;quot;. &lt;/p&gt;
&lt;p&gt;STL MT issues has been resolved in the libstdc++ &lt;br /&gt;
version distributed with gcc 3.x compiled with &lt;br /&gt;
--enable-threads. &lt;br /&gt;
In this case defining _PTHREADS not only is &lt;br /&gt;
uneccessary, it is very dangerous because  it breaks &lt;br /&gt;
libstdc++ ABI and will result in strange conflicts when &lt;br /&gt;
other modules build without _PTHREADS are loaded in &lt;br /&gt;
memory. Defining _PTHREADS also has a detrimental &lt;br /&gt;
effect on perfromance. &lt;/p&gt;
&lt;p&gt;To quote from libstdc++ FAQ: &lt;br /&gt;
&amp;amp;quot;For the sake of this discussion, libstdc++-v3 configures &lt;br /&gt;
the SGI STL implementation, not you. This is quite &lt;br /&gt;
different from how gcc pre-3.0 worked. In particular, past &lt;br /&gt;
advice was for people using g++ to explicitly define &lt;br /&gt;
_PTHREADS or other macros or port-specific compilation &lt;br /&gt;
options on the command line to get a thread-safe STL. &lt;br /&gt;
This is no longer required for any port and should no &lt;br /&gt;
longer be done unless you really know what you are &lt;br /&gt;
doing and assume all responsibility. &amp;amp;quot; &lt;/p&gt;
&lt;p&gt;See the following links for references: &lt;br /&gt;
&lt;a href="http://gcc.gnu.org/onlinedocs/libstdc++/23_containers/howto.html#3"&gt;http://gcc.gnu.org/onlinedocs/libstdc++/23_containers/howto.html#3&lt;/a&gt; &lt;br /&gt;
&lt;a href="http://gcc.gnu.org/ml/libstdc++/2001-05/msg00384.html"&gt;http://gcc.gnu.org/ml/libstdc++/2001-05/msg00384.html&lt;/a&gt; &lt;br /&gt;
&lt;a href="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/howto.html#3"&gt;http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/howto.html#3&lt;/a&gt; &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gene Gorokhovsky</dc:creator><pubDate>Tue, 18 Mar 2003 19:49:50 -0000</pubDate><guid>https://sourceforge.nete490d8fcbbc5ec10d15f5258972688c470ad5ca9</guid></item></channel></rss>