diff options
| author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-16 01:03:20 +0000 |
|---|---|---|
| committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-16 01:03:20 +0000 |
| commit | e6ad417572ba4de6ca183f18142ccc4243a98f2b (patch) | |
| tree | 8bf2e6ad149a58f65aa22945786c62f4e8a30c65 | |
| parent | 42ded3a1f725cdbfbaf3f31a0ad6e3ca1964a9e2 (diff) | |
| download | ppe42-gcc-e6ad417572ba4de6ca183f18142ccc4243a98f2b.tar.gz ppe42-gcc-e6ad417572ba4de6ca183f18142ccc4243a98f2b.zip | |
* mkcheckin.in: Move check for bash version 2 later in the file.
* include/bits/basic_string.h (basic_string::_Rep::_S_max_size):
Make it const.
(basic_string::_Rep::_S_terminal): Likewise.
* include/bits/string.tcc (basic_string::_Rep::_S_max_size):
Likewise.
(basic_string::_Rep::_S_terminal): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37490 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | libstdc++-v3/ChangeLog | 11 | ||||
| -rw-r--r-- | libstdc++-v3/include/bits/basic_string.h | 4 | ||||
| -rw-r--r-- | libstdc++-v3/include/bits/string.tcc | 8 | ||||
| -rwxr-xr-x | libstdc++-v3/mkcheck.in | 13 |
4 files changed, 23 insertions, 13 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2861d5bdc8f..1de4d678351 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,14 @@ +2000-11-15 Mark Mitchell <mark@codesourcery.com> + + * mkcheckin.in: Move check for bash version 2 later in the file. + + * include/bits/basic_string.h (basic_string::_Rep::_S_max_size): + Make it const. + (basic_string::_Rep::_S_terminal): Likewise. + * include/bits/string.tcc (basic_string::_Rep::_S_max_size): + Likewise. + (basic_string::_Rep::_S_terminal): Likewise. + 2000-11-15 David Billinghurst <David.Billinghurst@riotinto.com> * mkcheck.in: Add function size_command() for irix. diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index 60795f7b72e..6f3b3726c03 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -131,8 +131,8 @@ namespace std { // Solving for m: // m = ((npos - sizeof(_Rep))/sizeof(CharT)) - 1 // In addition, this implementation quarters this ammount. - static size_type _S_max_size; - static _CharT _S_terminal; + static const size_type _S_max_size; + static const _CharT _S_terminal; size_type _M_length; size_type _M_capacity; diff --git a/libstdc++-v3/include/bits/string.tcc b/libstdc++-v3/include/bits/string.tcc index 82a5a7af8ff..386108d8405 100644 --- a/libstdc++-v3/include/bits/string.tcc +++ b/libstdc++-v3/include/bits/string.tcc @@ -44,23 +44,23 @@ namespace std { template<typename _CharT, typename _Traits, typename _Alloc> - _CharT + const _CharT basic_string<_CharT, _Traits, _Alloc>:: _Rep::_S_terminal = _CharT(); template<typename _CharT, typename _Traits, typename _Alloc> - typename basic_string<_CharT, _Traits, _Alloc>::size_type + const typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: _Rep::_S_max_size = (((npos - sizeof(_Rep))/sizeof(_CharT)) - 1) / 4; template<typename _CharT, typename _Traits, typename _Alloc> - const basic_string<_CharT, _Traits, _Alloc>::size_type + const typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>::npos; // Linker sets _S_empty_rep_storage to all 0s (one reference, empty string) // at static init time (before static ctors are run). template<typename _CharT, typename _Traits, typename _Alloc> - basic_string<_CharT, _Traits, _Alloc>::size_type + typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>::_S_empty_rep_storage[ (sizeof(_Rep) + sizeof(_CharT) + sizeof(size_type) - 1)/sizeof(size_type)]; diff --git a/libstdc++-v3/mkcheck.in b/libstdc++-v3/mkcheck.in index 066853a1ab2..9d676e8c85c 100755 --- a/libstdc++-v3/mkcheck.in +++ b/libstdc++-v3/mkcheck.in @@ -19,13 +19,6 @@ ### XXX Note that breaking out of this with ^C will not work. Dunno why. -# This has been true all along. Found out about it the hard way... -case $BASH_VERSION in - 1*) echo 'You need bash 2.x to run mkcheck. Exiting.'; exit 1 ;; - *) ;; # ?? -esac - - # # 1: variables # @@ -91,6 +84,12 @@ if [ $WHICH -eq 2 ]; then exit 0; fi +# This has been true all along. Found out about it the hard way... +case $BASH_VERSION in + 1*) echo 'You need bash 2.x to run mkcheck. Exiting.'; exit 1 ;; + *) ;; # ?? +esac + # It's not dejagnu; we need to do things ourselves. Pick up any extra # settings for this target. . ${top_srcdir}/configure.target |

