diff options
| author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-30 00:08:29 +0000 |
|---|---|---|
| committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-30 00:08:29 +0000 |
| commit | e543bfc049a9cc357d61d75df430a1924c14faf3 (patch) | |
| tree | 4062f59ed38873a74525cac1bcb73d7b5bb59f8a /libstdc++-v3/include/c_std | |
| parent | 6db3e8352fefa7e59317de8a9078f0c001289e3f (diff) | |
| download | ppe42-gcc-e543bfc049a9cc357d61d75df430a1924c14faf3.tar.gz ppe42-gcc-e543bfc049a9cc357d61d75df430a1924c14faf3.zip | |
* include/c_std/cstring (memchr, strchr, strpbrk, strrchr, strstr):
Provide inlines only if __CORRECT_ISO_CPP_STRING_H_PROTO is not
defined.
* include/c_std/cwchar (wcschr, wcspbrk, wcsrchr, wcsstr, wmemchr):
Provide inlines only if __CORRECT_ISO_CPP_WCHAR_H_PROTO is not
defined.
* include/c_global/cstring (memchr, strchr, strpbrk, strrchr, strstr):
Provide inlines only if __CORRECT_ISO_CPP_STRING_H_PROTO is not
defined.
* include/c_global/cwchar (wcschr, wcspbrk, wcsrchr, wcsstr, wmemchr):
Provide inlines only if __CORRECT_ISO_CPP_WCHAR_H_PROTO is not
defined.
* testsuite/21_strings/c_strings/char_t/2.cc (test02): If first
argument is const char *, assign result to const char * var, not
char *.
* testsuite/21_strings/c_strings/wchar_t/2.cc (test02): If first
argument is const wchar_t *, assign result to const wchar_t * var, not
wchar_t *.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143773 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/c_std')
| -rw-r--r-- | libstdc++-v3/include/c_std/cstring | 17 | ||||
| -rw-r--r-- | libstdc++-v3/include/c_std/cwchar | 17 |
2 files changed, 14 insertions, 20 deletions
diff --git a/libstdc++-v3/include/c_std/cstring b/libstdc++-v3/include/c_std/cstring index 5fef6b0086e..608e219cd7f 100644 --- a/libstdc++-v3/include/c_std/cstring +++ b/libstdc++-v3/include/c_std/cstring @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -94,36 +94,33 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::memset; using ::strerror; using ::strlen; - using ::memchr; + using ::strchr; + using ::strpbrk; + using ::strrchr; + using ::strstr; +#ifndef __CORRECT_ISO_CPP_STRING_H_PROTO inline void* memchr(void* __p, int __c, size_t __n) { return memchr(const_cast<const void*>(__p), __c, __n); } - using ::strchr; - inline char* strchr(char* __s1, int __n) { return __builtin_strchr(const_cast<const char*>(__s1), __n); } - using ::strpbrk; - inline char* strpbrk(char* __s1, const char* __s2) { return __builtin_strpbrk(const_cast<const char*>(__s1), __s2); } - using ::strrchr; - inline char* strrchr(char* __s1, int __n) { return __builtin_strrchr(const_cast<const char*>(__s1), __n); } - using ::strstr; - inline char* strstr(char* __s1, const char* __s2) { return __builtin_strstr(const_cast<const char*>(__s1), __s2); } +#endif _GLIBCXX_END_NAMESPACE diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar index 19ce17deceb..a6ffe0ab466 100644 --- a/libstdc++-v3/include/c_std/cwchar +++ b/libstdc++-v3/include/c_std/cwchar @@ -1,7 +1,7 @@ // -*- C++ -*- forwarding header. // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007 +// 2006, 2007, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -204,36 +204,33 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::wmemset; using ::wprintf; using ::wscanf; - using ::wcschr; + using ::wcspbrk; + using ::wcsrchr; + using ::wcsstr; + using ::wmemchr; +#ifndef __CORRECT_ISO_CPP_WCHAR_H_PROTO inline wchar_t* wcschr(wchar_t* __p, wchar_t __c) { return wcschr(const_cast<const wchar_t*>(__p), __c); } - using ::wcspbrk; - inline wchar_t* wcspbrk(wchar_t* __s1, const wchar_t* __s2) { return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); } - using ::wcsrchr; - inline wchar_t* wcsrchr(wchar_t* __p, wchar_t __c) { return wcsrchr(const_cast<const wchar_t*>(__p), __c); } - using ::wcsstr; - inline wchar_t* wcsstr(wchar_t* __s1, const wchar_t* __s2) { return wcsstr(const_cast<const wchar_t*>(__s1), __s2); } - using ::wmemchr; - inline wchar_t* wmemchr(wchar_t* __p, wchar_t __c, size_t __n) { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); } +#endif _GLIBCXX_END_NAMESPACE |

