xref: /netbsd-src/external/gpl3/gcc.old/dist/libstdc++-v3/doc/html/manual/backwards.html (revision c0a68be459da21030695f60d10265c2fc49758f8)
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Backwards Compatibility</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><meta name="keywords" content="ISO C++, backwards" /><meta name="keywords" content="ISO C++, library" /><meta name="keywords" content="ISO C++, runtime, library" /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance" /><link rel="prev" href="api.html" title="API Evolution and Deprecation History" /><link rel="next" href="appendix_free.html" title="Appendix C.  Free Software Needs Free Documentation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Backwards Compatibility</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><th width="60%" align="center">Appendix B. 
3  Porting and Maintenance
4
5</th><td width="20%" align="right"> <a accesskey="n" href="appendix_free.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.appendix.porting.backwards"></a>Backwards Compatibility</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.first"></a>First</h3></div></div></div><p>The first generation GNU C++ library was called libg++.  It was a
6separate GNU project, although reliably paired with GCC. Rumors imply
7that it had a working relationship with at least two kinds of
8dinosaur.
9</p><p>Some background: libg++ was designed and created when there was no
10ISO standard to provide guidance.  Classes like linked lists are now
11provided for by <code class="classname">list&lt;T&gt;</code> and do not need to be
12created by <code class="function">genclass</code>.  (For that matter, templates exist
13now and are well-supported, whereas genclass (mostly) predates them.)
14</p><p>There are other classes in libg++ that are not specified in the
15ISO Standard (e.g., statistical analysis).  While there are a lot of
16really useful things that are used by a lot of people, the Standards
17Committee couldn't include everything, and so a lot of those
18<span class="quote">“<span class="quote">obvious</span>”</span> classes didn't get included.
19</p><p>Known Issues include many of the limitations of its immediate ancestor.</p><p>Portability notes and known implementation limitations are as follows.</p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.first.ios_base"></a>No <code class="code">ios_base</code></h4></div></div></div><p> At least some older implementations don't have <code class="code">std::ios_base</code>, so you should use <code class="code">std::ios::badbit</code>, <code class="code">std::ios::failbit</code> and <code class="code">std::ios::eofbit</code> and <code class="code">std::ios::goodbit</code>.
20</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.first.cout_cin"></a>No <code class="code">cout</code> in <code class="filename">&lt;ostream.h&gt;</code>, no <code class="code">cin</code> in <code class="filename">&lt;istream.h&gt;</code></h4></div></div></div><p>
21	In earlier versions of the standard,
22	<code class="filename">&lt;fstream.h&gt;</code>,
23	<code class="filename">&lt;ostream.h&gt;</code>
24	and <code class="filename">&lt;istream.h&gt;</code>
25	used to define
26	<code class="code">cout</code>, <code class="code">cin</code> and so on. ISO C++ specifies that one needs to include
27	<code class="filename">&lt;iostream&gt;</code>
28	explicitly to get the required definitions.
29 </p><p> Some include adjustment may be required.</p><p>This project is no longer maintained or supported, and the sources
30archived. For the desperate,
31the <a class="link" href="http://gcc.gnu.org/extensions.html" target="_top">GCC extensions
32page</a> describes where to find the last libg++ source. The code is
33considered replaced and rewritten.
34</p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.second"></a>Second</h3></div></div></div><p>
35  The second generation GNU C++ library was called libstdc++, or
36  libstdc++-v2. It spans the time between libg++ and pre-ISO C++
37  standardization and is usually associated with the following GCC
38  releases: egcs 1.x, gcc 2.95, and gcc 2.96.
39</p><p>
40  The STL portions of this library are based on SGI/HP STL release 3.11.
41</p><p>
42  This project is no longer maintained or supported, and the sources
43  archived.  The code is considered replaced and rewritten.
44</p><p>
45  Portability notes and known implementation limitations are as follows.
46</p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.std"></a>Namespace <code class="code">std::</code> not supported</h4></div></div></div><p>
47    Some care is required to support C++ compiler and or library
48    implementation that do not have the standard library in
49    <code class="code">namespace std</code>.
50  </p><p>
51    The following sections list some possible solutions to support compilers
52    that cannot ignore <code class="code">std::</code>-qualified names.
53  </p><p>
54    First, see if the compiler has a flag for this. Namespace
55    back-portability-issues are generally not a problem for g++
56    compilers that do not have libstdc++ in <code class="code">std::</code>, as the
57    compilers use <code class="option">-fno-honor-std</code> (ignore
58    <code class="code">std::</code>, <code class="code">:: = std::</code>) by default. That is,
59    the responsibility for enabling or disabling <code class="code">std::</code> is
60    on the user; the maintainer does not have to care about it. This
61    probably applies to some other compilers as well.
62  </p><p>
63    Second, experiment with a variety of pre-processor tricks.
64  </p><p>
65    By defining <code class="code">std</code> as a macro, fully-qualified namespace
66    calls become global. Volia.
67  </p><pre class="programlisting">
68#ifdef WICKEDLY_OLD_COMPILER
69# define std
70#endif
71</pre><p>
72    Thanks to Juergen Heinzl who posted this solution on gnu.gcc.help.
73  </p><p>
74    Another pre-processor based approach is to define a macro
75    <code class="code">NAMESPACE_STD</code>, which is defined to either
76    <span class="quote">“<span class="quote"> </span>”</span> or <span class="quote">“<span class="quote">std</span>”</span> based on a compile-type
77    test. On GNU systems, this can be done with autotools by means of
78    an autoconf test (see below) for <code class="code">HAVE_NAMESPACE_STD</code>,
79    then using that to set a value for the <code class="code">NAMESPACE_STD</code>
80    macro.  At that point, one is able to use
81    <code class="code">NAMESPACE_STD::string</code>, which will evaluate to
82    <code class="code">std::string</code> or <code class="code">::string</code> (i.e., in the
83    global namespace on systems that do not put <code class="code">string</code> in
84    <code class="code">std::</code>).
85  </p><pre class="programlisting">
86dnl @synopsis AC_CXX_NAMESPACE_STD
87dnl
88dnl If the compiler supports namespace std, define
89dnl HAVE_NAMESPACE_STD.
90dnl
91dnl @category Cxx
92dnl @author Todd Veldhuizen
93dnl @author Luc Maisonobe &lt;luc@spaceroots.org&gt;
94dnl @version 2004-02-04
95dnl @license AllPermissive
96AC_DEFUN([AC_CXX_NAMESPACE_STD], [
97  AC_CACHE_CHECK(if g++ supports namespace std,
98  ac_cv_cxx_have_std_namespace,
99  [AC_LANG_SAVE
100  AC_LANG_CPLUSPLUS
101  AC_TRY_COMPILE([#include &lt;iostream&gt;
102		  std::istream&amp; is = std::cin;],,
103  ac_cv_cxx_have_std_namespace=yes, ac_cv_cxx_have_std_namespace=no)
104  AC_LANG_RESTORE
105  ])
106  if test "$ac_cv_cxx_have_std_namespace" = yes; then
107    AC_DEFINE(HAVE_NAMESPACE_STD,,[Define if g++ supports namespace std. ])
108  fi
109])
110</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.iterators"></a>Illegal iterator usage</h4></div></div></div><p>
111  The following illustrate implementation-allowed illegal iterator
112  use, and then correct use.
113</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
114      you cannot do <code class="code">ostream::operator&lt;&lt;(iterator)</code>
115      to print the address of the iterator =&gt; use
116      <code class="code">operator&lt;&lt; &amp;*iterator</code> instead
117    </p></li><li class="listitem"><p>
118      you cannot clear an iterator's reference (<code class="code">iterator =
119      0</code>) =&gt; use <code class="code">iterator = iterator_type();</code>
120    </p></li><li class="listitem"><p>
121      <code class="code">if (iterator)</code> won't work any more =&gt; use
122      <code class="code">if (iterator != iterator_type())</code>
123    </p></li></ul></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.isspace"></a><code class="code">isspace</code> from <code class="filename">&lt;cctype&gt;</code> is a macro
124  </h4></div></div></div><p>
125    Glibc 2.0.x and 2.1.x define <code class="filename">&lt;ctype.h&gt;</code> functionality as macros
126    (isspace, isalpha etc.).
127  </p><p>
128    This implementations of libstdc++, however, keep these functions
129    as macros, and so it is not back-portable to use fully qualified
130    names. For example:
131  </p><pre class="programlisting">
132#include &lt;cctype&gt;
133int main() { std::isspace('X'); }
134</pre><p>
135  Results in something like this:
136</p><pre class="programlisting">
137std:: (__ctype_b[(int) ( ( 'X' ) )] &amp; (unsigned short int) _ISspace ) ;
138</pre><p>
139  A solution is to modify a header-file so that the compiler tells
140  <code class="filename">&lt;ctype.h&gt;</code> to define functions
141  instead of macros:
142</p><pre class="programlisting">
143// This keeps isalnum, et al from being propagated as macros.
144#if __linux__
145# define __NO_CTYPE 1
146#endif
147</pre><p>
148  Then, include <code class="filename">&lt;ctype.h&gt;</code>
149</p><p>
150  Another problem arises if you put a <code class="code">using namespace
151  std;</code> declaration at the top, and include
152  <code class="filename">&lt;ctype.h&gt;</code>. This will
153  result in ambiguities between the definitions in the global namespace
154  (<code class="filename">&lt;ctype.h&gt;</code>) and the
155  definitions in namespace <code class="code">std::</code>
156  (<code class="code">&lt;cctype&gt;</code>).
157</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.at"></a>No <code class="code">vector::at</code>, <code class="code">deque::at</code>, <code class="code">string::at</code></h4></div></div></div><p>
158  One solution is to add an autoconf-test for this:
159</p><pre class="programlisting">
160AC_MSG_CHECKING(for container::at)
161AC_TRY_COMPILE(
162[
163#include &lt;vector&gt;
164#include &lt;deque&gt;
165#include &lt;string&gt;
166
167using namespace std;
168],
169[
170deque&lt;int&gt; test_deque(3);
171test_deque.at(2);
172vector&lt;int&gt; test_vector(2);
173test_vector.at(1);
174string test_string(<span class="quote">“<span class="quote">test_string</span>”</span>);
175test_string.at(3);
176],
177[AC_MSG_RESULT(yes)
178AC_DEFINE(HAVE_CONTAINER_AT)],
179[AC_MSG_RESULT(no)])
180</pre><p>
181  If you are using other (non-GNU) compilers it might be a good idea
182  to check for <code class="code">string::at</code> separately.
183</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.eof"></a>No <code class="code">std::char_traits&lt;char&gt;::eof</code></h4></div></div></div><p>
184  Use some kind of autoconf test, plus this:
185</p><pre class="programlisting">
186#ifdef HAVE_CHAR_TRAITS
187#define CPP_EOF std::char_traits&lt;char&gt;::eof()
188#else
189#define CPP_EOF EOF
190#endif
191</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.stringclear"></a>No <code class="code">string::clear</code></h4></div></div></div><p>
192  There are two functions for deleting the contents of a string:
193  <code class="code">clear</code> and <code class="code">erase</code> (the latter returns the
194  string).
195</p><pre class="programlisting">
196void
197clear() { _M_mutate(0, this-&gt;size(), 0); }
198</pre><pre class="programlisting">
199basic_string&amp;
200erase(size_type __pos = 0, size_type __n = npos)
201{
202  return this-&gt;replace(_M_check(__pos), _M_fold(__pos, __n),
203			  _M_data(), _M_data());
204}
205</pre><p>
206  Unfortunately, <code class="code">clear</code> is not implemented in this
207  version, so you should use <code class="code">erase</code> (which is probably
208  faster than <code class="code">operator=(charT*)</code>).
209</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.ostreamform_istreamscan"></a>
210  Removal of <code class="code">ostream::form</code> and <code class="code">istream::scan</code>
211  extensions
212</h4></div></div></div><p>
213  These are no longer supported. Please use stringstreams instead.
214</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.stringstreams"></a>No <code class="code">basic_stringbuf</code>, <code class="code">basic_stringstream</code></h4></div></div></div><p>
215  Although the ISO standard <code class="code">i/ostringstream</code>-classes are
216  provided, (<code class="filename">&lt;sstream&gt;</code>), for
217  compatibility with older implementations the pre-ISO
218  <code class="code">i/ostrstream</code> (<code class="filename">&lt;strstream&gt;</code>) interface is also provided,
219  with these caveats:
220</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
221      <code class="code">strstream</code> is considered to be deprecated
222    </p></li><li class="listitem"><p>
223      <code class="code">strstream</code> is limited to <code class="code">char</code>
224    </p></li><li class="listitem"><p>
225      with <code class="code">ostringstream</code> you don't have to take care of
226      terminating the string or freeing its memory
227    </p></li><li class="listitem"><p>
228      <code class="code">istringstream</code> can be re-filled (clear();
229      str(input);)
230    </p></li></ul></div><p>
231  You can then use output-stringstreams like this:
232</p><pre class="programlisting">
233#ifdef HAVE_SSTREAM
234# include &lt;sstream&gt;
235#else
236# include &lt;strstream&gt;
237#endif
238
239#ifdef HAVE_SSTREAM
240  std::ostringstream oss;
241#else
242  std::ostrstream oss;
243#endif
244
245oss &lt;&lt; "Name=" &lt;&lt; m_name &lt;&lt; ", number=" &lt;&lt; m_number &lt;&lt; std::endl;
246...
247#ifndef HAVE_SSTREAM
248  oss &lt;&lt; std::ends; // terminate the char*-string
249#endif
250
251// str() returns char* for ostrstream and a string for ostringstream
252// this also causes ostrstream to think that the buffer's memory
253// is yours
254m_label.set_text(oss.str());
255#ifndef HAVE_SSTREAM
256  // let the ostrstream take care of freeing the memory
257  oss.freeze(false);
258#endif
259</pre><p>
260      Input-stringstreams can be used similarly:
261</p><pre class="programlisting">
262std::string input;
263...
264#ifdef HAVE_SSTREAM
265std::istringstream iss(input);
266#else
267std::istrstream iss(input.c_str());
268#endif
269
270int i;
271iss &gt;&gt; i;
272</pre><p> One (the only?) restriction is that an istrstream cannot be re-filled:
273</p><pre class="programlisting">
274std::istringstream iss(numerator);
275iss &gt;&gt; m_num;
276// this is not possible with istrstream
277iss.clear();
278iss.str(denominator);
279iss &gt;&gt; m_den;
280</pre><p>
281If you don't care about speed, you can put these conversions in
282      a template-function:
283</p><pre class="programlisting">
284template &lt;class X&gt;
285void fromString(const string&amp; input, X&amp; any)
286{
287#ifdef HAVE_SSTREAM
288std::istringstream iss(input);
289#else
290std::istrstream iss(input.c_str());
291#endif
292X temp;
293iss &gt;&gt; temp;
294if (iss.fail())
295throw runtime_error(..)
296any = temp;
297}
298</pre><p>
299  Another example of using stringstreams is in <a class="link" href="strings.html#strings.string.shrink" title="Shrink to Fit">this howto</a>.
300</p><p> There is additional information in the libstdc++-v2 info files, in
301particular <span class="quote">“<span class="quote">info iostream</span>”</span>.
302</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.wchar"></a>Little or no wide character support</h4></div></div></div><p>
303    Classes <code class="classname">wstring</code> and
304    <code class="classname">char_traits&lt;wchar_t&gt;</code> are
305    not supported.
306  </p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.iostream_templates"></a>No templatized iostreams</h4></div></div></div><p>
307    Classes <code class="classname">wfilebuf</code> and
308    <code class="classname">wstringstream</code> are not supported.
309  </p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.thread_safety"></a>Thread safety issues</h4></div></div></div><p>
310    Earlier GCC releases had a somewhat different approach to
311    threading configuration and proper compilation.  Before GCC 3.0,
312    configuration of the threading model was dictated by compiler
313    command-line options and macros (both of which were somewhat
314    thread-implementation and port-specific).  There were no
315    guarantees related to being able to link code compiled with one
316    set of options and macro setting with another set.
317  </p><p>
318    For GCC 3.0, configuration of the threading model used with
319    libraries and user-code is performed when GCC is configured and
320    built using the --enable-threads and --disable-threads options.
321    The ABI is stable for symbol name-mangling and limited functional
322    compatibility exists between code compiled under different
323    threading models.
324  </p><p>
325     The libstdc++ library has been designed so that it can be used in
326     multithreaded applications (with libstdc++-v2 this was only true
327     of the STL parts.)  The first problem is finding a
328     <span class="emphasis"><em>fast</em></span> method of implementation portable to
329     all platforms.  Due to historical reasons, some of the library is
330     written against per-CPU-architecture spinlocks and other parts
331     against the gthr.h abstraction layer which is provided by gcc.  A
332     minor problem that pops up every so often is different
333     interpretations of what "thread-safe" means for a
334     library (not a general program).  We currently use the <a class="link" href="https://web.archive.org/web/20171225062613/http://www.sgi.com/tech/stl/thread_safety.html" target="_top">same
335     definition that SGI</a> uses for their STL subset.  However,
336     the exception for read-only containers only applies to the STL
337     components. This definition is widely-used and something similar
338     will be used in the next version of the C++ standard library.
339   </p><p>
340     Here is a small link farm to threads (no pun) in the mail
341     archives that discuss the threading problem.  Each link is to the
342     first relevant message in the thread; from there you can use
343     "Thread Next" to move down the thread.  This farm is in
344     latest-to-oldest order.
345   </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
346	    Our threading expert Loren gives a breakdown of <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2001-10/msg00024.html" target="_top">the
347	    six situations involving threads</a> for the 3.0
348	    release series.
349	  </p></li><li class="listitem"><p>
350	    <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2001-05/msg00384.html" target="_top">
351	This message</a> inspired a recent updating of issues with
352	threading and the SGI STL library.  It also contains some
353	example POSIX-multithreaded STL code.
354	  </p></li></ul></div><p>
355     (A large selection of links to older messages has been removed;
356     many of the messages from 1999 were lost in a disk crash, and the
357     few people with access to the backup tapes have been too swamped
358     with work to restore them.  Many of the points have been
359     superseded anyhow.)
360   </p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.third"></a>Third</h3></div></div></div><p> The third generation GNU C++ library is called libstdc++, or
361libstdc++-v3.
362</p><p>The subset commonly known as the Standard Template Library
363	 (clauses 23 through 25, mostly) is adapted from the final release
364	 of the SGI STL (version 3.3), with extensive changes.
365      </p><p>A more formal description of the V3 goals can be found in the
366	 official <a class="link" href="source_design_notes.html" title="Design Notes">design document</a>.
367      </p><p>Portability notes and known implementation limitations are as follows.</p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.third.headers"></a>Pre-ISO headers removed</h4></div></div></div><p> The pre-ISO C++ headers
368      (<code class="filename">&lt;iostream.h&gt;</code>,
369      <code class="filename">&lt;defalloc.h&gt;</code> etc.) are
370      not supported.
371</p><p>For those of you new to ISO C++ (welcome, time travelers!), the
372      ancient pre-ISO headers have new names.
373      The C++ FAQ has a good explanation in <a class="link" href="https://isocpp.org/wiki/faq/coding-standards#std-headers" target="_top">What's
374      the difference between &lt;xxx&gt; and &lt;xxx.h&gt; headers?</a>.
375   </p><p>Porting between pre-ISO headers and ISO headers is simple: headers
376like <code class="filename">&lt;vector.h&gt;</code> can be replaced with <code class="filename">&lt;vector&gt;</code> and a using
377directive <code class="code">using namespace std;</code> can be put at the global
378scope. This should be enough to get this code compiling, assuming the
379other usage is correct.
380</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.third.hash"></a>Extension headers hash_map, hash_set moved to ext or backwards</h4></div></div></div><p>At this time most of the features of the SGI STL extension have been
381	 replaced by standardized libraries.
382	 In particular, the <code class="classname">unordered_map</code> and
383	 <code class="classname">unordered_set</code> containers of TR1 and C++ 2011
384	 are suitable replacements for the non-standard
385	 <code class="classname">hash_map</code> and <code class="classname">hash_set</code>
386	 containers in the SGI STL.
387      </p><p> Header files <code class="filename">&lt;hash_map&gt;</code> and <code class="filename">&lt;hash_set&gt;</code> moved
388to <code class="filename">&lt;ext/hash_map&gt;</code> and  <code class="filename">&lt;ext/hash_set&gt;</code>,
389respectively. At the same time, all types in these files are enclosed
390in <code class="code">namespace __gnu_cxx</code>. Later versions deprecate
391these files, and suggest using TR1's  <code class="filename">&lt;unordered_map&gt;</code>
392and  <code class="filename">&lt;unordered_set&gt;</code> instead.
393</p><p>The extensions are no longer in the global or <code class="code">std</code>
394	 namespaces, instead they are declared in the <code class="code">__gnu_cxx</code>
395	 namespace. For maximum portability, consider defining a namespace
396	 alias to use to talk about extensions, e.g.:
397      </p><pre class="programlisting">
398      #ifdef __GNUC__
399      #if __GNUC__ &lt; 3
400	#include &lt;hash_map.h&gt;
401	namespace extension { using ::hash_map; }; // inherit globals
402      #else
403	#include &lt;backward/hash_map&gt;
404	#if __GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ == 0
405	  namespace extension = std;               // GCC 3.0
406	#else
407	  namespace extension = ::__gnu_cxx;       // GCC 3.1 and later
408	#endif
409      #endif
410      #else      // ...  there are other compilers, right?
411	namespace extension = std;
412      #endif
413
414      extension::hash_map&lt;int,int&gt; my_map;
415      </pre><p>This is a bit cleaner than defining typedefs for all the
416	 instantiations you might need.
417      </p><p>The following autoconf tests check for working HP/SGI hash containers.
418</p><pre class="programlisting">
419# AC_HEADER_EXT_HASH_MAP
420AC_DEFUN([AC_HEADER_EXT_HASH_MAP], [
421  AC_CACHE_CHECK(for ext/hash_map,
422  ac_cv_cxx_ext_hash_map,
423  [AC_LANG_SAVE
424  AC_LANG_CPLUSPLUS
425  ac_save_CXXFLAGS="$CXXFLAGS"
426  CXXFLAGS="$CXXFLAGS -Werror"
427  AC_TRY_COMPILE([#include &lt;ext/hash_map&gt;], [using __gnu_cxx::hash_map;],
428  ac_cv_cxx_ext_hash_map=yes, ac_cv_cxx_ext_hash_map=no)
429  CXXFLAGS="$ac_save_CXXFLAGS"
430  AC_LANG_RESTORE
431  ])
432  if test "$ac_cv_cxx_ext_hash_map" = yes; then
433    AC_DEFINE(HAVE_EXT_HASH_MAP,,[Define if ext/hash_map is present. ])
434  fi
435])
436</pre><pre class="programlisting">
437# AC_HEADER_EXT_HASH_SET
438AC_DEFUN([AC_HEADER_EXT_HASH_SET], [
439  AC_CACHE_CHECK(for ext/hash_set,
440  ac_cv_cxx_ext_hash_set,
441  [AC_LANG_SAVE
442  AC_LANG_CPLUSPLUS
443  ac_save_CXXFLAGS="$CXXFLAGS"
444  CXXFLAGS="$CXXFLAGS -Werror"
445  AC_TRY_COMPILE([#include &lt;ext/hash_set&gt;], [using __gnu_cxx::hash_set;],
446  ac_cv_cxx_ext_hash_set=yes, ac_cv_cxx_ext_hash_set=no)
447  CXXFLAGS="$ac_save_CXXFLAGS"
448  AC_LANG_RESTORE
449  ])
450  if test "$ac_cv_cxx_ext_hash_set" = yes; then
451    AC_DEFINE(HAVE_EXT_HASH_SET,,[Define if ext/hash_set is present. ])
452  fi
453])
454</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.third.nocreate_noreplace"></a>No <code class="code">ios::nocreate/ios::noreplace</code>.
455</h4></div></div></div><p>Historically these flags were used with iostreams to control whether
456new files are created or not when opening a file stream, similar to the
457<code class="code">O_CREAT</code> and <code class="code">O_EXCL</code> flags for the
458<code class="function">open(2)</code> system call. Because iostream modes correspond
459to <code class="function">fopen(3)</code> modes these flags are not supported.
460For input streams a new file will not be created anyway, so
461<code class="code">ios::nocreate</code> is not needed.
462For output streams, a new file will be created if it does not exist, which is
463consistent with the behaviour of <code class="function">fopen</code>.
464</p><p>When one of these flags is needed a possible alternative is to attempt
465to open the file using <span class="type">std::ifstream</span> first to determine whether
466the file already exists or not. This may not be reliable however, because
467whether the file exists or not could change between opening the
468<span class="type">std::istream</span> and re-opening with an output stream. If you need
469to check for existence and open a file as a single operation then you will
470need to use OS-specific facilities outside the C++ standard library, such
471as <code class="function">open(2)</code>.
472</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.third.streamattach"></a>
473No <code class="code">stream::attach(int fd)</code>
474</h4></div></div></div><p>
475      Phil Edwards writes: It was considered and rejected for the ISO
476      standard.  Not all environments use file descriptors.  Of those
477      that do, not all of them use integers to represent them.
478    </p><p>
479      For a portable solution (among systems which use
480      file descriptors), you need to implement a subclass of
481      <code class="code">std::streambuf</code> (or
482      <code class="code">std::basic_streambuf&lt;..&gt;</code>) which opens a file
483      given a descriptor, and then pass an instance of this to the
484      stream-constructor.
485    </p><p>
486      An extension is available that implements this.
487      <code class="filename">&lt;ext/stdio_filebuf.h&gt;</code>
488      contains a derived class called
489      <code class="classname">__gnu_cxx::stdio_filebuf</code>.
490      This class can be constructed from a C <code class="code">FILE*</code> or a file
491      descriptor, and provides the <code class="code">fd()</code> function.
492    </p><p>
493 For another example of this, refer to
494      <a class="link" href="http://www.josuttis.com/cppcode/fdstream.html" target="_top">fdstream example</a>
495      by Nicolai Josuttis.
496</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.third.support_cxx98"></a>
497Support for C++98 dialect.
498</h4></div></div></div><p>Check for complete library coverage of the C++1998/2003 standard.
499</p><pre class="programlisting">
500# AC_HEADER_STDCXX_98
501AC_DEFUN([AC_HEADER_STDCXX_98], [
502  AC_CACHE_CHECK(for ISO C++ 98 include files,
503  ac_cv_cxx_stdcxx_98,
504  [AC_LANG_SAVE
505  AC_LANG_CPLUSPLUS
506  AC_TRY_COMPILE([
507    #include &lt;cassert&gt;
508    #include &lt;cctype&gt;
509    #include &lt;cerrno&gt;
510    #include &lt;cfloat&gt;
511    #include &lt;ciso646&gt;
512    #include &lt;climits&gt;
513    #include &lt;clocale&gt;
514    #include &lt;cmath&gt;
515    #include &lt;csetjmp&gt;
516    #include &lt;csignal&gt;
517    #include &lt;cstdarg&gt;
518    #include &lt;cstddef&gt;
519    #include &lt;cstdio&gt;
520    #include &lt;cstdlib&gt;
521    #include &lt;cstring&gt;
522    #include &lt;ctime&gt;
523
524    #include &lt;algorithm&gt;
525    #include &lt;bitset&gt;
526    #include &lt;complex&gt;
527    #include &lt;deque&gt;
528    #include &lt;exception&gt;
529    #include &lt;fstream&gt;
530    #include &lt;functional&gt;
531    #include &lt;iomanip&gt;
532    #include &lt;ios&gt;
533    #include &lt;iosfwd&gt;
534    #include &lt;iostream&gt;
535    #include &lt;istream&gt;
536    #include &lt;iterator&gt;
537    #include &lt;limits&gt;
538    #include &lt;list&gt;
539    #include &lt;locale&gt;
540    #include &lt;map&gt;
541    #include &lt;memory&gt;
542    #include &lt;new&gt;
543    #include &lt;numeric&gt;
544    #include &lt;ostream&gt;
545    #include &lt;queue&gt;
546    #include &lt;set&gt;
547    #include &lt;sstream&gt;
548    #include &lt;stack&gt;
549    #include &lt;stdexcept&gt;
550    #include &lt;streambuf&gt;
551    #include &lt;string&gt;
552    #include &lt;typeinfo&gt;
553    #include &lt;utility&gt;
554    #include &lt;valarray&gt;
555    #include &lt;vector&gt;
556  ],,
557  ac_cv_cxx_stdcxx_98=yes, ac_cv_cxx_stdcxx_98=no)
558  AC_LANG_RESTORE
559  ])
560  if test "$ac_cv_cxx_stdcxx_98" = yes; then
561    AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ])
562  fi
563])
564</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.third.support_tr1"></a>
565Support for C++TR1 dialect.
566</h4></div></div></div><p>Check for library coverage of the TR1 standard.
567</p><pre class="programlisting">
568# AC_HEADER_STDCXX_TR1
569AC_DEFUN([AC_HEADER_STDCXX_TR1], [
570  AC_CACHE_CHECK(for ISO C++ TR1 include files,
571  ac_cv_cxx_stdcxx_tr1,
572  [AC_LANG_SAVE
573  AC_LANG_CPLUSPLUS
574  AC_TRY_COMPILE([
575  #include &lt;tr1/array&gt;
576  #include &lt;tr1/ccomplex&gt;
577  #include &lt;tr1/cctype&gt;
578  #include &lt;tr1/cfenv&gt;
579  #include &lt;tr1/cfloat&gt;
580  #include &lt;tr1/cinttypes&gt;
581  #include &lt;tr1/climits&gt;
582  #include &lt;tr1/cmath&gt;
583  #include &lt;tr1/complex&gt;
584  #include &lt;tr1/cstdarg&gt;
585  #include &lt;tr1/cstdbool&gt;
586  #include &lt;tr1/cstdint&gt;
587  #include &lt;tr1/cstdio&gt;
588  #include &lt;tr1/cstdlib&gt;
589  #include &lt;tr1/ctgmath&gt;
590  #include &lt;tr1/ctime&gt;
591  #include &lt;tr1/cwchar&gt;
592  #include &lt;tr1/cwctype&gt;
593  #include &lt;tr1/functional&gt;
594  #include &lt;tr1/memory&gt;
595  #include &lt;tr1/random&gt;
596  #include &lt;tr1/regex&gt;
597  #include &lt;tr1/tuple&gt;
598  #include &lt;tr1/type_traits&gt;
599  #include &lt;tr1/unordered_set&gt;
600  #include &lt;tr1/unordered_map&gt;
601  #include &lt;tr1/utility&gt;
602  ],,
603  ac_cv_cxx_stdcxx_tr1=yes, ac_cv_cxx_stdcxx_tr1=no)
604  AC_LANG_RESTORE
605  ])
606  if test "$ac_cv_cxx_stdcxx_tr1" = yes; then
607    AC_DEFINE(STDCXX_TR1_HEADERS,,[Define if ISO C++ TR1 header files are present. ])
608  fi
609])
610</pre><p>An alternative is to check just for specific TR1 includes, such as &lt;unordered_map&gt; and &lt;unordered_set&gt;.
611</p><pre class="programlisting">
612# AC_HEADER_TR1_UNORDERED_MAP
613AC_DEFUN([AC_HEADER_TR1_UNORDERED_MAP], [
614  AC_CACHE_CHECK(for tr1/unordered_map,
615  ac_cv_cxx_tr1_unordered_map,
616  [AC_LANG_SAVE
617  AC_LANG_CPLUSPLUS
618  AC_TRY_COMPILE([#include &lt;tr1/unordered_map&gt;], [using std::tr1::unordered_map;],
619  ac_cv_cxx_tr1_unordered_map=yes, ac_cv_cxx_tr1_unordered_map=no)
620  AC_LANG_RESTORE
621  ])
622  if test "$ac_cv_cxx_tr1_unordered_map" = yes; then
623    AC_DEFINE(HAVE_TR1_UNORDERED_MAP,,[Define if tr1/unordered_map is present. ])
624  fi
625])
626</pre><pre class="programlisting">
627# AC_HEADER_TR1_UNORDERED_SET
628AC_DEFUN([AC_HEADER_TR1_UNORDERED_SET], [
629  AC_CACHE_CHECK(for tr1/unordered_set,
630  ac_cv_cxx_tr1_unordered_set,
631  [AC_LANG_SAVE
632  AC_LANG_CPLUSPLUS
633  AC_TRY_COMPILE([#include &lt;tr1/unordered_set&gt;], [using std::tr1::unordered_set;],
634  ac_cv_cxx_tr1_unordered_set=yes, ac_cv_cxx_tr1_unordered_set=no)
635  AC_LANG_RESTORE
636  ])
637  if test "$ac_cv_cxx_tr1_unordered_set" = yes; then
638    AC_DEFINE(HAVE_TR1_UNORDERED_SET,,[Define if tr1/unordered_set is present. ])
639  fi
640])
641</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.third.support_cxx11"></a>
642Support for C++11 dialect.
643</h4></div></div></div><p>Check for baseline language coverage in the compiler for the C++11 standard.
644</p><pre class="programlisting">
645# AC_COMPILE_STDCXX_11
646AC_DEFUN([AC_COMPILE_STDCXX_11], [
647  AC_CACHE_CHECK(if g++ supports C++11 features without additional flags,
648  ac_cv_cxx_compile_cxx11_native,
649  [AC_LANG_SAVE
650  AC_LANG_CPLUSPLUS
651  AC_TRY_COMPILE([
652  template &lt;typename T&gt;
653    struct check final
654    {
655      static constexpr T value{ __cplusplus };
656    };
657
658    typedef check&lt;check&lt;bool&gt;&gt; right_angle_brackets;
659
660    int a;
661    decltype(a) b;
662
663    typedef check&lt;int&gt; check_type;
664    check_type c{};
665    check_type&amp;&amp; cr = static_cast&lt;check_type&amp;&amp;&gt;(c);
666
667    static_assert(check_type::value == 201103L, "C++11 compiler");],,
668  ac_cv_cxx_compile_cxx11_native=yes, ac_cv_cxx_compile_cxx11_native=no)
669  AC_LANG_RESTORE
670  ])
671
672  AC_CACHE_CHECK(if g++ supports C++11 features with -std=c++11,
673  ac_cv_cxx_compile_cxx11_cxx,
674  [AC_LANG_SAVE
675  AC_LANG_CPLUSPLUS
676  ac_save_CXXFLAGS="$CXXFLAGS"
677  CXXFLAGS="$CXXFLAGS -std=c++11"
678  AC_TRY_COMPILE([
679  template &lt;typename T&gt;
680    struct check final
681    {
682      static constexpr T value{ __cplusplus };
683    };
684
685    typedef check&lt;check&lt;bool&gt;&gt; right_angle_brackets;
686
687    int a;
688    decltype(a) b;
689
690    typedef check&lt;int&gt; check_type;
691    check_type c{};
692    check_type&amp;&amp; cr = static_cast&lt;check_type&amp;&amp;&gt;(c);
693
694    static_assert(check_type::value == 201103L, "C++11 compiler");],,
695  ac_cv_cxx_compile_cxx11_cxx=yes, ac_cv_cxx_compile_cxx11_cxx=no)
696  CXXFLAGS="$ac_save_CXXFLAGS"
697  AC_LANG_RESTORE
698  ])
699
700  AC_CACHE_CHECK(if g++ supports C++11 features with -std=gnu++11,
701  ac_cv_cxx_compile_cxx11_gxx,
702  [AC_LANG_SAVE
703  AC_LANG_CPLUSPLUS
704  ac_save_CXXFLAGS="$CXXFLAGS"
705  CXXFLAGS="$CXXFLAGS -std=gnu++11"
706  AC_TRY_COMPILE([
707  template &lt;typename T&gt;
708    struct check final
709    {
710      static constexpr T value{ __cplusplus };
711    };
712
713    typedef check&lt;check&lt;bool&gt;&gt; right_angle_brackets;
714
715    int a;
716    decltype(a) b;
717
718    typedef check&lt;int&gt; check_type;
719    check_type c{};
720    check_type&amp;&amp; cr = static_cast&lt;check_type&amp;&amp;&gt;(c);
721
722    static_assert(check_type::value == 201103L, "C++11 compiler");],,
723  ac_cv_cxx_compile_cxx11_gxx=yes, ac_cv_cxx_compile_cxx11_gxx=no)
724  CXXFLAGS="$ac_save_CXXFLAGS"
725  AC_LANG_RESTORE
726  ])
727
728  if test "$ac_cv_cxx_compile_cxx11_native" = yes ||
729     test "$ac_cv_cxx_compile_cxx11_cxx" = yes ||
730     test "$ac_cv_cxx_compile_cxx11_gxx" = yes; then
731    AC_DEFINE(HAVE_STDCXX_11,,[Define if g++ supports C++11 features. ])
732  fi
733])
734</pre><p>Check for library coverage of the C++2011 standard.
735  (Some library headers are commented out in this check, they are
736  not currently provided by libstdc++).
737</p><pre class="programlisting">
738# AC_HEADER_STDCXX_11
739AC_DEFUN([AC_HEADER_STDCXX_11], [
740  AC_CACHE_CHECK(for ISO C++11 include files,
741  ac_cv_cxx_stdcxx_11,
742  [AC_REQUIRE([AC_COMPILE_STDCXX_11])
743  AC_LANG_SAVE
744  AC_LANG_CPLUSPLUS
745  ac_save_CXXFLAGS="$CXXFLAGS"
746  CXXFLAGS="$CXXFLAGS -std=gnu++11"
747
748  AC_TRY_COMPILE([
749    #include &lt;cassert&gt;
750    #include &lt;ccomplex&gt;
751    #include &lt;cctype&gt;
752    #include &lt;cerrno&gt;
753    #include &lt;cfenv&gt;
754    #include &lt;cfloat&gt;
755    #include &lt;cinttypes&gt;
756    #include &lt;ciso646&gt;
757    #include &lt;climits&gt;
758    #include &lt;clocale&gt;
759    #include &lt;cmath&gt;
760    #include &lt;csetjmp&gt;
761    #include &lt;csignal&gt;
762    #include &lt;cstdalign&gt;
763    #include &lt;cstdarg&gt;
764    #include &lt;cstdbool&gt;
765    #include &lt;cstddef&gt;
766    #include &lt;cstdint&gt;
767    #include &lt;cstdio&gt;
768    #include &lt;cstdlib&gt;
769    #include &lt;cstring&gt;
770    #include &lt;ctgmath&gt;
771    #include &lt;ctime&gt;
772    // #include &lt;cuchar&gt;
773    #include &lt;cwchar&gt;
774    #include &lt;cwctype&gt;
775
776    #include &lt;algorithm&gt;
777    #include &lt;array&gt;
778    #include &lt;atomic&gt;
779    #include &lt;bitset&gt;
780    #include &lt;chrono&gt;
781    // #include &lt;codecvt&gt;
782    #include &lt;complex&gt;
783    #include &lt;condition_variable&gt;
784    #include &lt;deque&gt;
785    #include &lt;exception&gt;
786    #include &lt;forward_list&gt;
787    #include &lt;fstream&gt;
788    #include &lt;functional&gt;
789    #include &lt;future&gt;
790    #include &lt;initializer_list&gt;
791    #include &lt;iomanip&gt;
792    #include &lt;ios&gt;
793    #include &lt;iosfwd&gt;
794    #include &lt;iostream&gt;
795    #include &lt;istream&gt;
796    #include &lt;iterator&gt;
797    #include &lt;limits&gt;
798    #include &lt;list&gt;
799    #include &lt;locale&gt;
800    #include &lt;map&gt;
801    #include &lt;memory&gt;
802    #include &lt;mutex&gt;
803    #include &lt;new&gt;
804    #include &lt;numeric&gt;
805    #include &lt;ostream&gt;
806    #include &lt;queue&gt;
807    #include &lt;random&gt;
808    #include &lt;ratio&gt;
809    #include &lt;regex&gt;
810    #include &lt;scoped_allocator&gt;
811    #include &lt;set&gt;
812    #include &lt;sstream&gt;
813    #include &lt;stack&gt;
814    #include &lt;stdexcept&gt;
815    #include &lt;streambuf&gt;
816    #include &lt;string&gt;
817    #include &lt;system_error&gt;
818    #include &lt;thread&gt;
819    #include &lt;tuple&gt;
820    #include &lt;typeindex&gt;
821    #include &lt;typeinfo&gt;
822    #include &lt;type_traits&gt;
823    #include &lt;unordered_map&gt;
824    #include &lt;unordered_set&gt;
825    #include &lt;utility&gt;
826    #include &lt;valarray&gt;
827    #include &lt;vector&gt;
828  ],,
829  ac_cv_cxx_stdcxx_11=yes, ac_cv_cxx_stdcxx_11=no)
830  AC_LANG_RESTORE
831  CXXFLAGS="$ac_save_CXXFLAGS"
832  ])
833  if test "$ac_cv_cxx_stdcxx_11" = yes; then
834    AC_DEFINE(STDCXX_11_HEADERS,,[Define if ISO C++11 header files are present. ])
835  fi
836])
837</pre><p>As is the case for TR1 support, these autoconf macros can be made for a finer-grained, per-header-file check. For
838<code class="filename">&lt;unordered_map&gt;</code>
839</p><pre class="programlisting">
840# AC_HEADER_UNORDERED_MAP
841AC_DEFUN([AC_HEADER_UNORDERED_MAP], [
842  AC_CACHE_CHECK(for unordered_map,
843  ac_cv_cxx_unordered_map,
844  [AC_REQUIRE([AC_COMPILE_STDCXX_11])
845  AC_LANG_SAVE
846  AC_LANG_CPLUSPLUS
847  ac_save_CXXFLAGS="$CXXFLAGS"
848  CXXFLAGS="$CXXFLAGS -std=gnu++11"
849  AC_TRY_COMPILE([#include &lt;unordered_map&gt;], [using std::unordered_map;],
850  ac_cv_cxx_unordered_map=yes, ac_cv_cxx_unordered_map=no)
851  CXXFLAGS="$ac_save_CXXFLAGS"
852  AC_LANG_RESTORE
853  ])
854  if test "$ac_cv_cxx_unordered_map" = yes; then
855    AC_DEFINE(HAVE_UNORDERED_MAP,,[Define if unordered_map is present. ])
856  fi
857])
858</pre><pre class="programlisting">
859# AC_HEADER_UNORDERED_SET
860AC_DEFUN([AC_HEADER_UNORDERED_SET], [
861  AC_CACHE_CHECK(for unordered_set,
862  ac_cv_cxx_unordered_set,
863  [AC_REQUIRE([AC_COMPILE_STDCXX_11])
864  AC_LANG_SAVE
865  AC_LANG_CPLUSPLUS
866  ac_save_CXXFLAGS="$CXXFLAGS"
867  CXXFLAGS="$CXXFLAGS -std=gnu++11"
868  AC_TRY_COMPILE([#include &lt;unordered_set&gt;], [using std::unordered_set;],
869  ac_cv_cxx_unordered_set=yes, ac_cv_cxx_unordered_set=no)
870  CXXFLAGS="$ac_save_CXXFLAGS"
871  AC_LANG_RESTORE
872  ])
873  if test "$ac_cv_cxx_unordered_set" = yes; then
874    AC_DEFINE(HAVE_UNORDERED_SET,,[Define if unordered_set is present. ])
875  fi
876])
877</pre><p>
878  Some C++11 features first appeared in GCC 4.3 and could be enabled by
879  <code class="option">-std=c++0x</code> and <code class="option">-std=gnu++0x</code> for GCC
880  releases which pre-date the 2011 standard. Those C++11 features and GCC's
881  support for them were still changing until the 2011 standard was finished,
882  but the autoconf checks above could be extended to test for incomplete
883  C++11 support with <code class="option">-std=c++0x</code> and
884  <code class="option">-std=gnu++0x</code>.
885</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.third.iterator_type"></a>
886  <code class="code">Container::iterator_type</code> is not necessarily <code class="code">Container::value_type*</code>
887</h4></div></div></div><p>
888  This is a change in behavior from older versions. Now, most
889  <span class="type">iterator_type</span> typedefs in container classes are POD
890  objects, not <span class="type">value_type</span> pointers.
891</p></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id-1.3.6.3.8.5.2"></a><p><span class="title"><em>
892	<a class="link" href="http://www.kegel.com/gcc/gcc4.html" target="_top">
893      Migrating to GCC 4.1
894	</a>
895      </em>. </span><span class="author"><span class="firstname">Dan</span> <span class="surname">Kegel</span>. </span></p></div><div class="biblioentry"><a id="id-1.3.6.3.8.5.3"></a><p><span class="title"><em>
896	<a class="link" href="https://lists.debian.org/debian-gcc/2006/03/msg00405.html" target="_top">
897      Building the Whole Debian Archive with GCC 4.1: A Summary
898	</a>
899      </em>. </span><span class="author"><span class="firstname">Martin</span> <span class="surname">Michlmayr</span>. </span></p></div><div class="biblioentry"><a id="id-1.3.6.3.8.5.4"></a><p><span class="title"><em>
900	<a class="link" href="http://annwm.lbl.gov/~leggett/Atlas/gcc-3.2.html" target="_top">
901      Migration guide for GCC-3.2
902	</a>
903      </em>. </span></p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="appendix_free.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">API Evolution and Deprecation History </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix C. 
904  Free Software Needs Free Documentation
905
906</td></tr></table></div></body></html>