summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-03-21 14:33:15 +0000
committerAlexey Samsonov <samsonov@google.com>2012-03-21 14:33:15 +0000
commit9113f3e00029eebdcdc0cd94923f2ef6df74fd76 (patch)
treea67bc1d386dec35b606289553454ec9bd2d82b5d
parentabbcccc187bd350ca1e22dfef04c2cb3a3f40eb6 (diff)
downloadbcm5719-llvm-9113f3e00029eebdcdc0cd94923f2ef6df74fd76.tar.gz
bcm5719-llvm-9113f3e00029eebdcdc0cd94923f2ef6df74fd76.zip
[asan] add missing declarations from string.h and remove this header
llvm-svn: 153187
-rw-r--r--compiler-rt/lib/asan/asan_interceptors.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler-rt/lib/asan/asan_interceptors.cc b/compiler-rt/lib/asan/asan_interceptors.cc
index 677ed2d4dbc..3378c5ab5fd 100644
--- a/compiler-rt/lib/asan/asan_interceptors.cc
+++ b/compiler-rt/lib/asan/asan_interceptors.cc
@@ -28,7 +28,6 @@
// FIXME(samsonov): Gradually replace system headers with declarations of
// intercepted functions.
#include <pthread.h>
-#include <string.h>
#endif // __APPLE__
// Use extern declarations of intercepted functions on Mac and Windows
@@ -56,6 +55,7 @@ void* memcpy(void *to, const void *from, size_t size);
void* memset(void *block, int c, size_t size);
# if defined(__APPLE__)
char* strchr(const char *str, int c);
+char* index(const char *string, int c);
# elif defined(_WIN32)
char* strchr(const char *s, char c);
# endif
@@ -64,6 +64,12 @@ char* strcpy(char *to, const char* from); // NOLINT
char* strncpy(char *to, const char* from, size_t size);
int strcmp(const char *s1, const char* s2);
int strncmp(const char *s1, const char* s2, size_t size);
+# if !defined(_WIN32)
+int strcasecmp(const char *s1, const char *s2);
+int strncasecmp(const char *s1, const char *s2, size_t n);
+char* strdup(const char *s);
+# endif
+size_t strlen(const char *s);
# if !defined(__APPLE__)
size_t strnlen(const char *s, size_t maxlen);
# endif
OpenPOWER on IntegriCloud