TODO List (This is incomplete... how ironic.)
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/doxygen/run_doxygen gcc-3.4.1/libstdc++-v3/docs/doxygen/run_doxygen
*** gcc-3.4.0/libstdc++-v3/docs/doxygen/run_doxygen 2003-09-13 20:58:27.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/docs/doxygen/run_doxygen 2004-05-22 07:13:13.000000000 +0000
***************
*** 9,15 ****
# We can check now that the version of doxygen is >= this variable.
! DOXYVER=1.2.15
find_doxygen() {
local -r v_required=`echo $DOXYVER | \
--- 9,15 ----
# We can check now that the version of doxygen is >= this variable.
! DOXYVER=1.3.7
find_doxygen() {
local -r v_required=`echo $DOXYVER | \
*************** mv s20_3_5_negators.3 Negation_fun
*** 215,228 ****
mv s20_3_6_binder.3 Binder_functors.3
mv s20_3_7_adaptors.3 Func_ptr_functors.3
mv s20_3_8_memadaptors.3 Member_ptr_functors.3
- mv std.3 Namespace_Std.3
mv iterator_tags.3 Iterator_types.3
# man pages are for functions/types/other entities, not source files
# directly. who the heck would type "man foo.h" anyhow?
find . -name "[a-z]*" -a ! -name "std_*" -print | xargs rm
! rm -f *.h.3 *config* *.cc.3 *.tcc.3
! rm -f *_t.3 # workaround doxygen template parsing bug for now
# this is used to examine what we would have deleted, for debugging
#mkdir trash
#find . -name "[a-z]*" -a ! -name "std_*" -print | xargs -i mv {} trash
--- 215,228 ----
mv s20_3_6_binder.3 Binder_functors.3
mv s20_3_7_adaptors.3 Func_ptr_functors.3
mv s20_3_8_memadaptors.3 Member_ptr_functors.3
mv iterator_tags.3 Iterator_types.3
+ mv std.3 Namespace_std.3
+ mv __gnu_cxx.3 Namespace___gnu_cxx.3
# man pages are for functions/types/other entities, not source files
# directly. who the heck would type "man foo.h" anyhow?
find . -name "[a-z]*" -a ! -name "std_*" -print | xargs rm
! rm -f *.h.3 *config* *.cc.3 *.tcc.3 *_t.3
# this is used to examine what we would have deleted, for debugging
#mkdir trash
#find . -name "[a-z]*" -a ! -name "std_*" -print | xargs -i mv {} trash
*************** rm stdheader
*** 247,254 ****
# implementations of man(1), e.g., Linux's. We need to have another top-level
# *roff tag to /stop/ the .SH NAME entry.
#problematic=`egrep --files-without-match '^\.SH SYNOPSIS' [A-Z]*.3`
! problematic='Containers.3 Sequences.3 Assoc_containers.3 Allocators.3
! Iterator_types.3'
for f in $problematic; do
sed '/^\.SH NAME/{
n
--- 247,253 ----
# implementations of man(1), e.g., Linux's. We need to have another top-level
# *roff tag to /stop/ the .SH NAME entry.
#problematic=`egrep --files-without-match '^\.SH SYNOPSIS' [A-Z]*.3`
! problematic='Containers.3 Sequences.3 Assoc_containers.3 Iterator_types.3'
for f in $problematic; do
sed '/^\.SH NAME/{
n
*************** for f in __gnu_cxx_*; do
*** 280,287 ****
newname=`echo $f | sed 's/^__gnu_cxx_/__gnu_cxx::/'`
mv $f $newname
done
! for f in *__policy_*; do
! newname=`echo $f | sed 's/__policy_/__policy::/'`
mv $f $newname
done
--- 279,290 ----
newname=`echo $f | sed 's/^__gnu_cxx_/__gnu_cxx::/'`
mv $f $newname
done
! for f in __gnu_debug_*; do
! newname=`echo $f | sed 's/^__gnu_debug_/__gnu_debug::/'`
! mv $f $newname
! done
! for f in GLIBCXXSTD_*; do
! newname=`echo $f | sed 's/^GLIBCXXSTD_/std::/'`
mv $f $newname
done
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/doxygen/stdheader.cc gcc-3.4.1/libstdc++-v3/docs/doxygen/stdheader.cc
*** gcc-3.4.0/libstdc++-v3/docs/doxygen/stdheader.cc 2002-11-21 08:16:32.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/docs/doxygen/stdheader.cc 2004-05-22 05:07:19.000000000 +0000
*************** void init_map()
*** 25,41 ****
headers["algo.h"] = "algorithm";
headers["algobase.h"] = "algorithm";
headers["algorithm.h"] = "algorithm";
! headers["alloc.h"] = "memory";
headers["basic_ios.h"] = "ios";
headers["basic_ios.tcc"] = "ios";
- headers["basic_string.h"] = "string";
- headers["basic_string.tcc"] = "string";
headers["bitset.h"] = "bitset";
headers["bvector.h"] = "vector";
- //headers["char_traits.h"] uhhhhhh
headers["complex.h"] = "complex";
//headers["construct.h"] stl_construct.h entirely internal
headers["deque.h"] = "deque";
headers["fstream.h"] = "fstream";
headers["fstream.tcc"] = "fstream";
headers["function.h"] = "functional";
--- 25,39 ----
headers["algo.h"] = "algorithm";
headers["algobase.h"] = "algorithm";
headers["algorithm.h"] = "algorithm";
! headers["allocator.h"] = "memory";
headers["basic_ios.h"] = "ios";
headers["basic_ios.tcc"] = "ios";
headers["bitset.h"] = "bitset";
headers["bvector.h"] = "vector";
headers["complex.h"] = "complex";
//headers["construct.h"] stl_construct.h entirely internal
headers["deque.h"] = "deque";
+ headers["deque.tcc"] = "deque";
headers["fstream.h"] = "fstream";
headers["fstream.tcc"] = "fstream";
headers["function.h"] = "functional";
*************** void init_map()
*** 52,58 ****
--- 50,60 ----
headers["iterator_base_types.h"] = "iterator";
headers["limits.h"] = "limits";
headers["list.h"] = "list";
+ headers["list.tcc"] = "list";
+ headers["codecvt.h"] = "locale";
headers["locale.h"] = "locale";
+ headers["localefwd.h"] = "locale";
+ headers["locale_classes.h"] = "locale";
headers["locale_facets.h"] = "locale";
headers["locale_facets.tcc"] = "locale";
headers["map.h"] = "map";
*************** void init_map()
*** 63,69 ****
headers["ostream.h"] = "ostream";
headers["ostream.tcc"] = "ostream";
headers["pair.h"] = "utility";
- //headers["pthread_alloc.h"] who knows
headers["queue.h"] = "queue";
headers["raw_storage_iter.h"] = "memory";
headers["relops.h"] = "utility";
--- 65,70 ----
*************** void init_map()
*** 71,91 ****
headers["sstream.h"] = "sstream";
headers["sstream.tcc"] = "sstream";
headers["stack.h"] = "stack";
headers["stdexcept.h"] = "stdexcept";
headers["streambuf.h"] = "streambuf";
headers["streambuf.tcc"] = "streambuf";
headers["string.h"] = "string";
headers["tempbuf.h"] = "memory";
- //headers["threads.h"] who knows
headers["tree.h"] = "backward/tree.h";
headers["uninitialized.h"] = "memory";
headers["utility.h"] = "utility";
headers["valarray.h"] = "valarray";
headers["valarray_array.h"] = "valarray";
headers["valarray_array.tcc"] = "valarray";
headers["valarray_meta.h"] = "valarray";
headers["vector.h"] = "vector";
// C wrappers -- probably was an easier way to do these, but oh well
headers["cassert.h"] = "cassert";
headers["cctype.h"] = "cctype";
--- 72,109 ----
headers["sstream.h"] = "sstream";
headers["sstream.tcc"] = "sstream";
headers["stack.h"] = "stack";
+ headers["functexcept.h"] = "stdexcept";
headers["stdexcept.h"] = "stdexcept";
+ headers["stream_iterator.h"] = "iterator";
+ headers["streambuf_iterator.h"] = "iterator";
headers["streambuf.h"] = "streambuf";
headers["streambuf.tcc"] = "streambuf";
headers["string.h"] = "string";
+ headers["char_traits.h"] = "string";
+ headers["postypes.h"] = "string";
+ headers["basic_string.h"] = "string";
+ headers["basic_string.tcc"] = "string";
headers["tempbuf.h"] = "memory";
headers["tree.h"] = "backward/tree.h";
headers["uninitialized.h"] = "memory";
headers["utility.h"] = "utility";
+ headers["gslice.h"] = "valarray";
+ headers["gslice_array.h"] = "valarray";
+ headers["indirect_array.h"] = "valarray";
+ headers["mask_array.h"] = "valarray";
+ headers["slice_array.h"] = "valarray";
headers["valarray.h"] = "valarray";
+ headers["valarray_after.h"] = "valarray";
+ headers["valarray_before.h"] = "valarray";
headers["valarray_array.h"] = "valarray";
headers["valarray_array.tcc"] = "valarray";
headers["valarray_meta.h"] = "valarray";
headers["vector.h"] = "vector";
+ //headers["threads.h"] who knows
+ //headers["concurrence.h"] who knows
+ //headers["atomicity.h"] who knows
+
// C wrappers -- probably was an easier way to do these, but oh well
headers["cassert.h"] = "cassert";
headers["cctype.h"] = "cctype";
*************** int main (int argc, char**)
*** 149,153 ****
do_word (w);
}
- // vim:ts=4:et:
--- 167,170 ----
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/doxygen/user.cfg.in gcc-3.4.1/libstdc++-v3/docs/doxygen/user.cfg.in
*** gcc-3.4.0/libstdc++-v3/docs/doxygen/user.cfg.in 2003-09-13 20:58:27.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/docs/doxygen/user.cfg.in 2004-05-22 05:07:19.000000000 +0000
***************
*** 1,4 ****
! # Doxyfile 1.3-rc2
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project
--- 1,4 ----
! # Doxyfile 1.3.7
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project
***************
*** 10,24 ****
# TAG += value [value, ...]
# Values that contain spaces should be placed between quotes (" ")
- ### When doxygen is run, the current directory is the top of the
- ### libstdc++-v3 build directory. Keep this in mind while writing
- ### relative-path directories.
- ###
- ### Currently this is not really run through autoconf; it just looks that way.
-
-
#---------------------------------------------------------------------------
! # General configuration options
#---------------------------------------------------------------------------
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
--- 10,17 ----
# TAG += value [value, ...]
# Values that contain spaces should be placed between quotes (" ")
#---------------------------------------------------------------------------
! # Project related configuration options
#---------------------------------------------------------------------------
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
*************** PROJECT_NUMBER =
*** 39,55 ****
OUTPUT_DIRECTORY = @outdir@
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
# documentation generated by doxygen is written. Doxygen will use this
# information to generate all constant output in the proper language.
# The default language is English, other supported languages are:
# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch,
# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en
! # (Japanese with english messages), Korean, Norwegian, Polish, Portuguese,
! # Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian.
OUTPUT_LANGUAGE = English
# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
# documentation are documented, even if no documentation was available.
# Private class members and static file members will be hidden unless
--- 32,212 ----
OUTPUT_DIRECTORY = @outdir@
+ # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+ # 2 levels of 10 sub-directories under the output directory of each output
+ # format and will distribute the generated files over these directories.
+ # Enabling this option can be useful when feeding doxygen a huge amount of source
+ # files, where putting all generated files in the same directory would otherwise
+ # cause performance problems for the file system.
+
+ CREATE_SUBDIRS = NO
+
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
# documentation generated by doxygen is written. Doxygen will use this
# information to generate all constant output in the proper language.
# The default language is English, other supported languages are:
# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch,
# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en
! # (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese,
! # Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
OUTPUT_LANGUAGE = English
+ # This tag can be used to specify the encoding used in the generated output.
+ # The encoding is not always determined by the language that is chosen,
+ # but also whether or not the output is meant for Windows or non-Windows users.
+ # In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
+ # forces the Windows encoding (this is the default for the Windows binary),
+ # whereas setting the tag to NO uses a Unix-style encoding (the default for
+ # all platforms other than Windows).
+
+ USE_WINDOWS_ENCODING = NO
+
+ # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+ # include brief member descriptions after the members that are listed in
+ # the file and class documentation (similar to JavaDoc).
+ # Set to NO to disable this.
+
+ BRIEF_MEMBER_DESC = YES
+
+ # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+ # the brief description of a member or function before the detailed description.
+ # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+ # brief descriptions will be completely suppressed.
+
+ REPEAT_BRIEF = YES
+
+ # This tag implements a quasi-intelligent brief description abbreviator
+ # that is used to form the text in various listings. Each string
+ # in this list, if found as the leading text of the brief description, will be
+ # stripped from the text and the result after processing the whole list, is used
+ # as the annotated text. Otherwise, the brief description is used as-is. If left
+ # blank, the following values are used ("$name" is automatically replaced with the
+ # name of the entity): "The $name class" "The $name widget" "The $name file"
+ # "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
+
+ ABBREVIATE_BRIEF =
+
+ # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+ # Doxygen will generate a detailed section even if there is only a brief
+ # description.
+
+ ALWAYS_DETAILED_SEC = YES
+
+ # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
+ # members of a class in the documentation of that class as if those members were
+ # ordinary class members. Constructors, destructors and assignment operators of
+ # the base classes will not be shown.
+
+ INLINE_INHERITED_MEMB = YES
+
+ # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+ # path before files name in the file list and in the header files. If set
+ # to NO the shortest path that makes the file name unique will be used.
+
+ FULL_PATH_NAMES = NO
+
+ # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+ # can be used to strip a user-defined part of the path. Stripping is
+ # only done if one of the specified strings matches the left-hand part of
+ # the path. The tag can be used to show relative paths in the file list.
+ # If left blank the directory from which doxygen is run is used as the
+ # path to strip.
+
+ STRIP_FROM_PATH =
+
+ # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+ # the path mentioned in the documentation of a class, which tells
+ # the reader which header file to include in order to use a class.
+ # If left blank only the name of the header file containing the class
+ # definition is used. Otherwise one should specify the include paths that
+ # are normally passed to the compiler using the -I flag.
+
+ STRIP_FROM_INC_PATH =
+
+ # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+ # (but less readable) file names. This can be useful is your file systems
+ # doesn't support long names like on DOS, Mac, or CD-ROM.
+
+ SHORT_NAMES = NO
+
+ # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+ # will interpret the first line (until the first dot) of a JavaDoc-style
+ # comment as the brief description. If set to NO, the JavaDoc
+ # comments will behave just like the Qt-style comments (thus requiring an
+ # explicit @brief command for a brief description.
+
+ JAVADOC_AUTOBRIEF = NO
+
+ # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+ # treat a multi-line C++ special comment block (i.e. a block of //! or ///
+ # comments) as a brief description. This used to be the default behaviour.
+ # The new default is to treat a multi-line C++ comment block as a detailed
+ # description. Set this tag to YES if you prefer the old behaviour instead.
+
+ MULTILINE_CPP_IS_BRIEF = YES
+
+ # If the DETAILS_AT_TOP tag is set to YES then Doxygen
+ # will output the detailed description near the top, like JavaDoc.
+ # If set to NO, the detailed description appears after the member
+ # documentation.
+
+ DETAILS_AT_TOP = NO
+
+ # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+ # member inherits the documentation from any documented member that it
+ # re-implements.
+
+ INHERIT_DOCS = YES
+
+ # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+ # tag is set to YES, then doxygen will reuse the documentation of the first
+ # member in the group (if any) for the other members of the group. By default
+ # all members of a group must be documented explicitly.
+
+ DISTRIBUTE_GROUP_DOC = YES
+
+ # The TAB_SIZE tag can be used to set the number of spaces in a tab.
+ # Doxygen uses this value to replace tabs by spaces in code fragments.
+
+ TAB_SIZE = 4
+
+ # This tag can be used to specify a number of aliases that acts
+ # as commands in the documentation. An alias has the form "name=value".
+ # For example adding "sideeffect=\par Side Effects:\n" will allow you to
+ # put the command \sideeffect (or @sideeffect) in the documentation, which
+ # will result in a user-defined paragraph with heading "Side Effects:".
+ # You can put \n's in the value part of an alias to insert newlines.
+
+ ALIASES = "doctodo=@todo\nDoc me! See docs/doxygen/TODO and http://gcc.gnu.org/ml/libstdc++/2002-02/msg00003.html for more." \
+ "isiosfwd=One of the @link s27_2_iosfwd I/O forward declarations @endlink"
+
+ # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+ # only. Doxygen will then generate output that is more tailored for C.
+ # For instance, some of the names that are used will be different. The list
+ # of all members will be omitted, etc.
+
+ OPTIMIZE_OUTPUT_FOR_C = NO
+
+ # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
+ # only. Doxygen will then generate output that is more tailored for Java.
+ # For instance, namespaces will be presented as packages, qualified scopes
+ # will look different, etc.
+
+ OPTIMIZE_OUTPUT_JAVA = NO
+
+ # Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+ # the same type (for instance a group of public functions) to be put as a
+ # subgroup of that type (e.g. under the Public Functions section). Set it to
+ # NO to prevent subgrouping. Alternatively, this can be done per class using
+ # the \nosubgrouping command.
+
+ SUBGROUPING = YES
+
+ #---------------------------------------------------------------------------
+ # Build related configuration options
+ #---------------------------------------------------------------------------
+
# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
# documentation are documented, even if no documentation was available.
# Private class members and static file members will be hidden unless
*************** EXTRACT_STATIC = YES
*** 73,78 ****
--- 230,242 ----
EXTRACT_LOCAL_CLASSES = NO
+ # This flag is only useful for Objective-C code. When set to YES local
+ # methods, which are defined in the implementation section but not in
+ # the interface are included in the documentation.
+ # If set to NO (the default) only methods in the interface are included.
+
+ EXTRACT_LOCAL_METHODS = NO
+
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
# undocumented members of documented classes, files or namespaces.
# If set to NO (the default) these members will be included in the
*************** HIDE_UNDOC_MEMBERS = YES
*** 83,89 ****
# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
# undocumented classes that are normally visible in the class hierarchy.
! # If set to NO (the default) these class will be included in the various
# overviews. This option has no effect if EXTRACT_ALL is enabled.
HIDE_UNDOC_CLASSES = YES
--- 247,253 ----
# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
# undocumented classes that are normally visible in the class hierarchy.
! # If set to NO (the default) these classes will be included in the various
# overviews. This option has no effect if EXTRACT_ALL is enabled.
HIDE_UNDOC_CLASSES = YES
*************** HIDE_FRIEND_COMPOUNDS = NO
*** 102,148 ****
HIDE_IN_BODY_DOCS = NO
- # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
- # include brief member descriptions after the members that are listed in
- # the file and class documentation (similar to JavaDoc).
- # Set to NO to disable this.
-
- BRIEF_MEMBER_DESC = YES
-
- # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
- # the brief description of a member or function before the detailed description.
- # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
- # brief descriptions will be completely suppressed.
-
- REPEAT_BRIEF = YES
-
- # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
- # Doxygen will generate a detailed section even if there is only a brief
- # description.
-
- ALWAYS_DETAILED_SEC = YES
-
- # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
- # members of a class in the documentation of that class as if those members were
- # ordinary class members. Constructors, destructors and assignment operators of
- # the base classes will not be shown.
-
- INLINE_INHERITED_MEMB = YES
- # pedwards -- this is useful, but ch27 gets huge
-
- # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
- # path before files name in the file list and in the header files. If set
- # to NO the shortest path that makes the file name unique will be used.
-
- FULL_PATH_NAMES = NO
-
- # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
- # can be used to strip a user defined part of the path. Stripping is
- # only done if one of the specified strings matches the left-hand part of
- # the path. It is allowed to use relative paths in the argument list.
-
- STRIP_FROM_PATH =
-
# The INTERNAL_DOCS tag determines if documentation
# that is typed after a \internal command is included. If the tag is set
# to NO (the default) then the documentation will be excluded.
--- 266,271 ----
*************** STRIP_FROM_PATH =
*** 151,216 ****
INTERNAL_DOCS = NO
# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
! # file names in lower case letters. If set to YES upper case letters are also
# allowed. This is useful if you have classes or files whose names only differ
# in case and if your file system supports case sensitive file names. Windows
! # users are adviced to set this option to NO.
CASE_SENSE_NAMES = NO
- # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
- # (but less readable) file names. This can be useful is your file systems
- # doesn't support long names like on DOS, Mac, or CD-ROM.
-
- SHORT_NAMES = NO
-
# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
# will show members with their full class and namespace scopes in the
# documentation. If set to YES the scope will be hidden.
HIDE_SCOPE_NAMES = NO
- # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
- # will generate a verbatim copy of the header file for each class for
- # which an include is specified. Set to NO to disable this.
-
- VERBATIM_HEADERS = NO
-
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
! # will put list of the files that are included by a file in the documentation
# of that file.
SHOW_INCLUDE_FILES = YES
- # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
- # will interpret the first line (until the first dot) of a JavaDoc-style
- # comment as the brief description. If set to NO, the JavaDoc
- # comments will behave just like the Qt-style comments (thus requiring an
- # explict @brief command for a brief description.
-
- JAVADOC_AUTOBRIEF = NO
-
- # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
- # treat a multi-line C++ special comment block (i.e. a block of //! or ///
- # comments) as a brief description. This used to be the default behaviour.
- # The new default is to treat a multi-line C++ comment block as a detailed
- # description. Set this tag to YES if you prefer the old behaviour instead.
-
- MULTILINE_CPP_IS_BRIEF = YES
-
- # If the DETAILS_AT_TOP tag is set to YES then Doxygen
- # will output the detailed description near the top, like JavaDoc.
- # If set to NO, the detailed description appears after the member
- # documentation.
-
- DETAILS_AT_TOP = NO
-
- # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
- # member inherits the documentation from any documented member that it
- # reimplements.
-
- INHERIT_DOCS = YES
-
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
# is inserted in the documentation for inline members.
--- 274,298 ----
INTERNAL_DOCS = NO
# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
! # file names in lower-case letters. If set to YES upper-case letters are also
# allowed. This is useful if you have classes or files whose names only differ
# in case and if your file system supports case sensitive file names. Windows
! # users are advised to set this option to NO.
CASE_SENSE_NAMES = NO
# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
# will show members with their full class and namespace scopes in the
# documentation. If set to YES the scope will be hidden.
HIDE_SCOPE_NAMES = NO
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
! # will put a list of the files that are included by a file in the documentation
# of that file.
SHOW_INCLUDE_FILES = YES
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
# is inserted in the documentation for inline members.
*************** INLINE_INFO = YES
*** 223,239 ****
SORT_MEMBER_DOCS = YES
! # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
! # tag is set to YES, then doxygen will reuse the documentation of the first
! # member in the group (if any) for the other members of the group. By default
! # all members of a group must be documented explicitly.
! DISTRIBUTE_GROUP_DOC = YES
! # The TAB_SIZE tag can be used to set the number of spaces in a tab.
! # Doxygen uses this value to replace tabs by spaces in code fragments.
! TAB_SIZE = 4
# The GENERATE_TODOLIST tag can be used to enable (YES) or
# disable (NO) the todo list. This list is created by putting \todo
--- 305,326 ----
SORT_MEMBER_DOCS = YES
! # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
! # brief documentation of file, namespace and class members alphabetically
! # by member name. If set to NO (the default) the members will appear in
! # declaration order.
! SORT_BRIEF_DOCS = NO
! # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
! # sorted by fully-qualified names, including namespaces. If set to
! # NO (the default), the class list will be sorted only by class name,
! # not including the namespace part.
! # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
! # Note: This option applies only to the class list, not to the
! # alphabetical list.
! SORT_BY_SCOPE_NAME = NO
# The GENERATE_TODOLIST tag can be used to enable (YES) or
# disable (NO) the todo list. This list is created by putting \todo
*************** GENERATE_BUGLIST = YES
*** 259,281 ****
GENERATE_DEPRECATEDLIST= YES
- # This tag can be used to specify a number of aliases that acts
- # as commands in the documentation. An alias has the form "name=value".
- # For example adding "sideeffect=\par Side Effects:\n" will allow you to
- # put the command \sideeffect (or @sideeffect) in the documentation, which
- # will result in a user defined paragraph with heading "Side Effects:".
- # You can put \n's in the value part of an alias to insert newlines.
-
- ALIASES = "doctodo=@todo\nDoc me! See docs/doxygen/TODO and http://gcc.gnu.org/ml/libstdc++/2002-02/msg00003.html for more." \
- "isiosfwd=One of the @link s27_2_iosfwd I/O forward declarations @endlink"
-
# The ENABLED_SECTIONS tag can be used to enable conditional
# documentation sections, marked by \if sectionname ... \endif.
ENABLED_SECTIONS = @enabled_sections@
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
! # the initial value of a variable or define consist of for it to appear in
# the documentation. If the initializer consists of more lines than specified
# here it will be hidden. Use a value of 0 to hide initializers completely.
# The appearance of the initializer of individual variables and defines in the
--- 346,358 ----
GENERATE_DEPRECATEDLIST= YES
# The ENABLED_SECTIONS tag can be used to enable conditional
# documentation sections, marked by \if sectionname ... \endif.
ENABLED_SECTIONS = @enabled_sections@
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
! # the initial value of a variable or define consists of for it to appear in
# the documentation. If the initializer consists of more lines than specified
# here it will be hidden. Use a value of 0 to hide initializers completely.
# The appearance of the initializer of individual variables and defines in the
*************** ENABLED_SECTIONS = @enabled_sectio
*** 284,303 ****
MAX_INITIALIZER_LINES = 0
- # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
- # only. Doxygen will then generate output that is more tailored for C.
- # For instance some of the names that are used will be different. The list
- # of all members will be omitted, etc.
-
- OPTIMIZE_OUTPUT_FOR_C = NO
-
- # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
- # only. Doxygen will then generate output that is more tailored for Java.
- # For instance namespaces will be presented as packages, qualified scopes
- # will look different, etc.
-
- OPTIMIZE_OUTPUT_JAVA = NO
-
# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
# at the bottom of the documentation of classes and structs. If set to YES the
# list will mention the files that were used to generate the documentation.
--- 361,366 ----
*************** INPUT = @srcdir@/docs/d
*** 361,374 ****
@srcdir@/libsupc++/typeinfo \
include
-
-
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
# and *.h) to filter out the source-files in the directories. If left
! # blank file matching one of the following patterns are included:
! # *.c *.cc *.cxx *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
! # *.h++ *.idl
FILE_PATTERNS = *
--- 424,435 ----
@srcdir@/libsupc++/typeinfo \
include
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
# and *.h) to filter out the source-files in the directories. If left
! # blank the following patterns are tested:
! # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
! # *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
FILE_PATTERNS = *
*************** RECURSIVE = YES
*** 385,391 ****
EXCLUDE = Makefile \
CVS \
include/bits/demangle.h \
! stdc++.h.gch
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
# that are symbolic links (a Unix filesystem feature) are excluded from the input.
--- 446,452 ----
EXCLUDE = Makefile \
CVS \
include/bits/demangle.h \
! stdc++.h.gch
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
# that are symbolic links (a Unix filesystem feature) are excluded from the input.
*************** EXCLUDE_SYMLINKS = NO
*** 399,405 ****
EXCLUDE_PATTERNS = CVS \
stamp-* \
Makefile \
! *gch*
# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
--- 460,466 ----
EXCLUDE_PATTERNS = CVS \
stamp-* \
Makefile \
! *gch*
# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
*************** FILTER_SOURCE_FILES = NO
*** 447,453 ****
#---------------------------------------------------------------------------
# If the SOURCE_BROWSER tag is set to YES then a list of source files will
! # be generated. Documented entities will be cross-referenced with these sources.
SOURCE_BROWSER = YES
--- 508,516 ----
#---------------------------------------------------------------------------
# If the SOURCE_BROWSER tag is set to YES then a list of source files will
! # be generated. Documented entities will be cross-referenced with these sources.
! # Note: To get rid of all source code in the generated output, make sure also
! # VERBATIM_HEADERS is set to NO.
SOURCE_BROWSER = YES
*************** REFERENCED_BY_RELATION = YES
*** 474,479 ****
--- 537,548 ----
REFERENCES_RELATION = YES
+ # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+ # will generate a verbatim copy of the header file for each class for
+ # which an include is specified. Set to NO to disable this.
+
+ VERBATIM_HEADERS = NO
+
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
*************** GENERATE_HTML = @do_html@
*** 512,519 ****
HTML_OUTPUT = @html_output_dir@
! # The HTML_FILE_EXTENSION tag can be used to specify the file extension for
! # each generated HTML page (for example: .htm,.php,.asp). If it is left blank
# doxygen will generate files with .html extension.
HTML_FILE_EXTENSION = .html
--- 581,588 ----
HTML_OUTPUT = @html_output_dir@
! # The HTML_FILE_EXTENSION tag can be used to specify the file extension for
! # each generated HTML page (for example: .htm,.php,.asp). If it is left blank
# doxygen will generate files with .html extension.
HTML_FILE_EXTENSION = .html
*************** HTML_HEADER =
*** 530,539 ****
HTML_FOOTER =
! # The HTML_STYLESHEET tag can be used to specify a user defined cascading
# style sheet that is used by each HTML page. It can be used to
# fine-tune the look of the HTML output. If the tag is left blank doxygen
! # will generate a default style sheet
HTML_STYLESHEET = @srcdir@/docs/doxygen/style.css
--- 599,610 ----
HTML_FOOTER =
! # The HTML_STYLESHEET tag can be used to specify a user-defined cascading
# style sheet that is used by each HTML page. It can be used to
# fine-tune the look of the HTML output. If the tag is left blank doxygen
! # will generate a default style sheet. Note that doxygen will try to copy
! # the style sheet file to the HTML output directory, so don't put your own
! # stylesheet in the HTML output directory as well, or it will be erased!
HTML_STYLESHEET = @srcdir@/docs/doxygen/style.css
*************** GENERATE_HTMLHELP = NO
*** 553,566 ****
# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
# be used to specify the file name of the resulting .chm file. You
# can add a path in front of the file if the result should not be
! # written to the html output dir.
CHM_FILE =
# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
# be used to specify the location (absolute path including file name) of
! # the HTML help compiler (hhc.exe). If non empty doxygen will try to run
! # the html help compiler on the generated index.hhp.
HHC_LOCATION =
--- 624,637 ----
# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
# be used to specify the file name of the resulting .chm file. You
# can add a path in front of the file if the result should not be
! # written to the html output directory.
CHM_FILE =
# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
# be used to specify the location (absolute path including file name) of
! # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
! # the HTML help compiler on the generated index.hhp.
HHC_LOCATION =
*************** GENERATE_CHI = NO
*** 577,583 ****
BINARY_TOC = NO
# The TOC_EXPAND flag can be set to YES to add extra items for group members
! # to the contents of the Html help documentation and to the tree view.
TOC_EXPAND = NO
--- 648,654 ----
BINARY_TOC = NO
# The TOC_EXPAND flag can be set to YES to add extra items for group members
! # to the contents of the HTML help documentation and to the tree view.
TOC_EXPAND = NO
*************** ENUM_VALUES_PER_LINE = 4
*** 595,604 ****
# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
# generated containing a tree-like index structure (just like the one that
# is generated for HTML Help). For this to work a browser that supports
! # JavaScript and frames is required (for instance Mozilla, Netscape 4.0+,
! # or Internet explorer 4.0+). Note that for large projects the tree generation
! # can take a very long time. In such cases it is better to disable this feature.
! # Windows users are probably better off using the HTML help feature.
GENERATE_TREEVIEW = NO
--- 666,674 ----
# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
# generated containing a tree-like index structure (just like the one that
# is generated for HTML Help). For this to work a browser that supports
! # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
! # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
! # probably better off using the HTML help feature.
GENERATE_TREEVIEW = NO
*************** USE_PDFLATEX = NO
*** 678,689 ****
LATEX_BATCHMODE = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
! # The RTF output is optimised for Word 97 and may not look very pretty with
# other RTF readers or editors.
GENERATE_RTF = NO
--- 748,765 ----
LATEX_BATCHMODE = NO
+ # If LATEX_HIDE_INDICES is set to YES then doxygen will not
+ # include the index chapters (such as File Index, Compound Index, etc.)
+ # in the output.
+
+ LATEX_HIDE_INDICES = NO
+
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
! # The RTF output is optimized for Word 97 and may not look very pretty with
# other RTF readers or editors.
GENERATE_RTF = NO
*************** COMPACT_RTF = NO
*** 710,716 ****
RTF_HYPERLINKS = NO
# Load stylesheet definitions from file. Syntax is similar to doxygen's
! # config file, i.e. a series of assigments. You only have to provide
# replacements, missing definitions are set to their default value.
RTF_STYLESHEET_FILE =
--- 786,792 ----
RTF_HYPERLINKS = NO
# Load stylesheet definitions from file. Syntax is similar to doxygen's
! # config file, i.e. a series of assignments. You only have to provide
# replacements, missing definitions are set to their default value.
RTF_STYLESHEET_FILE =
*************** MAN_LINKS = NO
*** 754,765 ****
# If the GENERATE_XML tag is set to YES Doxygen will
# generate an XML file that captures the structure of
! # the code including all documentation. Note that this
! # feature is still experimental and incomplete at the
! # moment.
GENERATE_XML = NO
# The XML_SCHEMA tag can be used to specify an XML schema,
# which can be used by a validating XML parser to check the
# syntax of the XML files.
--- 830,845 ----
# If the GENERATE_XML tag is set to YES Doxygen will
# generate an XML file that captures the structure of
! # the code including all documentation.
GENERATE_XML = NO
+ # 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
+ # put in front of it. If left blank `xml' will be used as the default path.
+
+ XML_OUTPUT = xml
+
# The XML_SCHEMA tag can be used to specify an XML schema,
# which can be used by a validating XML parser to check the
# syntax of the XML files.
*************** XML_SCHEMA =
*** 772,777 ****
--- 852,864 ----
XML_DTD =
+ # If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+ # dump the program listings (including syntax highlighting
+ # and cross-referencing information) to the XML output. Note that
+ # enabling this will significantly increase the size of the XML output.
+
+ XML_PROGRAMLISTING = YES
+
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
*************** INCLUDE_FILE_PATTERNS =
*** 864,884 ****
# or name=definition (no spaces). If the definition and the = are
# omitted =1 is assumed.
! ### The deprecated functions are clearly marked as such in the code, but
! ### the DEPRECATED macro must be defined for that code to be seen by doxygen.
! ### The class_requires macros are kludges because SKIP_FUNCTION_MACROS is
! ### completely broken, and the presence of the macros confuses the parser.
!
! PREDEFINED = _GLIBCXX_DEPRECATED \
! _GLIBCXX_USE_WCHAR_T \
! _GLIBCXX_USE_LONG_LONG \
! __glibcxx_class_requires="//" \
! __glibcxx_class_requires2="//" \
! __glibcxx_class_requires3="//" \
! __glibcxx_class_requires4="//"
! # If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then
! # this tag can be used to specify a list of macro names that should be expanded.
# The macro definition that is found in the sources will be used.
# Use the PREDEFINED tag if you want to use a different macro definition.
--- 951,966 ----
# or name=definition (no spaces). If the definition and the = are
# omitted =1 is assumed.
! PREDEFINED = _GLIBCXX_DEPRECATED \
! _GLIBCXX_USE_WCHAR_T \
! _GLIBCXX_USE_LONG_LONG \
! __glibcxx_class_requires=// \
! __glibcxx_class_requires2=// \
! __glibcxx_class_requires3=// \
! __glibcxx_class_requires4=//
! # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
! # this tag can be used to specify a list of macro names that should be expanded.
# The macro definition that is found in the sources will be used.
# Use the PREDEFINED tag if you want to use a different macro definition.
*************** EXPAND_AS_DEFINED =
*** 886,901 ****
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
# doxygen's preprocessor will remove all function-like macros that are alone
! # on a line and do not end with a semicolon. Such function macros are typically
! # used for boiler-plate code, and will confuse the parser if not removed.
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
! # Configuration::addtions related to external references
#---------------------------------------------------------------------------
! # The TAGFILES tag can be used to specify one or more tagfiles.
TAGFILES =
--- 968,997 ----
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
# doxygen's preprocessor will remove all function-like macros that are alone
! # on a line, have an all uppercase name, and do not end with a semicolon. Such
! # function macros are typically used for boiler-plate code, and will confuse the
! # parser if not removed.
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
! # Configuration::additions related to external references
#---------------------------------------------------------------------------
! # The TAGFILES option can be used to specify one or more tagfiles.
! # Optionally an initial location of the external documentation
! # can be added for each tagfile. The format of a tag file without
! # this location is as follows:
! # TAGFILES = file1 file2 ...
! # Adding location for the tag files is done as follows:
! # TAGFILES = file1=loc1 "file2 = loc2" ...
! # where "loc1" and "loc2" can be relative or absolute paths or
! # URLs. If a location is present for each tag, the installdox tool
! # does not have to be run to correct the links.
! # Note that each tag file must have a unique name
! # (where the name does NOT include the path)
! # If a tag file is not located in the directory in which doxygen
! # is run, you must also specify the path to the tagfile here.
TAGFILES =
*************** PERL_PATH = /usr/bin/perl
*** 926,935 ****
#---------------------------------------------------------------------------
# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
! # generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or
# super classes. Setting the tag to NO turns the diagrams off. Note that this
! # option is superceded by the HAVE_DOT option below. This is only a fallback. It is
! # recommended to install and use dot, since it yield more powerful graphs.
CLASS_DIAGRAMS = YES
--- 1022,1031 ----
#---------------------------------------------------------------------------
# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
! # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or
# super classes. Setting the tag to NO turns the diagrams off. Note that this
! # option is superseded by the HAVE_DOT option below. This is only a fallback. It is
! # recommended to install and use dot, since it yields more powerful graphs.
CLASS_DIAGRAMS = YES
*************** CLASS_GRAPH = YES
*** 960,965 ****
--- 1056,1067 ----
COLLABORATION_GRAPH = YES
+ # If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+ # collaboration diagrams in a style similar to the OMG's Unified Modeling
+ # Language.
+
+ UML_LOOK = NO
+
# If set to YES, the inheritance and collaboration graphs will show the
# relations between templates and their instances.
*************** INCLUDE_GRAPH = YES
*** 979,984 ****
--- 1081,1094 ----
INCLUDED_BY_GRAPH = YES
+ # If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
+ # generate a call dependency graph for every global function or class method.
+ # Note that enabling this option will significantly increase the time of a run.
+ # So in most cases it will be better to enable call graphs for selected
+ # functions only using the \callgraph command.
+
+ CALL_GRAPH = NO
+
# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
# will graphical hierarchy of all classes instead of a textual one.
*************** MAX_DOT_GRAPH_WIDTH = 1024
*** 1017,1022 ****
--- 1127,1143 ----
MAX_DOT_GRAPH_HEIGHT = 1024
+ # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+ # graphs generated by dot. A depth value of 3 means that only nodes reachable
+ # from the root by following a path via at most 3 edges will be shown. Nodes that
+ # lay further from the root node will be omitted. Note that setting this option to
+ # 1 or 2 may greatly reduce the computation time needed for large code bases. Also
+ # note that a graph may be further truncated if the graph's image dimensions are
+ # not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT).
+ # If 0 is used for the depth value (the default), the graph is not depth-constrained.
+
+ MAX_DOT_GRAPH_DEPTH = 0
+
# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
# generate a legend page explaining the meaning of the various boxes and
# arrows in the dot generated graphs.
*************** MAX_DOT_GRAPH_HEIGHT = 1024
*** 1024,1074 ****
GENERATE_LEGEND = YES
# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
! # remove the intermedate dot files that are used to generate
# the various graphs.
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
! # Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
# The SEARCHENGINE tag specifies whether or not a search engine should be
# used. If set to NO the values of all tags below this one will be ignored.
SEARCHENGINE = NO
-
- # The CGI_NAME tag should be the name of the CGI script that
- # starts the search engine (doxysearch) with the correct parameters.
- # A script with this name will be generated by doxygen.
-
- CGI_NAME = search.cgi
-
- # The CGI_URL tag should be the absolute URL to the directory where the
- # cgi binaries are located. See the documentation of your http daemon for
- # details.
-
- CGI_URL =
-
- # The DOC_URL tag should be the absolute URL to the directory where the
- # documentation is located. If left blank the absolute path to the
- # documentation, with file:// prepended to it, will be used.
-
- DOC_URL =
-
- # The DOC_ABSPATH tag should be the absolute path to the directory where the
- # documentation is located. If left blank the directory on the local machine
- # will be used.
-
- DOC_ABSPATH =
-
- # The BIN_ABSPATH tag must point to the directory where the doxysearch binary
- # is installed.
-
- BIN_ABSPATH = /usr/local/bin/
-
- # The EXT_DOC_PATHS tag can be used to specify one or more paths to
- # documentation generated for other projects. This allows doxysearch to search
- # the documentation for these projects as well.
-
- EXT_DOC_PATHS =
--- 1145,1160 ----
GENERATE_LEGEND = YES
# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
! # remove the intermediate dot files that are used to generate
# the various graphs.
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
! # Configuration::additions related to the search engine
#---------------------------------------------------------------------------
# The SEARCHENGINE tag specifies whether or not a search engine should be
# used. If set to NO the values of all tags below this one will be ignored.
SEARCHENGINE = NO
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/html/17_intro/TODO gcc-3.4.1/libstdc++-v3/docs/html/17_intro/TODO
*** gcc-3.4.0/libstdc++-v3/docs/html/17_intro/TODO 2003-11-13 00:25:23.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/docs/html/17_intro/TODO 2004-05-15 20:44:13.000000000 +0000
*************** std::allocator
*** 2,17 ****
- switch to mt_allocator with --enable-threads=posix.
- - Try to figure out a way to switch allocators in a more elegant
- manner, and make the default allocator configurable.
-
- persistent allocator
- global/extern allocator
std::string
! - re-design for multi-paradigm, meta string class solution incorporating COW
vs. deep copy issues, MT scalability
See Andrei Alexandrescu, June 2001, C/C++ Users Journal
"Generic: A Policy-Based basic_string Implementation"
--- 2,14 ----
- switch to mt_allocator with --enable-threads=posix.
- persistent allocator
- global/extern allocator
std::string
! - Policy-based design incorporating COW
vs. deep copy issues, MT scalability
See Andrei Alexandrescu, June 2001, C/C++ Users Journal
"Generic: A Policy-Based basic_string Implementation"
*************** std::locale
*** 53,60 ****
- minimize ctype convertion in data facets, see numpunct/num_put/num_get
- - finish caching data facets and using the caches
-
std::basic_filebuf, 27_io
- wfilebuf, get variable-encoding working and tested, including
--- 50,55 ----
*************** testsuite
*** 86,96 ****
- diffing generated output files
- make check-abi needs to have full symbol checking. Scope the LSB
testsuite, see what's going on with the typeinfo etc. bits.
- - provide testsuites for numerics.
-
- try to do a better job of ABI testing, with instantiations of all
standard-specified types checked, not just exported symbols.
--- 81,91 ----
- diffing generated output files
+ - provide testsuites for numerics.
+
- make check-abi needs to have full symbol checking. Scope the LSB
testsuite, see what's going on with the typeinfo etc. bits.
- try to do a better job of ABI testing, with instantiations of all
standard-specified types checked, not just exported symbols.
*************** Nathan's commentary on cantrip, http://w
*** 140,148 ****
- auto_ptr: seems to be some disagreement on what is
standards-conformant behavior, specially on conversion operators.
- - looks like deque::get_allocator not standards conformant or deque
- allocator non-standard.
-
- list::assignment operator needs const_cast
- a cleaner division between pointers-to-value_type and true iterators
--- 135,140 ----
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/html/20_util/allocator.html gcc-3.4.1/libstdc++-v3/docs/html/20_util/allocator.html
*** gcc-3.4.0/libstdc++-v3/docs/html/20_util/allocator.html 2004-03-18 17:36:39.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/docs/html/20_util/allocator.html 2004-04-30 03:23:45.000000000 +0000
***************
*** 308,313 ****
--- 308,319 ----
A high-performance allocator that uses a bit-map to keep track
+ of the used and unused memory locations. It has its own
+ documentation, found here.
+
C++ applications often dependent on specific language support
+ routines, say for throwing exceptions, or catching exceptions, and
+ perhaps also dependent on features in the C++ Standard Library.
+
+
+
The C++ Standard Library has many include files, types defined in
+ those include files, specific named functions, and other behavior. The
+ text of these behaviors, as written in source include files, is called
+ the Application Programing Interface, or API.
+
+
+
Furthermore, C++ source that is compiled into object files is
+ transformed by the compiler: it arranges objects with specific
+ alignment and in a particular layout, mangling names according to a
+ well-defined algorithm, has specific arrangements for the support of
+ virtual functions, etc. These details are defined as the compiler
+ Application Binary Interface, or ABI. The GNU C++ compiler uses an
+ industry-standard C++ ABI starting with version 3. Details can be
+ found in the
+ ABI specification.
+
+
+
+ The GNU C++ compiler, g++, has a compiler command line option to
+ switch between various different C++ ABIs. This explicit version
+ switch is the flag -fabi-version. In addition, some
+ g++ command line options may change the ABI as a side-effect of
+ use. Such flags include -fpack-struct and
+ -fno-exceptions, but include others: see the complete
+ list in the GCC manual under the heading Options
+ for Code Generation Conventions.
+
+
+
The configure options used when building a specific libstdc++
+ version may also impact the resulting library ABI. The available
+ configure options, and their impact on the library ABI, are documented
+
+ here.
+
+
+
Putting all of these ideas together results in the C++ Standard
+ library ABI, which is the compilation of a given library API by a
+ given compiler ABI. In a nutshell:
+
+
+ library API + compiler ABI = library ABI
+
+
+ The library ABI is mostly of interest for end-users who have
+ unresolved symbols and are linking dynamically to the C++ Standard
+ library, and who thus must be careful to compile their application
+ with a compiler that is compatible with the available C++ Standard
+ library binary. In this case, compatible is defined with the equation
+ above: given an application compiled with a given compiler ABI and
+ library API, it will work correctly with a Standard C++ Library
+ created with the same constraints.
+
+
+
+ To use a specific version of the C++ ABI, one must use a
+ corresponding GNU C++ toolchain (Ie, g++ and libstdc++) that
+ implements the C++ ABI in question.
+
The C++ interface has evolved throughout the history of the GNU
+ C++ toolchain. With each release, various details have been changed so
+ as to give distinct versions to the C++ interface.
+
Extending existing, stable ABIs. Versioning gives subsequent stable
+ releases series libraries the ability to add new symbols and add
+ functionality, all the while retaining backwards compatibility with
+ the previous releases in the series. Note: the reverse is not true. It
+ is not possible to take binaries linked with the latest version of a
+ release series (if symbols have been added) and expect the initial
+ release of the series to remain link compatible.
+
+
+
Allows multiple, incompatible ABIs to coexist at the same time.
+
+ How can this complexity be managed? What does C++ versioning mean?
+ Because library and compiler changes often make binaries compiled
+ with one version of the GNU tools incompatible with binaries
+ compiled with other (either newer or older) versions of the same GNU
+ tools, specific techniques are used to make managing this complexity
+ easier.
+
+
+
+ The following techniques are used:
+
+
+
+
+
Release versioning on the libgcc_s.so binary. This is
+ implemented via file names and the ELF DT_SONAME mechanism (at least
+ on ELF systems).
+
+
It is versioned as follows:
+
+
+
gcc-3.0.0: libgcc_s.so.1
+
gcc-3.0.1: libgcc_s.so.1
+
gcc-3.0.2: libgcc_s.so.1
+
gcc-3.0.3: libgcc_s.so.1
+
gcc-3.0.4: libgcc_s.so.1
+
gcc-3.1.0: libgcc_s.so.1
+
gcc-3.1.1: libgcc_s.so.1
+
gcc-3.2.0: libgcc_s.so.1
+
gcc-3.2.1: libgcc_s.so.1
+
gcc-3.2.2: libgcc_s.so.1
+
gcc-3.2.3: libgcc_s.so.1
+
gcc-3.3.0: libgcc_s.so.1
+
gcc-3.3.1: libgcc_s.so.1
+
gcc-3.3.2: libgcc_s.so.1
+
gcc-3.3.3: libgcc_s.so.1
+
gcc-3.4.0: on m68k-linux and hppa-linux this is either libgcc_s.so.1
+ (when configuring --with-sjlj-exceptions) or
+ libgcc_s.so.2. For all others, this is libgcc_s.so.1.
+
+
+
+
+
+
Release versioning on the libstdc++.so binary, implemented in the same was as the libgcc_s.so binary, above.
+
+
It is versioned as follows:
+
+
+
gcc-3.0.0: libstdc++.so.3.0.0
+
gcc-3.0.1: libstdc++.so.3.0.1
+
gcc-3.0.2: libstdc++.so.3.0.2
+
gcc-3.0.3: libstdc++.so.3.0.2 (Error should be libstdc++.so.3.0.3)
It is versioned with the following labels and version definitions:
+
+
gcc-3.0.0: GCC_3.0
+
gcc-3.0.1: GCC_3.0
+
gcc-3.0.2: GCC_3.0
+
gcc-3.0.3: GCC_3.0
+
gcc-3.0.4: GCC_3.0
+
gcc-3.1.0: GCC_3.0
+
gcc-3.1.1: GCC_3.0
+
gcc-3.2.0: GCC_3.0
+
gcc-3.2.1: GCC_3.0
+
gcc-3.2.2: GCC_3.0
+
gcc-3.2.3: GCC_3.0
+
gcc-3.3.0: GCC_3.0
+
gcc-3.3.1: GCC_3.0
+
gcc-3.3.2: GCC_3.0
+
gcc-3.3.3: GCC_3.0
+
gcc-3.4.0: GCC_3.0
+
+
+
+
+
Symbol versioning on the libstdc++.so binary.
+
+
mapfile: libstdc++-v3/config/linker-map.gnu
+
It is versioned with the following labels and version
+ definitions, where the version definition is the maximum for a
+ particular release. Note, only symbol which are newly introduced
+ will use the maximum version definition. Thus, for release series
+ with the same label, but incremented version definitions, the later
+ release has both versions. (An example of this would be the
+ gcc-3.2.1 release, which has GLIBCPP_3.2.1 for new symbols and
+ GLIBCPP_3.2 for symbols that were introduced in the gcc-3.2.0
+ release.)
+
+
+
gcc-3.0.0: (Error, not versioned)
+
gcc-3.0.1: (Error, not versioned)
+
gcc-3.0.2: (Error, not versioned)
+
gcc-3.0.3: (Error, not versioned)
+
gcc-3.0.4: (Error, not versioned)
+
gcc-3.1.0: GLIBCPP_3.1, CXXABI_1
+
gcc-3.1.1: GLIBCPP_3.1, CXXABI_1
+
gcc-3.2.0: GLIBCPP_3.2, CXXABI_1.2
+
gcc-3.2.1: GLIBCPP_3.2.1, CXXABI_1.2
+
gcc-3.2.2: GLIBCPP_3.2.2, CXXABI_1.2
+
gcc-3.2.3: GLIBCPP_3.2.2, CXXABI_1.2
+
gcc-3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1
+
gcc-3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1
+
gcc-3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1
+
gcc-3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1
+
gcc-3.4.0: GLIBCXX_3.4, CXXABI_1.3
+
+
+
+
+
+
Incremental bumping of a compiler pre-defined macro,
+ __GXX_ABI_VERSION. This macro is defined as the version of the
+ compiler v3 ABI, with g++ 3.0.x being version 100. This macro will
+ be automatically defined whenever g++ is used (the curious can
+ test this by invoking g++ with the '-v' flag.)
+
+
+
+ This macro was defined in the file "lang-specs.h" in the gcc/cp directory.
+ Later versions defined it in "c-common.c" in the gcc directory, and from
+ G++ 3.4 it is defined in c-cppbuiltin.c and its value determined by the
+ '-fabi-version' command line option.
+
+
+
+ It is versioned as follows, where 'n' is given by '-fabi-version=n':
+
+
+
gcc-3.0.x: 100
+
gcc-3.1.x: 100 (Error, should be 101)
+
gcc-3.2.x: 102
+
gcc-3.3.x: 102
+
gcc-3.4.x: 102 (when n=1)
+
gcc-3.4.x: 1000+n (when n>1)
+
gcc-3.4.x: 999999 (when n=0)
+
+
+
+
+
+
Changes to the default compiler option for
+ -fabi-version.
+
+
+ It is versioned as follows:
+
+
+
gcc-3.0.x: (Error, not versioned)
+
gcc-3.1.x: (Error, not versioned)
+
gcc-3.2.x: -fabi-version=1
+
gcc-3.3.x: -fabi-version=1
+
gcc-3.4.x: -fabi-version=2
+
+
+
+
+
+
Incremental bumping of a library pre-defined macro. For releases
+ before 3.4.0, the macro is __GLIBCPP__. For later releases, it's
+ __GLIBCXX__. (The libstdc++ project generously changed from CPP to
+ CXX throughout its source to allow the "C" pre-processor the CPP
+ macro namespace.) These macros are defined as the date the library
+ was released, in compressed ISO date format, as an unsigned long.
+
+
+
+ In addition, the pre-defined macro is defined in the file
+ "c++config" in the "libstdc++-v3/include/bits" directory and is
+ changed every night by an automated script.
+
+
+ It is versioned as follows:
+
+
+
gcc-3.0.0: 20010615
+
gcc-3.0.1: 20010819
+
gcc-3.0.2: 20011023
+
gcc-3.0.3: 20011220
+
gcc-3.0.4: 20020220
+
gcc-3.1.0: 20020514
+
gcc-3.1.1: 20020725
+
gcc-3.2.0: 20020814
+
gcc-3.2.1: 20021119
+
gcc-3.2.2: 20030205
+
gcc-3.2.3: 20030422
+
gcc-3.3.0: 20030513
+
gcc-3.3.1: 20030804
+
gcc-3.3.2: 20031016
+
gcc-3.3.3: 20040214
+
gcc-3.4.0: 20040419
+
+
+
+
+
+
+
+ Incremental bumping of a library pre-defined macro,
+ _GLIBCPP_VERSION. This macro is defined as the released version of
+ the library, as a string literal. This is only implemented in
+ gcc-3.1.0 releases and higher, and is deprecated in 3.4 (where it
+ is called _GLIBCXX_VERSION).
+
+
+
+ This macro is defined in the file "c++config" in the
+ "libstdc++-v3/include/bits" directory and is generated
+ automatically by autoconf as part of the configure-time generation
+ of config.h.
+
+
+
+ It is versioned as follows:
+
+
+
gcc-3.0.0: "3.0.0"
+
gcc-3.0.1: "3.0.0" (Error, should be "3.0.1")
+
gcc-3.0.2: "3.0.0" (Error, should be "3.0.2")
+
gcc-3.0.3: "3.0.0" (Error, should be "3.0.3")
+
gcc-3.0.4: "3.0.0" (Error, should be "3.0.4")
+
gcc-3.1.0: "3.1.0"
+
gcc-3.1.1: "3.1.1"
+
gcc-3.2.0: "3.2"
+
gcc-3.2.1: "3.2.1"
+
gcc-3.2.2: "3.2.2"
+
gcc-3.2.3: "3.2.3"
+
gcc-3.3.0: "3.3"
+
gcc-3.3.1: "3.3.1"
+
gcc-3.3.2: "3.3.2"
+
gcc-3.3.3: "3.3.3"
+
gcc-3.4.0: "version-unused"
+
+
+
+
+
+
+ Matching each specific C++ compiler release to a specific set of
+ C++ include files. This is only implemented in gcc-3.1.1 releases
+ and higher.
+
+
+ All C++ includes are installed in include/c++, then nest in a
+ directory hierarchy corresponding to the C++ compiler's released
+ version. This version corresponds to the variable "gcc_version" in
+ "libstdc++-v3/acinclude.m4," and more details can be found in that
+ file's macro GLIBCXX_CONFIGURE (GLIBCPP_CONFIGURE before gcc-3.4.0).
+
+
+ C++ includes are versioned as follows:
+
+
+
gcc-3.0.0: include/g++-v3
+
gcc-3.0.1: include/g++-v3
+
gcc-3.0.2: include/g++-v3
+
gcc-3.0.3: include/g++-v3
+
gcc-3.0.4: include/g++-v3
+
gcc-3.1.0: include/g++-v3
+
gcc-3.1.1: include/c++/3.1.1
+
gcc-3.2.0: include/c++/3.2
+
gcc-3.2.1: include/c++/3.2.1
+
gcc-3.2.2: include/c++/3.2.2
+
gcc-3.2.3: include/c++/3.2.3
+
gcc-3.3.0: include/c++/3.3
+
gcc-3.3.1: include/c++/3.3.1
+
gcc-3.3.2: include/c++/3.3.2
+
gcc-3.3.3: include/c++/3.3.3
+
gcc-3.4.0: include/c++/3.4.0
+
+
+
+
+
+ Taken together, these techniques can accurately specify interface
+ and implementation changes in the GNU C++ tools themselves. Used
+ properly, they allow both the GNU C++ tools implementation, and
+ programs using them, an evolving yet controlled development that
+ maintains backward compatibility.
+
+ Minimum environment that supports a versioned ABI: A supported
+ dynamic linker, a GNU linker of sufficient vintage to understand
+ demangled C++ name globbing (ld), a shared executable compiled with
+ g++, and shared libraries (libgcc_s, libstdc++-v3) compiled by a
+ compiler (g++) with a compatible ABI. Phew.
+
+
+
+ On top of all that, an additional constraint: libstdc++ did not
+ attempt to version symbols (or age gracefully, really) until version
+ 3.1.0.
+
+
+
+ Most modern Linux and BSD versions, particularly ones using
+ gcc-3.1.x tools and more recent vintages, will meet the requirements above.
+
+ It turns out that most of the configure options that change default
+ behavior will impact the mangled names of exported symbols, and thus
+ impact versioning and compatibility.
+
+
+
+ For more information on configure options, including ABI impacts, see:
+ http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html
+
+
+
+ There is one flag that explicitly deals with symbol versioning:
+ --enable-symvers.
+
+
+
+ In particular, libstdc++-v3/acinclude.m4 has a macro called
+ GLIBCXX_ENABLE_SYMVERS that defaults to yes (or the argument passed
+ in via --enable-symvers=foo). At that point, the macro attempts to
+ make sure that all the requirement for symbol versioning are in
+ place. For more information, please consult acinclude.m4.
+
+ When the GNU C++ library is being built with symbol versioning on,
+ you should see the following at configure time for libstdc++-v3:
+
+
+
+ checking versioning on shared library symbols... gnu
+
+
+ If you don't see this line in the configure output, or if this line
+ appears but the last word is 'no', then you are out of luck.
+
+
+
+ If the compiler is pre-installed, a quick way to test is to compile
+ the following (or any) simple C++ file and link it to the shared
+ libstdc++ library:
+
+ The following non-exhaustive list will cause the library major version
+ number to increase, say from "libstdc++.so.3.0.4" to
+ "libstdc++.so.4.0.0".
+
+
+
changes in the gcc/g++ compiler ABI
+
changing size of an exported symbol
+
changing alignment of an exported symbol
+
changing the layout of an exported symbol
+
changing mangling on an exported symbol
+
deleting an exported symbol
+
changing the inheritance properties of a type by adding or removing
+ base classes
+
+ changing the size, alignment, or layout of types
+ specified in the C++ standard. These may not necessarily be
+ instantiated or otherwise exported in the library binary, and
+ include all the required locale facets, as well as things like
+ std::basic_streambuf, et al.
+
This is accomplished by two techniques that separate the API from
+ the ABI: forcing undefined references to link against a library binary
+ for definitions.
+
+
+
+
Include files have declarations, source files have defines
+
+
For non-templatized types, such as much of class
+ locale, the appropriate standard C++ include, say
+ locale, can contain full declarations, while various
+ source files (say locale.cc, locale_init.cc,
+ localename.cc) contain definitions.
+
+
Extern template on required types
+
+
For parts of the standard that have an explicit list of required
+ instantiations, the GNU extension syntax extern template
+ can be used to control where template definitions
+ reside. By marking required instantiations as extern
+ template in include files, and providing explicit
+ instantiations in the appropriate instantiation files, non-inlined
+ template functions can be versioned. This technique is mostly used
+ on parts of the standard that require char and
+ wchar_t instantiations, and includes
+ basic_string, the locale facets, and the types in
+ iostreams.
+
+
+
In addition, these techniques have the additional benefit that
+ they reduce binary size, which can increase runtime performance.
+
+
+
+
Namespaces linking symbol definitions to export mapfiles
+
+
All symbols in the shared library binary are processed by a linker
+ script at build time that either allows or disallows external
+ linkage. Because of this, some symbols, regardless of normal C/C++
+ linkage, are not visible. Symbols that are internal have several
+ appealing characteristics: by not exporting the symbols, there are no
+ relocations when the shared library is started and thus this makes for
+ faster runtime loading performance by the underlying dynamic loading
+ mechanism. In addition, they have the possibility of changing without
+ impacting ABI compatibility.
+
+
+
The following namespaces are transformed by the mapfile:
+
+
+
namespace std
+
Defaults to exporting all symbols in label
+ GLIBCXX that do not begin with an underscore, ie
+ __test_func would not be exported by default. Select
+ exceptional symbols are allowed to be visible.
+
+
namespace __gnu_cxx
+
Defaults to not exporting any symbols in label
+ GLIBCXX, select items are allowed to be visible.
+
+
namespace __gnu_internal
+
Defaults to not exported, no items are allowed to be visible.
+
+
namespace __cxxabiv1, aliased to namespace abi
+
Defaults to not exporting any symbols in label
+ CXXABI, select items are allowed to be visible.
+
+
+
+
+
+
Freezing the API
+
Disallowed changes, as above, are not made on a stable release
+ branch. Enforcement tends to be less strict with GNU extensions that
+ standard includes.
+ Testing for GNU C++ ABI changes is composed of two distinct areas:
+ testing the C++ compiler (g++) for compiler changes, and testing the
+ C++ library (libstdc++) for library changes.
+
+
+
+ Testing the C++ compiler ABI can be done various ways.
+
+
+
+ One.
+ Intel ABI checker. More information can be obtained
+ here.
+
+
+
+ Two.
+ The second is yet unreleased, but has been announced on the gcc
+ mailing list. It is yet unspecified if these tools will be freely
+ available, and able to be included in a GNU project. Please contact
+ Mark Mitchell (mark@codesourcery.com) for more details, and current
+ status.
+
+
+
+ Three.
+ Involves using the vlad.consistency test framework. This has also been
+ discussed on the gcc mailing lists.
+
+
+
+ Testing the C++ library ABI can also be done various ways.
+
+
+
+ One.
+ (Brendan Kehoe, Jeff Law suggestion to run 'make check-c++' two ways,
+ one with a new compiler and an old library, and the other with an old
+ compiler and a new library, and look for testsuite regressions)
+
+
+
+ Details on how to set this kind of test up can be found here:
+ http://gcc.gnu.org/ml/gcc/2002-08/msg00142.html
+
+
+
+ Two.
+ Use the 'make check-abi' rule in the libstdc++-v3 Makefile.
+
+
+
+ This is a proactive check the library ABI. Currently, exported symbol
+ names that are either weak or defined are checked against a last known
+ good baseline. Currently, this baseline is keyed off of 3.2.0
+ binaries, as this was the last time the .so number was incremented. In
+ addition, all exported names are demangled, and the exported objects
+ are checked to make sure they are the same size as the same object in
+ the baseline.
+
+
+
+ This dataset is insufficient, yet a start. Also needed is a
+ comprehensive check for all user-visible types part of the standard
+ library for sizeof() and alignof() changes.
+
+
+
+ Verifying compatible layouts of objects is not even attempted. It
+ should be possible to use sizeof, alignof, and offsetof to compute
+ offsets for each structure and type in the standard library, saving to
+ another datafile. Then, compute this in a similar way for new
+ binaries, and look for differences.
+
+
+
+ Another approach might be to use the -fdump-class-hierarchy flag to
+ get information. However, currently this approach gives insufficient
+ data for use in library testing, as class data members, their offsets,
+ and other detailed data is not displayed with this flag.
+ (See g++/7470 on how this was used to find bugs.)
+
+
+
+ Perhaps there are other C++ ABI checkers. If so, please notify
+ us. We'd like to know about them!
+
+ A "C" application, dynamically linked to two shared libraries, liba,
+ libb. The dependent library liba is C++ shared library compiled with
+ gcc-3.3.x, and uses io, exceptions, locale, etc. The dependent library
+ libb is a C++ shared library compiled with gcc-3.4.x, and also uses io,
+ exceptions, locale, etc.
+
+ This resulting binary, when executed, will be able to safely use code
+ from both liba, and the dependent libstdc++.so.6, and libb, with the
+ dependent libstdc++.so.5.
+
+
+
+
+
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/html/abi.txt gcc-3.4.1/libstdc++-v3/docs/html/abi.txt
*** gcc-3.4.0/libstdc++-v3/docs/html/abi.txt 2003-07-28 04:13:57.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/docs/html/abi.txt 1970-01-01 00:00:00.000000000 +0000
***************
*** 1,389 ****
-
- 2002-10-14 Benjamin Kosnik
-
- Description of the libstdc++ ABI.
-
- I. What is an ABI? What's covered? What's not?
-
- - scope of document, of use to system integrators.
-
- - What's the deal with C++? Why can't different compiler's object
- files link with each other? Bug? Feature?
-
- - compilation includes and linked library binary must match up..
-
- - shared library only, static is immutable.
-
- - What's an ABI?
-
- - library ABI, compiler ABI different issues, (but related)
-
- - GNU C++ does not have a compiler command line option to switch
- between various different C++ ABIs. For instance, there is no way to
- switch between the gcc-3.0.x ABI, gcc-3.1.x ABI, and the gcc-3.2.x
- ABI during compilation. Other C++ compilers do allow this, and some
- g++ command line options may change the ABI (-fno-exceptions, see
- the complete list), but there is no version switch. Sorry.
-
- To use a specific C++ABI, one must use the corresponding GNU C++
- toolchain.
-
- - How can this complexity be managed? What does C++ versioning mean?
- Because library and compiler changes often make binaries compiled
- with one version of the GNU tools incompatible with binaries
- compiled with other (either newer or older) versions of the same GNU
- tools, specific techniques are used to make managing this complexity
- easier.
-
- The following techniques are used:
-
- - Release versioning on the libgcc_s.so binary.
-
- It is versioned as follows:
- gcc-3.0.0: libgcc_s.so.1
- gcc-3.0.1: libgcc_s.so.1
- gcc-3.0.2: libgcc_s.so.1
- gcc-3.0.3: libgcc_s.so.1
- gcc-3.0.4: libgcc_s.so.1
- gcc-3.1.0: libgcc_s.so.1
- gcc-3.1.1: libgcc_s.so.1
- gcc-3.2.0: libgcc_s.so.1
-
-
- - Release versioning on the libstdc++.so binary.
-
- It is versioned as follows:
- gcc-3.0.0: libstdc++.so.3.0.0
- gcc-3.0.1: libstdc++.so.3.0.1
- gcc-3.0.2: libstdc++.so.3.0.2
- gcc-3.0.3: libstdc++.so.3.0.2 (Error, should be libstdc++.so.3.0.3)
- gcc-3.0.4: libstdc++.so.3.0.4
- gcc-3.1.0: libstdc++.so.4.0.0
- gcc-3.1.1: libstdc++.so.4.0.1
- gcc-3.2.0: libstdc++.so.5.0.0
-
-
- - Symbol versioning on the libgcc_s.so binary.
-
- file: gcc/libgcc-std.ver
-
- It is versioned as follows:
- gcc-3.0.0: GCC_3.0
- gcc-3.0.1: GCC_3.0
- gcc-3.0.2: GCC_3.0
- gcc-3.0.3: GCC_3.0
- gcc-3.0.4: GCC_3.0
- gcc-3.1.0: GCC_3.0
- gcc-3.1.1: GCC_3.0
- gcc-3.2.0: GCC_3.0
-
-
- - Symbol versioning on the libstdc++.so binary.
-
- It is versioned as follows:
- gcc-3.0.0: (Error, unversioned)
- gcc-3.0.1: (Error, unversioned)
- gcc-3.0.2: (Error, unversioned)
- gcc-3.0.3: (Error, unversioned)
- gcc-3.0.4: (Error, unversioned)
- gcc-3.1.0: GLIBCPP_3.1, CXXABI_1
- gcc-3.1.1: GLIBCPP_3.1, CXXABI_1
- gcc-3.2.0: GLIBCPP_3.2, CXXABI_1.2
-
- file: libstdc++-v3/config/linker-map.gnu
-
-
- - Incremental bumping of a compiler pre-defined macro,
- __GXX_ABI_VERSION. This macro is defined as the version of the
- compiler v3 ABI, with g++ 3.0.x being version 100. This macro will
- be automatically defined whenever g++ is used (the curious can
- test this by invoking g++ with the '-v' flag.)
-
- This macro is defined in the file "lang-specs.h" in the gcc/cp directory.
- Later versions define it in "c-common.c" in the gcc directory.
-
- It is versioned as follows:
- gcc-3.0.x: 100
- gcc-3.1.x: 100 (Error, should be 101)
- gcc-3.2.x: 102
-
-
- - Incremental bumping of a library pre-defined macro, __GLIBCPP__ or
- __GLIBCXX__. This macro is defined as the date the library was
- released, in compressed ISO date format, as an unsigned long.
-
- This macro is defined in the file "c++config" in the
- "libstdc++-v3/include/bits" directory and is changed every night
- by an automated script.
-
- It is versioned as follows:
- gcc-3.0.0: 20010615
- gcc-3.0.1: 20010819
- gcc-3.0.2: 20011023
- gcc-3.0.3: 20011220
- gcc-3.0.4: 20020220
- gcc-3.1.0: 20020514
- gcc-3.1.1: 20020725
- gcc-3.2.0: 20020814
-
-
- - Incremental bumping of a library pre-defined macro,
- _GLIBCPP_VERSION. This macro is defined as the released version of
- the library, as a string literal. This is only implemented in
- gcc-3.1.0 releases and higher, and changed to _GLIBCXX_VERSION in 3.4.
-
- This macro is defined in the file "c++config" in the
- "libstdc++-v3/include/bits" directory and is generated
- automatically by autoconf as part of the configure-time generation
- of config.h.
-
- It is versioned as follows:
- gcc-3.0.0: "3.0.0"
- gcc-3.0.1: "3.0.0" (Error, should be "3.0.1")
- gcc-3.0.2: "3.0.0" (Error, should be "3.0.2")
- gcc-3.0.3: "3.0.0" (Error, should be "3.0.3")
- gcc-3.0.4: "3.0.0" (Error, should be "3.0.4")
- gcc-3.1.0: "3.1.0"
- gcc-3.1.1: "3.1.1"
- gcc-3.2.0: "3.2"
-
-
- - Matching each specific C++ compiler release to a specific set of
- C++ include files. This is only implemented in gcc-3.1.1 releases
- and higher.
-
- All C++ includes are installed in include/c++, then nest in a
- directory hierarchy corresponding to the C++ compiler's released
- version. This version corresponds to the variable "gcc_version" in
- "libstdc++-v3/acinclude.m4," and more details can be found in that
- file's macro GLIBCPP_CONFIGURE.
-
- C++ includes are versioned as follows:
- gcc-3.0.0: include/g++-v3
- gcc-3.0.1: include/g++-v3
- gcc-3.0.2: include/g++-v3
- gcc-3.0.3: include/g++-v3
- gcc-3.0.4: include/g++-v3
- gcc-3.1.0: include/g++-v3
- gcc-3.1.1: include/c++/3.1.1
- gcc-3.2.0: include/c++/3.2
-
- Taken together, these techniques can accurately specify interface
- and implementation changes in the GNU C++ tools themselves. Used
- properly, they allow both the GNU C++ tools implementation, and
- programs using them, an evolving yet controlled development that
- maintains backward compatibility.
-
- - Minimum environment that supports a versioned ABI: what's needed? A
- supported dynamic linker, a GNU linker of sufficient vintage to
- understand demangled C++ name globbing (ld), a shared executable
- compiled with g++, and shared libraries (libgcc_s, libstdc++-v3)
- compiled by a compiler (g++) with a compatible ABI. Phew.
-
- On top of all that, an additional constraint: libstdc++ did not
- attempt to version symbols (or age gracefully, really) until version
- 3.1.0.
-
- Most modern Linux and BSD versions, particularly ones using
- gcc-3.1.x tools, will meet the requirements above.
-
- - What configure options impact symbol versioning?
-
- It turns out that most of the configure options that change default
- behavior will impact the mangled names of exported symbols, and thus
- impact versioning and compatibility.
-
- For more information on configure options, including ABI impacts, see:
- http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html
-
- There is one flag that explicitly deals with symbol versioning:
- --enable-symvers.
-
- In particular, libstdc++-v3/acinclude.m4 has a macro called
- GLIBCXX_ENABLE_SYMVERS that defaults to yes (or the argument passed
- in via --enable-symvers=foo). At that point, the macro attempts to
- make sure that all the requirement for symbol versioning are in
- place. For more information, please consult acinclude.m4.
-
- - How can I tell if symbol versioning is, indeed, active?
-
- When the GNU C++ library is being built with symbol versioning on,
- you should see the following at configure time for libstdc++-v3:
-
- checking versioning on shared library symbols... gnu
-
- If you don't see this line in the configure output, or if this line
- appears but the last word is 'no', then you are out of luck.
-
- If the compiler is pre-installed, a quick way to test is to compile
- the following (or any) simple C++ file:
-
- #include
-
- int main()
- { std::cout << "hello" << std::endl; return 0; }
-
- %g++ hello.cc -o hello.out
- %nm hello.out
-
- If you see symbols in the resulting output with "GLIBCPP_3.x" as part
- of the name, then the executable is versioned. Here's an example:
-
- U _ZNSt8ios_base4InitC1Ev@@GLIBCPP_3.1
-
-
- II. Library ABI changes
-
- The following will cause the library major version number to
- increase, say from "libstdc++.so.3.0.4" to "libstdc++.so.4.0.0".
-
- - (anything) changing in the gcc/g++ compiler ABI
-
- - (anything) changing size of an exported symbol
-
- - (anything) changing alignment of an exported symbol
-
- - (anything) changing the layout of an exported symbol
-
- - (anything) changing mangling on an exported symbol
-
- - (anything) deleting an exported symbol
-
- - (anything) changing the size, alignment, or layout of types
- specified in the C++ standard. These may not necessarily be
- instantiated or otherwise exported in the library binary, and
- include all the required locale facets, as well as things like
- std::basic_streambuf, et al.
-
- Note: adding an exported symbol, if it's in a new and dependent
- interface name, is ok.
-
- The following will cause the library revision version number to
- increase, say from "libstdc++.so.5.0.0" to "libstdc++.so.5.0.1".
-
- - any release of the gcc toolchain.
-
-
- III. Versioning
-
- - include files
-
- - versioning headers with version, why necessary
- (need to control member/non-member functions, add delete files)
-
- - shared library binaries
-
- - release versions
-
- - libtool versions
-
- - when does so version get a bump? what are the options?
-
- - how is the link map used?
-
- - in an non-abi breaking minor release, how are symbols added?
- removed?
-
- - in an abi-breaking major release, what happens? symbol fall back
-
-
- IV. Testing ABI changes
-
- Testing for GNU C++ ABI changes is composed of two distinct areas:
- testing the C++ compiler (g++) for compiler changes, and testing the
- C++ library (libstdc++) for library changes.
-
- Testing the C++ compiler ABI can be done various ways.
-
- One.
- Intel ABI checker. More information can be obtained
- here.
-
- Two.
- The second is yet unreleased, but has been announced on the gcc
- mailing list. It is yet unspecified if these tools will be freely
- available, and able to be included in a GNU project. Please contact
- Mark Mitchell (mark@codesourcery.com) for more details, and current
- status.
-
- Three.
- Involves using the vlad.consistency test framework. This has also been
- discussed on the gcc mailing lists.
-
- Testing the C++ library ABI can also be done various ways.
-
- One.
- (Brendan Kehoe, Jeff Law suggestion to run 'make check-c++' two ways,
- one with a new compiler and an old library, and the other with an old
- compiler and a new library, and look for testsuite regressions)
-
- Details on how to set this kind of test up can be found here:
- http://gcc.gnu.org/ml/gcc/2002-08/msg00142.html
-
- Two.
- Use the 'make check-abi' rule in the libstdc++-v3 Makefile.
-
- This is a proactive check the library ABI. Currently, exported symbol
- names that are either weak or defined are checked against a last known
- good baseline. Currently, this baseline is keyed off of 3.2.0
- binaries, as this was the last time the .so number was incremented. In
- addition, all exported names are demangled, and the exported objects
- are checked to make sure they are the same size as the same object in
- the baseline.
-
- This dataset is insufficient, yet a start. Also needed is a
- comprehensive check for all user-visible types part of the standard
- library for sizeof() and alignof() changes.
-
- Verifying compatible layouts of objects is not even attempted. It
- should be possible to use sizeof, alignof, and offsetof to compute
- offsets for each structure and type in the standard library, saving to
- another datafile. Then, compute this in a similar way for new
- binaries, and look for differences.
-
- Another approach might be to use the -fdump-class-hierarchy flag to
- get information. However, currently this approach gives insufficient
- data for use in library testing, as class data members, their offsets,
- and other detailed data is not displayed with this flag.
- (See g++/7470 on how this was used to find bugs.)
-
- Perhaps there are other C++ ABI checkers. If so, please notify
- us. We'd like to know about them!
-
-
- V. Issues not directly addressed, and possible suggestions
-
- - what to do about multi-ABI systems (nathan scenario)?
-
- - compatibility libs
-
- --enable-version-specific-runtime-libs
-
- - Alexandre Oliva proposal to have extended name attributes, modify ld
-
- - directory-level versioning
-
- - wrapping C++ API's in "C" to use the C ABI.
-
-
- V. References
-
- ABIcheck, a vague idea of checking ABI compatibility
- http://abicheck.sourceforge.net/
-
- C++ ABI reference
- http://www.codesourcery.com/cxx-abi/
-
- Intel ABI documentation
- "Intel® Compilers for Linux* -Compatibility with the GNU Compilers"
- (included in icc 6.0)
-
- Sun Solaris 2.9 docs
- Linker and Libraries Guide (document 816-1386)
- C++ Migration Guide (document 816-2459)
- http://docs.sun.com/db/prod/solaris.9
- http://docs.sun.com/?p=/doc/816-1386&a=load
-
- Ulrich Drepper, "ELF Symbol Versioning"
- http://people.redhat.com/drepper/symbol-versioning
-
--- 0 ----
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/html/configopts.html gcc-3.4.1/libstdc++-v3/docs/html/configopts.html
*** gcc-3.4.0/libstdc++-v3/docs/html/configopts.html 2004-03-18 17:36:36.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/docs/html/configopts.html 2004-04-23 22:05:26.000000000 +0000
*************** options
*** 135,141 ****
Select a target-specific underlying std::allocator. The
choices are 'new' to specify a wrapper for new, 'malloc' to
specify a wrapper for malloc, 'mt' for a fixed power of two allocator
! (More info) or
'bitmap' for a bitmap allocator. This option can change the
library ABI.
--- 135,141 ----
Select a target-specific underlying std::allocator. The
choices are 'new' to specify a wrapper for new, 'malloc' to
specify a wrapper for malloc, 'mt' for a fixed power of two allocator
! (documented under extensions) or
'bitmap' for a bitmap allocator. This option can change the
library ABI.
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/html/faq/index.html gcc-3.4.1/libstdc++-v3/docs/html/faq/index.html
*** gcc-3.4.0/libstdc++-v3/docs/html/faq/index.html 2004-03-18 17:36:41.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/docs/html/faq/index.html 2004-05-13 15:27:41.000000000 +0000
*************** which is no longer available, thanks dej
*** 395,410 ****
It's not a bug, and it's not really a problem. Nevertheless, some
people don't like it, so here are two pseudo-solutions:
!
If the only functions from libstdc++.a which you need are language
! support functions (those listed in
! clause 18 of the standard,
! e.g., new and delete), then try linking
! against libsupc++.a (usually specifying
! -lsupc++ when calling g++ for the final link step will
! do it). This library contains only those support routines, one per
! object file. But if you are using anything from the rest of the
! library, such as IOStreams or vectors, then you'll still need
! pieces from libstdc++.a.
The second method is one we hope to incorporate into the library
build process. Some platforms can place each function and variable
--- 395,411 ----
It's not a bug, and it's not really a problem. Nevertheless, some
people don't like it, so here are two pseudo-solutions:
!
If the only functions from libstdc++.a which you need are
! language support functions (those listed in clause 18 of the
! standard, e.g., new and delete),
! then try linking against libsupc++.a (Using
! gcc instead of g++ and explicitly
! linking in -lsupc++ for the final link step will
! do it). This library contains only those support routines,
! one per object file. But if you are using anything from the
! rest of the library, such as IOStreams or vectors, then
! you'll still need pieces from libstdc++.a.
The second method is one we hope to incorporate into the library
build process. Some platforms can place each function and variable
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/backward/iterator.h gcc-3.4.1/libstdc++-v3/include/backward/iterator.h
*** gcc-3.4.0/libstdc++-v3/include/backward/iterator.h 2003-12-09 03:27:10.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/backward/iterator.h 2004-05-06 22:07:06.000000000 +0000
***************
*** 1,3 ****
--- 1,32 ----
+ // Backward-compat support -*- C++ -*-
+
+ // Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the
+ // terms of the GNU General Public License as published by the
+ // Free Software Foundation; either version 2, or (at your option)
+ // any later version.
+
+ // This library is distributed in the hope that it will be useful,
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ // GNU General Public License for more details.
+
+ // You should have received a copy of the GNU General Public License along
+ // with this library; see the file COPYING. If not, write to the Free
+ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ // USA.
+
+ // As a special exception, you may use this file as part of a free software
+ // library without restriction. Specifically, if other files instantiate
+ // templates or use macros or inline functions from this file, or you compile
+ // this file and link it with other files to produce an executable, this
+ // file does not by itself cause the resulting executable to be covered by
+ // the GNU General Public License. This exception does not however
+ // invalidate any other reasons why the executable file might be covered by
+ // the GNU General Public License.
+
/*
*
* Copyright (c) 1994
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/backward/strstream gcc-3.4.1/libstdc++-v3/include/backward/strstream
*** gcc-3.4.0/libstdc++-v3/include/backward/strstream 2003-12-09 03:27:10.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/backward/strstream 2004-05-24 20:49:48.000000000 +0000
***************
*** 1,6 ****
// Backward-compat support -*- C++ -*-
! // Copyright (C) 2001, 2002 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
--- 1,6 ----
// Backward-compat support -*- C++ -*-
! // Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
*************** namespace std
*** 98,103 ****
--- 98,108 ----
= ios_base::in | ios_base::out);
private:
+ strstreambuf&
+ operator=(const strstreambuf&);
+
+ strstreambuf(const strstreambuf&);
+
// Dynamic allocation, possibly using _M_alloc_fun and _M_free_fun.
char* _M_alloc(size_t);
void _M_free(char*);
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/basic_ios.h gcc-3.4.1/libstdc++-v3/include/bits/basic_ios.h
*** gcc-3.4.0/libstdc++-v3/include/bits/basic_ios.h 2004-03-18 17:36:46.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/basic_ios.h 2004-05-24 20:49:48.000000000 +0000
***************
*** 1,6 ****
// Iostreams base classes -*- C++ -*-
! // Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// Iostreams base classes -*- C++ -*-
! // Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
*************** namespace std
*** 254,260 ****
*/
explicit
basic_ios(basic_streambuf<_CharT, _Traits>* __sb)
! : ios_base(), _M_ctype(0), _M_num_put(0), _M_num_get(0)
{ this->init(__sb); }
/**
--- 254,261 ----
*/
explicit
basic_ios(basic_streambuf<_CharT, _Traits>* __sb)
! : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0),
! _M_ctype(0), _M_num_put(0), _M_num_get(0)
{ this->init(__sb); }
/**
*************** namespace std
*** 440,446 ****
* The default constructor does nothing and is not normally
* accessible to users.
*/
! basic_ios() : ios_base(), _M_ctype(0), _M_num_put(0), _M_num_get(0)
{ }
/**
--- 441,449 ----
* The default constructor does nothing and is not normally
* accessible to users.
*/
! basic_ios()
! : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false),
! _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0)
{ }
/**
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/basic_string.h gcc-3.4.1/libstdc++-v3/include/bits/basic_string.h
*** gcc-3.4.0/libstdc++-v3/include/bits/basic_string.h 2004-03-18 17:36:46.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/basic_string.h 2004-05-24 20:49:49.000000000 +0000
*************** namespace std
*** 418,431 ****
* @param str Source string.
*/
basic_string&
! operator=(const basic_string& __str) { return this->assign(__str); }
/**
* @brief Copy contents of @a s into this string.
* @param s Source null-terminated string.
*/
basic_string&
! operator=(const _CharT* __s) { return this->assign(__s); }
/**
* @brief Set value to string of length 1.
--- 418,439 ----
* @param str Source string.
*/
basic_string&
! operator=(const basic_string& __str)
! {
! this->assign(__str);
! return *this;
! }
/**
* @brief Copy contents of @a s into this string.
* @param s Source null-terminated string.
*/
basic_string&
! operator=(const _CharT* __s)
! {
! this->assign(__s);
! return *this;
! }
/**
* @brief Set value to string of length 1.
*************** namespace std
*** 435,441 ****
* (*this)[0] == @a c.
*/
basic_string&
! operator=(_CharT __c) { return this->assign(1, __c); }
// Iterators:
/**
--- 443,453 ----
* (*this)[0] == @a c.
*/
basic_string&
! operator=(_CharT __c)
! {
! this->assign(1, __c);
! return *this;
! }
// Iterators:
/**
*************** namespace std
*** 1342,1348 ****
if (this->max_size() - (this->size() - __n1) < __n2)
__throw_length_error(__N("basic_string::_M_replace_aux"));
_M_mutate(__pos1, __n1, __n2);
! if (__n2)
traits_type::assign(_M_data() + __pos1, __n2, __c);
return *this;
}
--- 1354,1362 ----
if (this->max_size() - (this->size() - __n1) < __n2)
__throw_length_error(__N("basic_string::_M_replace_aux"));
_M_mutate(__pos1, __n1, __n2);
! if (__n2 == 1)
! _M_data()[__pos1] = __c;
! else if (__n2)
traits_type::assign(_M_data() + __pos1, __n2, __c);
return *this;
}
*************** namespace std
*** 1352,1358 ****
size_type __n2)
{
_M_mutate(__pos1, __n1, __n2);
! if (__n2)
traits_type::copy(_M_data() + __pos1, __s, __n2);
return *this;
}
--- 1366,1374 ----
size_type __n2)
{
_M_mutate(__pos1, __n1, __n2);
! if (__n2 == 1)
! _M_data()[__pos1] = *__s;
! else if (__n2)
traits_type::copy(_M_data() + __pos1, __s, __n2);
return *this;
}
*************** namespace std
*** 1960,1966 ****
* @param rhs Last string.
* @return New string with value of @a lhs followed by @a rhs.
*/
! template
basic_string<_CharT, _Traits, _Alloc>
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
--- 1976,1982 ----
* @param rhs Last string.
* @return New string with value of @a lhs followed by @a rhs.
*/
! template
basic_string<_CharT, _Traits, _Alloc>
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/basic_string.tcc gcc-3.4.1/libstdc++-v3/include/bits/basic_string.tcc
*** gcc-3.4.0/libstdc++-v3/include/bits/basic_string.tcc 2004-03-18 17:36:47.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/basic_string.tcc 2004-05-09 23:27:56.000000000 +0000
*************** namespace std
*** 91,97 ****
if (__beg == __end && __a == _Alloc())
return _S_empty_rep()._M_refdata();
// Avoid reallocation for common case.
! _CharT __buf[100];
size_type __len = 0;
while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT))
{
--- 91,97 ----
if (__beg == __end && __a == _Alloc())
return _S_empty_rep()._M_refdata();
// Avoid reallocation for common case.
! _CharT __buf[128];
size_type __len = 0;
while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT))
{
*************** namespace std
*** 178,185 ****
template
basic_string<_CharT, _Traits, _Alloc>::
basic_string(const basic_string& __str)
! : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(), __str.get_allocator()),
! __str.get_allocator())
{ }
template
--- 178,186 ----
template
basic_string<_CharT, _Traits, _Alloc>::
basic_string(const basic_string& __str)
! : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()),
! __str.get_allocator()),
! __str.get_allocator())
{ }
template
*************** namespace std
*** 382,388 ****
{
const size_type __old_size = this->size();
const size_type __new_size = __old_size + __len2 - __len1;
- const _CharT* __src = _M_data() + __pos + __len1;
const size_type __how_much = __old_size - __pos - __len1;
if (_M_rep() == &_S_empty_rep()
--- 383,388 ----
*************** namespace std
*** 396,402 ****
traits_type::copy(__r->_M_refdata(), _M_data(), __pos);
if (__how_much)
traits_type::copy(__r->_M_refdata() + __pos + __len2,
! __src, __how_much);
_M_rep()->_M_dispose(__a);
_M_data(__r->_M_refdata());
--- 396,402 ----
traits_type::copy(__r->_M_refdata(), _M_data(), __pos);
if (__how_much)
traits_type::copy(__r->_M_refdata() + __pos + __len2,
! _M_data() + __pos + __len1, __how_much);
_M_rep()->_M_dispose(__a);
_M_data(__r->_M_refdata());
*************** namespace std
*** 404,410 ****
else if (__how_much && __len1 != __len2)
{
// Work in-place
! traits_type::move(_M_data() + __pos + __len2, __src, __how_much);
}
_M_rep()->_M_set_sharable();
_M_rep()->_M_length = __new_size;
--- 404,411 ----
else if (__how_much && __len1 != __len2)
{
// Work in-place
! traits_type::move(_M_data() + __pos + __len2,
! _M_data() + __pos + __len1, __how_much);
}
_M_rep()->_M_set_sharable();
_M_rep()->_M_length = __new_size;
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/boost_concept_check.h gcc-3.4.1/libstdc++-v3/include/bits/boost_concept_check.h
*** gcc-3.4.0/libstdc++-v3/include/bits/boost_concept_check.h 2004-03-18 17:36:47.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/boost_concept_check.h 2004-06-23 16:09:48.000000000 +0000
***************
*** 1,4 ****
--- 1,30 ----
+ // Copyright (C) 2004 Free Software Foundation, Inc.
//
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the
+ // terms of the GNU General Public License as published by the
+ // Free Software Foundation; either version 2, or (at your option)
+ // any later version.
+
+ // This library is distributed in the hope that it will be useful,
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ // GNU General Public License for more details.
+
+ // You should have received a copy of the GNU General Public License along
+ // with this library; see the file COPYING. If not, write to the Free
+ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ // USA.
+
+ // As a special exception, you may use this file as part of a free software
+ // library without restriction. Specifically, if other files instantiate
+ // templates or use macros or inline functions from this file, or you compile
+ // this file and link it with other files to produce an executable, this
+ // file does not by itself cause the resulting executable to be covered by
+ // the GNU General Public License. This exception does not however
+ // invalidate any other reasons why the executable file might be covered by
+ // the GNU General Public License.
+
// (C) Copyright Jeremy Siek 2000. Permission to copy, use, modify,
// sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided
*************** inline void __function_requires()
*** 36,41 ****
--- 62,73 ----
void (_Concept::*__x)() _IsUnused = &_Concept::__constraints;
}
+ // No definition: if this is referenced, there's a problem with
+ // the instantiating type not being one of the required integer types.
+ // Unfortunately, this results in a link-time error, not a compile-time error.
+ void __error_type_must_be_an_integer_type();
+ void __error_type_must_be_an_unsigned_integer_type();
+ void __error_type_must_be_a_signed_integer_type();
// ??? Should the "concept_checking*" structs begin with more than _ ?
#define _GLIBCXX_CLASS_REQUIRES(_type_var, _ns, _concept) \
*************** struct _Aux_require_same<_Tp,_Tp> { type
*** 88,94 ****
template
struct _IntegerConcept {
void __constraints() {
! this->__error_type_must_be_an_integer_type();
}
};
template <> struct _IntegerConcept { void __constraints() {} };
--- 120,126 ----
template
struct _IntegerConcept {
void __constraints() {
! __error_type_must_be_an_integer_type();
}
};
template <> struct _IntegerConcept { void __constraints() {} };
*************** struct _Aux_require_same<_Tp,_Tp> { type
*** 104,110 ****
template
struct _SignedIntegerConcept {
void __constraints() {
! this->__error_type_must_be_a_signed_integer_type();
}
};
template <> struct _SignedIntegerConcept { void __constraints() {} };
--- 136,142 ----
template
struct _SignedIntegerConcept {
void __constraints() {
! __error_type_must_be_a_signed_integer_type();
}
};
template <> struct _SignedIntegerConcept { void __constraints() {} };
*************** struct _Aux_require_same<_Tp,_Tp> { type
*** 115,121 ****
template
struct _UnsignedIntegerConcept {
void __constraints() {
! this->__error_type_must_be_an_unsigned_integer_type();
}
};
template <> struct _UnsignedIntegerConcept
--- 147,153 ----
template
struct _UnsignedIntegerConcept {
void __constraints() {
! __error_type_must_be_an_unsigned_integer_type();
}
};
template <> struct _UnsignedIntegerConcept
*************** struct _Aux_require_same<_Tp,_Tp> { type
*** 162,168 ****
__const_constraints(__a);
}
void __const_constraints(const _Tp& __a) {
! _Tp __c(__a) _IsUnused; // require const copy constructor
const _Tp* __ptr _IsUnused = &__a; // require const address of operator
}
_Tp __b;
--- 194,200 ----
__const_constraints(__a);
}
void __const_constraints(const _Tp& __a) {
! _Tp __c _IsUnused(__a); // require const copy constructor
const _Tp* __ptr _IsUnused = &__a; // require const address of operator
}
_Tp __b;
*************** struct _Aux_require_same<_Tp,_Tp> { type
*** 173,184 ****
struct _SGIAssignableConcept
{
void __constraints() {
! _Tp __b(__a) _IsUnused;
__a = __a; // require assignment operator
__const_constraints(__a);
}
void __const_constraints(const _Tp& __b) {
! _Tp __c(__b) _IsUnused;
__a = __b; // const required for argument to assignment
}
_Tp __a;
--- 205,216 ----
struct _SGIAssignableConcept
{
void __constraints() {
! _Tp __b _IsUnused(__a);
__a = __a; // require assignment operator
__const_constraints(__a);
}
void __const_constraints(const _Tp& __b) {
! _Tp __c _IsUnused(__b);
__a = __b; // const required for argument to assignment
}
_Tp __a;
*************** struct _Aux_require_same<_Tp,_Tp> { type
*** 386,392 ****
struct _TrivialIteratorConcept
{
void __constraints() {
! __function_requires< _DefaultConstructibleConcept<_Tp> >();
__function_requires< _AssignableConcept<_Tp> >();
__function_requires< _EqualityComparableConcept<_Tp> >();
// typedef typename std::iterator_traits<_Tp>::value_type _V;
--- 418,424 ----
struct _TrivialIteratorConcept
{
void __constraints() {
! // __function_requires< _DefaultConstructibleConcept<_Tp> >();
__function_requires< _AssignableConcept<_Tp> >();
__function_requires< _EqualityComparableConcept<_Tp> >();
// typedef typename std::iterator_traits<_Tp>::value_type _V;
*************** struct _Aux_require_same<_Tp,_Tp> { type
*** 443,448 ****
--- 475,481 ----
{
void __constraints() {
__function_requires< _InputIteratorConcept<_Tp> >();
+ __function_requires< _DefaultConstructibleConcept<_Tp> >();
__function_requires< _ConvertibleConcept<
typename std::iterator_traits<_Tp>::iterator_category,
std::forward_iterator_tag> >();
*************** struct _Aux_require_same<_Tp,_Tp> { type
*** 694,702 ****
__function_requires< _DefaultConstructibleConcept<_Sequence> >();
_Sequence
! __c(__n) _IsUnused,
! __c2(__n, __t) _IsUnused,
! __c3(__first, __last) _IsUnused;
__c.insert(__p, __t);
__c.insert(__p, __n, __t);
--- 727,735 ----
__function_requires< _DefaultConstructibleConcept<_Sequence> >();
_Sequence
! __c _IsUnused(__n),
! __c2 _IsUnused(__n, __t),
! __c3 _IsUnused(__first, __last);
__c.insert(__p, __t);
__c.insert(__p, __n, __t);
*************** struct _Aux_require_same<_Tp,_Tp> { type
*** 813,819 ****
__c.insert(__first, __last);
}
! typename _MultipleAssociativeContainer::iterator __pos _IsUnused;
typename _MultipleAssociativeContainer::value_type __t;
typename _MultipleAssociativeContainer::value_type *__first, *__last;
};
--- 846,852 ----
__c.insert(__first, __last);
}
! typename _MultipleAssociativeContainer::iterator __pos;
typename _MultipleAssociativeContainer::value_type __t;
typename _MultipleAssociativeContainer::value_type *__first, *__last;
};
*************** struct _Aux_require_same<_Tp,_Tp> { type
*** 856,864 ****
_ReversibleContainerConcept<_SortedAssociativeContainer> >();
_SortedAssociativeContainer
! __c(__kc) _IsUnused,
! __c2(__first, __last) _IsUnused,
! __c3(__first, __last, __kc) _IsUnused;
__p = __c.upper_bound(__k);
__p = __c.lower_bound(__k);
--- 889,897 ----
_ReversibleContainerConcept<_SortedAssociativeContainer> >();
_SortedAssociativeContainer
! __c _IsUnused(__kc),
! __c2 _IsUnused(__first, __last),
! __c3 _IsUnused(__first, __last, __kc);
__p = __c.upper_bound(__k);
__p = __c.lower_bound(__k);
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/c++config gcc-3.4.1/libstdc++-v3/include/bits/c++config
*** gcc-3.4.0/libstdc++-v3/include/bits/c++config 2004-04-19 00:16:03.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/c++config 2004-07-01 00:16:05.000000000 +0000
***************
*** 35,41 ****
#include
// The current version of the C++ library in compressed ISO date format.
! #define __GLIBCXX__ 20040419
// Allow use of "export template." This is currently not a feature
// that g++ supports.
--- 35,41 ----
#include
// The current version of the C++ library in compressed ISO date format.
! #define __GLIBCXX__ 20040701
// Allow use of "export template." This is currently not a feature
// that g++ supports.
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/codecvt.h gcc-3.4.1/libstdc++-v3/include/bits/codecvt.h
*** gcc-3.4.0/libstdc++-v3/include/bits/codecvt.h 2004-03-18 17:36:47.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/codecvt.h 2004-04-30 04:20:22.000000000 +0000
***************
*** 459,466 ****
{
if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
{
! _S_destroy_c_locale(this->_M_c_locale_codecvt);
! _S_create_c_locale(this->_M_c_locale_codecvt, __s);
}
}
--- 459,466 ----
{
if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
{
! this->_S_destroy_c_locale(this->_M_c_locale_codecvt);
! this->_S_create_c_locale(this->_M_c_locale_codecvt, __s);
}
}
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/fstream.tcc gcc-3.4.1/libstdc++-v3/include/bits/fstream.tcc
*** gcc-3.4.0/libstdc++-v3/include/bits/fstream.tcc 2004-03-18 17:36:49.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/fstream.tcc 2004-05-24 20:49:49.000000000 +0000
*************** namespace std
*** 73,82 ****
template
basic_filebuf<_CharT, _Traits>::
! basic_filebuf() : __streambuf_type(), _M_file(&_M_lock),
_M_mode(ios_base::openmode(0)), _M_state_beg(), _M_state_cur(),
_M_state_last(), _M_buf(NULL), _M_buf_size(BUFSIZ),
! _M_buf_allocated(false), _M_reading(false), _M_writing(false),
_M_pback_cur_save(0), _M_pback_end_save(0), _M_pback_init(false),
_M_codecvt(0), _M_ext_buf(0), _M_ext_buf_size(0), _M_ext_next(0),
_M_ext_end(0)
--- 73,82 ----
template
basic_filebuf<_CharT, _Traits>::
! basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock),
_M_mode(ios_base::openmode(0)), _M_state_beg(), _M_state_cur(),
_M_state_last(), _M_buf(NULL), _M_buf_size(BUFSIZ),
! _M_buf_allocated(false), _M_reading(false), _M_writing(false), _M_pback(),
_M_pback_cur_save(0), _M_pback_end_save(0), _M_pback_init(false),
_M_codecvt(0), _M_ext_buf(0), _M_ext_buf_size(0), _M_ext_next(0),
_M_ext_end(0)
*************** namespace std
*** 786,791 ****
--- 786,793 ----
if (__testvalid)
_M_codecvt = _M_codecvt_tmp;
+ else
+ _M_codecvt = 0;
}
// Inhibit implicit instantiations for required instantiations,
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/istream.tcc gcc-3.4.1/libstdc++-v3/include/bits/istream.tcc
*** gcc-3.4.0/libstdc++-v3/include/bits/istream.tcc 2004-03-18 17:36:50.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/istream.tcc 2004-05-25 22:13:24.000000000 +0000
***************
*** 1,6 ****
// istream classes -*- C++ -*-
! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// istream classes -*- C++ -*-
! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
***************
*** 29,35 ****
// the GNU General Public License.
//
! // ISO C++ 14882: 27.6.2 Output streams
//
#ifndef _ISTREAM_TCC
--- 29,35 ----
// the GNU General Public License.
//
! // ISO C++ 14882: 27.6.1 Input streams
//
#ifndef _ISTREAM_TCC
*************** namespace std
*** 44,57 ****
{
template
basic_istream<_CharT, _Traits>::sentry::
! sentry(basic_istream<_CharT, _Traits>& __in, bool __noskipws)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
if (__in.good())
{
if (__in.tie())
__in.tie()->flush();
! if (!__noskipws && (__in.flags() & ios_base::skipws))
{
const __int_type __eof = traits_type::eof();
__streambuf_type* __sb = __in.rdbuf();
--- 44,57 ----
{
template
basic_istream<_CharT, _Traits>::sentry::
! sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
if (__in.good())
{
if (__in.tie())
__in.tie()->flush();
! if (!__noskip && (__in.flags() & ios_base::skipws))
{
const __int_type __eof = traits_type::eof();
__streambuf_type* __sb = __in.rdbuf();
*************** namespace std
*** 59,65 ****
const __ctype_type& __ct = __check_facet(__in._M_ctype);
while (!traits_type::eq_int_type(__c, __eof)
! && __ct.is(ctype_base::space,
traits_type::to_char_type(__c)))
__c = __sb->snextc();
--- 59,65 ----
const __ctype_type& __ct = __check_facet(__in._M_ctype);
while (!traits_type::eq_int_type(__c, __eof)
! && __ct.is(ctype_base::space,
traits_type::to_char_type(__c)))
__c = __sb->snextc();
*************** namespace std
*** 75,81 ****
_M_ok = true;
else
{
- _M_ok = false;
__err |= ios_base::failbit;
__in.setstate(__err);
}
--- 75,80 ----
*************** namespace std
*** 478,484 ****
{
try
{
! int_type __cb = this->rdbuf()->sbumpc();
// 27.6.1.1 paragraph 3
if (!traits_type::eq_int_type(__cb, traits_type::eof()))
{
--- 477,483 ----
{
try
{
! const int_type __cb = this->rdbuf()->sbumpc();
// 27.6.1.1 paragraph 3
if (!traits_type::eq_int_type(__cb, traits_type::eof()))
{
*************** namespace std
*** 520,527 ****
&& !traits_type::eq_int_type(__c, __idelim))
{
*__s++ = traits_type::to_char_type(__c);
- __c = __sb->snextc();
++_M_gcount;
}
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
--- 519,526 ----
&& !traits_type::eq_int_type(__c, __idelim))
{
*__s++ = traits_type::to_char_type(__c);
++_M_gcount;
+ __c = __sb->snextc();
}
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
*************** namespace std
*** 592,618 ****
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
int_type __c = __sb->sgetc();
!
while (_M_gcount + 1 < __n
&& !traits_type::eq_int_type(__c, __eof)
&& !traits_type::eq_int_type(__c, __idelim))
{
! *__s++ = traits_type::to_char_type(__c);
! __c = __sb->snextc();
! ++_M_gcount;
}
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
! else
{
! if (traits_type::eq_int_type(__c, __idelim))
! {
! __sb->sbumpc();
! ++_M_gcount;
! }
! else
! __err |= ios_base::failbit;
}
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
--- 591,634 ----
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
int_type __c = __sb->sgetc();
!
while (_M_gcount + 1 < __n
&& !traits_type::eq_int_type(__c, __eof)
&& !traits_type::eq_int_type(__c, __idelim))
{
! streamsize __size = std::min(streamsize(__sb->egptr()
! - __sb->gptr()),
! __n - _M_gcount - 1);
! if (__size > 1)
! {
! const char_type* __p = traits_type::find(__sb->gptr(),
! __size,
! __delim);
! if (__p)
! __size = __p - __sb->gptr();
! traits_type::copy(__s, __sb->gptr(), __size);
! __s += __size;
! __sb->gbump(__size);
! _M_gcount += __size;
! __c = __sb->sgetc();
! }
! else
! {
! *__s++ = traits_type::to_char_type(__c);
! ++_M_gcount;
! __c = __sb->snextc();
! }
}
+
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
! else if (traits_type::eq_int_type(__c, __idelim))
{
! ++_M_gcount;
! __sb->sbumpc();
}
+ else
+ __err |= ios_base::failbit;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
*************** namespace std
*** 641,648 ****
__streambuf_type* __sb = this->rdbuf();
int_type __c;
! __n = std::min(__n, numeric_limits::max());
! while (_M_gcount < __n
&& !traits_type::eq_int_type(__c = __sb->sbumpc(), __eof))
{
++_M_gcount;
--- 657,665 ----
__streambuf_type* __sb = this->rdbuf();
int_type __c;
! if (__n != numeric_limits::max())
! --__n;
! while (_M_gcount <= __n
&& !traits_type::eq_int_type(__c = __sb->sbumpc(), __eof))
{
++_M_gcount;
*************** namespace std
*** 722,735 ****
try
{
// Cannot compare int_type with streamsize generically.
! streamsize __num = this->rdbuf()->in_avail();
! if (__num >= 0)
! {
! __num = std::min(__num, __n);
! if (__num)
! _M_gcount = this->rdbuf()->sgetn(__s, __num);
! }
! else
__err |= ios_base::eofbit;
}
catch(...)
--- 739,748 ----
try
{
// Cannot compare int_type with streamsize generically.
! const streamsize __num = this->rdbuf()->in_avail();
! if (__num > 0)
! _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n));
! else if (__num == -1)
__err |= ios_base::eofbit;
}
catch(...)
*************** namespace std
*** 858,864 ****
if (!this->fail())
{
// 136. seekp, seekg setting wrong streams?
! pos_type __p = this->rdbuf()->pubseekpos(__pos, ios_base::in);
// 129. Need error indication from seekp() and seekg()
if (__p == pos_type(off_type(-1)))
--- 871,878 ----
if (!this->fail())
{
// 136. seekp, seekg setting wrong streams?
! const pos_type __p = this->rdbuf()->pubseekpos(__pos,
! ios_base::in);
// 129. Need error indication from seekp() and seekg()
if (__p == pos_type(off_type(-1)))
*************** namespace std
*** 885,892 ****
if (!this->fail())
{
// 136. seekp, seekg setting wrong streams?
! pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
! ios_base::in);
// 129. Need error indication from seekp() and seekg()
if (__p == pos_type(off_type(-1)))
--- 899,906 ----
if (!this->fail())
{
// 136. seekp, seekg setting wrong streams?
! const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
! ios_base::in);
// 129. Need error indication from seekp() and seekg()
if (__p == pos_type(off_type(-1)))
*************** namespace std
*** 906,918 ****
operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
{
typedef basic_istream<_CharT, _Traits> __istream_type;
typename __istream_type::sentry __cerb(__in, false);
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
try
{
! typename __istream_type::int_type __cb = __in.rdbuf()->sbumpc();
if (!_Traits::eq_int_type(__cb, _Traits::eof()))
__c = _Traits::to_char_type(__cb);
else
--- 920,934 ----
operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
{
typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::int_type __int_type;
+
typename __istream_type::sentry __cerb(__in, false);
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
try
{
! const __int_type __cb = __in.rdbuf()->sbumpc();
if (!_Traits::eq_int_type(__cb, _Traits::eof()))
__c = _Traits::to_char_type(__cb);
else
*************** namespace std
*** 1025,1035 ****
{
try
{
__str.erase();
! streamsize __w = __in.width();
! __size_type __n;
! __n = __w > 0 ? static_cast<__size_type>(__w) : __str.max_size();
!
const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
const __int_type __eof = _Traits::eof();
__streambuf_type* __sb = __in.rdbuf();
--- 1041,1053 ----
{
try
{
+ // Avoid reallocation for common case.
__str.erase();
! _CharT __buf[128];
! __size_type __len = 0;
! const streamsize __w = __in.width();
! const __size_type __n = __w > 0 ? static_cast<__size_type>(__w)
! : __str.max_size();
const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
const __int_type __eof = _Traits::eof();
__streambuf_type* __sb = __in.rdbuf();
*************** namespace std
*** 1039,1048 ****
&& !_Traits::eq_int_type(__c, __eof)
&& !__ct.is(ctype_base::space, _Traits::to_char_type(__c)))
{
! __str += _Traits::to_char_type(__c);
++__extracted;
__c = __sb->snextc();
}
if (_Traits::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
__in.width(0);
--- 1057,1073 ----
&& !_Traits::eq_int_type(__c, __eof)
&& !__ct.is(ctype_base::space, _Traits::to_char_type(__c)))
{
! if (__len == sizeof(__buf) / sizeof(_CharT))
! {
! __str.append(__buf, sizeof(__buf) / sizeof(_CharT));
! __len = 0;
! }
! __buf[__len++] = _Traits::to_char_type(__c);
++__extracted;
__c = __sb->snextc();
}
+ __str.append(__buf, __len);
+
if (_Traits::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
__in.width(0);
*************** namespace std
*** 1077,1106 ****
__size_type __extracted = 0;
const __size_type __n = __str.max_size();
- bool __testdelim = false;
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
typename __istream_type::sentry __cerb(__in, true);
if (__cerb)
{
try
{
__str.erase();
! __int_type __idelim = _Traits::to_int_type(__delim);
! __streambuf_type* __sb = __in.rdbuf();
! __int_type __c = __sb->sbumpc();
const __int_type __eof = _Traits::eof();
! __testdelim = _Traits::eq_int_type(__c, __idelim);
! while (!_Traits::eq_int_type(__c, __eof) && !__testdelim
! && __extracted < __n)
{
! __str += _Traits::to_char_type(__c);
++__extracted;
! __c = __sb->sbumpc();
! __testdelim = _Traits::eq_int_type(__c, __idelim);
}
if (_Traits::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
}
catch(...)
{
--- 1102,1146 ----
__size_type __extracted = 0;
const __size_type __n = __str.max_size();
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
typename __istream_type::sentry __cerb(__in, true);
if (__cerb)
{
try
{
+ // Avoid reallocation for common case.
__str.erase();
! _CharT __buf[128];
! __size_type __len = 0;
! const __int_type __idelim = _Traits::to_int_type(__delim);
const __int_type __eof = _Traits::eof();
! __streambuf_type* __sb = __in.rdbuf();
! __int_type __c = __sb->sgetc();
! while (__extracted < __n
! && !_Traits::eq_int_type(__c, __eof)
! && !_Traits::eq_int_type(__c, __idelim))
{
! if (__len == sizeof(__buf) / sizeof(_CharT))
! {
! __str.append(__buf, sizeof(__buf) / sizeof(_CharT));
! __len = 0;
! }
! __buf[__len++] = _Traits::to_char_type(__c);
++__extracted;
! __c = __sb->snextc();
}
+ __str.append(__buf, __len);
+
if (_Traits::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
+ else if (_Traits::eq_int_type(__c, __idelim))
+ {
+ ++__extracted;
+ __sb->sbumpc();
+ }
+ else
+ __err |= ios_base::failbit;
}
catch(...)
{
*************** namespace std
*** 1110,1116 ****
__in._M_setstate(ios_base::badbit);
}
}
! if ((!__extracted && !__testdelim) || __extracted == __n)
__err |= ios_base::failbit;
if (__err)
__in.setstate(__err);
--- 1150,1156 ----
__in._M_setstate(ios_base::badbit);
}
}
! if (!__extracted)
__err |= ios_base::failbit;
if (__err)
__in.setstate(__err);
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/locale_classes.h gcc-3.4.1/libstdc++-v3/include/bits/locale_classes.h
*** gcc-3.4.0/libstdc++-v3/include/bits/locale_classes.h 2004-03-18 17:36:50.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/locale_classes.h 2004-05-24 20:49:49.000000000 +0000
*************** namespace std
*** 416,422 ****
facet(const facet&); // Not defined.
! void
operator=(const facet&); // Not defined.
};
--- 416,422 ----
facet(const facet&); // Not defined.
! facet&
operator=(const facet&); // Not defined.
};
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/locale_facets.h gcc-3.4.1/libstdc++-v3/include/bits/locale_facets.h
*** gcc-3.4.0/libstdc++-v3/include/bits/locale_facets.h 2004-03-24 21:11:32.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/locale_facets.h 2004-05-24 20:49:49.000000000 +0000
*************** namespace std
*** 1161,1168 ****
_M_widen_ok = 1;
// Set _M_widen_ok to 2 if memcpy can't be used.
! for (size_t __i = 0; __i < sizeof(_M_widen); ++__i)
! if (__tmp[__i] != _M_widen[__i])
{
_M_widen_ok = 2;
break;
--- 1161,1168 ----
_M_widen_ok = 1;
// Set _M_widen_ok to 2 if memcpy can't be used.
! for (size_t __j = 0; __j < sizeof(_M_widen); ++__j)
! if (__tmp[__j] != _M_widen[__j])
{
_M_widen_ok = 2;
break;
*************** namespace std
*** 1182,1192 ****
// Check if any default values were created. Do this by
// renarrowing with a different default value and comparing.
bool __consecutive = true;
! for (size_t __i = 0; __i < sizeof(_M_narrow); ++__i)
! if (!_M_narrow[__i])
{
char __c;
! do_narrow(__tmp + __i, __tmp + __i + 1, 1, &__c);
if (__c == 1)
{
__consecutive = false;
--- 1182,1192 ----
// Check if any default values were created. Do this by
// renarrowing with a different default value and comparing.
bool __consecutive = true;
! for (size_t __j = 0; __j < sizeof(_M_narrow); ++__j)
! if (!_M_narrow[__j])
{
char __c;
! do_narrow(__tmp + __j, __tmp + __j + 1, 1, &__c);
if (__c == 1)
{
__consecutive = false;
*************** namespace std
*** 1624,1629 ****
--- 1624,1636 ----
void
_M_cache(const locale& __loc);
+
+ private:
+ __numpunct_cache&
+ operator=(const __numpunct_cache&);
+
+ explicit
+ __numpunct_cache(const __numpunct_cache&);
};
template
*************** namespace std
*** 2487,2494 ****
*/
explicit
collate(size_t __refs = 0)
! : facet(__refs)
! { _M_c_locale_collate = _S_get_c_locale(); }
/**
* @brief Internal constructor. Not for general use.
--- 2494,2501 ----
*/
explicit
collate(size_t __refs = 0)
! : facet(__refs), _M_c_locale_collate(_S_get_c_locale())
! { }
/**
* @brief Internal constructor. Not for general use.
*************** namespace std
*** 2501,2508 ****
*/
explicit
collate(__c_locale __cloc, size_t __refs = 0)
! : facet(__refs)
! { _M_c_locale_collate = _S_clone_c_locale(__cloc); }
/**
* @brief Compare two strings.
--- 2508,2515 ----
*/
explicit
collate(__c_locale __cloc, size_t __refs = 0)
! : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc))
! { }
/**
* @brief Compare two strings.
*************** namespace std
*** 2757,2762 ****
--- 2764,2776 ----
void
_M_cache(const locale& __loc);
+
+ private:
+ __timepunct_cache&
+ operator=(const __timepunct_cache&);
+
+ explicit
+ __timepunct_cache(const __timepunct_cache&);
};
template
*************** namespace std
*** 3493,3498 ****
--- 3507,3519 ----
void
_M_cache(const locale& __loc);
+
+ private:
+ __moneypunct_cache&
+ operator=(const __moneypunct_cache&);
+
+ explicit
+ __moneypunct_cache(const __moneypunct_cache&);
};
template
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/locale_facets.tcc gcc-3.4.1/libstdc++-v3/include/bits/locale_facets.tcc
*** gcc-3.4.0/libstdc++-v3/include/bits/locale_facets.tcc 2004-03-24 21:11:33.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/locale_facets.tcc 2004-06-17 10:39:32.000000000 +0000
*************** namespace std
*** 497,503 ****
// At this point, base is determined. If not hex, only allow
// base digits as valid input.
! const size_t __len = __base == 16 ? __num_base::_S_iend - __num_base::_S_izero : __base;
// Extract.
string __found_grouping;
--- 497,505 ----
// At this point, base is determined. If not hex, only allow
// base digits as valid input.
! const size_t __len = __base == 16 ? (__num_base::_S_iend
! - __num_base::_S_izero)
! : __base;
// Extract.
string __found_grouping;
*************** namespace std
*** 826,832 ****
inline int
__int_to_char(_CharT* __bufend, unsigned long __v, const _CharT* __lit,
ios_base::fmtflags __flags)
! { return __int_to_char(__bufend, __v, __lit, __flags, false); }
#ifdef _GLIBCXX_USE_LONG_LONG
template
--- 828,838 ----
inline int
__int_to_char(_CharT* __bufend, unsigned long __v, const _CharT* __lit,
ios_base::fmtflags __flags)
! {
! // About showpos, see Table 60 and C99 7.19.6.1, p6 (+).
! return __int_to_char(__bufend, __v, __lit,
! __flags & ~ios_base::showpos, false);
! }
#ifdef _GLIBCXX_USE_LONG_LONG
template
*************** namespace std
*** 848,854 ****
inline int
__int_to_char(_CharT* __bufend, unsigned long long __v,
const _CharT* __lit, ios_base::fmtflags __flags)
! { return __int_to_char(__bufend, __v, __lit, __flags, false); }
#endif
template
--- 854,861 ----
inline int
__int_to_char(_CharT* __bufend, unsigned long long __v,
const _CharT* __lit, ios_base::fmtflags __flags)
! { return __int_to_char(__bufend, __v, __lit,
! __flags & ~ios_base::showpos, false); }
#endif
template
*************** namespace std
*** 1043,1071 ****
const locale& __loc = __io._M_getloc();
const __cache_type* __lc = __uc(__loc);
- // Note: digits10 is rounded down: add 1 to ensure the maximum
- // available precision. Then, in general, one more 1 needs to
- // be added since, when the %{g,G} conversion specifiers are
- // chosen inside _S_format_float, the precision field is "the
- // maximum number of significant digits", *not* the "number of
- // digits to appear after the decimal point", as happens for
- // %{e,E,f,F} (C99, 7.19.6.1,4).
- const int __max_digits = numeric_limits<_ValueT>::digits10 + 2;
-
// Use default precision if out of range.
streamsize __prec = __io.precision();
! if (__prec > static_cast(__max_digits))
! __prec = static_cast(__max_digits);
! else if (__prec < static_cast(0))
__prec = static_cast(6);
// [22.2.2.2.2] Stage 1, numeric conversion to character.
int __len;
// Long enough for the max format spec.
char __fbuf[16];
#ifdef _GLIBCXX_USE_C99
! // First try a buffer perhaps big enough (for sure sufficient
// for non-ios_base::fixed outputs)
int __cs_size = __max_digits * 3;
char* __cs = static_cast(__builtin_alloca(__cs_size));
--- 1050,1069 ----
const locale& __loc = __io._M_getloc();
const __cache_type* __lc = __uc(__loc);
// Use default precision if out of range.
streamsize __prec = __io.precision();
! if (__prec < static_cast(0))
__prec = static_cast(6);
+ const int __max_digits = numeric_limits<_ValueT>::digits10;
+
// [22.2.2.2.2] Stage 1, numeric conversion to character.
int __len;
// Long enough for the max format spec.
char __fbuf[16];
#ifdef _GLIBCXX_USE_C99
! // First try a buffer perhaps big enough (most probably sufficient
// for non-ios_base::fixed outputs)
int __cs_size = __max_digits * 3;
char* __cs = static_cast(__builtin_alloca(__cs_size));
*************** namespace std
*** 1088,1100 ****
const int __max_exp = numeric_limits<_ValueT>::max_exponent10;
// The size of the output string is computed as follows.
! // ios_base::fixed outputs may need up to __max_exp+1 chars
! // for the integer part + up to __max_digits chars for the
! // fractional part + 3 chars for sign, decimal point, '\0'. On
! // the other hand, for non-fixed outputs __max_digits*3 chars
! // are largely sufficient.
! const int __cs_size = __fixed ? __max_exp + __max_digits + 4
! : __max_digits * 3;
char* __cs = static_cast(__builtin_alloca(__cs_size));
__num_base::_S_format_float(__io, __fbuf, __mod);
--- 1086,1098 ----
const int __max_exp = numeric_limits<_ValueT>::max_exponent10;
// The size of the output string is computed as follows.
! // ios_base::fixed outputs may need up to __max_exp + 1 chars
! // for the integer part + __prec chars for the fractional part
! // + 3 chars for sign, decimal point, '\0'. On the other hand,
! // for non-fixed outputs __max_digits * 2 + __prec chars are
! // largely sufficient.
! const int __cs_size = __fixed ? __max_exp + __prec + 4
! : __max_digits * 2 + __prec;
char* __cs = static_cast(__builtin_alloca(__cs_size));
__num_base::_S_format_float(__io, __fbuf, __mod);
*************** namespace std
*** 1998,2032 ****
while (__nmatches > 1)
{
// Find smallest matching string.
! size_t __minlen = 10;
! for (size_t __i2 = 0; __i2 < __nmatches; ++__i2)
__minlen = std::min(__minlen,
__traits_type::length(__names[__matches[__i2]]));
++__beg;
if (__pos < __minlen && __beg != __end)
! {
! ++__pos;
! for (size_t __i3 = 0; __i3 < __nmatches; ++__i3)
! {
! __name = __names[__matches[__i3]];
! if (__name[__pos] != *__beg)
! __matches[__i3] = __matches[--__nmatches];
! }
! }
else
break;
}
if (__nmatches == 1)
{
- // If there was only one match, the first compare is redundant.
- if (__pos == 0)
- {
- ++__pos;
- ++__beg;
- }
-
// Make sure found name is completely extracted.
__name = __names[__matches[0]];
const size_t __len = __traits_type::length(__name);
while (__pos < __len && __beg != __end && __name[__pos] == *__beg)
--- 1996,2025 ----
while (__nmatches > 1)
{
// Find smallest matching string.
! size_t __minlen = __traits_type::length(__names[__matches[0]]);
! for (size_t __i2 = 1; __i2 < __nmatches; ++__i2)
__minlen = std::min(__minlen,
__traits_type::length(__names[__matches[__i2]]));
+ ++__pos;
++__beg;
if (__pos < __minlen && __beg != __end)
! for (size_t __i3 = 0; __i3 < __nmatches;)
! {
! __name = __names[__matches[__i3]];
! if (__name[__pos] != *__beg)
! __matches[__i3] = __matches[--__nmatches];
! else
! ++__i3;
! }
else
break;
}
if (__nmatches == 1)
{
// Make sure found name is completely extracted.
+ ++__pos;
+ ++__beg;
__name = __names[__matches[0]];
const size_t __len = __traits_type::length(__name);
while (__pos < __len && __beg != __end && __name[__pos] == *__beg)
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/ostream.tcc gcc-3.4.1/libstdc++-v3/include/bits/ostream.tcc
*** gcc-3.4.0/libstdc++-v3/include/bits/ostream.tcc 2004-03-18 17:36:52.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/ostream.tcc 2004-05-25 22:13:24.000000000 +0000
***************
*** 1,6 ****
// ostream classes -*- C++ -*-
! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// ostream classes -*- C++ -*-
! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
*************** namespace std
*** 44,50 ****
template
basic_ostream<_CharT, _Traits>::sentry::
sentry(basic_ostream<_CharT, _Traits>& __os)
! : _M_os(__os)
{
// XXX MT
if (__os.tie() && __os.good())
--- 44,50 ----
template
basic_ostream<_CharT, _Traits>::sentry::
sentry(basic_ostream<_CharT, _Traits>& __os)
! : _M_ok(false), _M_os(__os)
{
// XXX MT
if (__os.tie() && __os.good())
*************** namespace std
*** 53,62 ****
if (__os.good())
_M_ok = true;
else
! {
! _M_ok = false;
! __os.setstate(ios_base::failbit);
! }
}
template
--- 53,59 ----
if (__os.good())
_M_ok = true;
else
! __os.setstate(ios_base::failbit);
}
template
*************** namespace std
*** 129,140 ****
try
{
bool __b = false;
! char_type __c = this->fill();
! ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
const __num_put_type& __np = __check_facet(this->_M_num_put);
if ((__fmt & ios_base::oct) || (__fmt & ios_base::hex))
{
! unsigned long __l = static_cast(__n);
__b = __np.put(*this, *this, __c, __l).failed();
}
else
--- 126,138 ----
try
{
bool __b = false;
! const char_type __c = this->fill();
! const ios_base::fmtflags __fmt = (this->flags()
! & ios_base::basefield);
const __num_put_type& __np = __check_facet(this->_M_num_put);
if ((__fmt & ios_base::oct) || (__fmt & ios_base::hex))
{
! const unsigned long __l = static_cast(__n);
__b = __np.put(*this, *this, __c, __l).failed();
}
else
*************** namespace std
*** 186,198 ****
try
{
bool __b = false;
! char_type __c = this->fill();
! ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
const __num_put_type& __np = __check_facet(this->_M_num_put);
if ((__fmt & ios_base::oct) || (__fmt & ios_base::hex))
{
! unsigned long long __l;
! __l = static_cast(__n);
__b = __np.put(*this, *this, __c, __l).failed();
}
else
--- 184,197 ----
try
{
bool __b = false;
! const char_type __c = this->fill();
! const ios_base::fmtflags __fmt = (this->flags()
! & ios_base::basefield);
const __num_put_type& __np = __check_facet(this->_M_num_put);
if ((__fmt & ios_base::oct) || (__fmt & ios_base::hex))
{
! const unsigned long long __l = (static_cast<
! unsigned long long>(__n));
__b = __np.put(*this, *this, __c, __l).failed();
}
else
*************** namespace std
*** 342,348 ****
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
try
{
! int_type __put = this->rdbuf()->sputc(__c);
if (traits_type::eq_int_type(__put, traits_type::eof()))
__err |= ios_base::badbit;
}
--- 341,347 ----
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
try
{
! const int_type __put = this->rdbuf()->sputc(__c);
if (traits_type::eq_int_type(__put, traits_type::eof()))
__err |= ios_base::badbit;
}
*************** namespace std
*** 426,432 ****
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 136. seekp, seekg setting wrong streams?
! pos_type __p = this->rdbuf()->pubseekpos(__pos, ios_base::out);
// 129. Need error indication from seekp() and seekg()
if (__p == pos_type(off_type(-1)))
--- 425,432 ----
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 136. seekp, seekg setting wrong streams?
! const pos_type __p = this->rdbuf()->pubseekpos(__pos,
! ios_base::out);
// 129. Need error indication from seekp() and seekg()
if (__p == pos_type(off_type(-1)))
*************** namespace std
*** 452,459 ****
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 136. seekp, seekg setting wrong streams?
! pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
! ios_base::out);
// 129. Need error indication from seekp() and seekg()
if (__p == pos_type(off_type(-1)))
--- 452,459 ----
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 136. seekp, seekg setting wrong streams?
! const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
! ios_base::out);
// 129. Need error indication from seekp() and seekg()
if (__p == pos_type(off_type(-1)))
*************** namespace std
*** 542,549 ****
streamsize __len = static_cast(_Traits::length(__s));
if (__w > __len)
{
! _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
! * __w));
__pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs,
__s, __w, __len, false);
__s = __cs;
--- 542,550 ----
streamsize __len = static_cast(_Traits::length(__s));
if (__w > __len)
{
! _CharT* __cs = (static_cast<
! _CharT*>(__builtin_alloca(sizeof(_CharT)
! * __w)));
__pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs,
__s, __w, __len, false);
__s = __cs;
*************** namespace std
*** 585,592 ****
streamsize __len = static_cast(__clen);
if (__w > __len)
{
! _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
! * __w));
__pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs,
__ws, __w, __len, false);
__str = __cs;
--- 586,594 ----
streamsize __len = static_cast(__clen);
if (__w > __len)
{
! _CharT* __cs = (static_cast<
! _CharT*>(__builtin_alloca(sizeof(_CharT)
! * __w)));
__pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs,
__ws, __w, __len, false);
__str = __cs;
*************** namespace std
*** 653,659 ****
// 25. String operator<< uses width() value wrong
if (__w > __len)
{
! _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w));
__pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, __s,
__w, __len, false);
__s = __cs;
--- 655,662 ----
// 25. String operator<< uses width() value wrong
if (__w > __len)
{
! _CharT* __cs = (static_cast<
! _CharT*>(__builtin_alloca(sizeof(_CharT) * __w)));
__pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, __s,
__w, __len, false);
__s = __cs;
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/stl_deque.h gcc-3.4.1/libstdc++-v3/include/bits/stl_deque.h
*** gcc-3.4.0/libstdc++-v3/include/bits/stl_deque.h 2004-04-16 19:08:34.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/stl_deque.h 2004-06-11 18:44:57.000000000 +0000
*************** namespace _GLIBCXX_STD
*** 591,604 ****
public:
typedef _Tp value_type;
! typedef value_type* pointer;
! typedef const value_type* const_pointer;
typedef typename _Base::iterator iterator;
typedef typename _Base::const_iterator const_iterator;
typedef std::reverse_iterator const_reverse_iterator;
typedef std::reverse_iterator reverse_iterator;
- typedef value_type& reference;
- typedef const value_type& const_reference;
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef typename _Base::allocator_type allocator_type;
--- 591,604 ----
public:
typedef _Tp value_type;
! typedef typename _Alloc::pointer pointer;
! typedef typename _Alloc::const_pointer const_pointer;
! typedef typename _Alloc::reference reference;
! typedef typename _Alloc::const_reference const_reference;
typedef typename _Base::iterator iterator;
typedef typename _Base::const_iterator const_iterator;
typedef std::reverse_iterator const_reverse_iterator;
typedef std::reverse_iterator reverse_iterator;
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef typename _Base::allocator_type allocator_type;
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/stl_list.h gcc-3.4.1/libstdc++-v3/include/bits/stl_list.h
*** gcc-3.4.0/libstdc++-v3/include/bits/stl_list.h 2004-04-16 19:08:34.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/stl_list.h 2004-06-11 18:44:58.000000000 +0000
*************** namespace _GLIBCXX_STD
*** 392,409 ****
typedef _List_base<_Tp, _Alloc> _Base;
public:
! typedef _Tp value_type;
! typedef value_type* pointer;
! typedef const value_type* const_pointer;
! typedef _List_iterator<_Tp> iterator;
! typedef _List_const_iterator<_Tp> const_iterator;
! typedef std::reverse_iterator const_reverse_iterator;
! typedef std::reverse_iterator reverse_iterator;
! typedef value_type& reference;
! typedef const value_type& const_reference;
! typedef size_t size_type;
! typedef ptrdiff_t difference_type;
! typedef typename _Base::allocator_type allocator_type;
protected:
// Note that pointers-to-_Node's can be ctor-converted to
--- 392,409 ----
typedef _List_base<_Tp, _Alloc> _Base;
public:
! typedef _Tp value_type;
! typedef typename _Alloc::pointer pointer;
! typedef typename _Alloc::const_pointer const_pointer;
! typedef typename _Alloc::reference reference;
! typedef typename _Alloc::const_reference const_reference;
! typedef _List_iterator<_Tp> iterator;
! typedef _List_const_iterator<_Tp> const_iterator;
! typedef std::reverse_iterator const_reverse_iterator;
! typedef std::reverse_iterator reverse_iterator;
! typedef size_t size_type;
! typedef ptrdiff_t difference_type;
! typedef typename _Base::allocator_type allocator_type;
protected:
// Note that pointers-to-_Node's can be ctor-converted to
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/stl_map.h gcc-3.4.1/libstdc++-v3/include/bits/stl_map.h
*** gcc-3.4.0/libstdc++-v3/include/bits/stl_map.h 2004-04-16 19:08:34.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/stl_map.h 2004-06-11 18:44:58.000000000 +0000
*************** namespace _GLIBCXX_STD
*** 126,142 ****
public:
// many of these are specified differently in ISO, but the following are
// "functionally equivalent"
! typedef typename _Rep_type::allocator_type allocator_type;
! typedef typename _Rep_type::reference reference;
! typedef typename _Rep_type::const_reference const_reference;
! typedef typename _Rep_type::iterator iterator;
! typedef typename _Rep_type::const_iterator const_iterator;
! typedef typename _Rep_type::size_type size_type;
! typedef typename _Rep_type::difference_type difference_type;
! typedef typename _Rep_type::pointer pointer;
! typedef typename _Rep_type::const_pointer const_pointer;
! typedef typename _Rep_type::reverse_iterator reverse_iterator;
! typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
// [23.3.1.1] construct/copy/destroy
// (get_allocator() is normally listed in this section, but seems to have
--- 126,142 ----
public:
// many of these are specified differently in ISO, but the following are
// "functionally equivalent"
! typedef typename _Alloc::pointer pointer;
! typedef typename _Alloc::const_pointer const_pointer;
! typedef typename _Alloc::reference reference;
! typedef typename _Alloc::const_reference const_reference;
! typedef typename _Rep_type::allocator_type allocator_type;
! typedef typename _Rep_type::iterator iterator;
! typedef typename _Rep_type::const_iterator const_iterator;
! typedef typename _Rep_type::size_type size_type;
! typedef typename _Rep_type::difference_type difference_type;
! typedef typename _Rep_type::reverse_iterator reverse_iterator;
! typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
// [23.3.1.1] construct/copy/destroy
// (get_allocator() is normally listed in this section, but seems to have
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/stl_multimap.h gcc-3.4.1/libstdc++-v3/include/bits/stl_multimap.h
*** gcc-3.4.0/libstdc++-v3/include/bits/stl_multimap.h 2004-04-16 19:08:34.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/stl_multimap.h 2004-06-11 18:44:58.000000000 +0000
*************** namespace _GLIBCXX_STD
*** 142,160 ****
public:
// many of these are specified differently in ISO, but the following are
// "functionally equivalent"
typedef typename _Rep_type::allocator_type allocator_type;
- typedef typename _Rep_type::reference reference;
- typedef typename _Rep_type::const_reference const_reference;
typedef typename _Rep_type::iterator iterator;
typedef typename _Rep_type::const_iterator const_iterator;
typedef typename _Rep_type::size_type size_type;
typedef typename _Rep_type::difference_type difference_type;
- typedef typename _Rep_type::pointer pointer;
- typedef typename _Rep_type::const_pointer const_pointer;
typedef typename _Rep_type::reverse_iterator reverse_iterator;
typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
-
// [23.3.2] construct/copy/destroy
// (get_allocator() is also listed in this section)
/**
--- 142,159 ----
public:
// many of these are specified differently in ISO, but the following are
// "functionally equivalent"
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
typedef typename _Rep_type::allocator_type allocator_type;
typedef typename _Rep_type::iterator iterator;
typedef typename _Rep_type::const_iterator const_iterator;
typedef typename _Rep_type::size_type size_type;
typedef typename _Rep_type::difference_type difference_type;
typedef typename _Rep_type::reverse_iterator reverse_iterator;
typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
// [23.3.2] construct/copy/destroy
// (get_allocator() is also listed in this section)
/**
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/stl_pair.h gcc-3.4.1/libstdc++-v3/include/bits/stl_pair.h
*** gcc-3.4.0/libstdc++-v3/include/bits/stl_pair.h 2004-03-18 17:37:00.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/stl_pair.h 2004-05-15 20:44:13.000000000 +0000
***************
*** 63,71 ****
namespace std
{
-
/// pair holds two objects of arbitrary type.
! template
struct pair
{
typedef _T1 first_type; ///< @c first_type is the first bound type
--- 63,70 ----
namespace std
{
/// pair holds two objects of arbitrary type.
! template
struct pair
{
typedef _T1 first_type; ///< @c first_type is the first bound type
*************** namespace std
*** 79,129 ****
/** The default constructor creates @c first and @c second using their
* respective default constructors. */
pair()
! : first(), second() {}
/** Two objects may be passed to a @c pair constructor to be copied. */
pair(const _T1& __a, const _T2& __b)
! : first(__a), second(__b) {}
/** There is also a templated copy ctor for the @c pair class itself. */
! template
pair(const pair<_U1, _U2>& __p)
! : first(__p.first), second(__p.second) {}
};
/// Two pairs of the same type are equal iff their members are equal.
! template
inline bool
operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __x.first == __y.first && __x.second == __y.second; }
///
! template
inline bool
operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __x.first < __y.first
|| (!(__y.first < __x.first) && __x.second < __y.second); }
/// Uses @c operator== to find the result.
! template
inline bool
operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__x == __y); }
/// Uses @c operator< to find the result.
! template
inline bool
operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __y < __x; }
/// Uses @c operator< to find the result.
! template
inline bool
operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__y < __x); }
/// Uses @c operator< to find the result.
! template
inline bool
operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__x < __y); }
--- 78,128 ----
/** The default constructor creates @c first and @c second using their
* respective default constructors. */
pair()
! : first(), second() { }
/** Two objects may be passed to a @c pair constructor to be copied. */
pair(const _T1& __a, const _T2& __b)
! : first(__a), second(__b) { }
/** There is also a templated copy ctor for the @c pair class itself. */
! template
pair(const pair<_U1, _U2>& __p)
! : first(__p.first), second(__p.second) { }
};
/// Two pairs of the same type are equal iff their members are equal.
! template
inline bool
operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __x.first == __y.first && __x.second == __y.second; }
///
! template
inline bool
operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __x.first < __y.first
|| (!(__y.first < __x.first) && __x.second < __y.second); }
/// Uses @c operator== to find the result.
! template
inline bool
operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__x == __y); }
/// Uses @c operator< to find the result.
! template
inline bool
operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __y < __x; }
/// Uses @c operator< to find the result.
! template
inline bool
operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__y < __x); }
/// Uses @c operator< to find the result.
! template
inline bool
operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__x < __y); }
*************** namespace std
*** 138,155 ****
* but LWG issue #181 says they should be passed by const value. We follow
* the LWG by default.
*/
- template
-
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 181. make_pair() unintended behavior
! inline pair<_T1, _T2>
! make_pair(_T1 __x, _T2 __y)
! { return pair<_T1, _T2>(__x, __y); }
!
} // namespace std
#endif /* _PAIR_H */
-
- // Local Variables:
- // mode:C++
- // End:
--- 137,147 ----
* but LWG issue #181 says they should be passed by const value. We follow
* the LWG by default.
*/
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 181. make_pair() unintended behavior
! template
! inline pair<_T1, _T2>
! make_pair(_T1 __x, _T2 __y) { return pair<_T1, _T2>(__x, __y); }
} // namespace std
#endif /* _PAIR_H */
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/stl_threads.h gcc-3.4.1/libstdc++-v3/include/bits/stl_threads.h
*** gcc-3.4.0/libstdc++-v3/include/bits/stl_threads.h 2004-03-18 17:37:01.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/stl_threads.h 2004-05-13 15:25:54.000000000 +0000
***************
*** 1,6 ****
// Threading support -*- C++ -*-
! // Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
--- 1,6 ----
// Threading support -*- C++ -*-
! // Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
***************
*** 54,60 ****
// layer.
#include "bits/gthr.h"
! namespace __gnu_cxx
{
#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION)
extern __gthread_mutex_t _GLIBCXX_mutex;
--- 54,60 ----
// layer.
#include "bits/gthr.h"
! namespace __gnu_internal
{
#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION)
extern __gthread_mutex_t _GLIBCXX_mutex;
*************** namespace __gnu_cxx
*** 63,69 ****
--- 63,72 ----
extern void _GLIBCXX_mutex_init(void);
extern void _GLIBCXX_mutex_address_init(void);
#endif
+ } // namespace __gnu_internal
+ namespace __gnu_cxx
+ {
// Locking class. Note that this class *does not have a
// constructor*. It must be initialized either statically, with
// __STL_MUTEX_INITIALIZER, or dynamically, by explicitly calling
*************** namespace __gnu_cxx
*** 92,115 ****
// There should be no code in this path given the usage rules above.
#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
if (_M_init_flag) return;
! if (__gthread_once(&__gnu_cxx::_GLIBCXX_once,
! __gnu_cxx::_GLIBCXX_mutex_init) != 0
&& __gthread_active_p())
abort ();
! __gthread_mutex_lock(&__gnu_cxx::_GLIBCXX_mutex);
if (!_M_init_flag)
{
// Even though we have a global lock, we use __gthread_once to be
// absolutely certain the _M_lock mutex is only initialized once on
// multiprocessor systems.
! __gnu_cxx::_GLIBCXX_mutex_address = &_M_lock;
if (__gthread_once(&_M_once,
! __gnu_cxx::_GLIBCXX_mutex_address_init) != 0
&& __gthread_active_p())
abort();
_M_init_flag = 1;
}
! __gthread_mutex_unlock(&__gnu_cxx::_GLIBCXX_mutex);
#endif
}
--- 95,118 ----
// There should be no code in this path given the usage rules above.
#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
if (_M_init_flag) return;
! if (__gthread_once(&__gnu_internal::_GLIBCXX_once,
! __gnu_internal::_GLIBCXX_mutex_init) != 0
&& __gthread_active_p())
abort ();
! __gthread_mutex_lock(&__gnu_internal::_GLIBCXX_mutex);
if (!_M_init_flag)
{
// Even though we have a global lock, we use __gthread_once to be
// absolutely certain the _M_lock mutex is only initialized once on
// multiprocessor systems.
! __gnu_internal::_GLIBCXX_mutex_address = &_M_lock;
if (__gthread_once(&_M_once,
! __gnu_internal::_GLIBCXX_mutex_address_init) != 0
&& __gthread_active_p())
abort();
_M_init_flag = 1;
}
! __gthread_mutex_unlock(&__gnu_internal::_GLIBCXX_mutex);
#endif
}
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/stl_vector.h gcc-3.4.1/libstdc++-v3/include/bits/stl_vector.h
*** gcc-3.4.0/libstdc++-v3/include/bits/stl_vector.h 2004-04-16 19:08:34.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/bits/stl_vector.h 2004-06-11 18:44:58.000000000 +0000
*************** namespace _GLIBCXX_STD
*** 147,165 ****
typedef vector<_Tp, _Alloc> vector_type;
public:
! typedef _Tp value_type;
! typedef value_type* pointer;
! typedef const value_type* const_pointer;
typedef __gnu_cxx::__normal_iterator iterator;
typedef __gnu_cxx::__normal_iterator
const_iterator;
! typedef std::reverse_iterator const_reverse_iterator;
! typedef std::reverse_iterator reverse_iterator;
! typedef value_type& reference;
! typedef const value_type& const_reference;
! typedef size_t size_type;
! typedef ptrdiff_t difference_type;
! typedef typename _Base::allocator_type allocator_type;
protected:
/** @if maint
--- 147,165 ----
typedef vector<_Tp, _Alloc> vector_type;
public:
! typedef _Tp value_type;
! typedef typename _Alloc::pointer pointer;
! typedef typename _Alloc::const_pointer const_pointer;
! typedef typename _Alloc::reference reference;
! typedef typename _Alloc::const_reference const_reference;
typedef __gnu_cxx::__normal_iterator iterator;
typedef __gnu_cxx::__normal_iterator
const_iterator;
! typedef std::reverse_iterator const_reverse_iterator;
! typedef std::reverse_iterator reverse_iterator;
! typedef size_t size_type;
! typedef ptrdiff_t difference_type;
! typedef typename _Base::allocator_type allocator_type;
protected:
/** @if maint
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/debug/formatter.h gcc-3.4.1/libstdc++-v3/include/debug/formatter.h
*** gcc-3.4.0/libstdc++-v3/include/debug/formatter.h 2004-04-16 19:08:34.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/debug/formatter.h 2004-06-25 07:08:15.000000000 +0000
*************** namespace __gnu_debug
*** 189,203 ****
} _M_string;
} _M_variant;
! _Parameter() : _M_kind(__unused_param) { }
! _Parameter(long __value, const char* __name) : _M_kind(__integer)
{
_M_variant._M_integer._M_name = __name;
_M_variant._M_integer._M_value = __value;
}
! _Parameter(const char* __value, const char* __name) : _M_kind(__string)
{
_M_variant._M_string._M_name = __name;
_M_variant._M_string._M_value = __value;
--- 189,205 ----
} _M_string;
} _M_variant;
! _Parameter() : _M_kind(__unused_param), _M_variant() { }
! _Parameter(long __value, const char* __name)
! : _M_kind(__integer), _M_variant()
{
_M_variant._M_integer._M_name = __name;
_M_variant._M_integer._M_value = __value;
}
! _Parameter(const char* __value, const char* __name)
! : _M_kind(__string), _M_variant()
{
_M_variant._M_string._M_name = __name;
_M_variant._M_string._M_value = __value;
*************** namespace __gnu_debug
*** 206,212 ****
template
_Parameter(const _Safe_iterator<_Iterator, _Sequence>& __it,
const char* __name, _Is_iterator)
! : _M_kind(__iterator)
{
_M_variant._M_iterator._M_name = __name;
_M_variant._M_iterator._M_address = &__it;
--- 208,214 ----
template
_Parameter(const _Safe_iterator<_Iterator, _Sequence>& __it,
const char* __name, _Is_iterator)
! : _M_kind(__iterator), _M_variant()
{
_M_variant._M_iterator._M_name = __name;
_M_variant._M_iterator._M_address = &__it;
*************** namespace __gnu_debug
*** 235,241 ****
template
_Parameter(const _Type*& __it, const char* __name, _Is_iterator)
! : _M_kind(__iterator)
{
_M_variant._M_iterator._M_name = __name;
_M_variant._M_iterator._M_address = &__it;
--- 237,243 ----
template
_Parameter(const _Type*& __it, const char* __name, _Is_iterator)
! : _M_kind(__iterator), _M_variant()
{
_M_variant._M_iterator._M_name = __name;
_M_variant._M_iterator._M_address = &__it;
*************** namespace __gnu_debug
*** 248,254 ****
template
_Parameter(_Type*& __it, const char* __name, _Is_iterator)
! : _M_kind(__iterator)
{
_M_variant._M_iterator._M_name = __name;
_M_variant._M_iterator._M_address = &__it;
--- 250,256 ----
template
_Parameter(_Type*& __it, const char* __name, _Is_iterator)
! : _M_kind(__iterator), _M_variant()
{
_M_variant._M_iterator._M_name = __name;
_M_variant._M_iterator._M_address = &__it;
*************** namespace __gnu_debug
*** 261,267 ****
template
_Parameter(const _Iterator& __it, const char* __name, _Is_iterator)
! : _M_kind(__iterator)
{
_M_variant._M_iterator._M_name = __name;
_M_variant._M_iterator._M_address = &__it;
--- 263,269 ----
template
_Parameter(const _Iterator& __it, const char* __name, _Is_iterator)
! : _M_kind(__iterator), _M_variant()
{
_M_variant._M_iterator._M_name = __name;
_M_variant._M_iterator._M_address = &__it;
*************** namespace __gnu_debug
*** 276,282 ****
template
_Parameter(const _Safe_sequence<_Sequence>& __seq,
const char* __name, _Is_sequence)
! : _M_kind(__sequence)
{
_M_variant._M_sequence._M_name = __name;
_M_variant._M_sequence._M_address =
--- 278,284 ----
template
_Parameter(const _Safe_sequence<_Sequence>& __seq,
const char* __name, _Is_sequence)
! : _M_kind(__sequence), _M_variant()
{
_M_variant._M_sequence._M_name = __name;
_M_variant._M_sequence._M_address =
*************** namespace __gnu_debug
*** 286,292 ****
template
_Parameter(const _Sequence& __seq, const char* __name, _Is_sequence)
! : _M_kind(__sequence)
{
_M_variant._M_sequence._M_name = __name;
_M_variant._M_sequence._M_address = &__seq;
--- 288,294 ----
template
_Parameter(const _Sequence& __seq, const char* __name, _Is_sequence)
! : _M_kind(__sequence), _M_variant()
{
_M_variant._M_sequence._M_name = __name;
_M_variant._M_sequence._M_address = &__seq;
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/debug/safe_base.h gcc-3.4.1/libstdc++-v3/include/debug/safe_base.h
*** gcc-3.4.0/libstdc++-v3/include/debug/safe_base.h 2003-12-09 04:26:28.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/debug/safe_base.h 2004-06-28 19:00:23.000000000 +0000
***************
*** 1,6 ****
// Safe sequence/iterator base implementation -*- C++ -*-
! // Copyright (C) 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// Safe sequence/iterator base implementation -*- C++ -*-
! // Copyright (C) 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
*************** namespace __gnu_debug
*** 95,100 ****
--- 95,106 ----
: _M_sequence(0), _M_version(0), _M_prior(0), _M_next(0)
{ this->_M_attach(__x._M_sequence, __constant); }
+ _Safe_iterator_base&
+ operator=(const _Safe_iterator_base&);
+
+ explicit
+ _Safe_iterator_base(const _Safe_iterator_base&);
+
~_Safe_iterator_base() { this->_M_detach(); }
public:
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/debug/safe_iterator.h gcc-3.4.1/libstdc++-v3/include/debug/safe_iterator.h
*** gcc-3.4.0/libstdc++-v3/include/debug/safe_iterator.h 2004-04-16 19:08:34.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/debug/safe_iterator.h 2004-05-18 18:41:16.000000000 +0000
***************
*** 35,40 ****
--- 35,41 ----
#include
#include
#include
+ #include
namespace __gnu_debug
{
*************** namespace __gnu_debug
*** 88,93 ****
--- 89,95 ----
typedef iterator_traits<_Iterator> _Traits;
public:
+ typedef _Iterator _Base_iterator;
typedef typename _Traits::iterator_category iterator_category;
typedef typename _Traits::value_type value_type;
typedef typename _Traits::difference_type difference_type;
*************** namespace __gnu_debug
*** 132,138 ****
* @pre @p x is not singular
*/
template
! _Safe_iterator(const _Safe_iterator<_MutableIterator, _Sequence>& __x)
: _Safe_iterator_base(__x, _M_constant()), _M_current(__x.base())
{
_GLIBCXX_DEBUG_VERIFY(!__x._M_singular(),
--- 134,146 ----
* @pre @p x is not singular
*/
template
! _Safe_iterator(
! const _Safe_iterator<_MutableIterator,
! typename std::__enable_if<
! _Sequence,
! (std::__are_same<_MutableIterator,
! typename _Sequence::iterator::_Base_iterator>::_M_type)
! >::_M_type>& __x)
: _Safe_iterator_base(__x, _M_constant()), _M_current(__x.base())
{
_GLIBCXX_DEBUG_VERIFY(!__x._M_singular(),
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/debug/safe_iterator.tcc gcc-3.4.1/libstdc++-v3/include/debug/safe_iterator.tcc
*** gcc-3.4.0/libstdc++-v3/include/debug/safe_iterator.tcc 2003-12-09 04:26:28.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/debug/safe_iterator.tcc 2004-05-15 21:17:59.000000000 +0000
***************
*** 1,6 ****
// Debugging iterator implementation (out of line) -*- C++ -*-
! // Copyright (C) 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// Debugging iterator implementation (out of line) -*- C++ -*-
! // Copyright (C) 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
*************** namespace __gnu_debug
*** 123,133 ****
if (this->base() == __victim->base())
__victim->_M_version = 0;
}
! for (_Safe_iterator_base* iter = _M_sequence->_M_const_iterators;
! iter; /* increment in loop */)
{
! const_iterator* __victim = static_cast(iter);
! iter = iter->_M_next;
if (this->base() == __victim->base())
__victim->_M_version = 0;
}
--- 123,133 ----
if (this->base() == __victim->base())
__victim->_M_version = 0;
}
! for (_Safe_iterator_base* iter2 = _M_sequence->_M_const_iterators;
! iter2; /* increment in loop */)
{
! const_iterator* __victim = static_cast(iter2);
! iter2 = iter2->_M_next;
if (this->base() == __victim->base())
__victim->_M_version = 0;
}
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/debug/safe_sequence.h gcc-3.4.1/libstdc++-v3/include/debug/safe_sequence.h
*** gcc-3.4.0/libstdc++-v3/include/debug/safe_sequence.h 2003-12-09 04:26:28.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/debug/safe_sequence.h 2004-05-15 21:17:59.000000000 +0000
***************
*** 1,6 ****
// Safe sequence implementation -*- C++ -*-
! // Copyright (C) 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// Safe sequence implementation -*- C++ -*-
! // Copyright (C) 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
*************** namespace __gnu_debug
*** 133,142 ****
}
}
! for (_Safe_iterator_base* __iter = _M_const_iterators; __iter; )
{
! const_iterator* __victim = static_cast(__iter);
! __iter = __iter->_M_next;
if (!__victim->_M_singular())
{
if (__pred(__victim->base()))
--- 133,142 ----
}
}
! for (_Safe_iterator_base* __iter2 = _M_const_iterators; __iter2; )
{
! const_iterator* __victim = static_cast(__iter2);
! __iter2 = __iter2->_M_next;
if (!__victim->_M_singular())
{
if (__pred(__victim->base()))
*************** namespace __gnu_debug
*** 166,175 ****
__victim->_M_attach(static_cast<_Sequence*>(this));
}
! for (_Safe_iterator_base* __iter = __from->_M_const_iterators; __iter;)
{
! const_iterator* __victim = static_cast(__iter);
! __iter = __iter->_M_next;
if (!__victim->_M_singular() && __victim->base() == __x.base())
__victim->_M_attach(static_cast<_Sequence*>(this));
}
--- 166,176 ----
__victim->_M_attach(static_cast<_Sequence*>(this));
}
! for (_Safe_iterator_base* __iter2 = __from->_M_const_iterators;
! __iter2;)
{
! const_iterator* __victim = static_cast(__iter2);
! __iter2 = __iter2->_M_next;
if (!__victim->_M_singular() && __victim->base() == __x.base())
__victim->_M_attach(static_cast<_Sequence*>(this));
}
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/ext/bitmap_allocator.h gcc-3.4.1/libstdc++-v3/include/ext/bitmap_allocator.h
*** gcc-3.4.0/libstdc++-v3/include/ext/bitmap_allocator.h 2004-03-18 17:37:05.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/ext/bitmap_allocator.h 2004-04-30 03:22:04.000000000 +0000
***************
*** 37,43 ****
#include
//For std::pair.
#include
! //std::find_if.
#include
//For the free list of exponentially growing memory blocks. At max,
//size of the vector should be not more than the number of bits in an
--- 37,43 ----
#include
//For std::pair.
#include
! //std::find_if, and std::lower_bound.
#include
//For the free list of exponentially growing memory blocks. At max,
//size of the vector should be not more than the number of bits in an
***************
*** 55,64 ****
--- 55,72 ----
#define NDEBUG
//#define CHECK_FOR_ERRORS
+ //#define __CPU_HAS_BACKWARD_BRANCH_PREDICTION
namespace __gnu_cxx
{
+ namespace {
+ #if defined __GTHREADS
+ bool const __threads_enabled = __gthread_active_p();
+ #endif
+ }
+
+ #if defined __GTHREADS
class _Mutex {
__gthread_mutex_t _M_mut;
//Prevent Copying and assignment.
*************** namespace __gnu_cxx
*** 67,78 ****
public:
_Mutex ()
{
#if !defined __GTHREAD_MUTEX_INIT
! __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mut);
#else
! __gthread_mutex_t __mtemp = __GTHREAD_MUTEX_INIT;
! _M_mut = __mtemp;
#endif
}
~_Mutex ()
{
--- 75,89 ----
public:
_Mutex ()
{
+ if (__threads_enabled)
+ {
#if !defined __GTHREAD_MUTEX_INIT
! __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mut);
#else
! __gthread_mutex_t __mtemp = __GTHREAD_MUTEX_INIT;
! _M_mut = __mtemp;
#endif
+ }
}
~_Mutex ()
{
*************** namespace __gnu_cxx
*** 81,102 ****
__gthread_mutex_t *_M_get() { return &_M_mut; }
};
-
class _Lock {
! _Mutex& _M_mt;
//Prevent Copying and assignment.
_Lock (_Lock const&);
_Lock& operator= (_Lock const&);
public:
! _Lock (_Mutex& __mref) : _M_mt(__mref)
{
! __gthread_mutex_lock(_M_mt._M_get());
}
! ~_Lock () { __gthread_mutex_unlock(_M_mt._M_get()); }
};
- namespace __aux_balloc {
static const unsigned int _Bits_Per_Byte = 8;
static const unsigned int _Bits_Per_Block = sizeof(unsigned int) * _Bits_Per_Byte;
--- 92,133 ----
__gthread_mutex_t *_M_get() { return &_M_mut; }
};
class _Lock {
! _Mutex* _M_pmt;
! bool _M_locked;
//Prevent Copying and assignment.
_Lock (_Lock const&);
_Lock& operator= (_Lock const&);
public:
! _Lock(_Mutex* __mptr)
! : _M_pmt(__mptr), _M_locked(false)
! { this->_M_lock(); }
! void _M_lock()
{
! if (__threads_enabled)
! {
! _M_locked = true;
! __gthread_mutex_lock(_M_pmt->_M_get());
! }
}
! void _M_unlock()
! {
! if (__threads_enabled)
! {
! if (__builtin_expect(_M_locked, true))
! {
! __gthread_mutex_unlock(_M_pmt->_M_get());
! _M_locked = false;
! }
! }
! }
! ~_Lock() { this->_M_unlock(); }
};
+ #endif
+
+ namespace __aux_balloc {
static const unsigned int _Bits_Per_Byte = 8;
static const unsigned int _Bits_Per_Block = sizeof(unsigned int) * _Bits_Per_Byte;
*************** namespace __gnu_cxx
*** 148,154 ****
//T should be a pointer type, and A is the Allocator for the vector.
template
! class _Ffit_finder : public std::unary_function, bool> {
typedef typename std::vector, _Alloc> _BPVector;
typedef typename _BPVector::difference_type _Counter_type;
typedef typename std::pair<_Tp, _Tp> _Block_pair;
--- 179,186 ----
//T should be a pointer type, and A is the Allocator for the vector.
template
! class _Ffit_finder
! : public std::unary_function, bool> {
typedef typename std::vector, _Alloc> _BPVector;
typedef typename _BPVector::difference_type _Counter_type;
typedef typename std::pair<_Tp, _Tp> _Block_pair;
*************** namespace __gnu_cxx
*** 157,163 ****
unsigned int _M_data_offset;
public:
! _Ffit_finder () : _M_pbitmap (0), _M_data_offset (0) { }
bool operator() (_Block_pair __bp) throw()
{
--- 189,197 ----
unsigned int _M_data_offset;
public:
! _Ffit_finder ()
! : _M_pbitmap (0), _M_data_offset (0)
! { }
bool operator() (_Block_pair __bp) throw()
{
*************** namespace __gnu_cxx
*** 214,220 ****
//Use the 2nd parameter with care. Make sure that such an entry
//exists in the vector before passing that particular index to
//this ctor.
! _Bit_map_counter (_BPVector& Rvbp, int __index = -1) : _M_vbp(Rvbp)
{
this->_M_reset(__index);
}
--- 248,255 ----
//Use the 2nd parameter with care. Make sure that such an entry
//exists in the vector before passing that particular index to
//this ctor.
! _Bit_map_counter (_BPVector& Rvbp, int __index = -1)
! : _M_vbp(Rvbp)
{
this->_M_reset(__index);
}
*************** namespace __gnu_cxx
*** 238,244 ****
}
//Dangerous Function! Use with extreme care. Pass to this
! //functions ONLY those values that are known to be correct,
//otherwise this will mess up big time.
void _M_set_internal_bit_map (unsigned int *__new_internal_marker) throw()
{
--- 273,279 ----
}
//Dangerous Function! Use with extreme care. Pass to this
! //function ONLY those values that are known to be correct,
//otherwise this will mess up big time.
void _M_set_internal_bit_map (unsigned int *__new_internal_marker) throw()
{
*************** namespace __gnu_cxx
*** 275,302 ****
return _M_curr_bmap;
}
! pointer base () { return _M_vbp[_M_curr_index].first; }
unsigned int _M_offset ()
{
! return _Bits_Per_Block * ((reinterpret_cast(this->base()) - _M_curr_bmap) - 1);
}
unsigned int _M_where () { return _M_curr_index; }
};
}
! //Generic Version of the bsf instruction.
! typedef unsigned int _Bit_map_type;
! static inline unsigned int _Bit_scan_forward (_Bit_map_type __num)
! {
! unsigned int __ret_val = 0;
! while (__num % 2 == 0)
! {
! ++__ret_val;
! __num >>= 1;
! }
! return __ret_val;
! }
struct _OOM_handler {
static std::new_handler _S_old_handler;
--- 310,331 ----
return _M_curr_bmap;
}
! pointer _M_base () { return _M_vbp[_M_curr_index].first; }
unsigned int _M_offset ()
{
! return _Bits_Per_Block * ((reinterpret_cast(this->_M_base()) - _M_curr_bmap) - 1);
}
unsigned int _M_where () { return _M_curr_index; }
};
}
! //Generic Version of the bsf instruction.
! typedef unsigned int _Bit_map_type;
! static inline unsigned int _Bit_scan_forward (register _Bit_map_type __num)
! {
! return static_cast(__builtin_ctz(__num));
! }
struct _OOM_handler {
static std::new_handler _S_old_handler;
*************** namespace __gnu_cxx
*** 347,354 ****
static void _S_validate_free_list(unsigned int *__addr) throw()
{
! const unsigned int Max_Size = 64;
! if (_S_free_list.size() >= Max_Size)
{
//Ok, the threshold value has been reached.
//We determine which block to remove from the list of free
--- 376,383 ----
static void _S_validate_free_list(unsigned int *__addr) throw()
{
! const unsigned int __max_size = 64;
! if (_S_free_list.size() >= __max_size)
{
//Ok, the threshold value has been reached.
//We determine which block to remove from the list of free
*************** namespace __gnu_cxx
*** 380,389 ****
static bool _S_should_i_give(unsigned int __block_size, unsigned int __required_size) throw()
{
! const unsigned int Max_Wastage_Percentage = 36;
!
if (__block_size >= __required_size &&
! (((__block_size - __required_size) * 100 / __block_size) < Max_Wastage_Percentage))
return true;
else
return false;
--- 409,417 ----
static bool _S_should_i_give(unsigned int __block_size, unsigned int __required_size) throw()
{
! const unsigned int __max_wastage_percentage = 36;
if (__block_size >= __required_size &&
! (((__block_size - __required_size) * 100 / __block_size) < __max_wastage_percentage))
return true;
else
return false;
*************** namespace __gnu_cxx
*** 395,401 ****
static inline void _S_insert_free_list(unsigned int *__addr) throw()
{
#if defined __GTHREADS
! _Lock __bfl_lock(*&_S_bfl_mutex);
#endif
//Call _S_validate_free_list to decide what should be done with this
//particular free list.
--- 423,429 ----
static inline void _S_insert_free_list(unsigned int *__addr) throw()
{
#if defined __GTHREADS
! _Lock __bfl_lock(&_S_bfl_mutex);
#endif
//Call _S_validate_free_list to decide what should be done with this
//particular free list.
*************** namespace __gnu_cxx
*** 405,416 ****
static unsigned int *_S_get_free_list(unsigned int __sz) throw (std::bad_alloc)
{
#if defined __GTHREADS
! _Lock __bfl_lock(*&_S_bfl_mutex);
#endif
_FLIter __temp = std::lower_bound(_S_free_list.begin(), _S_free_list.end(),
__sz, _LT_pointer_compare());
if (__temp == _S_free_list.end() || !_S_should_i_give (**__temp, __sz))
{
_OOM_handler __set_handler(_BFL_type::_S_clear);
unsigned int *__ret_val = reinterpret_cast
(operator new (__sz + sizeof(unsigned int)));
--- 433,446 ----
static unsigned int *_S_get_free_list(unsigned int __sz) throw (std::bad_alloc)
{
#if defined __GTHREADS
! _Lock __bfl_lock(&_S_bfl_mutex);
#endif
_FLIter __temp = std::lower_bound(_S_free_list.begin(), _S_free_list.end(),
__sz, _LT_pointer_compare());
if (__temp == _S_free_list.end() || !_S_should_i_give (**__temp, __sz))
{
+ //We hold the lock because the OOM_Handler is a stateless
+ //entity.
_OOM_handler __set_handler(_BFL_type::_S_clear);
unsigned int *__ret_val = reinterpret_cast
(operator new (__sz + sizeof(unsigned int)));
*************** namespace __gnu_cxx
*** 430,436 ****
static void _S_clear()
{
#if defined __GTHREADS
! _Lock __bfl_lock(*&_S_bfl_mutex);
#endif
_FLIter __iter = _S_free_list.begin();
while (__iter != _S_free_list.end())
--- 460,466 ----
static void _S_clear()
{
#if defined __GTHREADS
! _Lock __bfl_lock(&_S_bfl_mutex);
#endif
_FLIter __iter = _S_free_list.begin();
while (__iter != _S_free_list.end())
*************** namespace __gnu_cxx
*** 448,454 ****
#endif
std::vector _BA_free_list_store::_S_free_list;
! template class bitmap_allocator;
// specialize for void:
template <> class bitmap_allocator {
public:
--- 478,484 ----
#endif
std::vector _BA_free_list_store::_S_free_list;
! template class bitmap_allocator;
// specialize for void:
template <> class bitmap_allocator {
public:
*************** namespace __gnu_cxx
*** 456,465 ****
typedef const void* const_pointer;
// reference-to-void members are impossible.
typedef void value_type;
! template struct rebind { typedef bitmap_allocator other; };
};
! template class bitmap_allocator : private _BA_free_list_store {
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
--- 486,495 ----
typedef const void* const_pointer;
// reference-to-void members are impossible.
typedef void value_type;
! template struct rebind { typedef bitmap_allocator<_Tp1> other; };
};
! template class bitmap_allocator : private _BA_free_list_store {
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
*************** namespace __gnu_cxx
*** 468,474 ****
typedef _Tp& reference;
typedef const _Tp& const_reference;
typedef _Tp value_type;
! template struct rebind { typedef bitmap_allocator other; };
private:
static const unsigned int _Bits_Per_Byte = 8;
--- 498,504 ----
typedef _Tp& reference;
typedef const _Tp& const_reference;
typedef _Tp value_type;
! template struct rebind { typedef bitmap_allocator<_Tp1> other; };
private:
static const unsigned int _Bits_Per_Byte = 8;
*************** namespace __gnu_cxx
*** 481,489 ****
*__pbmap &= __mask;
}
! static inline void _S_bit_free(unsigned int *__pbmap, unsigned int __Pos) throw()
{
! unsigned int __mask = 1 << __Pos;
*__pbmap |= __mask;
}
--- 511,519 ----
*__pbmap &= __mask;
}
! static inline void _S_bit_free(unsigned int *__pbmap, unsigned int __pos) throw()
{
! unsigned int __mask = 1 << __pos;
*__pbmap |= __mask;
}
*************** namespace __gnu_cxx
*** 565,582 ****
static _Mutex _S_mut;
#endif
- public:
- bitmap_allocator() throw()
- { }
-
- bitmap_allocator(const bitmap_allocator&) { }
-
- template bitmap_allocator(const bitmap_allocator<_Tp1>&) throw()
- { }
-
- ~bitmap_allocator() throw()
- { }
-
//Complexity: Worst case complexity is O(N), but that is hardly ever
//hit. if and when this particular case is encountered, the next few
//cases are guaranteed to have a worst case complexity of O(1)!
--- 595,600 ----
*************** namespace __gnu_cxx
*** 586,607 ****
static pointer _S_allocate_single_object()
{
#if defined __GTHREADS
! _Lock _bit_lock(*&_S_mut);
#endif
//The algorithm is something like this: The last_requst variable
//points to the last accessed Bit Map. When such a condition
//occurs, we try to find a free block in the current bitmap, or
//succeeding bitmaps until the last bitmap is reached. If no free
! //block turns up, we resort to First Fit method. But, again, the
! //First Fit is used only upto the point where we started the
! //previous linear search.
while (_S_last_request._M_finished() == false && (*(_S_last_request._M_get()) == 0))
{
_S_last_request.operator++();
}
! if (_S_last_request._M_finished())
{
//Fall Back to First Fit algorithm.
typedef typename __gnu_cxx::__aux_balloc::_Ffit_finder _FFF;
--- 604,630 ----
static pointer _S_allocate_single_object()
{
#if defined __GTHREADS
! _Lock __bit_lock(&_S_mut);
#endif
+
//The algorithm is something like this: The last_requst variable
//points to the last accessed Bit Map. When such a condition
//occurs, we try to find a free block in the current bitmap, or
//succeeding bitmaps until the last bitmap is reached. If no free
! //block turns up, we resort to First Fit method.
+ //WARNING: Do not re-order the condition in the while statement
+ //below, because it relies on C++'s short-circuit
+ //evaluation. The return from _S_last_request->_M_get() will NOT
+ //be dereferenceable if _S_last_request->_M_finished() returns
+ //true. This would inevitibly lead to a NULL pointer dereference
+ //if tinkered with.
while (_S_last_request._M_finished() == false && (*(_S_last_request._M_get()) == 0))
{
_S_last_request.operator++();
}
! if (__builtin_expect(_S_last_request._M_finished() == true, false))
{
//Fall Back to First Fit algorithm.
typedef typename __gnu_cxx::__aux_balloc::_Ffit_finder _FFF;
*************** namespace __gnu_cxx
*** 645,651 ****
unsigned int __nz_bit = _Bit_scan_forward(*_S_last_request._M_get());
_S_bit_allocate(_S_last_request._M_get(), __nz_bit);
! pointer __ret_val = _S_last_request.base() + _S_last_request._M_offset() + __nz_bit;
unsigned int *__puse_count = reinterpret_cast
(_S_mem_blocks[_S_last_request._M_where()].first) -
--- 668,674 ----
unsigned int __nz_bit = _Bit_scan_forward(*_S_last_request._M_get());
_S_bit_allocate(_S_last_request._M_get(), __nz_bit);
! pointer __ret_val = _S_last_request._M_base() + _S_last_request._M_offset() + __nz_bit;
unsigned int *__puse_count = reinterpret_cast
(_S_mem_blocks[_S_last_request._M_where()].first) -
*************** namespace __gnu_cxx
*** 654,702 ****
return __ret_val;
}
- //Complexity: O(1), but internally the complexity depends upon the
- //complexity of the function(s) _S_allocate_single_object and
- //_S_memory_get.
- pointer allocate(size_type __n)
- {
- if (__n == 1)
- return _S_allocate_single_object();
- else
- return reinterpret_cast(_S_memory_get(__n * sizeof(value_type)));
- }
-
- //Complexity: Worst case complexity is O(N) where N is the number of
- //blocks of size sizeof(value_type) within the free lists that the
- //allocator holds. However, this worst case is hit only when the
- //user supplies a bogus argument to hint. If the hint argument is
- //sensible, then the complexity drops to O(lg(N)), and in extreme
- //cases, even drops to as low as O(1). So, if the user supplied
- //argument is good, then this function performs very well.
- pointer allocate(size_type __n, typename bitmap_allocator::const_pointer)
- {
- return allocate(__n);
- }
-
- void deallocate(pointer __p, size_type __n) throw()
- {
- if (__n == 1)
- _S_deallocate_single_object(__p);
- else
- _S_memory_put(__p);
- }
-
//Complexity: O(lg(N)), but the worst case is hit quite often! I
//need to do something about this. I'll be able to work on it, only
//when I have some solid figures from a few real apps.
static void _S_deallocate_single_object(pointer __p) throw()
{
#if defined __GTHREADS
! _Lock _bit_lock(*&_S_mut);
#endif
- typedef typename _BPVector::iterator iterator;
- typedef typename _BPVector::difference_type diff_type;
! diff_type __diff;
int __displacement;
assert(_S_last_dealloc_index >= 0);
--- 677,695 ----
return __ret_val;
}
//Complexity: O(lg(N)), but the worst case is hit quite often! I
//need to do something about this. I'll be able to work on it, only
//when I have some solid figures from a few real apps.
static void _S_deallocate_single_object(pointer __p) throw()
{
#if defined __GTHREADS
! _Lock __bit_lock(&_S_mut);
#endif
! typedef typename _BPVector::iterator _Iterator;
! typedef typename _BPVector::difference_type _Difference_type;
!
! _Difference_type __diff;
int __displacement;
assert(_S_last_dealloc_index >= 0);
*************** namespace __gnu_cxx
*** 711,717 ****
}
else
{
! iterator _iter = (std::find_if(_S_mem_blocks.begin(), _S_mem_blocks.end(),
__gnu_cxx::__aux_balloc::_Inclusive_between(__p)));
assert(_iter != _S_mem_blocks.end());
--- 704,710 ----
}
else
{
! _Iterator _iter = (std::find_if(_S_mem_blocks.begin(), _S_mem_blocks.end(),
__gnu_cxx::__aux_balloc::_Inclusive_between(__p)));
assert(_iter != _S_mem_blocks.end());
*************** namespace __gnu_cxx
*** 734,740 ****
--(*__puse_count);
! if (!*__puse_count)
{
_S_block_size /= 2;
--- 727,733 ----
--(*__puse_count);
! if (__builtin_expect(*__puse_count == 0, false))
{
_S_block_size /= 2;
*************** namespace __gnu_cxx
*** 744,755 ****
_S_mem_blocks.erase(_S_mem_blocks.begin() + __diff);
//We reset the _S_last_request variable to reflect the erased
! //block. We do this to pretect future requests after the last
//block has been removed from a particular memory Chunk,
//which in turn has been returned to the free list, and
//hence had been erased from the vector, so the size of the
//vector gets reduced by 1.
! if ((diff_type)_S_last_request._M_where() >= __diff--)
{
_S_last_request._M_reset(__diff);
// assert(__diff >= 0);
--- 737,748 ----
_S_mem_blocks.erase(_S_mem_blocks.begin() + __diff);
//We reset the _S_last_request variable to reflect the erased
! //block. We do this to protect future requests after the last
//block has been removed from a particular memory Chunk,
//which in turn has been returned to the free list, and
//hence had been erased from the vector, so the size of the
//vector gets reduced by 1.
! if ((_Difference_type)_S_last_request._M_where() >= __diff--)
{
_S_last_request._M_reset(__diff);
// assert(__diff >= 0);
*************** namespace __gnu_cxx
*** 768,781 ****
}
}
pointer address(reference r) const { return &r; }
const_pointer address(const_reference r) const { return &r; }
size_type max_size(void) const throw() { return (size_type()-1)/sizeof(value_type); }
! void construct (pointer p, const_reference _data)
{
! new (p) value_type (_data);
}
void destroy (pointer p)
--- 761,817 ----
}
}
+ public:
+ bitmap_allocator() throw()
+ { }
+
+ bitmap_allocator(const bitmap_allocator&) { }
+
+ template bitmap_allocator(const bitmap_allocator<_Tp1>&) throw()
+ { }
+
+ ~bitmap_allocator() throw()
+ { }
+
+ //Complexity: O(1), but internally the complexity depends upon the
+ //complexity of the function(s) _S_allocate_single_object and
+ //_S_memory_get.
+ pointer allocate(size_type __n)
+ {
+ if (__builtin_expect(__n == 1, true))
+ return _S_allocate_single_object();
+ else
+ return reinterpret_cast(_S_memory_get(__n * sizeof(value_type)));
+ }
+
+ //Complexity: Worst case complexity is O(N) where N is the number of
+ //blocks of size sizeof(value_type) within the free lists that the
+ //allocator holds. However, this worst case is hit only when the
+ //user supplies a bogus argument to hint. If the hint argument is
+ //sensible, then the complexity drops to O(lg(N)), and in extreme
+ //cases, even drops to as low as O(1). So, if the user supplied
+ //argument is good, then this function performs very well.
+ pointer allocate(size_type __n, typename bitmap_allocator::const_pointer)
+ {
+ return allocate(__n);
+ }
+
+ void deallocate(pointer __p, size_type __n) throw()
+ {
+ if (__builtin_expect(__n == 1, true))
+ _S_deallocate_single_object(__p);
+ else
+ _S_memory_put(__p);
+ }
+
pointer address(reference r) const { return &r; }
const_pointer address(const_reference r) const { return &r; }
size_type max_size(void) const throw() { return (size_type()-1)/sizeof(value_type); }
! void construct (pointer p, const_reference __data)
{
! ::new(p) value_type(__data);
}
void destroy (pointer p)
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/ext/debug_allocator.h gcc-3.4.1/libstdc++-v3/include/ext/debug_allocator.h
*** gcc-3.4.0/libstdc++-v3/include/ext/debug_allocator.h 2004-03-18 17:37:05.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/ext/debug_allocator.h 2004-04-30 03:25:08.000000000 +0000
*************** namespace __gnu_cxx
*** 108,114 ****
void
deallocate(pointer __p, size_type __n)
{
! pointer __real_p = __p - _M_extra;
if (*reinterpret_cast(__real_p) != __n)
abort();
_M_allocator.deallocate(__real_p, __n + _M_extra);
--- 108,116 ----
void
deallocate(pointer __p, size_type __n)
{
! if (!__p)
! abort();
! pointer __real_p = __p - _M_extra;
if (*reinterpret_cast(__real_p) != __n)
abort();
_M_allocator.deallocate(__real_p, __n + _M_extra);
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/ext/enc_filebuf.h gcc-3.4.1/libstdc++-v3/include/ext/enc_filebuf.h
*** gcc-3.4.0/libstdc++-v3/include/ext/enc_filebuf.h 2003-12-09 04:31:53.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/ext/enc_filebuf.h 2004-05-18 09:15:11.000000000 +0000
*************** namespace __gnu_cxx
*** 54,65 ****
enc_filebuf(state_type& __state)
: std::basic_filebuf<_CharT, enc_char_traits<_CharT> >()
{
- // Set state type to something useful.
- // Something more than copyconstructible is needed here, so
- // require default and copy constructible + assignment operator.
- __glibcxx_class_requires(state_type, _SGIAssignableConcept);
this->_M_state_beg = __state;
this->_M_state_beg._M_init();
! };
};
} // namespace __gnu_cxx
--- 54,68 ----
enc_filebuf(state_type& __state)
: std::basic_filebuf<_CharT, enc_char_traits<_CharT> >()
{
this->_M_state_beg = __state;
this->_M_state_beg._M_init();
! }
!
! private:
! // concept requirements:
! // Set state type to something useful.
! // Something more than copyconstructible is needed here, so
! // require default and copy constructible + assignment operator.
! __glibcxx_class_requires(state_type, _SGIAssignableConcept)
};
} // namespace __gnu_cxx
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/ext/malloc_allocator.h gcc-3.4.1/libstdc++-v3/include/ext/malloc_allocator.h
*** gcc-3.4.0/libstdc++-v3/include/ext/malloc_allocator.h 2004-03-18 17:37:05.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/ext/malloc_allocator.h 2004-04-30 03:25:08.000000000 +0000
*************** namespace __gnu_cxx
*** 78,84 ****
// about what the return value is when __n == 0.
pointer
allocate(size_type __n, const void* = 0)
! { return static_cast<_Tp*>(malloc(__n * sizeof(_Tp))); }
// __p is not permitted to be a null pointer.
void
--- 78,89 ----
// about what the return value is when __n == 0.
pointer
allocate(size_type __n, const void* = 0)
! {
! pointer __ret = static_cast<_Tp*>(malloc(__n * sizeof(_Tp)));
! if (!__ret)
! throw std::bad_alloc();
! return __ret;
! }
// __p is not permitted to be a null pointer.
void
*************** namespace __gnu_cxx
*** 93,99 ****
// 402. wrong new expression in [some_] allocator::construct
void
construct(pointer __p, const _Tp& __val)
! { *__p = __val; }
void
destroy(pointer __p) { __p->~_Tp(); }
--- 98,104 ----
// 402. wrong new expression in [some_] allocator::construct
void
construct(pointer __p, const _Tp& __val)
! { ::new(__p) value_type(__val); }
void
destroy(pointer __p) { __p->~_Tp(); }
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/ext/mt_allocator.h gcc-3.4.1/libstdc++-v3/include/ext/mt_allocator.h
*** gcc-3.4.0/libstdc++-v3/include/ext/mt_allocator.h 2004-03-18 17:37:05.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/ext/mt_allocator.h 2004-06-18 23:32:08.000000000 +0000
*************** namespace __gnu_cxx
*** 57,69 ****
class __mt_alloc
{
public:
! typedef size_t size_type;
! typedef ptrdiff_t difference_type;
! typedef _Tp* pointer;
! typedef const _Tp* const_pointer;
! typedef _Tp& reference;
! typedef const _Tp& const_reference;
! typedef _Tp value_type;
template
struct rebind
--- 57,69 ----
class __mt_alloc
{
public:
! typedef size_t size_type;
! typedef ptrdiff_t difference_type;
! typedef _Tp* pointer;
! typedef const _Tp* const_pointer;
! typedef _Tp& reference;
! typedef const _Tp& const_reference;
! typedef _Tp value_type;
template
struct rebind
*************** namespace __gnu_cxx
*** 88,97 ****
~__mt_alloc() throw() { }
pointer
! address(reference __x) const { return &__x; }
const_pointer
! address(const_reference __x) const { return &__x; }
size_type
max_size() const throw()
--- 88,99 ----
~__mt_alloc() throw() { }
pointer
! address(reference __x) const
! { return &__x; }
const_pointer
! address(const_reference __x) const
! { return &__x; }
size_type
max_size() const throw()
*************** namespace __gnu_cxx
*** 107,126 ****
destroy(pointer __p) { __p->~_Tp(); }
pointer
! allocate(size_t __n, const void* = 0);
void
deallocate(pointer __p, size_type __n);
// Variables used to configure the behavior of the allocator,
// assigned and explained in detail below.
! struct tune
{
// Allocation requests (after round-up to power of 2) below
// this value will be handled by the allocator. A raw new/
// call will be used for requests larger than this value.
size_t _M_max_bytes;
// In order to avoid fragmenting and minimize the number of
// new() calls we always request new memory using this
// value. Based on previous discussions on the libstdc++
--- 109,137 ----
destroy(pointer __p) { __p->~_Tp(); }
pointer
! allocate(size_type __n, const void* = 0);
void
deallocate(pointer __p, size_type __n);
// Variables used to configure the behavior of the allocator,
// assigned and explained in detail below.
! struct _Tune
{
+ // Alignment needed.
+ // NB: In any case must be >= sizeof(_Block_record), that
+ // is 4 on 32 bit machines and 8 on 64 bit machines.
+ size_t _M_align;
+
// Allocation requests (after round-up to power of 2) below
// this value will be handled by the allocator. A raw new/
// call will be used for requests larger than this value.
size_t _M_max_bytes;
+ // Size in bytes of the smallest bin.
+ // NB: Must be a power of 2 and >= _M_align.
+ size_t _M_min_bin;
+
// In order to avoid fragmenting and minimize the number of
// new() calls we always request new memory using this
// value. Based on previous discussions on the libstdc++
*************** namespace __gnu_cxx
*** 143,165 ****
// Set to true forces all allocations to use new().
bool _M_force_new;
! explicit tune()
! : _M_max_bytes(128), _M_chunk_size(4096 - 4 * sizeof(void*)),
! #ifdef __GTHREADS
! _M_max_threads(4096),
! #else
! _M_max_threads(0),
! #endif
! _M_freelist_headroom(10),
! _M_force_new(getenv("GLIBCXX_FORCE_NEW") ? true : false)
! { }
! explicit tune(size_t __maxb, size_t __chunk, size_t __maxthreads,
! size_t __headroom, bool __force)
! : _M_max_bytes(__maxb), _M_chunk_size(__chunk),
! _M_max_threads(__maxthreads), _M_freelist_headroom(__headroom),
! _M_force_new(__force)
! { }
};
private:
--- 154,175 ----
// Set to true forces all allocations to use new().
bool _M_force_new;
! explicit
! _Tune()
! : _M_align(8), _M_max_bytes(128), _M_min_bin(8),
! _M_chunk_size(4096 - 4 * sizeof(void*)),
! _M_max_threads(4096), _M_freelist_headroom(10),
! _M_force_new(getenv("GLIBCXX_FORCE_NEW") ? true : false)
! { }
! explicit
! _Tune(size_t __align, size_t __maxb, size_t __minbin,
! size_t __chunk, size_t __maxthreads, size_t __headroom,
! bool __force)
! : _M_align(__align), _M_max_bytes(__maxb), _M_min_bin(__minbin),
! _M_chunk_size(__chunk), _M_max_threads(__maxthreads),
! _M_freelist_headroom(__headroom), _M_force_new(__force)
! { }
};
private:
*************** namespace __gnu_cxx
*** 170,186 ****
#endif
static bool _S_init;
! static void
_S_initialize();
// Configuration options.
! static tune _S_options;
! static const tune
! _S_get_options() { return _S_options; }
static void
! _S_set_options(tune __t)
{
if (!_S_init)
_S_options = __t;
--- 180,197 ----
#endif
static bool _S_init;
! static void
_S_initialize();
// Configuration options.
! static _Tune _S_options;
! static const _Tune
! _S_get_options()
! { return _S_options; }
static void
! _S_set_options(_Tune __t)
{
if (!_S_init)
_S_options = __t;
*************** namespace __gnu_cxx
*** 188,195 ****
// Using short int as type for the binmap implies we are never
// caching blocks larger than 65535 with this allocator
! typedef unsigned short int binmap_type;
! static binmap_type* _S_binmap;
// Each requesting thread is assigned an id ranging from 1 to
// _S_max_threads. Thread id 0 is used as a global memory pool.
--- 199,206 ----
// Using short int as type for the binmap implies we are never
// caching blocks larger than 65535 with this allocator
! typedef unsigned short int _Binmap_type;
! static _Binmap_type* _S_binmap;
// Each requesting thread is assigned an id ranging from 1 to
// _S_max_threads. Thread id 0 is used as a global memory pool.
*************** namespace __gnu_cxx
*** 201,263 ****
// (i.e. the thread dies) is called, we return the thread id to
// the front of this list.
#ifdef __GTHREADS
! struct thread_record
{
// Points to next free thread id record. NULL if last record in list.
! thread_record* volatile next;
// Thread id ranging from 1 to _S_max_threads.
! size_t id;
};
! static thread_record* volatile _S_thread_freelist_first;
static __gthread_mutex_t _S_thread_freelist_mutex;
static __gthread_key_t _S_thread_key;
static void
! _S_destroy_thread_key(void* freelist_pos);
#endif
static size_t
_S_get_thread_id();
! struct block_record
{
! // Points to the next block_record for its thread_id.
! block_record* volatile next;
- // The thread id of the thread which has requested this block.
#ifdef __GTHREADS
! size_t thread_id;
#endif
};
! struct bin_record
{
// An "array" of pointers to the first free block for each
// thread id. Memory to this "array" is allocated in _S_initialize()
// for _S_max_threads + global pool 0.
! block_record** volatile first;
// An "array" of counters used to keep track of the amount of
// blocks that are on the freelist/used for each thread id.
// Memory to these "arrays" is allocated in _S_initialize() for
// _S_max_threads + global pool 0.
! size_t* volatile free;
! size_t* volatile used;
// Each bin has its own mutex which is used to ensure data
// integrity while changing "ownership" on a block. The mutex
// is initialized in _S_initialize().
! #ifdef __GTHREADS
! __gthread_mutex_t* mutex;
#endif
};
// An "array" of bin_records each of which represents a specific
// power of 2 size. Memory to this "array" is allocated in
// _S_initialize().
! static bin_record* volatile _S_bin;
// Actual value calculated in _S_initialize().
static size_t _S_bin_size;
--- 212,274 ----
// (i.e. the thread dies) is called, we return the thread id to
// the front of this list.
#ifdef __GTHREADS
! struct _Thread_record
{
// Points to next free thread id record. NULL if last record in list.
! _Thread_record* volatile _M_next;
// Thread id ranging from 1 to _S_max_threads.
! size_t _M_id;
};
! static _Thread_record* volatile _S_thread_freelist_first;
static __gthread_mutex_t _S_thread_freelist_mutex;
static __gthread_key_t _S_thread_key;
static void
! _S_destroy_thread_key(void* __freelist_pos);
#endif
static size_t
_S_get_thread_id();
! union _Block_record
{
! // Points to the block_record of the next free block.
! _Block_record* volatile _M_next;
#ifdef __GTHREADS
! // The thread id of the thread which has requested this block.
! size_t _M_thread_id;
#endif
};
! struct _Bin_record
{
// An "array" of pointers to the first free block for each
// thread id. Memory to this "array" is allocated in _S_initialize()
// for _S_max_threads + global pool 0.
! _Block_record** volatile _M_first;
+ #ifdef __GTHREADS
// An "array" of counters used to keep track of the amount of
// blocks that are on the freelist/used for each thread id.
// Memory to these "arrays" is allocated in _S_initialize() for
// _S_max_threads + global pool 0.
! size_t* volatile _M_free;
! size_t* volatile _M_used;
// Each bin has its own mutex which is used to ensure data
// integrity while changing "ownership" on a block. The mutex
// is initialized in _S_initialize().
! __gthread_mutex_t* _M_mutex;
#endif
};
// An "array" of bin_records each of which represents a specific
// power of 2 size. Memory to this "array" is allocated in
// _S_initialize().
! static _Bin_record* volatile _S_bin;
// Actual value calculated in _S_initialize().
static size_t _S_bin_size;
*************** namespace __gnu_cxx
*** 266,272 ****
template
typename __mt_alloc<_Tp>::pointer
__mt_alloc<_Tp>::
! allocate(size_t __n, const void*)
{
// Although the test in __gthread_once() would suffice, we wrap
// test of the once condition in our own unlocked check. This
--- 277,283 ----
template
typename __mt_alloc<_Tp>::pointer
__mt_alloc<_Tp>::
! allocate(size_type __n, const void*)
{
// Although the test in __gthread_once() would suffice, we wrap
// test of the once condition in our own unlocked check. This
*************** namespace __gnu_cxx
*** 291,310 ****
void* __ret = ::operator new(__bytes);
return static_cast<_Tp*>(__ret);
}
!
// Round up to power of 2 and figure out which bin to use.
const size_t __which = _S_binmap[__bytes];
const size_t __thread_id = _S_get_thread_id();
// Find out if we have blocks on our freelist. If so, go ahead
// and use them directly without having to lock anything.
! const bin_record& __bin = _S_bin[__which];
! block_record* block = NULL;
! if (__bin.first[__thread_id] == NULL)
{
// Are we using threads?
// - Yes, check if there are free blocks on the global
! // list. If so, grab up to block_count blocks in one
// lock and change ownership. If the global list is
// empty, we allocate a new chunk and add those blocks
// directly to our own freelist (with us as owner).
--- 302,327 ----
void* __ret = ::operator new(__bytes);
return static_cast<_Tp*>(__ret);
}
!
// Round up to power of 2 and figure out which bin to use.
const size_t __which = _S_binmap[__bytes];
const size_t __thread_id = _S_get_thread_id();
// Find out if we have blocks on our freelist. If so, go ahead
// and use them directly without having to lock anything.
! const _Bin_record& __bin = _S_bin[__which];
! _Block_record* __block = NULL;
! if (__bin._M_first[__thread_id] == NULL)
{
+ // NB: For alignment reasons, we can't use the first _M_align
+ // bytes, even when sizeof(_Block_record) < _M_align.
+ const size_t __bin_size = ((_S_options._M_min_bin << __which)
+ + _S_options._M_align);
+ size_t __block_count = _S_options._M_chunk_size / __bin_size;
+
// Are we using threads?
// - Yes, check if there are free blocks on the global
! // list. If so, grab up to __block_count blocks in one
// lock and change ownership. If the global list is
// empty, we allocate a new chunk and add those blocks
// directly to our own freelist (with us as owner).
*************** namespace __gnu_cxx
*** 315,429 ****
#ifdef __GTHREADS
if (__gthread_active_p())
{
! const size_t bin_size = (1 << __which) + sizeof(block_record);
! size_t block_count = _S_options._M_chunk_size / bin_size;
!
! __gthread_mutex_lock(__bin.mutex);
! if (__bin.first[0] == NULL)
{
// No need to hold the lock when we are adding a
// whole chunk to our own list.
! __gthread_mutex_unlock(__bin.mutex);
!
! void* v = ::operator new(_S_options._M_chunk_size);
! __bin.first[__thread_id] = static_cast(v);
!
! __bin.free[__thread_id] = block_count;
! block_count--;
! block = __bin.first[__thread_id];
! while (block_count > 0)
{
! char* c = reinterpret_cast(block) + bin_size;
! block->next = reinterpret_cast(c);
! block->thread_id = __thread_id;
! block = block->next;
! block_count--;
}
!
! block->next = NULL;
! block->thread_id = __thread_id;
}
else
{
! size_t global_count = 0;
! block_record* tmp;
! while (__bin.first[0] != NULL && global_count < block_count)
{
! tmp = __bin.first[0]->next;
! block = __bin.first[0];
!
! if (__bin.first[__thread_id] == NULL)
! {
! __bin.first[__thread_id] = block;
! block->next = NULL;
! }
! else
! {
! block->next = __bin.first[__thread_id];
! __bin.first[__thread_id] = block;
! }
!
! block->thread_id = __thread_id;
! __bin.free[__thread_id]++;
! __bin.first[0] = tmp;
! global_count++;
}
! __gthread_mutex_unlock(__bin.mutex);
}
-
- // Return the first newly added block in our list and
- // update the counters
- block = __bin.first[__thread_id];
- __bin.first[__thread_id] = __bin.first[__thread_id]->next;
- __bin.free[__thread_id]--;
- __bin.used[__thread_id]++;
}
else
#endif
{
void* __v = ::operator new(_S_options._M_chunk_size);
! __bin.first[0] = static_cast(__v);
!
! const size_t bin_size = (1 << __which) + sizeof(block_record);
! size_t block_count = _S_options._M_chunk_size / bin_size;
! block_count--;
! block = __bin.first[0];
! while (block_count > 0)
{
! char* __c = reinterpret_cast(block) + bin_size;
! block->next = reinterpret_cast(__c);
! block = block->next;
! block_count--;
}
! block->next = NULL;
!
! // Remove from list.
! block = __bin.first[0];
! __bin.first[0] = __bin.first[0]->next;
}
}
- else
- {
- // "Default" operation - we have blocks on our own freelist
- // grab the first record and update the counters.
- block = __bin.first[__thread_id];
- __bin.first[__thread_id] = __bin.first[__thread_id]->next;
#ifdef __GTHREADS
! if (__gthread_active_p())
! {
! __bin.free[__thread_id]--;
! __bin.used[__thread_id]++;
! }
! #endif
}
! char* __c = reinterpret_cast(block) + sizeof(block_record);
return static_cast<_Tp*>(static_cast(__c));
}
-
template
void
__mt_alloc<_Tp>::
--- 332,417 ----
#ifdef __GTHREADS
if (__gthread_active_p())
{
! __gthread_mutex_lock(__bin._M_mutex);
! if (__bin._M_first[0] == NULL)
{
// No need to hold the lock when we are adding a
// whole chunk to our own list.
! __gthread_mutex_unlock(__bin._M_mutex);
! void* __v = ::operator new(_S_options._M_chunk_size);
! __bin._M_first[__thread_id] = static_cast<_Block_record*>(__v);
! __bin._M_free[__thread_id] = __block_count;
!
! --__block_count;
! __block = __bin._M_first[__thread_id];
! while (__block_count-- > 0)
{
! char* __c = reinterpret_cast(__block) + __bin_size;
! __block->_M_next = reinterpret_cast<_Block_record*>(__c);
! __block = __block->_M_next;
}
! __block->_M_next = NULL;
}
else
{
! // Is the number of required blocks greater than or
! // equal to the number that can be provided by the
! // global free list?
! __bin._M_first[__thread_id] = __bin._M_first[0];
! if (__block_count >= __bin._M_free[0])
{
! __bin._M_free[__thread_id] = __bin._M_free[0];
! __bin._M_free[0] = 0;
! __bin._M_first[0] = NULL;
}
! else
! {
! __bin._M_free[__thread_id] = __block_count;
! __bin._M_free[0] -= __block_count;
! --__block_count;
! __block = __bin._M_first[0];
! while (__block_count-- > 0)
! __block = __block->_M_next;
! __bin._M_first[0] = __block->_M_next;
! __block->_M_next = NULL;
! }
! __gthread_mutex_unlock(__bin._M_mutex);
}
}
else
#endif
{
void* __v = ::operator new(_S_options._M_chunk_size);
! __bin._M_first[0] = static_cast<_Block_record*>(__v);
! --__block_count;
! __block = __bin._M_first[0];
! while (__block_count-- > 0)
{
! char* __c = reinterpret_cast(__block) + __bin_size;
! __block->_M_next = reinterpret_cast<_Block_record*>(__c);
! __block = __block->_M_next;
}
! __block->_M_next = NULL;
}
}
+ __block = __bin._M_first[__thread_id];
+ __bin._M_first[__thread_id] = __bin._M_first[__thread_id]->_M_next;
#ifdef __GTHREADS
! if (__gthread_active_p())
! {
! __block->_M_thread_id = __thread_id;
! --__bin._M_free[__thread_id];
! ++__bin._M_used[__thread_id];
}
! #endif
!
! char* __c = reinterpret_cast(__block) + _S_options._M_align;
return static_cast<_Tp*>(static_cast(__c));
}
template
void
__mt_alloc<_Tp>::
*************** namespace __gnu_cxx
*** 440,526 ****
// Round up to power of 2 and figure out which bin to use.
const size_t __which = _S_binmap[__bytes];
! const size_t thread_id = _S_get_thread_id();
! const bin_record& __bin = _S_bin[__which];
! char* __c = reinterpret_cast(__p) - sizeof(block_record);
! block_record* block = reinterpret_cast(__c);
#ifdef __GTHREADS
if (__gthread_active_p())
{
! // Calculate the number of records to remove from our freelist.
! int remove = __bin.free[thread_id] -
! (__bin.used[thread_id] / _S_options._M_freelist_headroom);
! // The calculation above will almost always tell us to
! // remove one or two records at a time, but this creates too
! // much contention when locking and therefore we wait until
! // the number of records is "high enough".
! int __cond1 = static_cast(100 * (_S_bin_size - __which));
! int __cond2 = static_cast(__bin.free[thread_id] / _S_options._M_freelist_headroom);
! if (remove > __cond1 && remove > __cond2)
{
! __gthread_mutex_lock(__bin.mutex);
! block_record* tmp;
! while (remove > 0)
! {
! tmp = __bin.first[thread_id]->next;
! if (__bin.first[0] == NULL)
! {
! __bin.first[0] = __bin.first[thread_id];
! __bin.first[0]->next = NULL;
! }
! else
! {
! __bin.first[thread_id]->next = __bin.first[0];
! __bin.first[0] = __bin.first[thread_id];
! }
!
! __bin.first[thread_id] = tmp;
! __bin.free[thread_id]--;
! remove--;
! }
! __gthread_mutex_unlock(__bin.mutex);
}
// Return this block to our list and update counters and
// owner id as needed.
! if (__bin.first[thread_id] == NULL)
! {
! __bin.first[thread_id] = block;
! block->next = NULL;
! }
! else
! {
! block->next = __bin.first[thread_id];
! __bin.first[thread_id] = block;
! }
!
! __bin.free[thread_id]++;
! if (thread_id == block->thread_id)
! __bin.used[thread_id]--;
! else
! {
! __bin.used[block->thread_id]--;
! block->thread_id = thread_id;
! }
}
else
#endif
{
// Single threaded application - return to global pool.
! if (__bin.first[0] == NULL)
! {
! __bin.first[0] = block;
! block->next = NULL;
! }
! else
! {
! block->next = __bin.first[0];
! __bin.first[0] = block;
! }
}
}
--- 428,485 ----
// Round up to power of 2 and figure out which bin to use.
const size_t __which = _S_binmap[__bytes];
! const _Bin_record& __bin = _S_bin[__which];
! char* __c = reinterpret_cast(__p) - _S_options._M_align;
! _Block_record* __block = reinterpret_cast<_Block_record*>(__c);
#ifdef __GTHREADS
if (__gthread_active_p())
{
! // Calculate the number of records to remove from our freelist:
! // in order to avoid too much contention we wait until the
! // number of records is "high enough".
! const size_t __thread_id = _S_get_thread_id();
! long __remove = ((__bin._M_free[__thread_id]
! * _S_options._M_freelist_headroom)
! - __bin._M_used[__thread_id]);
! if (__remove > static_cast(100 * (_S_bin_size - __which)
! * _S_options._M_freelist_headroom)
! && __remove > static_cast(__bin._M_free[__thread_id]))
{
! _Block_record* __tmp = __bin._M_first[__thread_id];
! _Block_record* __first = __tmp;
! __remove /= _S_options._M_freelist_headroom;
! const long __removed = __remove;
! --__remove;
! while (__remove-- > 0)
! __tmp = __tmp->_M_next;
! __bin._M_first[__thread_id] = __tmp->_M_next;
! __bin._M_free[__thread_id] -= __removed;
!
! __gthread_mutex_lock(__bin._M_mutex);
! __tmp->_M_next = __bin._M_first[0];
! __bin._M_first[0] = __first;
! __bin._M_free[0] += __removed;
! __gthread_mutex_unlock(__bin._M_mutex);
}
// Return this block to our list and update counters and
// owner id as needed.
! --__bin._M_used[__block->_M_thread_id];
!
! __block->_M_next = __bin._M_first[__thread_id];
! __bin._M_first[__thread_id] = __block;
! ++__bin._M_free[__thread_id];
}
else
#endif
{
// Single threaded application - return to global pool.
! __block->_M_next = __bin._M_first[0];
! __bin._M_first[0] = __block;
}
}
*************** namespace __gnu_cxx
*** 534,588 ****
// Calculate the number of bins required based on _M_max_bytes.
// _S_bin_size is statically-initialized to one.
! size_t __bin_size = 1;
while (_S_options._M_max_bytes > __bin_size)
{
! __bin_size = __bin_size << 1;
! _S_bin_size++;
}
// Setup the bin map for quick lookup of the relevant bin.
! const size_t __j = (_S_options._M_max_bytes + 1) * sizeof(binmap_type);
! _S_binmap = static_cast(::operator new(__j));
! binmap_type* __bp = _S_binmap;
! binmap_type __bin_max = 1;
! binmap_type __bint = 0;
! for (binmap_type __ct = 0; __ct <= _S_options._M_max_bytes; __ct++)
{
if (__ct > __bin_max)
{
__bin_max <<= 1;
! __bint++;
}
*__bp++ = __bint;
}
// If __gthread_active_p() create and initialize the list of
// free thread ids. Single threaded applications use thread id 0
// directly and have no need for this.
- void* __v;
#ifdef __GTHREADS
if (__gthread_active_p())
{
! const size_t __k = sizeof(thread_record) * _S_options._M_max_threads;
__v = ::operator new(__k);
! _S_thread_freelist_first = static_cast(__v);
// NOTE! The first assignable thread id is 1 since the
// global pool uses id 0
size_t __i;
! for (__i = 1; __i < _S_options._M_max_threads; __i++)
{
! thread_record& __tr = _S_thread_freelist_first[__i - 1];
! __tr.next = &_S_thread_freelist_first[__i];
! __tr.id = __i;
}
// Set last record.
! _S_thread_freelist_first[__i - 1].next = NULL;
! _S_thread_freelist_first[__i - 1].id = __i;
!
// Make sure this is initialized.
#ifndef __GTHREAD_MUTEX_INIT
--- 493,549 ----
// Calculate the number of bins required based on _M_max_bytes.
// _S_bin_size is statically-initialized to one.
! size_t __bin_size = _S_options._M_min_bin;
while (_S_options._M_max_bytes > __bin_size)
{
! __bin_size <<= 1;
! ++_S_bin_size;
}
// Setup the bin map for quick lookup of the relevant bin.
! const size_t __j = (_S_options._M_max_bytes + 1) * sizeof(_Binmap_type);
! _S_binmap = static_cast<_Binmap_type*>(::operator new(__j));
! _Binmap_type* __bp = _S_binmap;
! _Binmap_type __bin_max = _S_options._M_min_bin;
! _Binmap_type __bint = 0;
! for (_Binmap_type __ct = 0; __ct <= _S_options._M_max_bytes; ++__ct)
{
if (__ct > __bin_max)
{
__bin_max <<= 1;
! ++__bint;
}
*__bp++ = __bint;
}
+ // Initialize _S_bin and its members.
+ void* __v = ::operator new(sizeof(_Bin_record) * _S_bin_size);
+ _S_bin = static_cast<_Bin_record*>(__v);
+
// If __gthread_active_p() create and initialize the list of
// free thread ids. Single threaded applications use thread id 0
// directly and have no need for this.
#ifdef __GTHREADS
if (__gthread_active_p())
{
! const size_t __k = sizeof(_Thread_record) * _S_options._M_max_threads;
__v = ::operator new(__k);
! _S_thread_freelist_first = static_cast<_Thread_record*>(__v);
// NOTE! The first assignable thread id is 1 since the
// global pool uses id 0
size_t __i;
! for (__i = 1; __i < _S_options._M_max_threads; ++__i)
{
! _Thread_record& __tr = _S_thread_freelist_first[__i - 1];
! __tr._M_next = &_S_thread_freelist_first[__i];
! __tr._M_id = __i;
}
// Set last record.
! _S_thread_freelist_first[__i - 1]._M_next = NULL;
! _S_thread_freelist_first[__i - 1]._M_id = __i;
// Make sure this is initialized.
#ifndef __GTHREAD_MUTEX_INIT
*************** namespace __gnu_cxx
*** 591,652 ****
// Initialize per thread key to hold pointer to
// _S_thread_freelist.
__gthread_key_create(&_S_thread_key, _S_destroy_thread_key);
- }
- #endif
-
- // Initialize _S_bin and its members.
- __v = ::operator new(sizeof(bin_record) * _S_bin_size);
- _S_bin = static_cast(__v);
-
- // Maximum number of threads.
- size_t __max_threads = 1;
- #ifdef __GTHREADS
- if (__gthread_active_p())
- __max_threads = _S_options._M_max_threads + 1;
- #endif
! for (size_t __n = 0; __n < _S_bin_size; __n++)
! {
! bin_record& __bin = _S_bin[__n];
! __v = ::operator new(sizeof(block_record*) * __max_threads);
! __bin.first = static_cast(__v);
- #ifdef __GTHREADS
- if (__gthread_active_p())
- {
__v = ::operator new(sizeof(size_t) * __max_threads);
! __bin.free = static_cast(__v);
__v = ::operator new(sizeof(size_t) * __max_threads);
! __bin.used = static_cast(__v);
__v = ::operator new(sizeof(__gthread_mutex_t));
! __bin.mutex = static_cast<__gthread_mutex_t*>(__v);
#ifdef __GTHREAD_MUTEX_INIT
{
// Do not copy a POSIX/gthr mutex once in use.
__gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
! *__bin.mutex = __tmp;
}
#else
! { __GTHREAD_MUTEX_INIT_FUNCTION(__bin.mutex); }
! #endif
! }
#endif
! for (size_t __threadn = 0; __threadn < __max_threads; __threadn++)
! {
! __bin.first[__threadn] = NULL;
! #ifdef __GTHREADS
! if (__gthread_active_p())
! {
! __bin.free[__threadn] = 0;
! __bin.used[__threadn] = 0;
! }
! #endif
! }
! }
_S_init = true;
}
--- 552,603 ----
// Initialize per thread key to hold pointer to
// _S_thread_freelist.
__gthread_key_create(&_S_thread_key, _S_destroy_thread_key);
! const size_t __max_threads = _S_options._M_max_threads + 1;
! for (size_t __n = 0; __n < _S_bin_size; ++__n)
! {
! _Bin_record& __bin = _S_bin[__n];
! __v = ::operator new(sizeof(_Block_record*) * __max_threads);
! __bin._M_first = static_cast<_Block_record**>(__v);
__v = ::operator new(sizeof(size_t) * __max_threads);
! __bin._M_free = static_cast(__v);
__v = ::operator new(sizeof(size_t) * __max_threads);
! __bin._M_used = static_cast(__v);
__v = ::operator new(sizeof(__gthread_mutex_t));
! __bin._M_mutex = static_cast<__gthread_mutex_t*>(__v);
#ifdef __GTHREAD_MUTEX_INIT
{
// Do not copy a POSIX/gthr mutex once in use.
__gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
! *__bin._M_mutex = __tmp;
}
#else
! { __GTHREAD_MUTEX_INIT_FUNCTION(__bin._M_mutex); }
#endif
! for (size_t __threadn = 0; __threadn < __max_threads;
! ++__threadn)
! {
! __bin._M_first[__threadn] = NULL;
! __bin._M_free[__threadn] = 0;
! __bin._M_used[__threadn] = 0;
! }
! }
! }
! else
! #endif
! for (size_t __n = 0; __n < _S_bin_size; ++__n)
! {
! _Bin_record& __bin = _S_bin[__n];
! __v = ::operator new(sizeof(_Block_record*));
! __bin._M_first = static_cast<_Block_record**>(__v);
! __bin._M_first[0] = NULL;
! }
!
_S_init = true;
}
*************** namespace __gnu_cxx
*** 657,668 ****
{
#ifdef __GTHREADS
// If we have thread support and it's active we check the thread
! // key value and return it's id or if it's not set we take the
// first record from _S_thread_freelist and sets the key and
// returns it's id.
if (__gthread_active_p())
{
! thread_record* __freelist_pos = static_cast(__gthread_getspecific(_S_thread_key));
if (__freelist_pos == NULL)
{
// Since _S_options._M_max_threads must be larger than
--- 608,620 ----
{
#ifdef __GTHREADS
// If we have thread support and it's active we check the thread
! // key value and return its id or if it's not set we take the
// first record from _S_thread_freelist and sets the key and
// returns it's id.
if (__gthread_active_p())
{
! _Thread_record* __freelist_pos =
! static_cast<_Thread_record*>(__gthread_getspecific(_S_thread_key));
if (__freelist_pos == NULL)
{
// Since _S_options._M_max_threads must be larger than
*************** namespace __gnu_cxx
*** 670,682 ****
// list can never be empty.
__gthread_mutex_lock(&_S_thread_freelist_mutex);
__freelist_pos = _S_thread_freelist_first;
! _S_thread_freelist_first = _S_thread_freelist_first->next;
__gthread_mutex_unlock(&_S_thread_freelist_mutex);
__gthread_setspecific(_S_thread_key,
static_cast(__freelist_pos));
}
! return __freelist_pos->id;
}
#endif
// Otherwise (no thread support or inactive) all requests are
--- 622,634 ----
// list can never be empty.
__gthread_mutex_lock(&_S_thread_freelist_mutex);
__freelist_pos = _S_thread_freelist_first;
! _S_thread_freelist_first = _S_thread_freelist_first->_M_next;
__gthread_mutex_unlock(&_S_thread_freelist_mutex);
__gthread_setspecific(_S_thread_key,
static_cast(__freelist_pos));
}
! return __freelist_pos->_M_id;
}
#endif
// Otherwise (no thread support or inactive) all requests are
*************** namespace __gnu_cxx
*** 692,699 ****
{
// Return this thread id record to front of thread_freelist.
__gthread_mutex_lock(&_S_thread_freelist_mutex);
! thread_record* __tr = static_cast(__freelist_pos);
! __tr->next = _S_thread_freelist_first;
_S_thread_freelist_first = __tr;
__gthread_mutex_unlock(&_S_thread_freelist_mutex);
}
--- 644,651 ----
{
// Return this thread id record to front of thread_freelist.
__gthread_mutex_lock(&_S_thread_freelist_mutex);
! _Thread_record* __tr = static_cast<_Thread_record*>(__freelist_pos);
! __tr->_M_next = _S_thread_freelist_first;
_S_thread_freelist_first = __tr;
__gthread_mutex_unlock(&_S_thread_freelist_mutex);
}
*************** namespace __gnu_cxx
*** 713,725 ****
bool __mt_alloc<_Tp>::_S_init = false;
template
! typename __mt_alloc<_Tp>::tune __mt_alloc<_Tp>::_S_options;
template
! typename __mt_alloc<_Tp>::binmap_type* __mt_alloc<_Tp>::_S_binmap;
template
! typename __mt_alloc<_Tp>::bin_record* volatile __mt_alloc<_Tp>::_S_bin;
template
size_t __mt_alloc<_Tp>::_S_bin_size = 1;
--- 665,677 ----
bool __mt_alloc<_Tp>::_S_init = false;
template
! typename __mt_alloc<_Tp>::_Tune __mt_alloc<_Tp>::_S_options;
template
! typename __mt_alloc<_Tp>::_Binmap_type* __mt_alloc<_Tp>::_S_binmap;
template
! typename __mt_alloc<_Tp>::_Bin_record* volatile __mt_alloc<_Tp>::_S_bin;
template
size_t __mt_alloc<_Tp>::_S_bin_size = 1;
*************** namespace __gnu_cxx
*** 730,736 ****
__gthread_once_t __mt_alloc<_Tp>::_S_once = __GTHREAD_ONCE_INIT;
template
! typename __mt_alloc<_Tp>::thread_record*
volatile __mt_alloc<_Tp>::_S_thread_freelist_first = NULL;
template
--- 682,688 ----
__gthread_once_t __mt_alloc<_Tp>::_S_once = __GTHREAD_ONCE_INIT;
template
! typename __mt_alloc<_Tp>::_Thread_record*
volatile __mt_alloc<_Tp>::_S_thread_freelist_first = NULL;
template
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/ext/pool_allocator.h gcc-3.4.1/libstdc++-v3/include/ext/pool_allocator.h
*** gcc-3.4.0/libstdc++-v3/include/ext/pool_allocator.h 2004-03-18 17:37:06.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/ext/pool_allocator.h 2004-06-17 10:39:33.000000000 +0000
*************** namespace __gnu_cxx
*** 59,67 ****
/**
* @if maint
! * Default node allocator. "SGI" style. Uses various allocators to
! * fulfill underlying requests (and makes as few requests as possible
! * when in default high-speed pool mode).
*
* Important implementation properties:
* 0. If globally mandated, then allocate objects from new
--- 59,66 ----
/**
* @if maint
! * Uses various allocators to fulfill underlying requests (and makes as
! * few requests as possible when in default high-speed pool mode).
*
* Important implementation properties:
* 0. If globally mandated, then allocate objects from new
*************** namespace __gnu_cxx
*** 72,246 ****
* information that we can return the object to the proper free list
* without permanently losing part of the object.
*
! * The first template parameter specifies whether more than one thread may
! * use this allocator. It is safe to allocate an object from one instance
! * of a default_alloc and deallocate it with another one. This effectively
* transfers its ownership to the second one. This may have undesirable
* effects on reference locality.
*
- * The second parameter is unused and serves only to allow the
- * creation of multiple default_alloc instances. Note that
- * containers built on different allocator instances have different
- * types, limiting the utility of this approach. If you do not
- * wish to share the free lists with the main default_alloc
- * instance, instantiate this with a non-zero __inst.
- *
* @endif
* (See @link Allocators allocators info @endlink for more.)
*/
! template
! class __pool_alloc
{
! private:
! enum {_S_align = 8};
! enum {_S_max_bytes = 128};
! enum {_S_freelists = _S_max_bytes / _S_align};
!
union _Obj
{
! union _Obj* _M_free_list_link;
! char _M_client_data[1]; // The client sees this.
};
!
static _Obj* volatile _S_free_list[_S_freelists];
!
// Chunk allocation state.
static char* _S_start_free;
static char* _S_end_free;
static size_t _S_heap_size;
!
static _STL_mutex_lock _S_lock;
static _Atomic_word _S_force_new;
!
static size_t
_S_round_up(size_t __bytes)
{ return ((__bytes + (size_t)_S_align - 1) & ~((size_t)_S_align - 1)); }
!
static size_t
_S_freelist_index(size_t __bytes)
! { return ((__bytes + (size_t)_S_align - 1)/(size_t)_S_align - 1); }
!
// Returns an object of size __n, and optionally adds to size __n
// free list.
static void*
_S_refill(size_t __n);
!
// Allocates a chunk for nobjs of size size. nobjs may be reduced
// if it is inconvenient to allocate the requested number.
static char*
_S_chunk_alloc(size_t __n, int& __nobjs);
!
// It would be nice to use _STL_auto_lock here. But we need a
// test whether threads are in use.
struct _Lock
{
! _Lock() { if (__threads) _S_lock._M_acquire_lock(); }
! ~_Lock() { if (__threads) _S_lock._M_release_lock(); }
} __attribute__ ((__unused__));
friend struct _Lock;
public:
! // __n must be > 0
! static void*
! allocate(size_t __n);
! // __p may not be 0
! static void
! deallocate(void* __p, size_t __n);
};
! template
inline bool
! operator==(const __pool_alloc<__threads,__inst>&,
! const __pool_alloc<__threads,__inst>&)
{ return true; }
! template
inline bool
! operator!=(const __pool_alloc<__threads,__inst>&,
! const __pool_alloc<__threads,__inst>&)
{ return false; }
-
// Allocate memory in large chunks in order to avoid fragmenting the
// heap too much. Assume that __n is properly aligned. We hold
// the allocation lock.
! template
char*
! __pool_alloc<__threads, __inst>::_S_chunk_alloc(size_t __n, int& __nobjs)
{
char* __result;
size_t __total_bytes = __n * __nobjs;
size_t __bytes_left = _S_end_free - _S_start_free;
!
if (__bytes_left >= __total_bytes)
! {
! __result = _S_start_free;
! _S_start_free += __total_bytes;
! return __result ;
! }
else if (__bytes_left >= __n)
! {
! __nobjs = (int)(__bytes_left/__n);
! __total_bytes = __n * __nobjs;
! __result = _S_start_free;
! _S_start_free += __total_bytes;
! return __result;
! }
else
! {
! size_t __bytes_to_get =
! 2 * __total_bytes + _S_round_up(_S_heap_size >> 4);
! // Try to make use of the left-over piece.
! if (__bytes_left > 0)
! {
! _Obj* volatile* __free_list =
! _S_free_list + _S_freelist_index(__bytes_left);
!
! ((_Obj*)(void*)_S_start_free)->_M_free_list_link = *__free_list;
! *__free_list = (_Obj*)(void*)_S_start_free;
! }
! _S_start_free = static_cast(::operator new(__bytes_to_get));
! if (_S_start_free == 0)
! {
! size_t __i;
! _Obj* volatile* __free_list;
! _Obj* __p;
! // Try to make do with what we have. That can't hurt. We
! // do not try smaller requests, since that tends to result
! // in disaster on multi-process machines.
! __i = __n;
! for (; __i <= (size_t) _S_max_bytes; __i += (size_t) _S_align)
! {
! __free_list = _S_free_list + _S_freelist_index(__i);
! __p = *__free_list;
! if (__p != 0)
! {
! *__free_list = __p -> _M_free_list_link;
! _S_start_free = (char*)__p;
! _S_end_free = _S_start_free + __i;
! return _S_chunk_alloc(__n, __nobjs);
! // Any leftover piece will eventually make it to the
! // right free list.
! }
! }
! _S_end_free = 0; // In case of exception.
! _S_start_free = static_cast(::operator new(__bytes_to_get));
! // This should either throw an exception or remedy the situation.
! // Thus we assume it succeeded.
! }
! _S_heap_size += __bytes_to_get;
! _S_end_free = _S_start_free + __bytes_to_get;
! return _S_chunk_alloc(__n, __nobjs);
! }
}
!
// Returns an object of size __n, and optionally adds to "size
// __n"'s free list. We assume that __n is properly aligned. We
// hold the allocation lock.
! template
void*
! __pool_alloc<__threads, __inst>::_S_refill(size_t __n)
{
int __nobjs = 20;
char* __chunk = _S_chunk_alloc(__n, __nobjs);
--- 71,279 ----
* information that we can return the object to the proper free list
* without permanently losing part of the object.
*
! * The template parameter specifies whether more than one thread may use
! * this allocator. It is safe to allocate an object from one instance
! * of the allocator and deallocate it with another one. This effectively
* transfers its ownership to the second one. This may have undesirable
* effects on reference locality.
*
* @endif
* (See @link Allocators allocators info @endlink for more.)
*/
! template
! struct __pool_base
{
! enum { _S_align = 8 };
! enum { _S_max_bytes = 128 };
! enum { _S_freelists = _S_max_bytes / _S_align };
!
union _Obj
{
! union _Obj* _M_free_list_link;
! char _M_client_data[1]; // The client sees this.
};
!
static _Obj* volatile _S_free_list[_S_freelists];
!
// Chunk allocation state.
static char* _S_start_free;
static char* _S_end_free;
static size_t _S_heap_size;
!
static _STL_mutex_lock _S_lock;
static _Atomic_word _S_force_new;
!
static size_t
_S_round_up(size_t __bytes)
{ return ((__bytes + (size_t)_S_align - 1) & ~((size_t)_S_align - 1)); }
!
static size_t
_S_freelist_index(size_t __bytes)
! { return ((__bytes + (size_t)_S_align - 1) / (size_t)_S_align - 1); }
!
// Returns an object of size __n, and optionally adds to size __n
// free list.
static void*
_S_refill(size_t __n);
!
// Allocates a chunk for nobjs of size size. nobjs may be reduced
// if it is inconvenient to allocate the requested number.
static char*
_S_chunk_alloc(size_t __n, int& __nobjs);
!
// It would be nice to use _STL_auto_lock here. But we need a
// test whether threads are in use.
struct _Lock
{
! _Lock() { if (__threads) _S_lock._M_acquire_lock(); }
! ~_Lock() { if (__threads) _S_lock._M_release_lock(); }
} __attribute__ ((__unused__));
friend struct _Lock;
+ };
+
+ typedef __pool_base __pool_alloc_base;
+ template
+ class __pool_alloc : private __pool_alloc_base
+ {
public:
! typedef size_t size_type;
! typedef ptrdiff_t difference_type;
! typedef _Tp* pointer;
! typedef const _Tp* const_pointer;
! typedef _Tp& reference;
! typedef const _Tp& const_reference;
! typedef _Tp value_type;
! template
! struct rebind
! { typedef __pool_alloc<_Tp1> other; };
!
! __pool_alloc() throw() { }
!
! __pool_alloc(const __pool_alloc&) throw() { }
!
! template
! __pool_alloc(const __pool_alloc<_Tp1>&) throw() { }
!
! ~__pool_alloc() throw() { }
!
! pointer
! address(reference __x) const { return &__x; }
!
! const_pointer
! address(const_reference __x) const { return &__x; }
!
! size_type
! max_size() const throw()
! { return size_t(-1) / sizeof(_Tp); }
!
! // _GLIBCXX_RESOLVE_LIB_DEFECTS
! // 402. wrong new expression in [some_] allocator::construct
! void
! construct(pointer __p, const _Tp& __val)
! { ::new(__p) _Tp(__val); }
!
! void
! destroy(pointer __p) { __p->~_Tp(); }
!
! pointer
! allocate(size_type __n, const void* = 0);
!
! void
! deallocate(pointer __p, size_type __n);
};
! template
inline bool
! operator==(const __pool_alloc<_Tp>&, const __pool_alloc<_Tp>&)
{ return true; }
! template
inline bool
! operator!=(const __pool_alloc<_Tp>&, const __pool_alloc<_Tp>&)
{ return false; }
// Allocate memory in large chunks in order to avoid fragmenting the
// heap too much. Assume that __n is properly aligned. We hold
// the allocation lock.
! template
char*
! __pool_base<__threads>::_S_chunk_alloc(size_t __n, int& __nobjs)
{
char* __result;
size_t __total_bytes = __n * __nobjs;
size_t __bytes_left = _S_end_free - _S_start_free;
!
if (__bytes_left >= __total_bytes)
! {
! __result = _S_start_free;
! _S_start_free += __total_bytes;
! return __result ;
! }
else if (__bytes_left >= __n)
! {
! __nobjs = (int)(__bytes_left / __n);
! __total_bytes = __n * __nobjs;
! __result = _S_start_free;
! _S_start_free += __total_bytes;
! return __result;
! }
else
! {
! size_t __bytes_to_get = (2 * __total_bytes
! + _S_round_up(_S_heap_size >> 4));
! // Try to make use of the left-over piece.
! if (__bytes_left > 0)
! {
! _Obj* volatile* __free_list = (_S_free_list
! + _S_freelist_index(__bytes_left));
!
! ((_Obj*)(void*)_S_start_free)->_M_free_list_link = *__free_list;
! *__free_list = (_Obj*)(void*)_S_start_free;
! }
!
! _S_start_free = static_cast(::operator new(__bytes_to_get));
! if (_S_start_free == 0)
! {
! size_t __i;
! _Obj* volatile* __free_list;
! _Obj* __p;
! // Try to make do with what we have. That can't hurt. We
! // do not try smaller requests, since that tends to result
! // in disaster on multi-process machines.
! __i = __n;
! for (; __i <= (size_t) _S_max_bytes; __i += (size_t) _S_align)
! {
! __free_list = _S_free_list + _S_freelist_index(__i);
! __p = *__free_list;
! if (__p != 0)
! {
! *__free_list = __p -> _M_free_list_link;
! _S_start_free = (char*)__p;
! _S_end_free = _S_start_free + __i;
! return _S_chunk_alloc(__n, __nobjs);
! // Any leftover piece will eventually make it to the
! // right free list.
! }
! }
! _S_end_free = 0; // In case of exception.
! _S_start_free = static_cast(::operator new(__bytes_to_get));
! // This should either throw an exception or remedy the situation.
! // Thus we assume it succeeded.
! }
! _S_heap_size += __bytes_to_get;
! _S_end_free = _S_start_free + __bytes_to_get;
! return _S_chunk_alloc(__n, __nobjs);
! }
}
!
// Returns an object of size __n, and optionally adds to "size
// __n"'s free list. We assume that __n is properly aligned. We
// hold the allocation lock.
! template
void*
! __pool_base<__threads>::_S_refill(size_t __n)
{
int __nobjs = 20;
char* __chunk = _S_chunk_alloc(__n, __nobjs);
*************** namespace __gnu_cxx
*** 249,266 ****
_Obj* __current_obj;
_Obj* __next_obj;
int __i;
!
if (1 == __nobjs)
! return __chunk;
__free_list = _S_free_list + _S_freelist_index(__n);
!
// Build free list in chunk.
__result = (_Obj*)(void*)__chunk;
*__free_list = __next_obj = (_Obj*)(void*)(__chunk + __n);
for (__i = 1; ; __i++)
! {
__current_obj = __next_obj;
! __next_obj = (_Obj*)(void*)((char*)__next_obj + __n);
if (__nobjs - 1 == __i)
{
__current_obj -> _M_free_list_link = 0;
--- 282,299 ----
_Obj* __current_obj;
_Obj* __next_obj;
int __i;
!
if (1 == __nobjs)
! return __chunk;
__free_list = _S_free_list + _S_freelist_index(__n);
!
// Build free list in chunk.
__result = (_Obj*)(void*)__chunk;
*__free_list = __next_obj = (_Obj*)(void*)(__chunk + __n);
for (__i = 1; ; __i++)
! {
__current_obj = __next_obj;
! __next_obj = (_Obj*)(void*)((char*)__next_obj + __n);
if (__nobjs - 1 == __i)
{
__current_obj -> _M_free_list_link = 0;
*************** namespace __gnu_cxx
*** 272,363 ****
return __result;
}
! template
! void*
! __pool_alloc<__threads, __inst>::allocate(size_t __n)
{
! void* __ret = 0;
!
! // If there is a race through here, assume answer from getenv
! // will resolve in same direction. Inspired by techniques
! // to efficiently support threading found in basic_string.h.
! if (_S_force_new == 0)
! {
! if (getenv("GLIBCXX_FORCE_NEW"))
! __atomic_add(&_S_force_new, 1);
! else
! __atomic_add(&_S_force_new, -1);
! }
!
! if ((__n > (size_t) _S_max_bytes) || (_S_force_new > 0))
! __ret = ::operator new(__n);
! else
{
! _Obj* volatile* __free_list = _S_free_list + _S_freelist_index(__n);
! // Acquire the lock here with a constructor call. This
! // ensures that it is released in exit or during stack
! // unwinding.
! _Lock __lock_instance;
! _Obj* __restrict__ __result = *__free_list;
! if (__builtin_expect(__result == 0, 0))
! __ret = _S_refill(_S_round_up(__n));
! else
{
! *__free_list = __result -> _M_free_list_link;
! __ret = __result;
}
! if (__builtin_expect(__ret == 0, 0))
__throw_bad_alloc();
}
return __ret;
}
! template
void
! __pool_alloc<__threads, __inst>::deallocate(void* __p, size_t __n)
{
! if ((__n > (size_t) _S_max_bytes) || (_S_force_new > 0))
! ::operator delete(__p);
! else
{
! _Obj* volatile* __free_list = _S_free_list + _S_freelist_index(__n);
! _Obj* __q = (_Obj*)__p;
! // Acquire the lock here with a constructor call. This
! // ensures that it is released in exit or during stack
! // unwinding.
! _Lock __lock_instance;
! __q -> _M_free_list_link = *__free_list;
! *__free_list = __q;
}
}
! template
! typename __pool_alloc<__threads, __inst>::_Obj* volatile
! __pool_alloc<__threads, __inst>::_S_free_list[_S_freelists];
! template
! char* __pool_alloc<__threads, __inst>::_S_start_free = 0;
! template
! char* __pool_alloc<__threads, __inst>::_S_end_free = 0;
! template
! size_t __pool_alloc<__threads, __inst>::_S_heap_size = 0;
! template
_STL_mutex_lock
! __pool_alloc<__threads, __inst>::_S_lock __STL_MUTEX_INITIALIZER;
!
! template _Atomic_word
! __pool_alloc<__threads, __inst>::_S_force_new = 0;
! // Inhibit implicit instantiations for required instantiations,
! // which are defined via explicit instantiations elsewhere.
! // NB: This syntax is a GNU extension.
! #if _GLIBCXX_EXTERN_TEMPLATE
! extern template class __pool_alloc;
! #endif
} // namespace __gnu_cxx
#endif
--- 305,404 ----
return __result;
}
! template
! _Tp*
! __pool_alloc<_Tp>::allocate(size_type __n, const void*)
{
! pointer __ret = 0;
! if (__n)
{
! if (__n <= max_size())
{
! const size_t __bytes = __n * sizeof(_Tp);
! // If there is a race through here, assume answer from getenv
! // will resolve in same direction. Inspired by techniques
! // to efficiently support threading found in basic_string.h.
! if (_S_force_new == 0)
! {
! if (getenv("GLIBCXX_FORCE_NEW"))
! __atomic_add(&_S_force_new, 1);
! else
! __atomic_add(&_S_force_new, -1);
! }
!
! if ((__bytes > (size_t) _S_max_bytes) || (_S_force_new > 0))
! __ret = static_cast<_Tp*>(::operator new(__bytes));
! else
! {
! _Obj* volatile* __free_list = (_S_free_list
! + _S_freelist_index(__bytes));
! // Acquire the lock here with a constructor call. This
! // ensures that it is released in exit or during stack
! // unwinding.
! _Lock __lock_instance;
! _Obj* __restrict__ __result = *__free_list;
! if (__builtin_expect(__result == 0, 0))
! __ret = static_cast<_Tp*>(_S_refill(_S_round_up(__bytes)));
! else
! {
! *__free_list = __result->_M_free_list_link;
! __ret = reinterpret_cast<_Tp*>(__result);
! }
! if (__builtin_expect(__ret == 0, 0))
! __throw_bad_alloc();
! }
}
! else
__throw_bad_alloc();
}
return __ret;
}
! template
void
! __pool_alloc<_Tp>::deallocate(pointer __p, size_type __n)
{
! if (__n)
{
! const size_t __bytes = __n * sizeof(_Tp);
! if ((__bytes > (size_t) _S_max_bytes) || (_S_force_new > 0))
! ::operator delete(__p);
! else
! {
! _Obj* volatile* __free_list = (_S_free_list
! + _S_freelist_index(__bytes));
! _Obj* __q = (_Obj*)__p;
! // Acquire the lock here with a constructor call. This
! // ensures that it is released in exit or during stack
! // unwinding.
! _Lock __lock_instance;
! __q -> _M_free_list_link = *__free_list;
! *__free_list = __q;
! }
}
}
! template
! typename __pool_base<__threads>::_Obj* volatile
! __pool_base<__threads>::_S_free_list[_S_freelists];
! template
! char* __pool_base<__threads>::_S_start_free = 0;
! template
! char* __pool_base<__threads>::_S_end_free = 0;
! template
! size_t __pool_base<__threads>::_S_heap_size = 0;
! template
_STL_mutex_lock
! __pool_base<__threads>::_S_lock __STL_MUTEX_INITIALIZER;
! template
! _Atomic_word
! __pool_base<__threads>::_S_force_new = 0;
} // namespace __gnu_cxx
#endif
diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/ext/rope gcc-3.4.1/libstdc++-v3/include/ext/rope
*** gcc-3.4.0/libstdc++-v3/include/ext/rope 2004-01-13 11:46:50.000000000 +0000
--- gcc-3.4.1/libstdc++-v3/include/ext/rope 2004-06-18 10:28:08.000000000 +0000
*************** class sequence_buffer : public iterator<
*** 215,221 ****
}
sequence_buffer& operator*() { return *this; }
sequence_buffer& operator++() { return *this; }
! sequence_buffer& operator++(int) { return *this; }
};
// The following should be treated as private, at least for now.
--- 215,221 ----
}
sequence_buffer& operator*() { return *this; }
sequence_buffer& operator++() { return *this; }
! sequence_buffer operator++(int) { return *this; }
};
// The following should be treated as private, at least for now.
*************** class _Rope_char_consumer {
*** 234,240 ****
// First a lot of forward declarations. The standard seems to require
// much stricter "declaration before use" than many of the implementations
// that preceded it.
! template > class rope;
template struct _Rope_RopeConcatenation;
template struct _Rope_RopeLeaf;
template struct _Rope_RopeFunction;
--- 234,240 ----
// First a lot of forward declarations. The standard seems to require
// much stricter "declaration before use" than many of the implementations
// that preceded it.
! template