* doc/xml/manual/abi.xml: Add xml:id anchor.
* doc/xml/manual/using.xml (manual.intro.using.macros): Document
_GLIBCXX_RELEASE. Link to new anchor for __GLIBCXX__ notes.
(concurrency.io.structure): Add markup.
* doc/html/*: Regenerate.
From-SVN: r246532
2017-03-28 Jonathan Wakely <jwakely@redhat.com>
+ * doc/xml/manual/abi.xml: Add xml:id anchor.
+ * doc/xml/manual/using.xml (manual.intro.using.macros): Document
+ _GLIBCXX_RELEASE. Link to new anchor for __GLIBCXX__ notes.
+ (concurrency.io.structure): Add markup.
+ * doc/html/*: Regenerate.
+
PR libstdc++/80229
* include/bits/shared_ptr_base.h
(__shared_ptr::_M_enable_shared_from_this_with): Change parameters to
<code class="code">-fabi-version</code>.
</p><p>
It is versioned as follows:
- </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0: (Error, not versioned) </p></li><li class="listitem"><p>GCC 3.1: (Error, not versioned) </p></li><li class="listitem"><p>GCC 3.2: <code class="code">-fabi-version=1</code></p></li><li class="listitem"><p>GCC 3.3: <code class="code">-fabi-version=1</code></p></li><li class="listitem"><p>GCC 3.4, GCC 4.x: <code class="code">-fabi-version=2</code> <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 5 and higher: <code class="code">-fabi-version=0</code> <span class="emphasis"><em>(See GCC manual for meaning)</em></span></p></li></ul></div><p></p></li><li class="listitem"><p>Incremental bumping of a library pre-defined macro. For releases
+ </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GCC 3.0: (Error, not versioned) </p></li><li class="listitem"><p>GCC 3.1: (Error, not versioned) </p></li><li class="listitem"><p>GCC 3.2: <code class="code">-fabi-version=1</code></p></li><li class="listitem"><p>GCC 3.3: <code class="code">-fabi-version=1</code></p></li><li class="listitem"><p>GCC 3.4, GCC 4.x: <code class="code">-fabi-version=2</code> <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 5 and higher: <code class="code">-fabi-version=0</code> <span class="emphasis"><em>(See GCC manual for meaning)</em></span></p></li></ul></div><p></p></li><li class="listitem"><p><a id="abi.versioning.__GLIBCXX__"></a>Incremental bumping of a library pre-defined macro. For releases
before 3.4.0, the macro is <span class="symbol">__GLIBCPP__</span>. For later
releases, it's <span class="symbol">__GLIBCXX__</span>. (The libstdc++ project
generously changed from CPP to CXX throughout its source to allow the
implementations of the C library with varying tradeoffs of threadsafety
and efficiency. You, the programmer, are always required to take care
with multiple threads.
- </p><p>(As an example, the POSIX standard requires that C stdio FILE*
- operations are atomic. POSIX-conforming C libraries (e.g, on Solaris
- and GNU/Linux) have an internal mutex to serialize operations on
- FILE*s. However, you still need to not do stupid things like calling
+ </p><p>(As an example, the POSIX standard requires that C stdio
+ <code class="code">FILE*</code> operations are atomic. POSIX-conforming C libraries
+ (e.g, on Solaris and GNU/Linux) have an internal mutex to serialize
+ operations on <code class="code">FILE*</code>s.
+ However, you still need to not do stupid things like calling
<code class="code">fclose(fs)</code> in one thread followed by an access of
<code class="code">fs</code> in another.)
</p><p>So, if your platform's C library is threadsafe, then your
features, or provide versioning information for the API. Only
those macros listed below are offered for consideration by the
general public.
- </p><p>Below is the macro which users may check for library version
- information. </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="code">__GLIBCXX__</code></span></dt><dd><p>The current version of
- libstdc++ in compressed ISO date format, as an unsigned
- long. For details on the value of this particular macro for a
- particular release, please consult the <a class="link" href="abi.html" title="ABI Policy and Guidelines">
- ABI Policy and Guidelines</a> appendix.
- </p></dd></dl></div><p>Below are the macros which users may change with #define/#undef or
+ </p><p>Below are the macros which users may check for library version
+ information. </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="code">_GLIBCXX_RELEASE</code></span></dt><dd><p>The major release number for libstdc++. This macro is defined
+ to the GCC major version that the libstdc++ headers belong to,
+ as an integer constant.
+ When compiling with GCC it has the same value as GCC's pre-defined
+ macro <span class="symbol">__GNUC__</span>.
+ This macro can be used when libstdc++ is used with a non-GNU
+ compiler where <span class="symbol">__GNUC__</span> is not defined, or has a
+ different value that doesn't correspond to the libstdc++ version.
+ This macro first appeared in the GCC 7.1 release and is not defined
+ for GCC 6.x or older releases.
+ </p></dd><dt><span class="term"><code class="code">__GLIBCXX__</code></span></dt><dd><p>The revision date of the libstdc++ source code,
+ in compressed ISO date format, as an unsigned
+ long. For notes about using this macro and details on the value of
+ this macro for a particular release, please consult the
+ <a class="link" href="abi.html#abi.versioning.__GLIBCXX__">ABI History</a>
+ appendix.
+ </p></dd></dl></div><p>Below are the macros which users may change with #define/#undef or
with -D/-U compiler flags. The default state of the symbol is
listed.</p><p><span class="quote">“<span class="quote">Configurable</span>”</span> (or <span class="quote">“<span class="quote">Not configurable</span>”</span>) means
that the symbol is initially chosen (or not) based on
<para/>
</listitem>
- <listitem>
+ <listitem xml:id="abi.versioning.__GLIBCXX__">
<para>Incremental bumping of a library pre-defined macro. For releases
before 3.4.0, the macro is <symbol>__GLIBCPP__</symbol>. For later
releases, it's <symbol>__GLIBCXX__</symbol>. (The libstdc++ project
general public.
</para>
- <para>Below is the macro which users may check for library version
+ <para>Below are the macros which users may check for library version
information. </para>
<variablelist>
+ <varlistentry>
+ <term><code>_GLIBCXX_RELEASE</code></term>
+ <listitem>
+ <para>The major release number for libstdc++. This macro is defined
+ to the GCC major version that the libstdc++ headers belong to,
+ as an integer constant.
+ When compiling with GCC it has the same value as GCC's pre-defined
+ macro <symbol>__GNUC__</symbol>.
+ This macro can be used when libstdc++ is used with a non-GNU
+ compiler where <symbol>__GNUC__</symbol> is not defined, or has a
+ different value that doesn't correspond to the libstdc++ version.
+ This macro first appeared in the GCC 7.1 release and is not defined
+ for GCC 6.x or older releases.
+ </para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term><code>__GLIBCXX__</code></term>
<listitem>
- <para>The current version of
- libstdc++ in compressed ISO date format, as an unsigned
- long. For details on the value of this particular macro for a
- particular release, please consult the <link linkend="appendix.porting.abi">
- ABI Policy and Guidelines</link> appendix.
- </para>
- </listitem>
+ <para>The revision date of the libstdc++ source code,
+ in compressed ISO date format, as an unsigned
+ long. For notes about using this macro and details on the value of
+ this macro for a particular release, please consult the
+ <link linkend="abi.versioning.__GLIBCXX__">ABI History</link>
+ appendix.
+ </para>
+ </listitem>
</varlistentry>
</variablelist>
and efficiency. You, the programmer, are always required to take care
with multiple threads.
</para>
- <para>(As an example, the POSIX standard requires that C stdio FILE*
- operations are atomic. POSIX-conforming C libraries (e.g, on Solaris
- and GNU/Linux) have an internal mutex to serialize operations on
- FILE*s. However, you still need to not do stupid things like calling
+ <para>(As an example, the POSIX standard requires that C stdio
+ <code>FILE*</code> operations are atomic. POSIX-conforming C libraries
+ (e.g, on Solaris and GNU/Linux) have an internal mutex to serialize
+ operations on <code>FILE*</code>s.
+ However, you still need to not do stupid things like calling
<code>fclose(fs)</code> in one thread followed by an access of
<code>fs</code> in another.)
</para>