summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2010-10-14 17:11:39 +0000
committerHoward Hinnant <hhinnant@apple.com>2010-10-14 17:11:39 +0000
commita65a935ba4a18ae47cbe344bfdb1249f3d403d95 (patch)
treeda6e984f8aa99f25b86c2d620d62b0e9878f4820
parent7518ff0ddac976dba54a7aa3bcd84081c5cfd882 (diff)
downloadbcm5719-llvm-a65a935ba4a18ae47cbe344bfdb1249f3d403d95.tar.gz
bcm5719-llvm-a65a935ba4a18ae47cbe344bfdb1249f3d403d95.zip
Bug 7983 fixed by Bernhard Rosenkraenzer
llvm-svn: 116487
-rw-r--r--libcxx/include/cstring11
1 files changed, 7 insertions, 4 deletions
diff --git a/libcxx/include/cstring b/libcxx/include/cstring
index 06521d1e6b2..6d2e507c4d8 100644
--- a/libcxx/include/cstring
+++ b/libcxx/include/cstring
@@ -78,23 +78,26 @@ using ::strcoll;
using ::strxfrm;
using ::memchr;
-inline _LIBCPP_INLINE_VISIBILITY void* memchr( void* __s, int __c, size_t __n) {return ::memchr(__s, __c, __n);}
using ::strchr;
-inline _LIBCPP_INLINE_VISIBILITY char* strchr( char* __s, int __c) {return ::strchr(__s, __c);}
using ::strcspn;
using ::strpbrk;
-inline _LIBCPP_INLINE_VISIBILITY char* strpbrk( char* __s1, const char* __s2) {return ::strpbrk(__s1, __s2);}
using ::strrchr;
-inline _LIBCPP_INLINE_VISIBILITY char* strrchr( char* __s, int __c) {return ::strrchr(__s, __c);}
using ::strspn;
using ::strstr;
+
+#ifndef __GLIBC__ // GNU libc and its derivates already have the correct prototype in <string.h> #ifdef __cplusplus
+inline _LIBCPP_INLINE_VISIBILITY char* strchr( char* __s, int __c) {return ::strchr(__s, __c);}
+inline _LIBCPP_INLINE_VISIBILITY char* strpbrk( char* __s1, const char* __s2) {return ::strpbrk(__s1, __s2);}
+inline _LIBCPP_INLINE_VISIBILITY char* strrchr( char* __s, int __c) {return ::strrchr(__s, __c);}
+inline _LIBCPP_INLINE_VISIBILITY void* memchr( void* __s, int __c, size_t __n) {return ::memchr(__s, __c, __n);}
inline _LIBCPP_INLINE_VISIBILITY char* strstr( char* __s1, const char* __s2) {return ::strstr(__s1, __s2);}
+#endif
using ::strtok;
using ::memset;
OpenPOWER on IntegriCloud