This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH v3 2/2] Port strnstr.c to newlib.
- From: Sichen Zhao <1473996754 at qq dot com>
- To: newlib at sourceware dot org
- Cc: gedare at rtems dot org, joel at rtems dot org, christian dot mauderer at embedded-brains dot de, sebastian dot huber at embedded-brains dot de, Sichen Zhao <1473996754 at qq dot com>
- Date: Fri, 25 Aug 2017 15:35:39 +0800
- Subject: [PATCH v3 2/2] Port strnstr.c to newlib.
- Authentication-results: sourceware.org; auth=none
- Feedback-id: esmtp:qq.com:bgforeign:bgforeign3
- References: <1503646539-20199-1-git-send-email-1473996754@qq.com>
---
newlib/libc/include/string.h | 3 +++
newlib/libc/string/Makefile.am | 1 +
2 files changed, 4 insertions(+)
diff --git a/newlib/libc/include/string.h b/newlib/libc/include/string.h
index 7833aa1..9c536f3 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 e62f286..f8bd41e 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 \
--
2.7.4