[multiple changes]

2000-06-20  Anthony Williams  <anthony@anthonyw.cjb.net>

	* bits/string.tcc: Fix find.
	* testsuite/21_strings/find.cc: Patch.

2000-06-20  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* docs/install.html: Update where to get automake, where to get
	binutils.
	* acinclude.m4: Need -fno-builtins too, so gcc doesn't recognize
	builtins.

From-SVN: r34622
This commit is contained in:
Benjamin Kosnik 2000-06-20 23:14:37 +00:00
parent e5ec24021a
commit 60df8b81b3
7 changed files with 445 additions and 415 deletions

View File

@ -1,3 +1,15 @@
2000-06-20 Anthony Williams <anthony@anthonyw.cjb.net>
* bits/string.tcc: Fix find.
* testsuite/21_strings/find.cc: Patch.
2000-06-20 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
* docs/install.html: Update where to get automake, where to get
binutils.
* acinclude.m4: Need -fno-builtins too, so gcc doesn't recognize
builtins.
2000-06-19 Benjamin Kosnik <bkoz@soma.redhat.com>
* acinclude.m4 ((GLIBCPP_CHECK_MATH_SUPPORT): Revert last change.

View File

@ -900,10 +900,13 @@ dnl Define HAVE_CARGF etc if "cargf" is found.
dnl
dnl GLIBCPP_CHECK_MATH_SUPPORT
AC_DEFUN(GLIBCPP_CHECK_MATH_SUPPORT, [
dnl Work around bug on powerpc compiler
dnl Work around bug on powerpc compiler, where no long double is
dnl declared, yet functions defined with long double are in libm. Thus,
dnl the "C" math library has the prototypes implicitly declared, and
dnl everything works.
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS='-Werror-implicit-function-declaration'
CFLAGS='-Werror-implicit-function-declaration -fno-builtins'
dnl Check libm
AC_CHECK_LIB(m, sin, libm="-lm")

View File

@ -912,10 +912,10 @@ dnl Define HAVE_CARGF etc if "cargf" is found.
dnl
dnl GLIBCPP_CHECK_MATH_SUPPORT
AC_DEFUN(GLIBCPP_CHECK_MATH_SUPPORT, [
dnl Work around bug on powerpc compiler
dnl Work around bug on powerpc compiler
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS='-Werror-implicit-function-declaration'
CFLAGS='-Werror-implicit-function-declaration -fno-builtins'
dnl Check libm
AC_CHECK_LIB(m, sin, libm="-lm")

View File

@ -602,8 +602,7 @@ namespace std
size_t __xpos = __pos;
const _CharT* __data = _M_data();
for (; __xpos + __n <= this->size(); ++__xpos)
if (traits_type::eq(__data[__xpos], *__s)
&& traits_type::compare(__data + __xpos, __s, __n) == 0)
if (traits_type::compare(__data + __xpos, __s, __n) == 0)
return __xpos;
return npos;
}

799
libstdc++-v3/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@
<TITLE>libstdc++-v3 Installation Instructions</TITLE>
<LINK REL="home" HREF="http://sourceware.cygnus.com/libstdc++/">
<LINK REL=StyleSheet HREF="lib3styles.css">
<!-- $Id: install.html,v 1.1 2000/04/21 20:33:30 bkoz Exp $ -->
<!-- $Id: install.html,v 1.2 2000/06/19 22:20:15 bkoz Exp $ -->
</HEAD>
<BODY>
@ -48,12 +48,13 @@
GCC snapshots can be had from one of the sites on their
<A HREF="http://gcc.gnu.org/mirrors.html">mirror list</A>.
</P>
<P>In addition, if you plan to modify the makefiles or regenerate the
configure scripts: automake (version 1.4 from Cygnus, not the one on
the net. It's available
<A HREF="ftp://sourceware.cygnus.com/pub/libstdc++/000215-automake.tar.gz">here</A>
and autoconf (version 2.13 and higher), which is available
<A HREF="ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz">here</A>.
<P>In addition, if you plan to modify the makefiles or regenerate
the configure scripts you'll need the nuevo automake (version
1.4 from Cygnus, not the one on the net. In addition, libtool
and autoconf are also required to be installed in the same
location as the new automake: you can get them all in one
easy-to-use tarball
<A HREF="ftp://sourceware.cygnus.com/pub/libstdc++/20000619-maintainer-tools.tar.gz"> here</A>.
</P>
<P>If you don't have bash, and want to run <TT>'make check'</TT> to
test your build, you'll need to get bash 2.x. Also recommended
@ -67,7 +68,8 @@
obtain maximum benefit from this, binutils after this date should
also be used (bugs were fixed with c++ exception handling related
to this change in libstdc++-v3.) The version of these tools should
be: <TT>2.10.90</TT>
be: <TT>2.10.90</TT>, and you can get snapshots (as well as releases) of binutils
<A HREF="ftp://sourceware.cygnus.com/pub/binutils"> here</A>.
</P>
<P>Finally, if you are using cygwin to compile libstdc++-v3 on
@ -379,7 +381,7 @@ To rebuild just libstdc++, use:
Comments and suggestions are welcome, and may be sent to
<A HREF="mailto:pme@sourceware.cygnus.com">Phil Edwards</A> or
<A HREF="mailto:gdr@egcs.cygnus.com">Gabriel Dos Reis</A>.
<BR> $Id: install.html,v 1.1 2000/04/21 20:33:30 bkoz Exp $
<BR> $Id: install.html,v 1.2 2000/06/19 22:20:15 bkoz Exp $
</EM></P>

View File

@ -56,10 +56,16 @@ bool test01(void)
test &= csz01 == 8;
csz01 = str01.find(str03, 12);
test &= csz01 == npos;
// An empty string consists of no characters
// therefore it should be found at every point in a string,
// except beyond the end
csz01 = str01.find(str04, 0);
test &= csz01 == 0;
csz01 = str01.find(str04, 5);
test &= csz01 == 5;
csz01 = str01.find(str04, str01.size());
test &= csz01 == npos;
// size_type find(const char* s, size_type pos, size_type n) const;
csz01 = str01.find(str_lit01, 0, 3);
@ -71,7 +77,7 @@ bool test01(void)
csz01 = str01.find(str_lit01);
test &= csz01 == 0;
csz01 = str01.find(str_lit01, 3);
test &= csz01 == npos;
test &= csz01 == 3; // zero length string should be found at pos
// size_type find(char c, size_type pos = 0) const;
csz01 = str01.find('z');
@ -80,7 +86,6 @@ bool test01(void)
csz01 = str01.find('/');
test &= csz01 == npos;
// size_type find_first_of(const string&, size_type pos = 0) const;
std::string str05("xena rulez");
csz01 = str01.find_first_of(str01);
@ -105,14 +110,12 @@ bool test01(void)
// An empty string consists of no characters
// therefore it should be found at every point in a string,
// except beyond the end
// However, str1.find_first_of(str2,pos) finds the first character in
// str1 (starting at pos) that exists in str2, which is none for empty str2
csz01 = str01.find_first_of(str04, 0);
test &= csz01 == npos;
csz01 = str01.find_first_of(str04, 5);
test &= csz01 == npos;
csz01 = str01.find(str04, str01.size());
test &= csz01 == str01.size();
csz01 = str01.find(str04, str01.size() + 1);
test &= csz01 == npos;
// size_type find_first_of(const char* s, size_type pos, size_type n) const;
csz01 = str01.find_first_of(str_lit01, 0, 3);