From c206d0442279fb1c0e39f62112ceaae5630d9ef7 Mon Sep 17 00:00:00 2001 From: Sichen Zhao <1473996754@qq.com> Date: Fri, 25 Aug 2017 15:35:39 +0800 Subject: Port strnstr.c to newlib. --- newlib/libc/include/string.h | 3 +++ newlib/libc/string/Makefile.am | 1 + 2 files changed, 4 insertions(+) (limited to 'newlib') 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 \ -- cgit v1.2.3