diff options
author | Sichen Zhao <1473996754@qq.com> | 2017-08-25 15:35:39 +0800 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2017-08-25 18:00:46 +0200 |
commit | c206d0442279fb1c0e39f62112ceaae5630d9ef7 (patch) | |
tree | 1a6f96b0bd3ce7445ef87cf1d3fece5083dbe082 | |
parent | 3437665ac85455c18fbc4cc616fe2aeb373f6552 (diff) | |
download | cygnal-c206d0442279fb1c0e39f62112ceaae5630d9ef7.tar.gz cygnal-c206d0442279fb1c0e39f62112ceaae5630d9ef7.tar.bz2 cygnal-c206d0442279fb1c0e39f62112ceaae5630d9ef7.zip |
Port strnstr.c to newlib.
-rw-r--r-- | newlib/libc/include/string.h | 3 | ||||
-rw-r--r-- | newlib/libc/string/Makefile.am | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/newlib/libc/include/string.h b/newlib/libc/include/string.h index 7833aa156..9c536f35f 100644 --- a/newlib/libc/include/string.h +++ b/newlib/libc/include/string.h @@ -121,6 +121,9 @@ size_t _EXFUN(strnlen,(const char *, size_t)); #if __BSD_VISIBLE char *_EXFUN(strsep,(char **, const char *)); #endif +#if __BSD_VISIBLE +char *strnstr(const char *, const char *, size_t) __pure; +#endif #if __MISC_VISIBLE char *_EXFUN(strlwr,(char *)); diff --git a/newlib/libc/string/Makefile.am b/newlib/libc/string/Makefile.am index e62f28627..f8bd41e08 100644 --- a/newlib/libc/string/Makefile.am +++ b/newlib/libc/string/Makefile.am @@ -40,6 +40,7 @@ GENERAL_SOURCES = \ strncmp.c \ strncpy.c \ strnlen.c \ + strnstr.c \ strpbrk.c \ strrchr.c \ strsep.c \ |