diff options
author | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2002-07-31 19:34:08 +0000 |
---|---|---|
committer | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2002-07-31 19:34:08 +0000 |
commit | de17e154289f92cf2f5e15e07eea16891254f146 (patch) | |
tree | f10b1f504c2b36a4e1b8077cd4e3c1d5e2c62458 /libstdc++-v3/docs | |
parent | 17655a67d81dd80c3f0f211319f0752d5d0f2d84 (diff) | |
download | gcc-de17e154289f92cf2f5e15e07eea16891254f146.tar.gz |
[multiple changes]
2002-07-31 Simon Whomsley <whomsley@avacadcam.com>
* docs/html/22_locale/howto.html: Fix.
2002-07-31 Alex Kompel <shurik@sequoiap.com>
PR libstdc++/7445
* src/locale.cc (locale::classic): Move locks inside !_S_classic
block.
2002-07-31 Benjamin Kosnik <bkoz@redhat.com>
* docs/html/abi.txt: Update.
From-SVN: r55908
Diffstat (limited to 'libstdc++-v3/docs')
-rw-r--r-- | libstdc++-v3/docs/html/22_locale/howto.html | 29 | ||||
-rw-r--r-- | libstdc++-v3/docs/html/abi.txt | 118 |
2 files changed, 122 insertions, 25 deletions
diff --git a/libstdc++-v3/docs/html/22_locale/howto.html b/libstdc++-v3/docs/html/22_locale/howto.html index d8ada0464b1..e1e58056604 100644 --- a/libstdc++-v3/docs/html/22_locale/howto.html +++ b/libstdc++-v3/docs/html/22_locale/howto.html @@ -163,7 +163,7 @@ struct Toupper { - Toupper (std::locale const& l) : loc(l) {;} + Toupper(std::locale const& l) : loc(l) {;} char operator() (char c) { return std::toupper(c,loc); } private: std::locale const& loc; @@ -171,7 +171,7 @@ struct Tolower { - Tolower (std::locale const& l) : loc(l) {;} + Tolower(std::locale const& l) : loc(l) {;} char operator() (char c) { return std::tolower(c,loc); } private: std::locale const& loc; @@ -179,26 +179,21 @@ int main () { - std::string s ("Some Kind Of Initial Input Goes Here"); - Toupper up ( std::locale("C") ); - Tolower down ( std::locale("C") ); + std::string s("Some Kind Of Initial Input Goes Here"); + std::locale loc_c("C"); + Toupper up(loc_c); + Tolower down(loc_c); - // Change everything into upper case - std::transform (s.begin(), s.end(), s.begin(), - up - ); + // Change everything into upper case. + std::transform(s.begin(), s.end(), s.begin(), up); - // Change everything into lower case - std::transform (s.begin(), s.end(), s.begin(), - down - ); + // Change everything into lower case. + std::transform(s.begin(), s.end(), s.begin(), down); // Change everything back into upper case, but store the - // result in a different string + // result in a different string. std::string capital_s; - std::transform (s.begin(), s.end(), std::back_inserter(capital_s), - up - ); + std::transform(s.begin(), s.end(), std::back_inserter(capital_s), up); }</pre> </p> <p>The final version of the code uses <code>bind2nd</code> to eliminate diff --git a/libstdc++-v3/docs/html/abi.txt b/libstdc++-v3/docs/html/abi.txt index 175e743ae60..70ec6605a75 100644 --- a/libstdc++-v3/docs/html/abi.txt +++ b/libstdc++-v3/docs/html/abi.txt @@ -6,20 +6,24 @@ document exists, why it's incomplete, and what needs to be done still. =========================== -2002-07-23 Benjamin Kosnik +2002-07-30 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? -- scope of document, of use to system integrators. - - compilation includes and linked library binary must match up.. -- library ABI, compiler ABI different (but effects) +- 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 @@ -29,7 +33,99 @@ I. What is an ABI? What's covered? What's not? the complete list), but there is no version switch. Sorry. The GNU Project recommends that -- shared library only, static is immutable. +- 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. + + - Release versioning on the libstdc++.so binary. + + - Symbol versioning on the libgcc_s.so binary. + + - Symbol versioning on the libstdc++.so binary. + + - Incremental bumping of a compiler pre-defined macro, + __GXX_ABI_VERSION. 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. + + It is versioned as follows: + gcc-3.0.x: 100 + gcc-3.1.x: 100 + gcc-3.2.x: 101 + + Ask the compiler people why this makes sense, or what this macro means. + + - Incremental bumping of a library pre-defined macro, + __GLIBCPP__. 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: (20020731) + + - 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. + + 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" + gcc-3.0.2: "3.0.0" + gcc-3.0.3: "3.0.0" + gcc-3.0.4: "3.0.0" + gcc-3.1.0: "3.1.0" + gcc-3.1.1: "3.1.1" + gcc-3.2.0: ("3.2.0") + + - 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 heirarchy 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 @@ -81,11 +177,12 @@ 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". - - -II. ABI changes +- any g++ compiler ABI changes - (anything) changing size of an exported symbol @@ -97,6 +194,11 @@ II. ABI changes - (anything) adding or deleting an exported symbol +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 |