aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Oldham <oldham@codesourcery.com>2001-06-04 15:46:03 +0000
committerJeffrey D. Oldham <oldham@gcc.gnu.org>2001-06-04 15:46:03 +0000
commit1007e271a35fcfc9959b769807d7b2591d64d5fb (patch)
tree51098b41682138295c206dcaa84d140438439d0c
parent6bdfaf09101d7f64d10932aa1d8e48ddc4a8b477 (diff)
downloadgcc-1007e271a35fcfc9959b769807d7b2591d64d5fb.zip
gcc-1007e271a35fcfc9959b769807d7b2591d64d5fb.tar.gz
gcc-1007e271a35fcfc9959b769807d7b2591d64d5fb.tar.bz2
char_traits.h (move): Qualify memmove with std::.
2001-06-04 Jeffrey Oldham <oldham@codesourcery.com> * include/bits/char_traits.h (move): Qualify memmove with std::. (copy): Qualify memcpy with std::. * testsuite/27_io/filebuf_virtuals.cc (test01): Qualify strlen and strncmp with std::. (test02): Likewise. * testsuite/27_io/stringbuf_virtuals.cc (test01): Likewise. From-SVN: r42854
-rw-r--r--libstdc++-v3/ChangeLog9
-rw-r--r--libstdc++-v3/include/bits/char_traits.h4
-rw-r--r--libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc8
-rw-r--r--libstdc++-v3/testsuite/27_io/stringbuf_virtuals.cc4
4 files changed, 17 insertions, 8 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 0fba2fe..0abbf73 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,12 @@
+2001-06-04 Jeffrey Oldham <oldham@codesourcery.com>
+
+ * include/bits/char_traits.h (move): Qualify memmove with std::.
+ (copy): Qualify memcpy with std::.
+ * testsuite/27_io/filebuf_virtuals.cc (test01): Qualify strlen and
+ strncmp with std::.
+ (test02): Likewise.
+ * testsuite/27_io/stringbuf_virtuals.cc (test01): Likewise.
+
2001-06-04 Hans-Peter Nilsson <hp@axis.com>
* libsupc++/Makefile.am (install-glibcppinstallHEADERS,
diff --git a/libstdc++-v3/include/bits/char_traits.h b/libstdc++-v3/include/bits/char_traits.h
index b98a304..73cce51 100644
--- a/libstdc++-v3/include/bits/char_traits.h
+++ b/libstdc++-v3/include/bits/char_traits.h
@@ -93,11 +93,11 @@ namespace std
static char_type*
move(char_type* __s1, const char_type* __s2, size_t __n)
- { return (char_type*) memmove(__s1, __s2, __n * sizeof(char_type)); }
+ { return (char_type*) std::memmove(__s1, __s2, __n * sizeof(char_type)); }
static char_type*
copy(char_type* __s1, const char_type* __s2, size_t __n)
- { return (char_type*) memcpy(__s1, __s2, __n * sizeof(char_type)); }
+ { return (char_type*) std::memcpy(__s1, __s2, __n * sizeof(char_type)); }
static char_type*
assign(char_type* __s, size_t __n, char_type __a)
diff --git a/libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc b/libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc
index 50860cb..bcf0503 100644
--- a/libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc
+++ b/libstdc++-v3/testsuite/27_io/filebuf_virtuals.cc
@@ -30,12 +30,12 @@ void test01()
bool test = true;
char buf[512];
const char* strlit = "how to tell a story and other essays: mark twain";
- const size_t strlitsize = strlen(strlit);
+ const size_t strlitsize = std::strlen(strlit);
filebuf fbuf01;
fbuf01.pubsetbuf(buf, 512);
fbuf01.sputn(strlit, strlitsize);
- VERIFY( strncmp(strlit, buf, strlitsize) != 0 );
+ VERIFY( std::strncmp(strlit, buf, strlitsize) != 0 );
}
void test02()
@@ -45,13 +45,13 @@ void test02()
bool test = true;
char buf[512];
const char* strlit = "how to tell a story and other essays: mark twain";
- const size_t strlitsize = strlen(strlit);
+ const size_t strlitsize = std::strlen(strlit);
filebuf fbuf01;
fbuf01.open("tmp", ios_base::out);
fbuf01.pubsetbuf(buf, strlitsize);
fbuf01.sputn(strlit, strlitsize);
- VERIFY( strncmp(strlit, buf, strlitsize) == 0 );
+ VERIFY( std::strncmp(strlit, buf, strlitsize) == 0 );
}
main()
diff --git a/libstdc++-v3/testsuite/27_io/stringbuf_virtuals.cc b/libstdc++-v3/testsuite/27_io/stringbuf_virtuals.cc
index ebaf92cc..ff367c9 100644
--- a/libstdc++-v3/testsuite/27_io/stringbuf_virtuals.cc
+++ b/libstdc++-v3/testsuite/27_io/stringbuf_virtuals.cc
@@ -30,12 +30,12 @@ void test01()
bool test = true;
char buf[512];
const char* strlit = "how to tell a story and other essays: mark twain";
- const size_t strlitsize = strlen(strlit);
+ const size_t strlitsize = std::strlen(strlit);
stringbuf sbuf(ios_base::out);
sbuf.pubsetbuf(buf, strlitsize);
sbuf.sputn(strlit, strlitsize);
- VERIFY( strncmp(strlit, buf, strlitsize) != 0 );
+ VERIFY( std::strncmp(strlit, buf, strlitsize) != 0 );
}
int main()