Commit 8a165db0 by Benjamin Kosnik Committed by Benjamin Kosnik

Convert documentation to DocBook.

2008-02-10  Benjamin Kosnik  <bkoz@redhat.com>

	Convert documentation to DocBook.
	* doc/Makefile.am (doc-doxygen-html): Changed to doc-html-doxygen.
	(doc-doxygen-man): Changed to doc-man-doxygen.
	(doc-performance): Changed to doc-html-performance.
	(doc-xml-doxygen): New.
	(doc-xml-single): New.
	(doc-xml-validate): New.
	(doc-html): New.
	(doc-html-single): New.
	(doc-fo): New.
	(doc-pdf): New.
	(doc-pdf-fop-xml): New.
	(doc-pdf-fop-fo): New.
	(doc-pdf-xmlto): New.
	(doc-pdf-xmlroff): New.
	(doc-pdf-prince): New.
	* doc/xml: New directory.
	* doc/xml/authors.xml: New.
	* doc/xml/images: New directory.
	* doc/xml/images/confdeps.png: Add.
	* doc/xml/images/confdeps.dot: Add.
	* doc/xml/faq.xml: New.
	* doc/xml/api.xml: New.
	* doc/xml/gnu: New directory.
	* doc/xml/gnu/gpl-3.0.xml: New.
	* doc/xml/gnu/fdl-1.2.xml: New.
	* doc/xml/gnu/gpl-2.0.xml: New.
	* doc/xml/manual: New directory.
	* doc/xml/manual/mt_allocator.xml: New.
	* doc/xml/manual/allocator.xml: New.
	* doc/xml/manual/ctype.xml: New.
	* doc/xml/manual/numerics.xml: New.
	* doc/xml/manual/codecvt.xml: New.
	* doc/xml/manual/concurrency.xml: New.
	* doc/xml/manual/backwards_compatibility.xml: New.
	* doc/xml/manual/intro.xml: New.
	* doc/xml/manual/shared_ptr.xml: New.
	* doc/xml/manual/abi.xml: New.
	* doc/xml/manual/status_cxxtr1.xml: New.
	* doc/xml/manual/auto_ptr.xml: New.
	* doc/xml/manual/build.xml: New.
	* doc/xml/manual/internals.xml: New.
	* doc/xml/manual/parallel_mode.xml: New.
	* doc/xml/manual/status_cxx1998.xml: New.
	* doc/xml/manual/containers.xml: New.
	* doc/xml/manual/io.xml: New.
	* doc/xml/manual/appendix_porting.xml: New.
	* doc/xml/manual/utilities.xml: New.
	* doc/xml/manual/bitmap_allocator.xml: New.
	* doc/xml/manual/support.xml: New.
	* doc/xml/manual/configure.xml: New.
	* doc/xml/manual/build_hacking.xml: New.
	* doc/xml/manual/evolution.xml: New.
	* doc/xml/manual/using.xml: New.
	* doc/xml/manual/debug.xml: New.
	* doc/xml/manual/localization.xml: New.
	* doc/xml/manual/strings.xml: New.
	* doc/xml/manual/debug_mode.xml: New.
	* doc/xml/manual/locale.xml: New.
	* doc/xml/manual/extensions.xml: New.
	* doc/xml/manual/appendix_contributing.xml: New.
	* doc/xml/manual/messages.xml: New.
	* doc/xml/manual/diagnostics.xml: New.
	* doc/xml/manual/appendix_free.xml: New.
	* doc/xml/manual/algorithms.xml: New.
	* doc/xml/manual/iterators.xml: New.
	* doc/xml/manual/spine.xml: New.
	* doc/xml/manual/test.xml: New.
	* doc/xml/manual/status_cxx200x.xml: New.
	* doc/xml/spine.xml: New.

	* doc/xml/book.txml: New. Template file.
	* doc/xml/chapter.txml: Same.
	* doc/xml/class.txml: Same.

	* doc/doxygen/guide.html: Removed, integrated into other docs.
	* doc/doxygen/user.cfg.in: Clean up XML generation.
	* doc/doxygen/run_doxygen: Move to..	
	* scripts/run_doxygen: ...here.
	
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.	
	* po/Makefile.in: Regenerate.
	* libmath/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.

From-SVN: r132226
parent 71a9ddca
2008-02-10 Benjamin Kosnik <bkoz@redhat.com>
Convert documentation to DocBook.
* doc/Makefile.am (doc-doxygen-html): Changed to doc-html-doxygen.
(doc-doxygen-man): Changed to doc-man-doxygen.
(doc-performance): Changed to doc-html-performance.
(doc-xml-doxygen): New.
(doc-xml-single): New.
(doc-xml-validate): New.
(doc-html): New.
(doc-html-single): New.
(doc-fo): New.
(doc-pdf): New.
(doc-pdf-fop-xml): New.
(doc-pdf-fop-fo): New.
(doc-pdf-xmlto): New.
(doc-pdf-xmlroff): New.
(doc-pdf-prince): New.
* doc/xml: New directory.
* doc/xml/authors.xml: New.
* doc/xml/images: New directory.
* doc/xml/images/confdeps.png: Add.
* doc/xml/images/confdeps.dot: Add.
* doc/xml/faq.xml: New.
* doc/xml/api.xml: New.
* doc/xml/gnu: New directory.
* doc/xml/gnu/gpl-3.0.xml: New.
* doc/xml/gnu/fdl-1.2.xml: New.
* doc/xml/gnu/gpl-2.0.xml: New.
* doc/xml/manual: New directory.
* doc/xml/manual/mt_allocator.xml: New.
* doc/xml/manual/allocator.xml: New.
* doc/xml/manual/ctype.xml: New.
* doc/xml/manual/numerics.xml: New.
* doc/xml/manual/codecvt.xml: New.
* doc/xml/manual/concurrency.xml: New.
* doc/xml/manual/backwards_compatibility.xml: New.
* doc/xml/manual/intro.xml: New.
* doc/xml/manual/shared_ptr.xml: New.
* doc/xml/manual/abi.xml: New.
* doc/xml/manual/status_cxxtr1.xml: New.
* doc/xml/manual/auto_ptr.xml: New.
* doc/xml/manual/build.xml: New.
* doc/xml/manual/internals.xml: New.
* doc/xml/manual/parallel_mode.xml: New.
* doc/xml/manual/status_cxx1998.xml: New.
* doc/xml/manual/containers.xml: New.
* doc/xml/manual/io.xml: New.
* doc/xml/manual/appendix_porting.xml: New.
* doc/xml/manual/utilities.xml: New.
* doc/xml/manual/bitmap_allocator.xml: New.
* doc/xml/manual/support.xml: New.
* doc/xml/manual/configure.xml: New.
* doc/xml/manual/build_hacking.xml: New.
* doc/xml/manual/evolution.xml: New.
* doc/xml/manual/using.xml: New.
* doc/xml/manual/debug.xml: New.
* doc/xml/manual/localization.xml: New.
* doc/xml/manual/strings.xml: New.
* doc/xml/manual/debug_mode.xml: New.
* doc/xml/manual/locale.xml: New.
* doc/xml/manual/extensions.xml: New.
* doc/xml/manual/appendix_contributing.xml: New.
* doc/xml/manual/messages.xml: New.
* doc/xml/manual/diagnostics.xml: New.
* doc/xml/manual/appendix_free.xml: New.
* doc/xml/manual/algorithms.xml: New.
* doc/xml/manual/iterators.xml: New.
* doc/xml/manual/spine.xml: New.
* doc/xml/manual/test.xml: New.
* doc/xml/manual/status_cxx200x.xml: New.
* doc/xml/spine.xml: New.
* doc/xml/book.txml: New. Template file.
* doc/xml/chapter.txml: Same.
* doc/xml/class.txml: Same.
* doc/doxygen/guide.html: Removed, integrated into other docs.
* doc/doxygen/user.cfg.in: Clean up XML generation
* doc/doxygen/run_doxygen: Move to..
* scripts/run_doxygen: ...here.
* configure: Regenerate.
* Makefile.in: Regenerate.
* src/Makefile.in: Regenerate.
* doc/Makefile.in: Regenerate.
* po/Makefile.in: Regenerate.
* libmath/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* libsupc++/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
2008-02-10 Paolo Carlini <pcarlini@suse.de> 2008-02-10 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/16251 PR libstdc++/16251
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -23,28 +23,210 @@ ...@@ -23,28 +23,210 @@
include $(top_srcdir)/fragment.am include $(top_srcdir)/fragment.am
# These rules are messy, but are hella worth it.
doc-doxygen-html: # Doxygen configuration
# Assumes doxygen, graphviz (with dot) installed
doc_doxygen_script=${top_srcdir}/scripts/run_doxygen
doc-html-doxygen:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`cd ..; ${PWD_COMMAND}`; \ builddir=`cd ..; ${PWD_COMMAND}`; \
${SHELL} ${top_srcdir}/doc/doxygen/run_doxygen \ ${SHELL} ${doc_doxygen_script} \
--host_alias=${host_alias} --mode=html $${srcdir} $${builddir}) --host_alias=${host_alias} --mode=html $${srcdir} $${builddir})
doc-doxygen-man: doc-man-doxygen:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`cd ..; ${PWD_COMMAND}`; \ builddir=`cd ..; ${PWD_COMMAND}`; \
${SHELL} ${top_srcdir}/doc/doxygen/run_doxygen \ ${SHELL} ${doc_doxygen_script} \
--host_alias=${host_alias} --mode=man $${srcdir} $${builddir}) --host_alias=${host_alias} --mode=man $${srcdir} $${builddir})
doc-xml-doxygen:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`cd ..; ${PWD_COMMAND}`; \
${SHELL} ${doc_doxygen_script} \
--host_alias=${host_alias} --mode=xml $${srcdir} $${builddir})
doxygen_xmldir = ${glibcxx_builddir}/doc/doxygen/xml
doc-xml-doxygen-single: doc-xml-doxygen
@echo "Generating doxygen xml single file..."
$(XSLTPROC) ${doxygen_xmldir}/combine.xslt ${doxygen_xmldir}/spine.xml > ${doxygen_xmldir}/all.xml;
# Performance doc and graph configuration.
# Assumes pychart, beautiful soup installed.
# Generates the plots and graphs for performance testing. # Generates the plots and graphs for performance testing.
doc_performance_script=${top_srcdir}/scripts/make_graphs.py doc_performance_script=${top_srcdir}/scripts/make_graphs.py
doc-performance: doc-html-performance:
-@(chmod + ${doc_performance_script}; \ -@(chmod + ${doc_performance_script}; \
${doc_performance_script} ${top_srcdir} \ ${doc_performance_script} ${top_srcdir} \
${glibcxx_builddir}/testsuite \ ${glibcxx_builddir}/testsuite \
${top_srcdir}/testsuite/data/make_graph_htmls.xml \ ${top_srcdir}/testsuite/data/make_graph_htmls.xml \
${top_srcdir}/testsuite/data/make_graph_test_infos.xml local g++) ${top_srcdir}/testsuite/data/make_graph_test_infos.xml local g++)
# Docbook configuration.
# Assumes
# libxslt
# docbook-style-xsl
# emacs-nxml-mode
# xmlto passivetex
xml_srcdir = ${glibcxx_srcdir}/doc/xml
xml_sources = \
${xml_srcdir}/spine.xml \
${xml_srcdir}/authors.xml \
${xml_srcdir}/manual/spine.xml \
${xml_srcdir}/manual/abi.xml \
${xml_srcdir}/manual/algorithms.xml \
${xml_srcdir}/manual/allocator.xml \
${xml_srcdir}/manual/auto_ptr.xml \
${xml_srcdir}/manual/backwards_compatibility.xml \
${xml_srcdir}/manual/bitmap_allocator.xml \
${xml_srcdir}/manual/build.xml \
${xml_srcdir}/manual/build_hacking.xml \
${xml_srcdir}/manual/codecvt.xml \
${xml_srcdir}/manual/concurrency.xml \
${xml_srcdir}/manual/configure.xml \
${xml_srcdir}/manual/containers.xml \
${xml_srcdir}/manual/ctype.xml \
${xml_srcdir}/manual/debug_mode.xml \
${xml_srcdir}/manual/debug.xml \
${xml_srcdir}/manual/diagnostics.xml \
${xml_srcdir}/manual/evolution.xml \
${xml_srcdir}/manual/extensions.xml \
${xml_srcdir}/manual/internals.xml \
${xml_srcdir}/manual/intro.xml \
${xml_srcdir}/manual/io.xml \
${xml_srcdir}/manual/iterators.xml \
${xml_srcdir}/manual/locale.xml \
${xml_srcdir}/manual/localization.xml \
${xml_srcdir}/manual/messages.xml \
${xml_srcdir}/manual/mt_allocator.xml \
${xml_srcdir}/manual/numerics.xml \
${xml_srcdir}/manual/parallel_mode.xml \
${xml_srcdir}/manual/internals.xml \
${xml_srcdir}/manual/shared_ptr.xml \
${xml_srcdir}/manual/spine.xml \
${xml_srcdir}/manual/status_cxx1998.xml \
${xml_srcdir}/manual/status_cxx200x.xml \
${xml_srcdir}/manual/status_cxxtr1.xml \
${xml_srcdir}/manual/strings.xml \
${xml_srcdir}/manual/support.xml \
${xml_srcdir}/manual/test.xml \
${xml_srcdir}/manual/using.xml \
${xml_srcdir}/manual/utilities.xml \
${xml_srcdir}/manual/appendix_free.xml \
${xml_srcdir}/manual/appendix_contributing.xml \
${xml_srcdir}/manual/appendix_porting.xml \
${xml_srcdir}/api.xml \
${xml_srcdir}/faq.xml
xml_sources_extra = \
${xml_srcdir}/gnu/fdl-1.2.xml \
${xml_srcdir}/gnu/gpl-2.0.xml
xml_noinst = \
${xml_srcdir}/book.txml \
${xml_srcdir}/chapter.txml \
${xml_srcdir}/class.txml
XSLTPROC = xsltproc
XSLTPROC_FLAGS = --nonet --xinclude
XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-stylesheets
XSL_FO_STYLE = $(XSL_STYLE_DIR)/fo/docbook.xsl
XSL_HTML_STYLE = $(XSL_STYLE_DIR)/xhtml/chunk.xsl
#XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/onechunk.xsl
XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/docbook.xsl
${glibcxx_builddir}/doc/html:
mkdir ${glibcxx_builddir}/doc/html
${glibcxx_builddir}/doc/pdf:
mkdir ${glibcxx_builddir}/doc/pdf
${glibcxx_builddir}/doc/fo:
mkdir ${glibcxx_builddir}/doc/fo
${glibcxx_builddir}/doc/xml:
mkdir ${glibcxx_builddir}/doc/xml
# Validate existing XML structure.
XMLLINT = xmllint
#LINT_FLAGS = --debug --nonet --xinclude --nsclean --postvalid --nowarning
#LINT_FLAGS = --noblanks --noout --xinclude --postvalid --noent
LINT_FLAGS = --postvalid --debug --xinclude --noent --noblanks --nonet --noout
VALID_FLAGS = --dtdvalid http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
XMLLINT_FLAGS = $(LINT_FLAGS) $(VALID_FLAGS)
doc-xml-validate: $(xml_sources)
@echo "Generating XML validation log..."
$(XMLLINT) $(XMLLINT_FLAGS) ${top_srcdir}/doc/xml/spine.xml
doc-xml-single: $(xml_sources) ${glibcxx_builddir}/doc/xml
@echo "Generating XML single..."
$(XMLLINT) --xinclude --noent --noblanks \
-o ${glibcxx_builddir}/doc/xml/spine-single.xml \
${top_srcdir}/doc/xml/spine.xml
# HTML, index plus chapters
doc-html: $(xml_sources) ${glibcxx_builddir}/doc/html
@echo "Generating html files..."
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/html/ \
$(XSL_HTML_STYLE) ${top_srcdir}/doc/xml/spine.xml
# HTML, all one page
doc-html-single: $(xml_sources) ${glibcxx_builddir}/doc/html
@echo "Generating html single file..."
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/html/ \
$(XSL_HTML_SINGLE_STYLE) ${top_srcdir}/doc/xml/spine.xml
# FO
doc-fo: $(xml_sources) ${glibcxx_builddir}/doc/fo
@echo "Generating FO files..."
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/fo/spine.fo \
$(XSL_FO_STYLE) ${top_srcdir}/doc/xml/spine.xml
# PDF
# Points to current best xml to PDF generation process.
doc-pdf: doc-pdf-xmlto
# PDF 1
# fop
FOP = fop
FOP_FLAGS = -d -r
doc-pdf-fop-xml: $(xml_sources) ${glibcxx_builddir}/doc/pdf
@echo "Generating pdf fop files from xml..."
$(FOP) $(FOP_FLAGS) -xml ${top_srcdir}/doc/xml/spine.xml \
-xsl $(XSL_FO_STYLE) -pdf ${glibcxx_builddir}/doc/pdf/spine.pdf
doc-pdf-fop-fo: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-fo
@echo "Generating pdf fop files from fo..."
$(FOP) $(FOP_FLAGS) -fo ${glibcxx_builddir}/doc/fo/spine.fo \
-pdf ${glibcxx_builddir}/doc/pdf/spine.pdf
# PDF 2
# xmlto
XML2PDF = xmlto
XML2PDF_FLAGS = -v pdf --skip-validation -o pdf
doc-pdf-xmlto: $(xml_sources) ${glibcxx_builddir}/doc/pdf
@echo "Generating pdf xmlto files..."
$(XML2PDF) $(XML2PDF_FLAGS) ${top_srcdir}/doc/xml/spine.xml
# PDF 3
# xmlroff
XMLROFF = xmlroff
XMLROFF_FLAGS = --format=pdf --backend=cairo --warn=1 --debug=1 --continue
doc-pdf-xmlroff: $(xml_sources) doc-fo
@echo "Generating pdf xmlroff files..."
$(XMLROFF) $(XMLROFF_FLAGS) ${glibcxx_builddir}/doc/fo/spine.fo
# PDF 4
# prince
PRINCE = prince
PRINCE_FLAGS = --log prince.log -o pdf/spine.pdf
doc-pdf-prince: $(xml_sources) ${glibcxx_builddir}/doc/pdf
@echo "Generating pdf prince files..."
$(PRINCE) $(PRINCE_FLAGS) ${top_srcdir}/doc/xml/spine.xml
# No install-pdf, install-html support in automake yet # No install-pdf, install-html support in automake yet
install-pdf: install-pdf:
install-html: install-html:
...@@ -55,8 +237,8 @@ install-html: ...@@ -55,8 +237,8 @@ install-html:
doc-doxygen-html doc-doxygen-man doc-performance doc-doxygen-html doc-doxygen-man doc-performance
# By adding these files here, automake will remove them for 'make clean' # By adding these files here, automake will remove them for 'make clean'
CLEANFILES = CLEANFILES = *.log
# To remove directories. # To remove directories.
clean-local: clean-local:
rm -rf man doxygen rm -rf man html pdf fo doxygen xml
<!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" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Build and Writing Guide for libstdc++ Doxygen</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff">
<h1>libstdc++ Source Documentation</h1>
<p>This file is docs/doxygen/guide.html in the libstdc++ source tree. It
is not included in the generated pages (no real point to doing that).
</p>
<ul>
<li><a href="#creating">Creating the pages</a></li>
<li><a href="#writing">Writing the markup</a></li>
</ul>
<hr />
<a name="creating"><h2>Creating the pages</h2></a>
<p>The Makefile rules <code>'make doc-doxygen-html'</code>,
and <code>'make doc-doxygen-man'</code> in the libstdc++ build
directory generate the HTML docs, the and the man pages,
respectively. Prerequisite tools are Bash 2.x,
<a href="http://www.doxygen.org/">
<!-- snagged from the generated page -->
<img src="doxygen.png" alt="Doxygen" align=center border=0 width=110 height=53>
</a>, a working version of <code>g++</code> somewhere in the PATH, and
the <a href="http://www.gnu.org/software/coreutils/">GNU coreutils</a>.
In addition, to generate the pretty pictures and hierarchy graphs, the
<a href=
"http://www.research.att.com/sw/tools/graphviz/download.html">Graphviz</a>
package will need to be installed.
(g++ is used to build a program which manipulates man pages. GNU versions
of find, xargs, and possibly sed and grep are used, just because the GNU
versions make things very easy.)
</p>
<p>Careful observers will see that the Makefile rules simply call a script
from the source tree, <code>run_doxygen</code>, which does the actual work
of running Doxygen and then (most importantly) massaging the output files.
If for some reason you prefer to not go through the Makefile, you can call
this script directly. (Start by passing <code>'--help'</code>.)
</p>
<p>If you wish to tweak the Doxygen settings, do so by editing
<code>docs/doxygen/user.cfg.in</code>. Notes to v3-hackers are written in
triple-# comments.
</p>
<a name="writing"><h2>Writing the markup</h2></a>
<p>In general, libstdc++ files should be formatted according to the GNU
C++ Coding Standard rules found in the file
<a href="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/C++STYLE">C++STYLE</a>.
Before any doxygen-specific formatting tweaks are made, please try to make
sure that the initial formatting is sound.
</p>
<p>Adding Doxygen markup to a file (informally called "doxygenating") is very
simple. The Doxygen manual can be found
<a href="http://www.stack.nl/~dimitri/doxygen/download.html#latestman">here</a>.
We try to use a very-recent version of Doxygen.
</p>
<h3>Doxygen style guide</h3>
<p>[incomplete and constantly evolving]</p>
<p>For classes, use deque/vector/list and std::pair as examples. For
functions, see their member functions, and the free functions in
<code>stl_algobase.h</code>. Member functions of other container-like
types should read similarly to these member functions.
</p>
<p>These points accompany the first list in section 3.1 of the Doxygen manual:
</p>
<ol>
<li>Use the Javadoc style...</li>
<li>...not the Qt style. The intermediate *'s are preferred.</li>
<li>Use the triple-slash style only for one-line comments (the "brief" mode).
Very recent versions of Doxygen permit full-mode comments in triple-slash
blocks, but the formatting still comes out wonky.</li>
<li>This is disgusting. Don't do this.</li>
</ol>
<p>Use the @-style of commands, not the !-style. Please be careful about
whitespace in your markup comments. Most of the time it doesn't matter;
doxygen absorbs most whitespace, and both HTML and *roff are agnostic about
whitespace. However, in &lt;pre&gt; blocks and @code/@endcode sections,
spacing can have "interesting" effects.
</p>
<p>Use either kind of grouping, as appropriate. <code>doxygroups.cc</code>
exists for this purpose. See <code>stl_iterator.h</code> for a good
example of the "other" kind of grouping.
</p>
<p>Please use markup tags like @p and @a when referring to things such as the
names of function parameters. Use @e for emphasis when necessary. Use @c
to refer to other standard names. (Examples of all these abound in the
present code.)
</p>
</body>
</html>
...@@ -1108,7 +1108,7 @@ MAN_LINKS = NO ...@@ -1108,7 +1108,7 @@ MAN_LINKS = NO
# generate an XML file that captures the structure of # generate an XML file that captures the structure of
# the code including all documentation. # the code including all documentation.
GENERATE_XML = NO GENERATE_XML = @do_xml@
# The XML_OUTPUT tag is used to specify where the XML pages will be put. # The XML_OUTPUT tag is used to specify where the XML pages will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be # If a relative path is entered the value of OUTPUT_DIRECTORY will be
...@@ -1120,6 +1120,7 @@ XML_OUTPUT = xml ...@@ -1120,6 +1120,7 @@ XML_OUTPUT = xml
# which can be used by a validating XML parser to check the # which can be used by a validating XML parser to check the
# syntax of the XML files. # syntax of the XML files.
#XML_SCHEMA =
XML_SCHEMA = XML_SCHEMA =
# The XML_DTD tag can be used to specify an XML DTD, # The XML_DTD tag can be used to specify an XML DTD,
...@@ -1127,6 +1128,7 @@ XML_SCHEMA = ...@@ -1127,6 +1128,7 @@ XML_SCHEMA =
# syntax of the XML files. # syntax of the XML files.
XML_DTD = XML_DTD =
#XML_DTD = http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will # If the XML_PROGRAMLISTING tag is set to YES Doxygen will
# dump the program listings (including syntax highlighting # dump the program listings (including syntax highlighting
......
<?xml version='1.0'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]>
<book>
<article id="api" xreflabel="API">
<?dbhtml filename="api.html"?>
<articleinfo>
<title>API and Source Level Documentation</title>
<copyright>
<year>
2008
</year>
<holder>
<ulink url="http://fsf.org">FSF
</ulink>
</holder>
</copyright>
<legalnotice>
<para>
<ulink url="17_intro/license.html">License
</ulink>
</para>
</legalnotice>
</articleinfo>
<para>
The GNU C++ library sources have been specially formatted so that with the
proper invocation of another tool (Doxygen), a set of HTML pages
are generated from the sources files themselves. The resultant
documentation is referred to as Source Level Documentation, and is
useful for examining the signatures of public member functions for
the library classes, finding out what is in a particular include
file, looking at inheritance diagrams, etc.
</para>
<para>
The source-level documentation for the most recent releases can be
viewed online:
</para>
<itemizedlist>
<listitem>
<para>
<ulink url="libstdc++-html-USERS-3.4/index.html">for the 3.4 release
</ulink>
</para>
</listitem>
<listitem>
<para>
<ulink url="libstdc++-html-USERS-4.1/index.html">for the 4.1 release
</ulink>
</para>
</listitem>
<listitem>
<para>
<ulink url="libstdc++-html-USERS-4.2/index.html">for the 4.2 release
</ulink>
</para>
</listitem>
<listitem>
<para>
<ulink url="latest-doxygen/index.html">&quot;the latest collection&quot;
</ulink>
(For the main development tree; see the date on the first page.)
</para>
</listitem>
</itemizedlist>
<para>
This generated HTML collection, as above, is also available for download in the libstdc++ snapshots directory at
<literal>&lt;URL:ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/&gt;</literal>.
You will almost certainly need to use one of the
<ulink url="http://gcc.gnu.org/mirrors.html">mirror sites</ulink> to download
the tarball. After unpacking, simply load libstdc++-html-*/index.html
into a browser.
</para>
<para>
Documentation for older releases is available for download only, not
online viewing.
</para>
<para>
In addition, an initial set of man pages are also available in the
same place as the HTML collections. Start with C++Intro(3).
</para>
</article>
</book>
<authorgroup>
<!--
<author>
<firstname>Benjamin</firstname>
<surname>Kosnik</surname>
<affiliation>
<shortaffil>Red Hat</shortaffil>
<orgname>Red Hat, Inc.</orgname>
<address>
<email>libstdc++@gcc.gnu.org</email>
</address>
</affiliation>
<authorblurb>
<para>
</para>
</authorblurb>
</author>
-->
<author>
<firstname>Paolo</firstname>
<surname>Carlini</surname>
<authorblurb>
<para>
TR1, LWG Active, Closed, Defects lists.
</para>
</authorblurb>
</author>
<author>
<firstname>Phil</firstname>
<surname>Edwards</surname>
<authorblurb>
<para>
Originating author, started HOWTO and FAQ, worked on sections
Demangling, Macros, Strings, Iterators, Backwards
Compatibility, SGI Extensions, Configure, Build, Install.
</para>
</authorblurb>
</author>
<author>
<firstname>Doug</firstname>
<surname>Gregor</surname>
<authorblurb>
<para>
Debug Mode, TR1 function objects
</para>
</authorblurb>
</author>
<author>
<firstname>Benjamin</firstname>
<surname>Kosnik</surname>
<authorblurb>
<para>
Allocators, ABI, API evolution and deprecation history,
Backwards Compatibility, Thread, Debug Support, Locales,
Facets, Parallel Mode, Headers, Namespaces, Construction and
Structure, DocBook conversion and layout.
</para>
</authorblurb>
</author>
<author>
<firstname>Dhruv</firstname>
<surname>Matani</surname>
<authorblurb>
<para>
bitmap_allocator
</para>
</authorblurb>
</author>
<author>
<firstname>Jason</firstname>
<surname>Merrill</surname>
<authorblurb>
<para>
License, __verbose_terminate_handler
</para>
</authorblurb>
</author>
<author>
<firstname>Mark</firstname>
<surname>Mitchell</surname>
<authorblurb>
<para>
Porting
</para>
</authorblurb>
</author>
<author>
<firstname>Nathan</firstname>
<surname>Myers</surname>
<authorblurb>
<para>
Referenced counted string, C++1998 implementation status.
</para>
</authorblurb>
</author>
<author>
<firstname>Felix</firstname>
<surname>Natter</surname>
<authorblurb>
<para>
Namespace composition, Backwards Compatibility.
</para>
</authorblurb>
</author>
<author>
<firstname>Stefan</firstname>
<surname>Olsson</surname>
<authorblurb>
<para>
mt_allocator
</para>
</authorblurb>
</author>
<author>
<firstname>Johannes</firstname>
<surname>Singler</surname>
<authorblurb>
<para>
Parallel mode
</para>
</authorblurb>
</author>
<author>
<firstname>Ami</firstname>
<surname>Tavory</surname>
<authorblurb>
<para>
Policy Based Datastructures, Associative Containers, Unordered
Containers.
</para>
</authorblurb>
</author>
<author>
<firstname>Jonathan</firstname>
<surname>Wakely</surname>
<authorblurb>
<para>
shared_ptr, markup editing and styling
</para>
</authorblurb>
</author>
</authorgroup>
<?xml version='1.0'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]>
<book id="api" xreflabel="Source Level Documentation">
<title>Source Level Documentation</title>
<bookinfo>
<copyright>
<year>2007</year>
<holder>
<ulink url="fsf.org">FSF
</ulink>
</holder>
</copyright>
<legalnotice>
<para>
<ulink url="17_intro/license.html">License
</ulink>
</para>
</legalnotice>
</bookinfo>
<part>
<title></title>
<chapter>
<title></title>
<para></para>
</chapter>
</part>
</book>
<?xml version='1.0'?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]>
<chapter id="manual.intro" xreflabel="Introduction">
<chapterinfo>
<keywordset>
<keyword>
ISO C++
</keyword>
<keyword>
library
</keyword>
</keywordset>
</chapterinfo>
<title>Introduction</title>
<sect1 id="manual.intro.status" xreflabel="Status">
<title>Status</title>
<para>
The GNU C++ ...
</para>
</sect1>
<sect1 id="manual.intro.setup" xreflabel="Setup">
<title>Setup</title>
<para>
The GNU C++ ...
</para>
<sect2 id="manual.intro.setup.next1" xreflabel="Next1">
<title>Next1</title>
<para>
The GNU C++ ...
</para>
</sect2>
<sect2 id="manual.intro.setup.next2" xreflabel="Next2">
<title>Next2</title>
<para>
The GNU C++ ...
</para>
</sect2>
</sect1>
<sect1 id="manual.intro.using" xreflabel="Using">
<title>Using</title>
<para>
The GNU C++ ...
</para>
</sect1>
</chapter>
<sect1 id="manual.util.memory.allocator" xreflabel="allocator">
<?dbhtml filename="allocator.html"?>
<sect1info>
<keywordset>
<keyword>
ISO C++
</keyword>
<keyword>
allocator
</keyword>
</keywordset>
</sect1info>
<title>allocator</title>
<para>
</para>
<sect2 id="allocator.req" xreflabel="allocator.req">
<title>Requirements</title>
<para>
</para>
<itemizedlist>
<listitem>
<para>
</para>
</listitem>
<listitem>
<para>
</para>
</listitem>
</itemizedlist>
<para>
</para>
</sect2>
<sect2 id="allocator.design_issues" xreflabel="allocator.design_issues">
<title>Design Issues</title>
<para>
</para>
<para>
</para>
</sect2>
<sect2 id="allocator.impl" xreflabel="allocator.impl">
<title>Implementation</title>
<sect3>
<title>Interface Design</title>
<para>
</para>
<para>
</para>
</sect3>
<sect3>
<title>Selecting Default Allocation Strategy</title>
<para>
</para>
<orderedlist>
<listitem>
</listitem>
<listitem>
</listitem>
<listitem>
</listitem>
</orderedlist>
</sect3>
<sect3>
<title>Disabling Memory Caching</title>
<para>
</para>
<para>
</para>
</sect3>
</sect2>
<sect2 id="allocator.using" xreflabel="allocator.using">
<title>Using</title>
<para>
</para>
</sect2>
<sect2 id="allocator.custom" xreflabel="allocator.custom">
<title>Custom Allocators</title>
<para>
</para>
<para>
</para>
</sect2>
<bibliography id="allocator.biblio" xreflabel="allocator.biblio">
<title>Bibliography</title>
<!--
<biblioentry>
<abbrev>
</abbrev>
<title>
</title>
<editor>
<firstname></firstname>
<surname></surname>
</editor>
<author>
<surname></surname>
<firstname></firstname>
</author>
<copyright>
<year></year>
<holder></holder>
</copyright>
<pagenums></pagenums>
<publisher>
<publishername>
</publishername>
</publisher>
<biblioid>
<ulink url="">
</ulink>
</biblioid>
</biblioentry>
-->
<biblioentry>
</biblioentry>
</bibliography>
</sect1>
\ No newline at end of file
# Blatantly ripped out of the graphviz examples and modified. -pme
digraph v3conf {
size="6,6";
node [color=lightblue2, style=filled];
"aclocal.m4" -> "acinclude.m4";
"configure" -> "aclocal.m4";
"configure" -> "configure.ac";
"configure" -> "crossconfig.m4";
"configure" -> "linkage.m4";
"[*/]Makefile.in" -> "Makefile.am";
"[*/]Makefile.in" -> "configure.ac";
"config.h.in" -> "acconfig.h";
"config.h.in" -> "configure.ac";
}
<?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]>
<part id="manual.algorithms" xreflabel="Algorithms">
<?dbhtml filename="algorithms.html"?>
<partinfo>
<keywordset>
<keyword>
ISO C++
</keyword>
<keyword>
library
</keyword>
<keyword>
algorithm
</keyword>
</keywordset>
</partinfo>
<title>Algorithms</title>
<preface>
<title></title>
<para>
The neatest accomplishment of the algorithms chapter is that all the
work is done via iterators, not containers directly. This means two
important things:
</para>
<orderedlist>
<listitem>
<para>
Anything that behaves like an iterator can be used in one of
these algorithms. Raw pointers make great candidates, thus
built-in arrays are fine containers, as well as your own iterators.
</para>
</listitem>
<listitem>
<para>
The algorithms do not (and cannot) affect the container as a
whole; only the things between the two iterator endpoints. If
you pass a range of iterators only enclosing the middle third of
a container, then anything outside that range is inviolate.
</para>
</listitem>
</orderedlist>
<para>
Even strings can be fed through the algorithms here, although the
string class has specialized versions of many of these functions
(for example, <code>string::find()</code>). Most of the examples
on this page will use simple arrays of integers as a playground
for algorithms, just to keep things simple. The use of
<emphasis>N</emphasis> as a size in the examples is to keep
things easy to read but probably won't be valid code. You can
use wrappers such as those described in the <ulink
url="../23_containers/howto.html">containers chapter</ulink> to
keep real code readable.
</para>
<para>
The single thing that trips people up the most is the definition
of <emphasis>range</emphasis> used with iterators; the famous
&quot;past-the-end&quot; rule that everybody loves to hate. The
<ulink url="../24_iterators/howto.html#2">iterators
chapter</ulink> of this document has a complete explanation of
this simple rule that seems to cause so much confusion. Once you
get <emphasis>range</emphasis> into your head (it's not that
hard, honest!), then the algorithms are a cakewalk.
</para>
</preface>
<!-- Chapter 01 : Non Modifying -->
<!-- Chapter 02 : Mutating -->
<chapter id="manual.algorithms.mutating" xreflabel="Mutating">
<title>Mutating</title>
<sect1 id="algorithms.mutating.swap" xreflabel="swap">
<title><function>swap</function></title>
<sect2 id="algorithms.swap.specializations" xreflabel="Specializations">
<title>Specializations</title>
<para>If you call <code> std::swap(x,y); </code> where x and y are standard
containers, then the call will automatically be replaced by a call to
<code> x.swap(y); </code> instead.
</para>
<para>This allows member functions of each container class to take over, and
containers' swap functions should have O(1) complexity according to
the standard. (And while &quot;should&quot; allows implementations to
behave otherwise and remain compliant, this implementation does in
fact use constant-time swaps.) This should not be surprising, since
for two containers of the same type to swap contents, only some
internal pointers to storage need to be exchanged.
</para>
</sect2>
</sect1>
</chapter>
<!-- Chapter 03 : Sorting -->
</part>
<?xml version='1.0'?>
<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]>
<appendix id="appendix.free" xreflabel="Free">
<?dbhtml filename="appendix_free.html"?>
<appendixinfo>
<keywordset>
<keyword>
ISO C++
</keyword>
<keyword>
library
</keyword>
</keywordset>
</appendixinfo>
<title>Free Software Needs Free Documentation</title>
<para>
The biggest deficiency in free operating systems is not in the
software--it is the lack of good free manuals that we can include in
these systems. Many of our most important programs do not come with
full manuals. Documentation is an essential part of any software
package; when an important free software package does not come with a
free manual, that is a major gap. We have many such gaps today.
</para>
<para>
Once upon a time, many years ago, I thought I would learn Perl. I got
a copy of a free manual, but I found it hard to read. When I asked
Perl users about alternatives, they told me that there were better
introductory manuals--but those were not free.
</para>
<para>
Why was this? The authors of the good manuals had written them for
O'Reilly Associates, which published them with restrictive terms--no
copying, no modification, source files not available--which exclude
them from the free software community.
</para>
<para>
That wasn't the first time this sort of thing has happened, and (to
our community's great loss) it was far from the last. Proprietary
manual publishers have enticed a great many authors to restrict their
manuals since then. Many times I have heard a GNU user eagerly tell
me about a manual that he is writing, with which he expects to help
the GNU project--and then had my hopes dashed, as he proceeded to
explain that he had signed a contract with a publisher that would
restrict it so that we cannot use it.
</para>
<para>
Given that writing good English is a rare skill among programmers, we
can ill afford to lose manuals this way.
</para>
<para>
Free documentation, like free software, is a matter of freedom,
not price. The problem with these manuals was not that O'Reilly
Associates charged a price for printed copies--that in itself is fine.
(The Free Software Foundation <ulink url="http://www.gnu.org/doc/doc.html">sells printed copies</ulink> of
free GNU manuals, too.) But GNU manuals are available in source code
form, while these manuals are available only on paper. GNU manuals
come with permission to copy and modify; the Perl manuals do not.
These restrictions are the problems.
</para>
<para>
The criterion for a free manual is pretty much the same as for free
software: it is a matter of giving all users certain freedoms.
Redistribution (including commercial redistribution) must be
permitted, so that the manual can accompany every copy of the program,
on-line or on paper. Permission for modification is crucial too.
</para>
<para>
As a general rule, I don't believe that it is essential for people to
have permission to modify all sorts of articles and books. The issues
for writings are not necessarily the same as those for software. For
example, I don't think you or I are obliged to give permission to
modify articles like this one, which describe our actions and our
views.
</para>
<para>
But there is a particular reason why the freedom to modify is crucial
for documentation for free software. When people exercise their right
to modify the software, and add or change its features, if they are
conscientious they will change the manual too--so they can provide
accurate and usable documentation with the modified program. A manual
which forbids programmers to be conscientious and finish the job, or
more precisely requires them to write a new manual from scratch if
they change the program, does not fill our community's needs.
</para>
<para>
While a blanket prohibition on modification is unacceptable, some
kinds of limits on the method of modification pose no problem. For
example, requirements to preserve the original author's copyright
notice, the distribution terms, or the list of authors, are ok. It is
also no problem to require modified versions to include notice that
they were modified, even to have entire sections that may not be
deleted or changed, as long as these sections deal with nontechnical
topics. (Some GNU manuals have them.)
</para>
<para>
These kinds of restrictions are not a problem because, as a practical
matter, they don't stop the conscientious programmer from adapting the
manual to fit the modified program. In other words, they don't block
the free software community from making full use of the manual.
</para>
<para>
However, it must be possible to modify all the <emphasis>technical</emphasis>
content of the manual, and then distribute the result in all the usual
media, through all the usual channels; otherwise, the restrictions do
block the community, the manual is not free, and so we need another
manual.
</para>
<para>
Unfortunately, it is often hard to find someone to write another
manual when a proprietary manual exists. The obstacle is that many
users think that a proprietary manual is good enough--so they don't
see the need to write a free manual. They do not see that the free
operating system has a gap that needs filling.
</para>
<para>
Why do users think that proprietary manuals are good enough? Some
have not considered the issue. I hope this article will do something
to change that.
</para>
<para>
Other users consider proprietary manuals acceptable for the same
reason so many people consider proprietary software acceptable: they
judge in purely practical terms, not using freedom as a criterion.
These people are entitled to their opinions, but since those opinions
spring from values which do not include freedom, they are no guide for
those of us who do value freedom.
</para>
<para>
Please spread the word about this issue. We continue to lose manuals
to proprietary publishing. If we spread the word that proprietary
manuals are not sufficient, perhaps the next person who wants to help
GNU by writing documentation will realize, before it is too late, that
he must above all make it free.
</para>
<para>
We can also encourage commercial publishers to sell free, copylefted
manuals instead of proprietary ones. One way you can help this is to
check the distribution terms of a manual before you buy it, and
prefer copylefted manuals to non-copylefted ones.
</para>
<para>
[Note: We now maintain a <ulink url="http://www.fsf.org/licensing/doc/other-free-books.html">web page
that lists free books available from other publishers</ulink>].
</para>
<para>Copyright © 2004, 2005, 2006, 2007 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA</para>
<para>Verbatim copying and distribution of this entire article are
permitted worldwide, without royalty, in any medium, provided this
notice is preserved.</para>
<para>Report any problems or suggestions to <email>webmaster@fsf.org</email>.</para>
</appendix>
<?xml version='1.0'?>
<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]>
<appendix id="appendix.porting" xreflabel="Porting">
<?dbhtml filename="appendix_porting.html"?>
<appendixinfo>
<keywordset>
<keyword>
ISO C++
</keyword>
<keyword>
library
</keyword>
</keywordset>
</appendixinfo>
<title>Porting and Maintenance</title>
<!-- Hacking the Build System -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="build_hacking.xml">
</xi:include>
<!-- Internals: Porting to New Hardware or Operating Systems -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="internals.xml">
</xi:include>
<!-- ABI Policy and Guidelines -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="abi.xml">
</xi:include>
<!-- API Evolution and Deprecation History -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="evolution.xml">
</xi:include>
<!-- Backwards Compatibility -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="backwards_compatibility.xml">
</xi:include>
</appendix>
<sect1 id="manual.util.memory.auto_ptr" xreflabel="auto_ptr">
<?dbhtml filename="auto_ptr.html"?>
<sect1info>
<keywordset>
<keyword>
ISO C++
</keyword>
<keyword>
auto_ptr
</keyword>
</keywordset>
</sect1info>
<title>auto_ptr</title>
<sect2 id="auto_ptr.limitations" xreflabel="auto_ptr.limitations">
<title>Limitations</title>
<para>Explaining all of the fun and delicious things that can
happen with misuse of the <classname>auto_ptr</classname> class
template (called <acronym>AP</acronym> here) would take some
time. Suffice it to say that the use of <acronym>AP</acronym>
safely in the presence of copying has some subtleties.
</para>
<para>
The AP class is a really
nifty idea for a smart pointer, but it is one of the dumbest of
all the smart pointers -- and that's fine.
</para>
<para>
AP is not meant to be a supersmart solution to all resource
leaks everywhere. Neither is it meant to be an effective form
of garbage collection (although it can help, a little bit).
And it can <emphasis>not</emphasis>be used for arrays!
</para>
<para>
<acronym>AP</acronym> is meant to prevent nasty leaks in the
presence of exceptions. That's <emphasis>all</emphasis>. This
code is AP-friendly:
</para>
<programlisting>
// Not a recommend naming scheme, but good for web-based FAQs.
typedef std::auto_ptr&lt;MyClass&gt; APMC;
extern function_taking_MyClass_pointer (MyClass*);
extern some_throwable_function ();
void func (int data)
{
APMC ap (new MyClass(data));
some_throwable_function(); // this will throw an exception
function_taking_MyClass_pointer (ap.get());
}
</programlisting>
<para>When an exception gets thrown, the instance of MyClass that's
been created on the heap will be <function>delete</function>'d as the stack is
unwound past <function>func()</function>.
</para>
<para>Changing that code as follows is not <acronym>AP</acronym>-friendly:
</para>
<programlisting>
APMC ap (new MyClass[22]);
</programlisting>
<para>You will get the same problems as you would without the use
of <acronym>AP</acronym>:
</para>
<programlisting>
char* array = new char[10]; // array new...
...
delete array; // ...but single-object delete
</programlisting>
<para>
AP cannot tell whether the pointer you've passed at creation points
to one or many things. If it points to many things, you are about
to die. AP is trivial to write, however, so you could write your
own <code>auto_array_ptr</code> for that situation (in fact, this has
been done many times; check the mailing lists, Usenet, Boost, etc).
</para>
</sect2>
<sect2 id="auto_ptr.using" xreflabel="auto_ptr.using">
<title>Use in Containers</title>
<para>
</para>
<para>All of the <ulink url="../23_containers/howto.html">containers</ulink>
described in the standard library require their contained types
to have, among other things, a copy constructor like this:
</para>
<programlisting>
struct My_Type
{
My_Type (My_Type const&amp;);
};
</programlisting>
<para>
Note the const keyword; the object being copied shouldn't change.
The template class <code>auto_ptr</code> (called AP here) does not
meet this requirement. Creating a new AP by copying an existing
one transfers ownership of the pointed-to object, which means that
the AP being copied must change, which in turn means that the
copy ctors of AP do not take const objects.
</para>
<para>
The resulting rule is simple: <emphasis>Never ever use a
container of auto_ptr objects</emphasis>. The standard says that
<quote>undefined</quote> behavior is the result, but it is
guaranteed to be messy.
</para>
<para>
To prevent you from doing this to yourself, the
<ulink url="../19_diagnostics/howto.html#3">concept checks</ulink> built
in to this implementation will issue an error if you try to
compile code like this:
</para>
<programlisting>
#include &lt;vector&gt;
#include &lt;memory&gt;
void f()
{
std::vector&lt; std::auto_ptr&lt;int&gt; &gt; vec_ap_int;
}
</programlisting>
<para>
Should you try this with the checks enabled, you will see an error.
</para>
</sect2>
</sect1>
\ No newline at end of file
<sect1 id="manual.intro.setup.build" xreflabel="Building">
<?dbhtml filename="build.html"?>
<sect1info>
<keywordset>
<keyword>
ISO C++
</keyword>
<keyword>
build
</keyword>
</keywordset>
</sect1info>
<title>Build</title>
<para>
Because libstdc++ is part of GCC, the primary source for
installation instructions is
<ulink url="http://gcc.gnu.org/install/">the GCC install page</ulink>.
Additional data is given here only where it applies to libstdc++.
</para>
<sect2 id="build.prereq" xreflabel="build.prereq">
<title>Prerequisites</title>
<para>
The list of software needed to build the library is kept with the
rest of the compiler, at
<ulink url="http://gcc.gnu.org/install/prerequisites.html">
http://gcc.gnu.org/install/prerequisites.html</ulink>. The same page
also lists the tools you will need if you wish to modify the source.
</para>
<para>As of GCC 4.0.1 the minimum version of binutils required to build
libstdc++ is <code>2.15.90.0.1.1</code>. You can get snapshots
(as well as releases) of binutils from
<ulink url="ftp://sources.redhat.com/pub/binutils">
ftp://sources.redhat.com/pub/binutils</ulink>.
Older releases of libstdc++ do not require such a recent version,
but to take full advantage of useful space-saving features and
bug-fixes you should use a recent binutils if possible.
The configure process will automatically detect and use these
features if the underlying support is present.
</para>
<para>
Finally, a few system-specific requirements:
</para>
<variablelist>
<varlistentry>
<term>linux</term>
<listitem>
<para>
If gcc 3.1.0 or later on is being used on linux, an attempt
will be made to use "C" library functionality necessary for
C++ named locale support. For gcc 3.2.1 and later, this
means that glibc 2.2.5 or later is required and the "C"
library de_DE locale information must be installed.
</para>
<para>
Note however that the sanity checks involving the de_DE
locale are skipped when an explicit --enable-clocale=gnu
configure option is used: only the basic checks are carried
out, defending against misconfigurations.
</para>
<para>
If the 'gnu' locale model is being used, the following
locales are used and tested in the libstdc++ testsuites.
The first column is the name of the locale, the second is
the character set it is expected to use.
</para>
<programlisting>
de_DE ISO-8859-1
de_DE@euro ISO-8859-15
en_HK ISO-8859-1
en_PH ISO-8859-1
en_US ISO-8859-1
en_US.ISO-8859-1 ISO-8859-1
en_US.ISO-8859-15 ISO-8859-15
en_US.UTF-8 UTF-8
es_ES ISO-8859-1
es_MX ISO-8859-1
fr_FR ISO-8859-1
fr_FR@euro ISO-8859-15
is_IS UTF-8
it_IT ISO-8859-1
ja_JP.eucjp EUC-JP
se_NO.UTF-8 UTF-8
ta_IN UTF-8
zh_TW BIG5
</programlisting>
<para>Failure to have the underlying "C" library locale
information installed will mean that C++ named locales for the
above regions will not work: because of this, the libstdc++
testsuite will skip the named locale tests. If this isn't an
issue, don't worry about it. If named locales are needed, the
underlying locale information must be installed. Note that
rebuilding libstdc++ after the "C" locales are installed is not
necessary.
</para>
<para>
To install support for locales, do only one of the following:
</para>
<itemizedlist>
<listitem>
<para>install all locales</para>
<itemizedlist>
<listitem>
<para>with RedHat Linux:
</para>
<para> <code> export LC_ALL=C </code>
</para>
<para> <code> rpm -e glibc-common --nodeps </code>
</para>
<para>
<code> rpm -i --define "_install_langs all"
glibc-common-2.2.5-34.i386.rpm
</code>
</para>
</listitem>
<listitem>
<para>
Instructions for other operating systems solicited.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>install just the necessary locales</para>
<itemizedlist>
<listitem>
<para>with Debian Linux:</para>
<para> Add the above list, as shown, to the file
<code>/etc/locale.gen</code> </para>
<para> run <code>/usr/sbin/locale-gen</code> </para>
</listitem>
<listitem>
<para>on most Unix-like operating systems:</para>
<para><code> localedef -i de_DE -f ISO-8859-1 de_DE </code></para>
<para>(repeat for each entry in the above list) </para>
</listitem>
<listitem>
<para>
Instructions for other operating systems solicited.
</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 id="build.configure" xreflabel="build.make">
<title>Make</title>
<para>If you have never done this before, you should read the basic
<ulink url="http://gcc.gnu.org/install/">GCC Installation
Instructions</ulink> first. Read <emphasis>all of them</emphasis>.
<emphasis>Twice.</emphasis>
</para>
<para>When building libstdc++ you'll have to configure
the entire <emphasis>gccsrcdir</emphasis> directory. The full list of libstdc++
specific configuration options, not dependent on the specific compiler
release being used, can be found <ulink url="configopts.html">here</ulink>.
</para>
<para>Consider possibly using --enable-languages=c++ to save time by only
building the C++ language parts.
</para>
<programlisting>
cd <emphasis>gccbuilddir</emphasis>
<emphasis>gccsrcdir</emphasis>/configure --prefix=<emphasis>destdir</emphasis> --other-opts...</programlisting>
</sect2>
</sect1>
\ No newline at end of file
<?xml version='1.0'?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]>
<chapter id="manual.ext.concurrency" xreflabel="Concurrency Extensions">
<?dbhtml filename="concurrency.html"?>
<chapterinfo>
<keywordset>
<keyword>
ISO C++
</keyword>
<keyword>
library
</keyword>
</keywordset>
</chapterinfo>
<title>Concurrency</title>
<sect1 id="manual.ext.concurrency.design" xreflabel="Design">
<title>Design</title>
<sect2 id="manual.ext.concurrency.design.threads" xreflabel="Threads API">
<title>Interface to Locks and Mutexes</title>
<para>The file &lt;ext/concurrence.h&gt; contains all the higher-level
constructs for playing with threads. In contrast to the atomics layer,
the concurrence layer consists largely of types. All types are defined within <code>namespace __gnu_cxx</code>.
</para>
<para>
These types can be used in a portable manner, regardless of the
specific environment. They are carefully designed to provide optimum
efficiency and speed, abstracting out underlying thread calls and
accesses when compiling for single-threaded situations (even on hosts
that support multiple threads.)
</para>
<para>The enumerated type <code>_Lock_policy</code> details the set of
available locking
policies: <code>_S_single</code>, <code>_S_mutex</code>,
and <code>_S_atomic</code>.
</para>
<itemizedlist>
<listitem><para><code>_S_single</code></para>
<para>Indicates single-threaded code that does not need locking.
</para>
</listitem>
<listitem><para><code>_S_mutex</code></para>
<para>Indicates multi-threaded code using thread-layer abstractions.
</para>
</listitem>
<listitem><para><code>_S_atomic</code></para>
<para>Indicates multi-threaded code using atomic operations.
</para>
</listitem>
</itemizedlist>
<para>The compile-time constant <code>__default_lock_policy</code> is set
to one of the three values above, depending on characteristics of the
host environment and the current compilation flags.
</para>
<para>Two more datatypes make up the rest of the
interface: <code>__mutex</code>, and <code>__scoped_lock</code>.
</para>
<para>
</para>
<para>The scoped lock idiom is well-discussed within the C++
community. This version takes a <code>__mutex</code> reference, and
locks it during construction of <code>__scoped_locke</code> and
unlocks it during destruction. This is an efficient way of locking
critical sections, while retaining exception-safety.
</para>
</sect2>
<sect2 id="manual.ext.concurrency.design.atomics" xreflabel="Atomic API">
<title>Interface to Atomic Functions</title>
<para>
Two functions and one type form the base of atomic support.
</para>
<para>The type <code>_Atomic_word</code> is a signed integral type
supporting atomic operations.
</para>
<para>
The two functions functions are:
</para>
<programlisting>
_Atomic_word
__exchange_and_add_dispatch(volatile _Atomic_word*, int);
void
__atomic_add_dispatch(volatile _Atomic_word*, int);
</programlisting>
<para>Both of these functions are declared in the header file
&lt;ext/atomicity.h&gt;, and are in <code>namespace __gnu_cxx</code>.
</para>
<itemizedlist>
<listitem><para>
<code>
__exchange_and_add_dispatch
</code>
</para>
<para>Adds the second argument's value to the first argument. Returns the old value.
</para>
</listitem>
<listitem><para>
<code>
__atomic_add_dispatch
</code>
</para>
<para>Adds the second argument's value to the first argument. Has no return value.
</para>
</listitem>
</itemizedlist>
<para>
These functions forward to one of several specialized helper
functions, depending on the circumstances. For instance,
</para>
<para>
<code>
__exchange_and_add_dispatch
</code>
</para>
<para>
Calls through to either of:
</para>
<itemizedlist>
<listitem><para><code>__exchange_and_add</code>
</para>
<para>Multi-thread version. Inlined if compiler-generated builtin atomics
can be used, otherwise resolved at link time to a non-builtin code
sequence.
</para>
</listitem>
<listitem><para><code>__exchange_and_add_single</code>
</para>
<para>Single threaded version. Inlined.</para>
</listitem>
</itemizedlist>
<para>However, only <code>__exchange_and_add_dispatch</code>
and <code>__atomic_add_dispatch</code> should be used. These functions
can be used in a portable manner, regardless of the specific
environment. They are carefully designed to provide optimum efficiency
and speed, abstracting out atomic accesses when they are not required
(even on hosts that support compiler intrinsics for atomic
operations.)
</para>
<para>
In addition, there are two macros
</para>
<para>
<code>
_GLIBCXX_READ_MEM_BARRIER
</code>
</para>
<para>
<code>
_GLIBCXX_WRITE_MEM_BARRIER
</code>
</para>
<para>
Which expand to the appropriate write and read barrier required by the
host hardware and operating system.
</para>
</sect2>
</sect1>
<sect1 id="manual.ext.concurrency.impl" xreflabel="Implementation">
<title>Implementation</title>
<sect2 id="manual.ext.concurrency.impl.atomic_fallbacks" xreflabel="Atomic F">
<title>Using Builitin Atomic Functions</title>
<para>The functions for atomic operations described above are either
implemented via compiler intrinsics (if the underlying host is
capable) or by library fallbacks.</para>
<para>Compiler intrinsics (builtins) are always preferred. However, as
the compiler builtins for atomics are not universally implemented,
using them directly is problematic, and can result in undefined
function calls. (An example of an undefined symbol from the use
of <code>__sync_fetch_and_add</code> on an unsupported host is a
missing reference to <code>__sync_fetch_and_add_4</code>.)
</para>
<para>In addition, on some hosts the compiler intrinsics are enabled
conditionally, via the <code>-march</code> command line flag. This makes
usage vary depending on the target hardware and the flags used during
compile.
</para>
<para> If builtins are possible, <code>_GLIBCXX_ATOMIC_BUILTINS</code>
will be defined.
</para>
<para>For the following hosts, intrinsics are enabled by default.
</para>
<itemizedlist>
<listitem><para>alpha</para></listitem>
<listitem><para>ia64</para></listitem>
<listitem><para>powerpc</para></listitem>
<listitem><para>s390</para></listitem>
</itemizedlist>
<para>For others, some form of <code>-march</code> may work. On
non-ancient x86 hardware, <code>-march=native</code> usually does the
trick.</para>
<para> For hosts without compiler intrinsics, but with capable
hardware, hand-crafted assembly is selected. This is the case for the following hosts:
</para>
<itemizedlist>
<listitem><para>cris</para></listitem>
<listitem><para>hppa</para></listitem>
<listitem><para>i386</para></listitem>
<listitem><para>i486</para></listitem>
<listitem><para>m48k</para></listitem>
<listitem><para>mips</para></listitem>
<listitem><para>sparc</para></listitem>
</itemizedlist>
<para>And for the rest, a simulated atomic lock via pthreads.
</para>
<para> Detailed information about compiler intrinsics for atomic operations can be found in the GCC <ulink url="http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html"> documentation</ulink>.
</para>
<para> More details on the library fallbacks from the porting <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/porting.html#Thread%20safety">section</ulink>.
</para>
</sect2>
<sect2 id="manual.ext.concurrency.impl.thread" xreflabel="Pthread">
<title>Thread Abstraction</title>
<para>A thin layer above IEEE 1003.1 (ie pthreads) is used to abstract
the thread interface for GCC. This layer is called "gthread," and is
comprised of one header file that wraps the host's default thread layer with
a POSIX-like interface.
</para>
<para> The file &lt;gthr-default.h&gt; points to the deduced wrapper for
the current host. In libstdc++ implementation files,
&lt;bits/gthr.h&gt; is used to select the proper gthreads file.
</para>
<para>Within libstdc++ sources, all calls to underlying thread functionality
use this layer. More detail as to the specific interface can be found in the source <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/gthr_8h-source.html">documentation</ulink>.
</para>
<para>By design, the gthread layer is interoperable with the types,
functions, and usage found in the usual &lt;pthread.h&gt; file,
including <code>pthread_t</code>, <code>pthread_once_t</code>, <code>pthread_create</code>,
etc.
</para>
</sect2>
</sect1>
<sect1 id="manual.ext.concurrency.use" xreflabel="Use">
<title>Use</title>
<para>Typical usage of the last two constructs is demonstrated as follows:
</para>
<programlisting>
#include &lt;ext/concurrence.h&gt;
namespace
{
__gnu_cxx::__mutex safe_base_mutex;
} // anonymous namespace
namespace other
{
void
foo()
{
__gnu_cxx::__scoped_lock sentry(safe_base_mutex);
for (int i = 0; i &lt; max; ++i)
{
_Safe_iterator_base* __old = __iter;
__iter = __iter-&lt;_M_next;
__old-&lt;_M_detach_single();
}
}
</programlisting>
<para>In this sample code, an anonymous namespace is used to keep
the <code>__mutex</code> private to the compilation unit,
and <code>__scoped_lock</code> is used to guard access to the critical
section within the for loop, locking the mutex on creation and freeing
the mutex as control moves out of this block.
</para>
<para>Several exception classes are used to keep track of
concurrence-related errors. These classes
are: <code>__concurrence_lock_error</code>, <code>__concurrence_unlock_error</code>, <code>__concurrence_wait_error</code>,
and <code>__concurrence_broadcast_error</code>.
</para>
</sect1>
</chapter>
<sect1 id="manual.localization.facet.ctype" xreflabel="ctype">
<?dbhtml filename="ctype.html"?>
<sect1info>
<keywordset>
<keyword>
ISO C++
</keyword>
<keyword>
ctype
</keyword>
</keywordset>
</sect1info>
<title>ctype</title>
<sect2 id="facet.ctype.impl" xreflabel="facet.ctype.impl">
<title>Implementation</title>
<sect3>
<title>Specializations</title>
<para>
For the required specialization codecvt&lt;wchar_t, char, mbstate_t&gt; ,
conversions are made between the internal character set (always UCS4
on GNU/Linux) and whatever the currently selected locale for the
LC_CTYPE category implements.
</para>
<para>
The two required specializations are implemented as follows:
</para>
<para>
<code>
ctype&lt;char&gt;
</code>
</para>
<para>
This is simple specialization. Implementing this was a piece of cake.
</para>
<para>
<code>
ctype&lt;wchar_t&gt;
</code>
</para>
<para>
This specialization, by specifying all the template parameters, pretty
much ties the hands of implementors. As such, the implementation is
straightforward, involving mcsrtombs for the conversions between char
to wchar_t and wcsrtombs for conversions between wchar_t and char.
</para>
<para>
Neither of these two required specializations deals with Unicode
characters.
</para>
</sect3>
</sect2>
<sect2 id="facet.ctype.future" xreflabel="facet.ctype.future">
<title>Future</title>
<itemizedlist>
<listitem>
<para>
How to deal with the global locale issue?
</para></listitem>
<listitem>
<para>
How to deal with different types than char, wchar_t? </para></listitem>
<listitem><para>
Overlap between codecvt/ctype: narrow/widen
</para></listitem>
<listitem>
<para>
Mask typedef in codecvt_base, argument types in codecvt. what
is know about this type?
</para></listitem>
<listitem>
<para>
Why mask* argument in codecvt?
</para></listitem>
<listitem>
<para>
Can this be made (more) generic? is there a simple way to
straighten out the configure-time mess that is a by-product of
this class?
</para></listitem>
<listitem>
<para>
Get the ctype&lt;wchar_t&gt;::mask stuff under control. Need to
make some kind of static table, and not do lookup evertime
somebody hits the do_is... functions. Too bad we can't just
redefine mask for ctype&lt;wchar_t&gt;
</para></listitem>
<listitem>
<para>
Rename abstract base class. See if just smash-overriding is a
better approach. Clarify, add sanity to naming.
</para>
</listitem>
</itemizedlist>
</sect2>
<bibliography id="facet.ctype.biblio" xreflabel="facet.ctype.biblio">
<title>Bibliography</title>
<biblioentry>
<title>
The GNU C Library
</title>
<author>
<surname>McGrath</surname>
<firstname>Roland</firstname>
</author>
<author>
<surname>Drepper</surname>
<firstname>Ulrich</firstname>
</author>
<copyright>
<year>2007</year>
<holder>FSF</holder>
</copyright>
<pagenums>Chapters 6 Character Set Handling and 7 Locales and Internationalization</pagenums>
</biblioentry>
<biblioentry>
<title>
Correspondence
</title>
<author>
<surname>Drepper</surname>
<firstname>Ulrich</firstname>
</author>
<copyright>
<year>2002</year>
<holder></holder>
</copyright>
</biblioentry>
<biblioentry>
<title>
ISO/IEC 14882:1998 Programming languages - C++
</title>
<copyright>
<year>1998</year>
<holder>ISO</holder>
</copyright>
</biblioentry>
<biblioentry>
<title>
ISO/IEC 9899:1999 Programming languages - C
</title>
<copyright>
<year>1999</year>
<holder>ISO</holder>
</copyright>
</biblioentry>
<biblioentry>
<title>
System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
</title>
<copyright>
<year>1999</year>
<holder>
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.</holder>
</copyright>
<biblioid>
<ulink url="http://www.opennc.org/austin/docreg.html">
</ulink>
</biblioid>
</biblioentry>
<biblioentry>
<title>
The C++ Programming Language, Special Edition
</title>
<author>
<surname>Stroustrup</surname>
<firstname>Bjarne</firstname>
</author>
<copyright>
<year>2000</year>
<holder>Addison Wesley, Inc.</holder>
</copyright>
<pagenums>Appendix D</pagenums>
<publisher>
<publishername>
Addison Wesley
</publishername>
</publisher>
</biblioentry>
<biblioentry>
<title>
Standard C++ IOStreams and Locales
</title>
<subtitle>
Advanced Programmer's Guide and Reference
</subtitle>
<author>
<surname>Langer</surname>
<firstname>Angelika</firstname>
</author>
<author>
<surname>Kreft</surname>
<firstname>Klaus</firstname>
</author>
<copyright>
<year>2000</year>
<holder>Addison Wesley Longman, Inc.</holder>
</copyright>
<publisher>
<publishername>
Addison Wesley Longman
</publishername>
</publisher>
</biblioentry>
</bibliography>
</sect1>
\ No newline at end of file
<sect1 id="manual.intro.using.debug" xreflabel="Debugging Support">
<?dbhtml filename="debug.html"?>
<sect1info>
<keywordset>
<keyword>
C++
</keyword>
<keyword>
debug
</keyword>
</keywordset>
</sect1info>
<title>Debugging Support</title>
<para>
There are numerous things that can be done to improve the ease with
which C++ binaries are debugged when using the GNU tool chain. Here
are some of them.
</para>
<sect2 id="debug.compiler" xreflabel="debug.compiler">
<title>Using <command>g++</command></title>
<para>
Compiler flags determine how debug information is transmitted
between compilation and debug or analysis tools.
</para>
<para>
The default optimizations and debug flags for a libstdc++ build
are <code>-g -O2</code>. However, both debug and optimization
flags can be varied to change debugging characteristics. For
instance, turning off all optimization via the <code>-g -O0</code>
flag will disable inlining, so that stepping through all
functions, including inlined constructors and destructors, is
possible. In addition,
<code>-fno-eliminate-unused-debug-types</code> can be used when
additional debug information, such as nested class info, is
desired.
</para>
<para>
Or, the debug format that the compiler and debugger use to
communicate information about source constructs can be changed via
<code> -gdwarf-2 </code> or <code> -gstabs </code> flags: some
debugging formats permit more expressive type and scope information
to be shown in gdb. The default debug information for a particular
platform can be identified via the value set by the
PREFERRED_DEBUGGING_TYPE macro in the gcc sources.
</para>
<para>
Many other options are available: please see <ulink
url="http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#Debugging%20Options">"Options
for Debugging Your Program"</ulink> in Using the GNU Compiler
Collection (GCC) for a complete list.
</para>
</sect2>
<sect2 id="debug.req" xreflabel="debug.req">
<title>Debug Versions of Library Binary Files</title>
<para>
If you would like debug symbols in libstdc++, there are two ways to
build libstdc++ with debug flags. The first is to run make from the
toplevel in a freshly-configured tree with
</para>
<programlisting>
--enable-libstdcxx-debug
</programlisting>
<para>and perhaps</para>
<programlisting>
--enable-libstdcxx-debug-flags='...'
</programlisting>
<para>
to create a separate debug build. Both the normal build and the
debug build will persist, without having to specify
<code>CXXFLAGS</code>, and the debug library will be installed in a
separate directory tree, in <code>(prefix)/lib/debug</code>. For
more information, look at the <ulink
url="configopts.html">configuration options</ulink> document.
</para>
<para>
A second approach is to use the configuration flags
</para>
<programlisting>
make CXXFLAGS='-g3 -O0' all
</programlisting>
<para>
This quick and dirty approach is often sufficient for quick
debugging tasks, when you cannot or don't want to recompile your
application to use the <ulink url="#safe">debug mode</ulink>.</para>
</sect2>
<sect2 id="debug.memory" xreflabel="debug.memory">
<title>Memory Leak Hunting</title>
<para>
There are various third party memory tracing and debug utilities
that can be used to provide detailed memory allocation information
about C++ code. An exhaustive list of tools is not going to be
attempted, but includes <code>mtrace</code>, <code>valgrind</code>,
<code>mudflap</code>, and the non-free commercial product
<code>purify</code>. In addition, <code>libcwd</code> has a
replacement for the global new and delete operators that can track
memory allocation and deallocation and provide useful memory
statistics.
</para>
<para>
Regardless of the memory debugging tool being used, there is one
thing of great importance to keep in mind when debugging C++ code
that uses <code>new</code> and <code>delete</code>: there are
different kinds of allocation schemes that can be used by <code>
std::allocator </code>. For implementation details, see the <ulink
url="ext/mt_allocator.html">mt allocator</ulink> documentation and
look specifically for <code>GLIBCXX_FORCE_NEW</code>.
</para>
<para>
In a nutshell, the default allocator used by <code>
std::allocator</code> is a high-performance pool allocator, and can
give the mistaken impression that in a suspect executable, memory is
being leaked, when in reality the memory "leak" is a pool being used
by the library's allocator and is reclaimed after program
termination.
</para>
<para>
For valgrind, there are some specific items to keep in mind. First
of all, use a version of valgrind that will work with current GNU
C++ tools: the first that can do this is valgrind 1.0.4, but later
versions should work at least as well. Second of all, use a
completely unoptimized build to avoid confusing valgrind. Third, use
GLIBCXX_FORCE_NEW to keep extraneous pool allocation noise from
cluttering debug information.
</para>
<para>
Fourth, it may be necessary to force deallocation in other libraries
as well, namely the "C" library. On linux, this can be accomplished
with the appropriate use of the <code>__cxa_atexit</code> or
<code>atexit</code> functions.
</para>
<programlisting>
#include &lt;cstdlib&gt;
extern "C" void __libc_freeres(void);
void do_something() { }
int main()
{
atexit(__libc_freeres);
do_something();
return 0;
}
</programlisting>
<para>or, using <code>__cxa_atexit</code>:</para>
<programlisting>
extern "C" void __libc_freeres(void);
extern "C" int __cxa_atexit(void (*func) (void *), void *arg, void *d);
void do_something() { }
int main()
{
extern void* __dso_handle __attribute__ ((__weak__));
__cxa_atexit((void (*) (void *)) __libc_freeres, NULL,
&amp;__dso_handle ? __dso_handle : NULL);
do_test();
return 0;
}
</programlisting>
<para>
Suggested valgrind flags, given the suggestions above about setting
up the runtime environment, library, and test file, might be:
</para>
<programlisting>
valgrind -v --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes a.out
</programlisting>
</sect2>
<sect2 id="debug.gdb" xreflabel="debug.gdb">
<title>Using <command>gdb</command></title>
<para>
</para>
<para>
Many options are available for gdb itself: please see <ulink
url="http://sources.redhat.com/gdb/current/onlinedocs/gdb_13.html#SEC109">
"GDB features for C++" </ulink> in the gdb documentation. Also
recommended: the other parts of this manual.
</para>
<para>
These settings can either be switched on in at the gdb command line,
or put into a .gdbint file to establish default debugging
characteristics, like so:
</para>
<programlisting>
set print pretty on
set print object on
set print static-members on
set print vtbl on
set print demangle on
set demangle-style gnu-v3
</programlisting>
</sect2>
<sect2 id="debug.exceptions" xreflabel="debug.exceptions">
<title>Tracking uncaught exceptions</title>
<para>
The <link linkend="support.termination.verbose">verbose
termination handler</link> gives information about uncaught
exceptions which are killing the program. It is described in the
linked-to page.
</para>
</sect2>
<sect2 id="debug.debug_mode" xreflabel="debug.debug_mode">
<title>Debug Mode</title>
<para> The <link linkend="manual.ext.debug_mode">Debug Mode</link>
has compile and run-time checks for many containers.
</para>
</sect2>
<sect2 id="debug.compile_time_checks" xreflabel="debug.compile_time_checks">
<title>Compile Time Checking</title>
<para> The <link linkend="manual.ext.compile_checks">Compile-Time
Checks</link> Extension has compile-time checks for many algorithms.
</para>
</sect2>
</sect1>
\ No newline at end of file
<?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]>
<part id="manual.diagnostics" xreflabel="Diagnostics">
<?dbhtml filename="diagnostics.html"?>
<partinfo>
<keywordset>
<keyword>
ISO C++
</keyword>
<keyword>
library
</keyword>
</keywordset>
</partinfo>
<title>Diagnostics</title>
<chapter id="manual.diagnostics.exceptions" xreflabel="Exceptions">
<title>Exceptions</title>
<sect1 id="manual.diagnostics.exceptions.hierarchy" xreflabel="Exception Classes">
<title>Exception Classes</title>
<para>
All exception objects are defined in one of the standard header
files: <filename>exception</filename>,
<filename>stdexcept</filename>, <filename>new</filename>, and
<filename>typeinfo</filename>.
</para>
<para>
The base exception object is <classname>exception</classname>,
located in <filename>exception</filename>. This object has no
<classname>string</classname> member.
</para>
<para>
Derived from this are several classes that may have a
<classname>string</classname> member: a full heirarchy can be
found in the <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00233.html">source documentation</ulink>.
</para>
</sect1>
<sect1 id="manual.diagnostics.exceptions.data" xreflabel="Adding Data to Exceptions">
<title>Adding Data to Exceptions</title>
<para>
The standard exception classes carry with them a single string as
data (usually describing what went wrong or where the 'throw' took
place). It's good to remember that you can add your own data to
these exceptions when extending the hierarchy:
</para>
<programlisting>
struct My_Exception : public std::runtime_error
{
public:
My_Exception (const string&amp; whatarg)
: std::runtime_error(whatarg), e(errno), id(GetDataBaseID()) { }
int errno_at_time_of_throw() const { return e; }
DBID id_of_thing_that_threw() const { return id; }
protected:
int e;
DBID id; // some user-defined type
};
</programlisting>
</sect1>
<sect1 id="manual.diagnostics.exceptions.cancellation" xreflabel="Cancellation">
<title>Cancellation</title>
<para>
</para>
</sect1>
</chapter>
<chapter id="manual.diagnostics.concept_checking" xreflabel="Concept Checking">
<title>Concept Checking</title>
<para>
In 1999, SGI added <quote>concept checkers</quote> to their
implementation of the STL: code which checked the template
parameters of instantiated pieces of the STL, in order to insure
that the parameters being used met the requirements of the
standard. For example, the Standard requires that types passed as
template parameters to <classname>vector</classname> be
&quot;Assignable&quot; (which means what you think it means). The
checking was done during compilation, and none of the code was
executed at runtime.
</para>
<para>
Unfortunately, the size of the compiler files grew significantly
as a result. The checking code itself was cumbersome. And bugs
were found in it on more than one occasion.
</para>
<para>
The primary author of the checking code, Jeremy Siek, had already
started work on a replacement implementation. The new code has been
formally reviewed and accepted into
<ulink url="http://www.boost.org/libs/concept_check/concept_check.htm">the
Boost libraries</ulink>, and we are pleased to incorporate it into the
GNU C++ library.
</para>
<para>
The new version imposes a much smaller space overhead on the generated
object file. The checks are also cleaner and easier to read and
understand.
</para>
<para>
They are off by default for all versions of GCC.
They can be enabled at configure time with
<ulink url="../configopts.html"><literal>--enable-concept-checks</literal></ulink>.
You can enable them on a per-translation-unit basis with
<literal>-D_GLIBCXX_CONCEPT_CHECKS</literal>.
</para>
<para>
Please note that the upcoming C++ standard has first-class
support for template parameter constraints based on concepts in the core
language. This will obviate the need for the library-simulated concept
checking described above.
</para>
</chapter>
</part>
<?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]>
<part id="manual.iterators" xreflabel="Iterators">
<?dbhtml filename="iterators.html"?>
<partinfo>
<keywordset>
<keyword>
ISO C++
</keyword>
<keyword>
library
</keyword>
</keywordset>
</partinfo>
<title>Iterators</title>
<!-- Chapter 01 : Predefined -->
<chapter id="manual.iterators.predefined" xreflabel="Predefined">
<title>Predefined</title>
<sect1 id="iterators.predefined.vs_pointers" xreflabel="Versus Pointers">
<title>Iterators vs. Pointers</title>
<para><ulink url="../faq/index.html#5_1">FAQ 5.1</ulink> points out that iterators
are not implemented as pointers. They are a generalization of
pointers, but they are implemented in libstdc++ as separate classes.
</para>
<para>Keeping that simple fact in mind as you design your code will
prevent a whole lot of difficult-to-understand bugs.
</para>
<para>You can think of it the other way 'round, even. Since iterators
are a generalization, that means that <emphasis>pointers</emphasis> are
<emphasis>iterators</emphasis>, and that pointers can be used whenever an
iterator would be. All those functions in the Algorithms chapter
of the Standard will work just as well on plain arrays and their
pointers.
</para>
<para>That doesn't mean that when you pass in a pointer, it gets wrapped
into some special delegating iterator-to-pointer class with a layer
of overhead. (If you think that's the case anywhere, you don't
understand templates to begin with...) Oh, no; if you pass
in a pointer, then the compiler will instantiate that template
using T* as a type, and good old high-speed pointer arithmetic as
its operations, so the resulting code will be doing exactly the same
things as it would be doing if you had hand-coded it yourself (for
the 273rd time).
</para>
<para>How much overhead <emphasis>is</emphasis> there when using an iterator class?
Very little. Most of the layering classes contain nothing but
typedefs, and typedefs are &quot;meta-information&quot; that simply
tell the compiler some nicknames; they don't create code. That
information gets passed down through inheritance, so while the
compiler has to do work looking up all the names, your runtime code
does not. (This has been a prime concern from the beginning.)
</para>
</sect1>
<sect1 id="iterators.predefined.end" xreflabel="end() Is One Past the End">
<title>One Past the End</title>
<para>This starts off sounding complicated, but is actually very easy,
especially towards the end. Trust me.
</para>
<para>Beginners usually have a little trouble understand the whole
'past-the-end' thing, until they remember their early algebra classes
(see, they <emphasis>told</emphasis> you that stuff would come in handy!) and
the concept of half-open ranges.
</para>
<para>First, some history, and a reminder of some of the funkier rules in
C and C++ for builtin arrays. The following rules have always been
true for both languages:
</para>
<orderedlist>
<listitem>
<para>You can point anywhere in the array, <emphasis>or to the first element
past the end of the array</emphasis>. A pointer that points to one
past the end of the array is guaranteed to be as unique as a
pointer to somewhere inside the array, so that you can compare
such pointers safely.
</para>
</listitem>
<listitem>
<para>You can only dereference a pointer that points into an array.
If your array pointer points outside the array -- even to just
one past the end -- and you dereference it, Bad Things happen.
</para>
</listitem>
<listitem>
<para>Strictly speaking, simply pointing anywhere else invokes
undefined behavior. Most programs won't puke until such a
pointer is actually dereferenced, but the standards leave that
up to the platform.
</para>
</listitem>
</orderedlist>
<para>The reason this past-the-end addressing was allowed is to make it
easy to write a loop to go over an entire array, e.g.,
while (*d++ = *s++);.
</para>
<para>So, when you think of two pointers delimiting an array, don't think
of them as indexing 0 through n-1. Think of them as <emphasis>boundary
markers</emphasis>:
</para>
<programlisting>
beginning end
| |
| | This is bad. Always having to
| | remember to add or subtract one.
| | Off-by-one bugs very common here.
V V
array of N elements
|---|---|--...--|---|---|
| 0 | 1 | ... |N-2|N-1|
|---|---|--...--|---|---|
^ ^
| |
| | This is good. This is safe. This
| | is guaranteed to work. Just don't
| | dereference 'end'.
beginning end
</programlisting>
<para>See? Everything between the boundary markers is part of the array.
Simple.
</para>
<para>Now think back to your junior-high school algebra course, when you
were learning how to draw graphs. Remember that a graph terminating
with a solid dot meant, &quot;Everything up through this point,&quot;
and a graph terminating with an open dot meant, &quot;Everything up
to, but not including, this point,&quot; respectively called closed
and open ranges? Remember how closed ranges were written with
brackets, <emphasis>[a,b]</emphasis>, and open ranges were written with parentheses,
<emphasis>(a,b)</emphasis>?
</para>
<para>The boundary markers for arrays describe a <emphasis>half-open range</emphasis>,
starting with (and including) the first element, and ending with (but
not including) the last element: <emphasis>[beginning,end)</emphasis>. See, I
told you it would be simple in the end.
</para>
<para>Iterators, and everything working with iterators, follows this same
time-honored tradition. A container's <code>begin()</code> method returns
an iterator referring to the first element, and its <code>end()</code>
method returns a past-the-end iterator, which is guaranteed to be
unique and comparable against any other iterator pointing into the
middle of the container.
</para>
<para>Container constructors, container methods, and algorithms, all take
pairs of iterators describing a range of values on which to operate.
All of these ranges are half-open ranges, so you pass the beginning
iterator as the starting parameter, and the one-past-the-end iterator
as the finishing parameter.
</para>
<para>This generalizes very well. You can operate on sub-ranges quite
easily this way; functions accepting a <emphasis>[first,last)</emphasis> range
don't know or care whether they are the boundaries of an entire {array,
sequence, container, whatever}, or whether they only enclose a few
elements from the center. This approach also makes zero-length
sequences very simple to recognize: if the two endpoints compare
equal, then the {array, sequence, container, whatever} is empty.
</para>
<para>Just don't dereference <code>end()</code>.
</para>
</sect1>
</chapter>
<!-- Chapter 02 : Stream -->
</part>
<?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]>
<part id="manual.localization" xreflabel="Localization">
<?dbhtml filename="localization.html"?>
<partinfo>
<keywordset>
<keyword>
ISO C++
</keyword>
<keyword>
library
</keyword>
</keywordset>
</partinfo>
<title>Localization</title>
<!-- Chapter 01 : Locale -->
<chapter id="manual.localization.locales" xreflabel="Locales">
<title>Locales</title>
<!-- Section 01 : locale -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="locale.xml">
</xi:include>
</chapter>
<!-- Chapter 02 : Facet -->
<chapter id="manual.localization.facet" xreflabel="facet">
<title>Facets aka Categories</title>
<!-- Section 01 : ctype -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="ctype.xml">
</xi:include>
<!-- Section 02 : codecvt -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="codecvt.xml">
</xi:include>
<!-- Section 03 : messages -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="messages.xml">
</xi:include>
</chapter>
<!-- Chapter 03 : Interacting with C -->
</part>
<?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]>
<part id="manual.numerics" xreflabel="Numerics">
<?dbhtml filename="numerics.html"?>
<partinfo>
<keywordset>
<keyword>
ISO C++
</keyword>
<keyword>
library
</keyword>
</keywordset>
</partinfo>
<title>Numerics</title>
<!-- Chapter 01 : Complex -->
<chapter id="manual.numerics.complex" xreflabel="complex">
<title>Complex</title>
<para>
</para>
<sect1 id="numerics.complex.processing" xreflabel="complex Processing">
<title>complex Processing</title>
<para>
</para>
<para>Using <code>complex&lt;&gt;</code> becomes even more comple- er, sorry,
<emphasis>complicated</emphasis>, with the not-quite-gratuitously-incompatible
addition of complex types to the C language. David Tribble has
compiled a list of C++98 and C99 conflict points; his description of
C's new type versus those of C++ and how to get them playing together
nicely is
<ulink url="http://david.tribble.com/text/cdiffs.htm#C99-complex">here</ulink>.
</para>
<para><code>complex&lt;&gt;</code> is intended to be instantiated with a
floating-point type. As long as you meet that and some other basic
requirements, then the resulting instantiation has all of the usual
math operators defined, as well as definitions of <code>op&lt;&lt;</code>
and <code>op&gt;&gt;</code> that work with iostreams: <code>op&lt;&lt;</code>
prints <code>(u,v)</code> and <code>op&gt;&gt;</code> can read <code>u</code>,
<code>(u)</code>, and <code>(u,v)</code>.
</para>
</sect1>
</chapter>
<!-- Chapter 02 : Generalized Operations -->
<chapter id="manual.numerics.generalized_ops" xreflabel="Generalized Ops">
<title>Generalized Operations</title>
<para>
</para>
<para>There are four generalized functions in the &lt;numeric&gt; header
that follow the same conventions as those in &lt;algorithm&gt;. Each
of them is overloaded: one signature for common default operations,
and a second for fully general operations. Their names are
self-explanatory to anyone who works with numerics on a regular basis:
</para>
<itemizedlist>
<listitem><para><code>accumulate</code></para></listitem>
<listitem><para><code>inner_product</code></para></listitem>
<listitem><para><code>partial_sum</code></para></listitem>
<listitem><para><code>adjacent_difference</code></para></listitem>
</itemizedlist>
<para>Here is a simple example of the two forms of <code>accumulate</code>.
</para>
<programlisting>
int ar[50];
int someval = somefunction();
// ...initialize members of ar to something...
int sum = std::accumulate(ar,ar+50,0);
int sum_stuff = std::accumulate(ar,ar+50,someval);
int product = std::accumulate(ar,ar+50,1,std::multiplies&lt;int&gt;());
</programlisting>
<para>The first call adds all the members of the array, using zero as an
initial value for <code>sum</code>. The second does the same, but uses
<code>someval</code> as the starting value (thus, <code>sum_stuff == sum +
someval</code>). The final call uses the second of the two signatures,
and multiplies all the members of the array; here we must obviously
use 1 as a starting value instead of 0.
</para>
<para>The other three functions have similar dual-signature forms.
</para>
</chapter>
<!-- Chapter 03 : Interacting with C -->
<chapter id="manual.numerics.c" xreflabel="Interacting with C">
<title>Interacting with C</title>
<sect1 id="numerics.c.array" xreflabel="Numerics vs. Arrays">
<title>Numerics vs. Arrays</title>
<para>One of the major reasons why FORTRAN can chew through numbers so well
is that it is defined to be free of pointer aliasing, an assumption
that C89 is not allowed to make, and neither is C++98. C99 adds a new
keyword, <code>restrict</code>, to apply to individual pointers. The
C++ solution is contained in the library rather than the language
(although many vendors can be expected to add this to their compilers
as an extension).
</para>
<para>That library solution is a set of two classes, five template classes,
and &quot;a whole bunch&quot; of functions. The classes are required
to be free of pointer aliasing, so compilers can optimize the
daylights out of them the same way that they have been for FORTRAN.
They are collectively called <code>valarray</code>, although strictly
speaking this is only one of the five template classes, and they are
designed to be familiar to people who have worked with the BLAS
libraries before.
</para>
</sect1>
<sect1 id="numerics.c.c99" xreflabel="C99">
<title>C99</title>
<para>In addition to the other topics on this page, we'll note here some
of the C99 features that appear in libstdc++.
</para>
<para>The C99 features depend on the <code>--enable-c99</code> configure flag.
This flag is already on by default, but it can be disabled by the
user. Also, the configuration machinery will disable it if the
necessary support for C99 (e.g., header files) cannot be found.
</para>
<para>As of GCC 3.0, C99 support includes classification functions
such as <code>isnormal</code>, <code>isgreater</code>,
<code>isnan</code>, etc.
The functions used for 'long long' support such as <code>strtoll</code>
are supported, as is the <code>lldiv_t</code> typedef. Also supported
are the wide character functions using 'long long', like
<code>wcstoll</code>.
</para>
</sect1>
</chapter>
</part>
<?xml version='1.0'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]>
<book id="manual-index" xreflabel="manual-index">
<?dbhtml dir="manual"?>
<?dbhtml filename="spine.html"?>
<title>The GNU C++ Library</title>
<bookinfo>
<copyright>
<year>2008</year>
<holder>
<ulink url="http://fsf.org">FSF</ulink>
</holder>
</copyright>
<legalnotice>
<para>
<ulink url="17_intro/license.html">License</ulink>
</para>
</legalnotice>
</bookinfo>
<!-- Part 01 : Intro -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="intro.xml">
</xi:include>
<!-- Part 02 : Support -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="support.xml">
</xi:include>
<!-- Part 03 : Diagnostics -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="diagnostics.xml">
</xi:include>
<!-- Part 04 : Utilities -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="utilities.xml">
</xi:include>
<!-- Part 05 : Strings -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="strings.xml">
</xi:include>
<!-- Part 06 : Localization -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="localization.xml">
</xi:include>
<!-- Part 07 : Containers -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="containers.xml">
</xi:include>
<!-- Part 08 : Iterators -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="iterators.xml">
</xi:include>
<!-- Part 09 : Algorithms -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="algorithms.xml">
</xi:include>
<!-- Part 10 : Numerics -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="numerics.xml">
</xi:include>
<!-- Part 11 : Input Output -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="io.xml">
</xi:include>
<!-- Part 12 : Extensions -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="extensions.xml">
</xi:include>
<!-- Appendix A -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="appendix_contributing.xml">
</xi:include>
<!-- Appendix B -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="appendix_porting.xml">
</xi:include>
<!-- Appendix C -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="appendix_free.xml">
</xi:include>
<!-- Appendix D -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="../gnu/gpl-2.0.xml">
</xi:include>
<!-- Appendix E -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="../gnu/fdl-1.2.xml">
</xi:include>
</book>
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]>
<part id="manual.util" xreflabel="Utilities">
<?dbhtml filename="utilities.html"?>
<partinfo>
<keywordset>
<keyword>
ISO C++
</keyword>
<keyword>
library
</keyword>
</keywordset>
</partinfo>
<title>Utilities</title>
<!-- Chapter 01 : Functors -->
<chapter id="manual.util.functors" xreflabel="Functors">
<title>Functors</title>
<para>If you don't know what functors are, you're not alone. Many people
get slightly the wrong idea. In the interest of not reinventing
the wheel, we will refer you to the introduction to the functor
concept written by SGI as part of their STL, in
<ulink url="http://www.sgi.com/tech/stl/functors.html">their
http://www.sgi.com/tech/stl/functors.html</ulink>.
</para>
</chapter>
<!-- Chapter 02 : Pairs -->
<chapter id="manual.util.pairs" xreflabel="Pairs">
<title>Pairs</title>
<para>The <code>pair&lt;T1,T2&gt;</code> is a simple and handy way to
carry around a pair of objects. One is of type T1, and another of
type T2; they may be the same type, but you don't get anything
extra if they are. The two members can be accessed directly, as
<code>.first</code> and <code>.second</code>.
</para>
<para>Construction is simple. The default ctor initializes each member
with its respective default ctor. The other simple ctor,
</para>
<programlisting>
pair (const T1&amp; x, const T2&amp; y);
</programlisting>
<para>does what you think it does, <code>first</code> getting <code>x</code>
and <code>second</code> getting <code>y</code>.
</para>
<para>There is a copy constructor, but it requires that your compiler
handle member function templates:
</para>
<programlisting>
template &lt;class U, class V&gt; pair (const pair&lt;U,V&gt;&amp; p);
</programlisting>
<para>The compiler will convert as necessary from U to T1 and from
V to T2 in order to perform the respective initializations.
</para>
<para>The comparison operators are done for you. Equality
of two <code>pair&lt;T1,T2&gt;</code>s is defined as both <code>first</code>
members comparing equal and both <code>second</code> members comparing
equal; this simply delegates responsibility to the respective
<code>operator==</code> functions (for types like MyClass) or builtin
comparisons (for types like int, char, etc).
</para>
<para>
The less-than operator is a bit odd the first time you see it. It
is defined as evaluating to:
</para>
<programlisting>
x.first &lt; y.first ||
( !(y.first &lt; x.first) &amp;&amp; x.second &lt; y.second )
</programlisting>
<para>The other operators are not defined using the <code>rel_ops</code>
functions above, but their semantics are the same.
</para>
<para>Finally, there is a template function called <function>make_pair</function>
that takes two references-to-const objects and returns an
instance of a pair instantiated on their respective types:
</para>
<programlisting>
pair&lt;int,MyClass&gt; p = make_pair(4,myobject);
</programlisting>
</chapter>
<!-- Chapter 03 : Memory -->
<chapter id="manual.util.memory" xreflabel="Memory">
<title>Memory</title>
<para>
Memory contains three general areas. First, function and operator
calls via <function>new</function> and <function>delete</function>
operator or member function calls. Second, allocation via
<classname>allocator</classname>. And finally, smart pointer and
intelligent pointer abstractions.
</para>
<!-- Section 01 : allocator -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="allocator.xml">
</xi:include>
<!-- Section 02 : auto_ptr -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="auto_ptr.xml">
</xi:include>
<!-- Section 03 : shared_ptr -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="shared_ptr.xml">
</xi:include>
</chapter>
<!-- Chapter 04 : Traits -->
<chapter id="manual.util.traits" xreflabel="Traits">
<title>Traits</title>
<para>
</para>
</chapter>
</part>
<?xml version='1.0'?>
<!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[
<!ENTITY authors SYSTEM "authors.xml">
<!ENTITY license SYSTEM "license.xml">
]>
<set id="set-index" xreflabel="set-index">
<?dbhtml filename="set-index.html"?>
<title>The GNU C++ Library Documentation</title>
<setinfo>
<copyright>
<year>2000</year>
<year>2001</year>
<year>2002</year>
<year>2003</year>
<year>2004</year>
<year>2005</year>
<year>2006</year>
<year>2007</year>
<year>2008</year>
<holder>
<ulink url="http://fsf.org">FSF</ulink>
</holder>
</copyright>
&authors;
</setinfo>
<!-- User Manual -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="manual/spine.xml" parse="xml">
</xi:include>
<!-- Source Level Documentation-->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="api.xml" parse="xml">
</xi:include>
<!-- FAQ -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="faq.xml" parse="xml">
</xi:include>
</set>
# Makefile.in generated by automake 1.9.6 from Makefile.am. # Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
...@@ -13,15 +13,11 @@ ...@@ -13,15 +13,11 @@
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
@SET_MAKE@ @SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644 install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c
...@@ -110,42 +106,13 @@ ECHO_C = @ECHO_C@ ...@@ -110,42 +106,13 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@ EGREP = @EGREP@
ENABLE_PARALLEL_FALSE = @ENABLE_PARALLEL_FALSE@
ENABLE_PARALLEL_TRUE = @ENABLE_PARALLEL_TRUE@
ENABLE_SYMVERS_DARWIN_FALSE = @ENABLE_SYMVERS_DARWIN_FALSE@
ENABLE_SYMVERS_DARWIN_TRUE = @ENABLE_SYMVERS_DARWIN_TRUE@
ENABLE_SYMVERS_FALSE = @ENABLE_SYMVERS_FALSE@
ENABLE_SYMVERS_GNU_FALSE = @ENABLE_SYMVERS_GNU_FALSE@
ENABLE_SYMVERS_GNU_NAMESPACE_FALSE = @ENABLE_SYMVERS_GNU_NAMESPACE_FALSE@
ENABLE_SYMVERS_GNU_NAMESPACE_TRUE = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@
ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@ ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@ FGREP = @FGREP@
GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@
GLIBCXX_BUILD_DEBUG_TRUE = @GLIBCXX_BUILD_DEBUG_TRUE@
GLIBCXX_BUILD_PCH_FALSE = @GLIBCXX_BUILD_PCH_FALSE@
GLIBCXX_BUILD_PCH_TRUE = @GLIBCXX_BUILD_PCH_TRUE@
GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE = @GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@
GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE = @GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@
GLIBCXX_C_HEADERS_C_FALSE = @GLIBCXX_C_HEADERS_C_FALSE@
GLIBCXX_C_HEADERS_C_GLOBAL_FALSE = @GLIBCXX_C_HEADERS_C_GLOBAL_FALSE@
GLIBCXX_C_HEADERS_C_GLOBAL_TRUE = @GLIBCXX_C_HEADERS_C_GLOBAL_TRUE@
GLIBCXX_C_HEADERS_C_STD_FALSE = @GLIBCXX_C_HEADERS_C_STD_FALSE@
GLIBCXX_C_HEADERS_C_STD_TRUE = @GLIBCXX_C_HEADERS_C_STD_TRUE@
GLIBCXX_C_HEADERS_C_TRUE = @GLIBCXX_C_HEADERS_C_TRUE@
GLIBCXX_C_HEADERS_EXTRA_FALSE = @GLIBCXX_C_HEADERS_EXTRA_FALSE@
GLIBCXX_C_HEADERS_EXTRA_TRUE = @GLIBCXX_C_HEADERS_EXTRA_TRUE@
GLIBCXX_HOSTED_FALSE = @GLIBCXX_HOSTED_FALSE@
GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
GLIBCXX_LDBL_COMPAT_FALSE = @GLIBCXX_LDBL_COMPAT_FALSE@
GLIBCXX_LDBL_COMPAT_TRUE = @GLIBCXX_LDBL_COMPAT_TRUE@
GREP = @GREP@ GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
...@@ -162,9 +129,8 @@ LN_S = @LN_S@ ...@@ -162,9 +129,8 @@ LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@ LTLIBICONV = @LTLIBICONV@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@ OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
...@@ -190,13 +156,13 @@ USE_NLS = @USE_NLS@ ...@@ -190,13 +156,13 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@ WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@ WERROR = @WERROR@
ac_ct_AR = @ac_ct_AR@ abs_builddir = @abs_builddir@
ac_ct_AS = @ac_ct_AS@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__tar = @am__tar@ am__tar = @am__tar@
am__untar = @am__untar@ am__untar = @am__untar@
...@@ -207,8 +173,12 @@ build_alias = @build_alias@ ...@@ -207,8 +173,12 @@ build_alias = @build_alias@
build_cpu = @build_cpu@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@
check_msgfmt = @check_msgfmt@ check_msgfmt = @check_msgfmt@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
enable_shared = @enable_shared@ enable_shared = @enable_shared@
enable_static = @enable_static@ enable_static = @enable_static@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
...@@ -228,29 +198,36 @@ host_alias = @host_alias@ ...@@ -228,29 +198,36 @@ host_alias = @host_alias@
host_cpu = @host_cpu@ host_cpu = @host_cpu@
host_os = @host_os@ host_os = @host_os@
host_vendor = @host_vendor@ host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@ includedir = @includedir@
infodir = @infodir@ infodir = @infodir@
install_sh = @install_sh@ install_sh = @install_sh@
libdir = @libdir@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@ libtool_VERSION = @libtool_VERSION@
localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@ lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
multi_basedir = @multi_basedir@ multi_basedir = @multi_basedir@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
port_specific_symbol_files = @port_specific_symbol_files@ port_specific_symbol_files = @port_specific_symbol_files@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
target = @target@ target = @target@
target_alias = @target_alias@ target_alias = @target_alias@
target_cpu = @target_cpu@ target_cpu = @target_cpu@
target_os = @target_os@ target_os = @target_os@
target_vendor = @target_vendor@ target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
toplevel_srcdir = @toplevel_srcdir@ toplevel_srcdir = @toplevel_srcdir@
# May be used by various substitution variables. # May be used by various substitution variables.
...@@ -1126,10 +1103,6 @@ mostlyclean-libtool: ...@@ -1126,10 +1103,6 @@ mostlyclean-libtool:
clean-libtool: clean-libtool:
-rm -rf .libs _libs -rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS tags: TAGS
TAGS: TAGS:
...@@ -1138,23 +1111,21 @@ CTAGS: ...@@ -1138,23 +1111,21 @@ CTAGS:
distdir: $(DISTFILES) distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/.. @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; \
list='$(DISTFILES)'; for file in $$list; do \ dist_files=`for file in $$list; do echo $$file; done | \
case $$file in \ sed -e "s|^$$srcdirstrip/||;t" \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ case $$dist_files in \
esac; \ */*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \ fi; \
...@@ -1200,7 +1171,7 @@ clean-am: clean-generic clean-libtool clean-local mostlyclean-am ...@@ -1200,7 +1171,7 @@ clean-am: clean-generic clean-libtool clean-local mostlyclean-am
distclean: distclean-am distclean: distclean-am
-rm -f Makefile -rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool distclean-am: clean-am distclean-generic
dvi: dvi-am dvi: dvi-am
...@@ -1214,12 +1185,20 @@ info-am: ...@@ -1214,12 +1185,20 @@ info-am:
install-data-am: install-data-local install-data-am: install-data-local
install-dvi: install-dvi-am
install-exec-am: install-exec-am:
install-html: install-html-am
install-info: install-info-am install-info: install-info-am
install-man: install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
...@@ -1238,18 +1217,21 @@ ps: ps-am ...@@ -1238,18 +1217,21 @@ ps: ps-am
ps-am: ps-am:
uninstall-am: uninstall-info-am uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am all-local check check-am clean clean-generic \ .PHONY: all all-am all-local check check-am clean clean-generic \
clean-libtool clean-local distclean distclean-generic \ clean-libtool clean-local distclean distclean-generic \
distclean-libtool distdir dvi dvi-am html html-am info info-am \ distclean-libtool distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \ install install-am install-data install-data-am \
install-data-local install-exec install-exec-am install-info \ install-data-local install-dvi install-dvi-am install-exec \
install-info-am install-man install-strip installcheck \ install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \ installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \ maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
uninstall-info-am
# Here are the rules for building the headers # Here are the rules for building the headers
......
# Makefile.in generated by automake 1.9.6 from Makefile.am. # Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
...@@ -13,15 +13,11 @@ ...@@ -13,15 +13,11 @@
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
@SET_MAKE@ @SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644 install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c
...@@ -110,42 +106,13 @@ ECHO_C = @ECHO_C@ ...@@ -110,42 +106,13 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@ EGREP = @EGREP@
ENABLE_PARALLEL_FALSE = @ENABLE_PARALLEL_FALSE@
ENABLE_PARALLEL_TRUE = @ENABLE_PARALLEL_TRUE@
ENABLE_SYMVERS_DARWIN_FALSE = @ENABLE_SYMVERS_DARWIN_FALSE@
ENABLE_SYMVERS_DARWIN_TRUE = @ENABLE_SYMVERS_DARWIN_TRUE@
ENABLE_SYMVERS_FALSE = @ENABLE_SYMVERS_FALSE@
ENABLE_SYMVERS_GNU_FALSE = @ENABLE_SYMVERS_GNU_FALSE@
ENABLE_SYMVERS_GNU_NAMESPACE_FALSE = @ENABLE_SYMVERS_GNU_NAMESPACE_FALSE@
ENABLE_SYMVERS_GNU_NAMESPACE_TRUE = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@
ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@ ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@ FGREP = @FGREP@
GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@
GLIBCXX_BUILD_DEBUG_TRUE = @GLIBCXX_BUILD_DEBUG_TRUE@
GLIBCXX_BUILD_PCH_FALSE = @GLIBCXX_BUILD_PCH_FALSE@
GLIBCXX_BUILD_PCH_TRUE = @GLIBCXX_BUILD_PCH_TRUE@
GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE = @GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@
GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE = @GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@
GLIBCXX_C_HEADERS_C_FALSE = @GLIBCXX_C_HEADERS_C_FALSE@
GLIBCXX_C_HEADERS_C_GLOBAL_FALSE = @GLIBCXX_C_HEADERS_C_GLOBAL_FALSE@
GLIBCXX_C_HEADERS_C_GLOBAL_TRUE = @GLIBCXX_C_HEADERS_C_GLOBAL_TRUE@
GLIBCXX_C_HEADERS_C_STD_FALSE = @GLIBCXX_C_HEADERS_C_STD_FALSE@
GLIBCXX_C_HEADERS_C_STD_TRUE = @GLIBCXX_C_HEADERS_C_STD_TRUE@
GLIBCXX_C_HEADERS_C_TRUE = @GLIBCXX_C_HEADERS_C_TRUE@
GLIBCXX_C_HEADERS_EXTRA_FALSE = @GLIBCXX_C_HEADERS_EXTRA_FALSE@
GLIBCXX_C_HEADERS_EXTRA_TRUE = @GLIBCXX_C_HEADERS_EXTRA_TRUE@
GLIBCXX_HOSTED_FALSE = @GLIBCXX_HOSTED_FALSE@
GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
GLIBCXX_LDBL_COMPAT_FALSE = @GLIBCXX_LDBL_COMPAT_FALSE@
GLIBCXX_LDBL_COMPAT_TRUE = @GLIBCXX_LDBL_COMPAT_TRUE@
GREP = @GREP@ GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
...@@ -162,9 +129,8 @@ LN_S = @LN_S@ ...@@ -162,9 +129,8 @@ LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@ LTLIBICONV = @LTLIBICONV@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@ OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
...@@ -190,13 +156,13 @@ USE_NLS = @USE_NLS@ ...@@ -190,13 +156,13 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@ WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@ WERROR = @WERROR@
ac_ct_AR = @ac_ct_AR@ abs_builddir = @abs_builddir@
ac_ct_AS = @ac_ct_AS@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__tar = @am__tar@ am__tar = @am__tar@
am__untar = @am__untar@ am__untar = @am__untar@
...@@ -207,8 +173,12 @@ build_alias = @build_alias@ ...@@ -207,8 +173,12 @@ build_alias = @build_alias@
build_cpu = @build_cpu@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@
check_msgfmt = @check_msgfmt@ check_msgfmt = @check_msgfmt@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
enable_shared = @enable_shared@ enable_shared = @enable_shared@
enable_static = @enable_static@ enable_static = @enable_static@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
...@@ -228,29 +198,36 @@ host_alias = @host_alias@ ...@@ -228,29 +198,36 @@ host_alias = @host_alias@
host_cpu = @host_cpu@ host_cpu = @host_cpu@
host_os = @host_os@ host_os = @host_os@
host_vendor = @host_vendor@ host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@ includedir = @includedir@
infodir = @infodir@ infodir = @infodir@
install_sh = @install_sh@ install_sh = @install_sh@
libdir = @libdir@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@ libtool_VERSION = @libtool_VERSION@
localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@ lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
multi_basedir = @multi_basedir@ multi_basedir = @multi_basedir@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
port_specific_symbol_files = @port_specific_symbol_files@ port_specific_symbol_files = @port_specific_symbol_files@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
target = @target@ target = @target@
target_alias = @target_alias@ target_alias = @target_alias@
target_cpu = @target_cpu@ target_cpu = @target_cpu@
target_os = @target_os@ target_os = @target_os@
target_vendor = @target_vendor@ target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
toplevel_srcdir = @toplevel_srcdir@ toplevel_srcdir = @toplevel_srcdir@
# May be used by various substitution variables. # May be used by various substitution variables.
...@@ -328,10 +305,6 @@ mostlyclean-libtool: ...@@ -328,10 +305,6 @@ mostlyclean-libtool:
clean-libtool: clean-libtool:
-rm -rf .libs _libs -rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS tags: TAGS
TAGS: TAGS:
...@@ -340,23 +313,21 @@ CTAGS: ...@@ -340,23 +313,21 @@ CTAGS:
distdir: $(DISTFILES) distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/.. @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; \
list='$(DISTFILES)'; for file in $$list; do \ dist_files=`for file in $$list; do echo $$file; done | \
case $$file in \ sed -e "s|^$$srcdirstrip/||;t" \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ case $$dist_files in \
esac; \ */*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \ fi; \
...@@ -402,7 +373,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am ...@@ -402,7 +373,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am distclean: distclean-am
-rm -f Makefile -rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool distclean-am: clean-am distclean-generic
dvi: dvi-am dvi: dvi-am
...@@ -416,12 +387,20 @@ info-am: ...@@ -416,12 +387,20 @@ info-am:
install-data-am: install-data-local install-data-am: install-data-local
install-dvi: install-dvi-am
install-exec-am: install-exec-am:
install-html: install-html-am
install-info: install-info-am install-info: install-info-am
install-man: install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
...@@ -440,17 +419,21 @@ ps: ps-am ...@@ -440,17 +419,21 @@ ps: ps-am
ps-am: ps-am:
uninstall-am: uninstall-info-am uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am all-local check check-am clean clean-generic \ .PHONY: all all-am all-local check check-am clean clean-generic \
clean-libtool distclean distclean-generic distclean-libtool \ clean-libtool distclean distclean-generic distclean-libtool \
distdir dvi dvi-am html html-am info info-am install \ distdir dvi dvi-am html html-am info info-am install \
install-am install-data install-data-am install-data-local \ install-am install-data install-data-am install-data-local \
install-exec install-exec-am install-info install-info-am \ install-dvi install-dvi-am install-exec install-exec-am \
install-man install-strip installcheck installcheck-am \ install-html install-html-am install-info install-info-am \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \ installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am uninstall uninstall-am uninstall-info-am ps ps-am uninstall uninstall-am
.po.mo: .po.mo:
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Runs doxygen and massages the output files. # Runs doxygen and massages the output files.
# Copyright (C) 2001, 2002, 2003, 2004, 2008 Free Software Foundation, Inc. # Copyright (C) 2001, 2002, 2003, 2004, 2008 Free Software Foundation, Inc.
# #
# Synopsis: run_doxygen --mode=[html|man] --host_alias=<alias> \ # Synopsis: run_doxygen --mode=[html|man|xml] --host_alias=<alias> \
# v3srcdir v3builddir # v3srcdir v3builddir
# #
# Originally hacked together by Phil Edwards <pme@gcc.gnu.org> # Originally hacked together by Phil Edwards <pme@gcc.gnu.org>
...@@ -49,6 +49,7 @@ Usage: run_doxygen --mode=MODE --host_alias=BUILD_ALIAS [<options>] ...@@ -49,6 +49,7 @@ Usage: run_doxygen --mode=MODE --host_alias=BUILD_ALIAS [<options>]
MODE is one of: MODE is one of:
html Generate user-level HTML library documentation. html Generate user-level HTML library documentation.
man Generate user-level man pages. man Generate user-level man pages.
xml Generate user-level XML pages.
BUILD_ALIAS is the GCC build alias set at configure time. BUILD_ALIAS is the GCC build alias set at configure time.
...@@ -99,7 +100,8 @@ host_alias=unset ...@@ -99,7 +100,8 @@ host_alias=unset
srcdir=unset srcdir=unset
outdir=unset outdir=unset
do_html=false do_html=false
do_man=false do_man=false
do_xml=false
enabled_sections= enabled_sections=
generate_tagfile= generate_tagfile=
DATEtext=`date '+%Y-%m-%d'` DATEtext=`date '+%Y-%m-%d'`
...@@ -125,6 +127,10 @@ case x"$mode" in ...@@ -125,6 +127,10 @@ case x"$mode" in
xman) xman)
do_man=true do_man=true
;; ;;
xxml)
do_xml=true
enabled_sections=maint
;;
*) *)
echo run_doxygen error: $mode is an invalid mode 1>&2 echo run_doxygen error: $mode is an invalid mode 1>&2
exit 1 ;; exit 1 ;;
...@@ -139,6 +145,10 @@ if $do_man; then ...@@ -139,6 +145,10 @@ if $do_man; then
chmod -R u+w $outdir/man/man3/ext chmod -R u+w $outdir/man/man3/ext
fi fi
if $do_xml; then
mkdir -p $outdir/xml
fi
( (
set -e set -e
cd $builddir cd $builddir
...@@ -150,6 +160,7 @@ fi ...@@ -150,6 +160,7 @@ fi
-e "s=@enabled_sections@=${enabled_sections}=" \ -e "s=@enabled_sections@=${enabled_sections}=" \
-e "s=@do_html@=${do_html}=" \ -e "s=@do_html@=${do_html}=" \
-e "s=@do_man@=${do_man}=" \ -e "s=@do_man@=${do_man}=" \
-e "s=@do_xml@=${do_xml}=" \
-e "s=@generate_tagfile@=${generate_tagfile}=" \ -e "s=@generate_tagfile@=${generate_tagfile}=" \
${srcdir}/doc/doxygen/user.cfg.in > ${outdir}/${mode}.cfg ${srcdir}/doc/doxygen/user.cfg.in > ${outdir}/${mode}.cfg
echo :: NOTE that this may take some time... echo :: NOTE that this may take some time...
...@@ -179,7 +190,8 @@ if $do_html; then ...@@ -179,7 +190,8 @@ if $do_html; then
mv annstrip.html annotated.html mv annstrip.html annotated.html
# Work around a bug in doxygen 1.3. # Work around a bug in doxygen 1.3.
for f in class*html struct*html; do # for f in class*html struct*html; do
for f in class*html; do
sed '1,10s!^<title> Template!<title>Template !' $f > TEMP sed '1,10s!^<title> Template!<title>Template !' $f > TEMP
mv TEMP $f mv TEMP $f
done done
......
# Makefile.in generated by automake 1.9.6 from Makefile.am. # Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
...@@ -13,15 +13,11 @@ ...@@ -13,15 +13,11 @@
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
@SET_MAKE@ @SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644 install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c
...@@ -114,42 +110,13 @@ ECHO_C = @ECHO_C@ ...@@ -114,42 +110,13 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@ EGREP = @EGREP@
ENABLE_PARALLEL_FALSE = @ENABLE_PARALLEL_FALSE@
ENABLE_PARALLEL_TRUE = @ENABLE_PARALLEL_TRUE@
ENABLE_SYMVERS_DARWIN_FALSE = @ENABLE_SYMVERS_DARWIN_FALSE@
ENABLE_SYMVERS_DARWIN_TRUE = @ENABLE_SYMVERS_DARWIN_TRUE@
ENABLE_SYMVERS_FALSE = @ENABLE_SYMVERS_FALSE@
ENABLE_SYMVERS_GNU_FALSE = @ENABLE_SYMVERS_GNU_FALSE@
ENABLE_SYMVERS_GNU_NAMESPACE_FALSE = @ENABLE_SYMVERS_GNU_NAMESPACE_FALSE@
ENABLE_SYMVERS_GNU_NAMESPACE_TRUE = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@
ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@ ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@ FGREP = @FGREP@
GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@
GLIBCXX_BUILD_DEBUG_TRUE = @GLIBCXX_BUILD_DEBUG_TRUE@
GLIBCXX_BUILD_PCH_FALSE = @GLIBCXX_BUILD_PCH_FALSE@
GLIBCXX_BUILD_PCH_TRUE = @GLIBCXX_BUILD_PCH_TRUE@
GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE = @GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@
GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE = @GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@
GLIBCXX_C_HEADERS_C_FALSE = @GLIBCXX_C_HEADERS_C_FALSE@
GLIBCXX_C_HEADERS_C_GLOBAL_FALSE = @GLIBCXX_C_HEADERS_C_GLOBAL_FALSE@
GLIBCXX_C_HEADERS_C_GLOBAL_TRUE = @GLIBCXX_C_HEADERS_C_GLOBAL_TRUE@
GLIBCXX_C_HEADERS_C_STD_FALSE = @GLIBCXX_C_HEADERS_C_STD_FALSE@
GLIBCXX_C_HEADERS_C_STD_TRUE = @GLIBCXX_C_HEADERS_C_STD_TRUE@
GLIBCXX_C_HEADERS_C_TRUE = @GLIBCXX_C_HEADERS_C_TRUE@
GLIBCXX_C_HEADERS_EXTRA_FALSE = @GLIBCXX_C_HEADERS_EXTRA_FALSE@
GLIBCXX_C_HEADERS_EXTRA_TRUE = @GLIBCXX_C_HEADERS_EXTRA_TRUE@
GLIBCXX_HOSTED_FALSE = @GLIBCXX_HOSTED_FALSE@
GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
GLIBCXX_LDBL_COMPAT_FALSE = @GLIBCXX_LDBL_COMPAT_FALSE@
GLIBCXX_LDBL_COMPAT_TRUE = @GLIBCXX_LDBL_COMPAT_TRUE@
GREP = @GREP@ GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
...@@ -166,9 +133,8 @@ LN_S = @LN_S@ ...@@ -166,9 +133,8 @@ LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@ LTLIBICONV = @LTLIBICONV@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@ OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
...@@ -194,13 +160,13 @@ USE_NLS = @USE_NLS@ ...@@ -194,13 +160,13 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@ WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@ WERROR = @WERROR@
ac_ct_AR = @ac_ct_AR@ abs_builddir = @abs_builddir@
ac_ct_AS = @ac_ct_AS@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__tar = @am__tar@ am__tar = @am__tar@
am__untar = @am__untar@ am__untar = @am__untar@
...@@ -211,8 +177,12 @@ build_alias = @build_alias@ ...@@ -211,8 +177,12 @@ build_alias = @build_alias@
build_cpu = @build_cpu@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@
check_msgfmt = @check_msgfmt@ check_msgfmt = @check_msgfmt@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
enable_shared = @enable_shared@ enable_shared = @enable_shared@
enable_static = @enable_static@ enable_static = @enable_static@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
...@@ -232,29 +202,36 @@ host_alias = @host_alias@ ...@@ -232,29 +202,36 @@ host_alias = @host_alias@
host_cpu = @host_cpu@ host_cpu = @host_cpu@
host_os = @host_os@ host_os = @host_os@
host_vendor = @host_vendor@ host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@ includedir = @includedir@
infodir = @infodir@ infodir = @infodir@
install_sh = @install_sh@ install_sh = @install_sh@
libdir = @libdir@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@ libtool_VERSION = @libtool_VERSION@
localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@ lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
multi_basedir = @multi_basedir@ multi_basedir = @multi_basedir@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
port_specific_symbol_files = @port_specific_symbol_files@ port_specific_symbol_files = @port_specific_symbol_files@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
target = @target@ target = @target@
target_alias = @target_alias@ target_alias = @target_alias@
target_cpu = @target_cpu@ target_cpu = @target_cpu@
target_os = @target_os@ target_os = @target_os@
target_vendor = @target_vendor@ target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
toplevel_srcdir = @toplevel_srcdir@ toplevel_srcdir = @toplevel_srcdir@
AUTOMAKE_OPTIONS = dejagnu nostdinc AUTOMAKE_OPTIONS = dejagnu nostdinc
...@@ -354,10 +331,6 @@ mostlyclean-libtool: ...@@ -354,10 +331,6 @@ mostlyclean-libtool:
clean-libtool: clean-libtool:
-rm -rf .libs _libs -rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS tags: TAGS
TAGS: TAGS:
...@@ -370,11 +343,13 @@ check-DEJAGNU: site.exp ...@@ -370,11 +343,13 @@ check-DEJAGNU: site.exp
EXPECT=$(EXPECT); export EXPECT; \ EXPECT=$(EXPECT); export EXPECT; \
runtest=$(RUNTEST); \ runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
l='$(DEJATOOL)'; for tool in $$l; do \ exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
$$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
then :; else exit_status=1; fi; \
done; \ done; \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\ else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi fi; \
exit $$exit_status
distclean-DEJAGNU: distclean-DEJAGNU:
-rm -f site.exp site.bak -rm -f site.exp site.bak
...@@ -383,23 +358,21 @@ distclean-DEJAGNU: ...@@ -383,23 +358,21 @@ distclean-DEJAGNU:
done done
distdir: $(DISTFILES) distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/.. @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; \
list='$(DISTFILES)'; for file in $$list; do \ dist_files=`for file in $$list; do echo $$file; done | \
case $$file in \ sed -e "s|^$$srcdirstrip/||;t" \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ case $$dist_files in \
esac; \ */*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \ fi; \
...@@ -446,8 +419,7 @@ clean-am: clean-generic clean-libtool clean-local mostlyclean-am ...@@ -446,8 +419,7 @@ clean-am: clean-generic clean-libtool clean-local mostlyclean-am
distclean: distclean-am distclean: distclean-am
-rm -f Makefile -rm -f Makefile
distclean-am: clean-am distclean-DEJAGNU distclean-generic \ distclean-am: clean-am distclean-DEJAGNU distclean-generic
distclean-libtool
dvi: dvi-am dvi: dvi-am
...@@ -461,12 +433,20 @@ info-am: ...@@ -461,12 +433,20 @@ info-am:
install-data-am: install-data-am:
install-dvi: install-dvi-am
install-exec-am: install-exec-am:
install-html: install-html-am
install-info: install-info-am install-info: install-info-am
install-man: install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
...@@ -485,18 +465,21 @@ ps: ps-am ...@@ -485,18 +465,21 @@ ps: ps-am
ps-am: ps-am:
uninstall-am: uninstall-info-am uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \ .PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \
clean-libtool clean-local distclean distclean-DEJAGNU \ clean-libtool clean-local distclean distclean-DEJAGNU \
distclean-generic distclean-libtool distdir dvi dvi-am html \ distclean-generic distclean-libtool distdir dvi dvi-am html \
html-am info info-am install install-am install-data \ html-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \ install-data-am install-dvi install-dvi-am install-exec \
install-info-am install-man install-strip installcheck \ install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \ installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \ maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
uninstall-info-am
# This rule generates all of the testsuite_files* lists at once. # This rule generates all of the testsuite_files* lists at once.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment