From 21e04a0b9b5dca99d821dbcf77717956163a103e Mon Sep 17 00:00:00 2001 From: Maxim Sobolev Date: Wed, 19 Dec 2001 14:43:59 +0000 Subject: [PATCH] Unbroke on -current: don't prototype/implement strnstr(3) - this function is already in libc. --- lang/eperl/files/patch-eperl_parse.c | 26 ++++++++++++++++++++++++++ lang/eperl/files/patch-eperl_proto.h | 13 +++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 lang/eperl/files/patch-eperl_parse.c create mode 100644 lang/eperl/files/patch-eperl_proto.h diff --git a/lang/eperl/files/patch-eperl_parse.c b/lang/eperl/files/patch-eperl_parse.c new file mode 100644 index 000000000000..fe0ee26898cc --- /dev/null +++ b/lang/eperl/files/patch-eperl_parse.c @@ -0,0 +1,26 @@ + +$FreeBSD$ + +--- eperl_parse.c 2001/12/19 14:40:20 1.1 ++++ eperl_parse.c 2001/12/19 14:40:33 +@@ -298,20 +298,6 @@ + return NULL; + } + +-char *strnstr(char *buf, char *str, int n) +-{ +- char *cp; +- char *cpe; +- int len; +- +- len = strlen(str); +- for (cp = buf, cpe = buf+n-len; cp <= cpe; cp++) { +- if (strncmp(cp, str, len) == 0) +- return cp; +- } +- return NULL; +-} +- + char *strncasestr(char *buf, char *str, int n) + { + char *cp; diff --git a/lang/eperl/files/patch-eperl_proto.h b/lang/eperl/files/patch-eperl_proto.h new file mode 100644 index 000000000000..4038c60b440f --- /dev/null +++ b/lang/eperl/files/patch-eperl_proto.h @@ -0,0 +1,13 @@ + +$FreeBSD$ + +--- eperl_proto.h 2001/12/19 14:37:46 1.1 ++++ eperl_proto.h 2001/12/19 14:39:24 +@@ -79,7 +79,6 @@ + extern char *ePerl_Efwrite(char *cpBuf, int nBuf, int cNum, char *cpOut); + extern char *ePerl_Cfwrite(char *cpBuf, int nBuf, int cNum, char *cpOut); + extern char *strnchr(char *buf, char chr, int n); +-extern char *strnstr(char *buf, char *str, int n); + extern char *strncasestr(char *buf, char *str, int n); + extern char *strndup(char *buf, int n); + extern char *ePerl_Bristled2Plain(char *cpBuf);