<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 62: _PTHREADS should not be #defined with gcc 3.x</title><link href="https://sourceforge.net/p/log4cpp/bugs/62/" rel="alternate"/><link href="https://sourceforge.net/p/log4cpp/bugs/62/feed.atom" rel="self"/><id>https://sourceforge.net/p/log4cpp/bugs/62/</id><updated>2003-03-18T19:49:50Z</updated><subtitle>Recent changes to 62: _PTHREADS should not be #defined with gcc 3.x</subtitle><entry><title>_PTHREADS should not be #defined with gcc 3.x</title><link href="https://sourceforge.net/p/log4cpp/bugs/62/" rel="alternate"/><published>2003-03-18T19:49:50Z</published><updated>2003-03-18T19:49:50Z</updated><author><name>Gene Gorokhovsky</name><uri>https://sourceforge.net/u/geneg/</uri></author><id>https://sourceforge.nete490d8fcbbc5ec10d15f5258972688c470ad5ca9</id><summary type="html">&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;</summary></entry></feed>