summaryrefslogtreecommitdiff
path: root/ftp/wu-ftpd+ipv6/files
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2001-10-10 03:23:29 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2001-10-10 03:23:29 +0000
commit74cad0bec29d8ae2bafb701d4ce920ab0893140e (patch)
treeebfa61c87b58eb226269cb41eadb6a8804f365b6 /ftp/wu-ftpd+ipv6/files
parentadd gsculpt (diff)
Fix broken strcasestr() implementation.
Use FreeBSD's strcasestr() if present.
Notes
Notes: svn path=/head/; revision=48640
Diffstat (limited to 'ftp/wu-ftpd+ipv6/files')
-rw-r--r--ftp/wu-ftpd+ipv6/files/patch-af29
-rw-r--r--ftp/wu-ftpd+ipv6/files/patch-aj8
-rw-r--r--ftp/wu-ftpd+ipv6/files/patch-al39
3 files changed, 57 insertions, 19 deletions
diff --git a/ftp/wu-ftpd+ipv6/files/patch-af b/ftp/wu-ftpd+ipv6/files/patch-af
new file mode 100644
index 000000000000..fd46f44ebbd3
--- /dev/null
+++ b/ftp/wu-ftpd+ipv6/files/patch-af
@@ -0,0 +1,29 @@
+--- support/strcasestr.c.orig Sat Jul 1 22:36:29 2000
++++ support/strcasestr.c Wed Oct 10 07:18:17 2001
+@@ -24,22 +24,24 @@
+ $Id: strcasestr.c,v 1.5 2000/07/01 18:36:29 wuftpd Exp $
+
+ ****************************************************************************/
++#include <ctype.h>
+ #include <string.h>
+ /*
+ * Find the first occurrence of find in s.
+ */
+-char *strcasestr(register char *s, register char *find)
++char *strcasestr(const char *s, const char *find)
+ {
+ register char c, sc;
+ register size_t len;
+
+ if ((c = *find++) != 0) {
++ c = tolower((unsigned char)c);
+ len = strlen(find);
+ do {
+ do {
+ if ((sc = *s++) == 0)
+ return (NULL);
+- } while (sc != c);
++ } while ((char)tolower((unsigned char)sc) != c);
+ } while (strncasecmp(s, find, len) != 0);
+ s--;
+ }
diff --git a/ftp/wu-ftpd+ipv6/files/patch-aj b/ftp/wu-ftpd+ipv6/files/patch-aj
new file mode 100644
index 000000000000..c6478879e93a
--- /dev/null
+++ b/ftp/wu-ftpd+ipv6/files/patch-aj
@@ -0,0 +1,8 @@
+--- src/proto.h.bak Sat Jul 1 22:17:39 2000
++++ src/proto.h Wed Oct 10 07:15:39 2001
+@@ -292,4 +292,4 @@
+ /*
+ ** support/strcasestr.c
+ */
+-char *strcasestr(register char *s, register char *find);
++char *strcasestr(const char *s, const char *find);
diff --git a/ftp/wu-ftpd+ipv6/files/patch-al b/ftp/wu-ftpd+ipv6/files/patch-al
index 40568f198e15..1a9774087352 100644
--- a/ftp/wu-ftpd+ipv6/files/patch-al
+++ b/ftp/wu-ftpd+ipv6/files/patch-al
@@ -1,19 +1,20 @@
-*** support/makefiles/Makefile.fbs.orig Mon Oct 4 22:44:08 1999
---- support/makefiles/Makefile.fbs Wed Oct 20 20:32:42 1999
-***************
-*** 33,39 ****
- LIBC = /usr/lib/libc.a
- IFLAGS =
- LFLAGS =
-! CFLAGS = -O ${IFLAGS} ${LFLAGS}
-
- SRCS = strcasestr.c authuser.c ftw.c
- OBJS = strcasestr.o authuser.o ftw.o
---- 33,39 ----
- LIBC = /usr/lib/libc.a
- IFLAGS =
- LFLAGS =
-! CFLAGS += ${IFLAGS} ${LFLAGS}
-
- SRCS = strcasestr.c authuser.c ftw.c
- OBJS = strcasestr.o authuser.o ftw.o
+--- support/makefiles/Makefile.fbs.orig Sat Jul 1 22:22:55 2000
++++ support/makefiles/Makefile.fbs Wed Oct 10 07:11:36 2001
+@@ -33,7 +33,14 @@
+ LIBC = /usr/lib/libc.a
+ IFLAGS =
+ LFLAGS =
+-CFLAGS = -O ${IFLAGS} ${LFLAGS}
++CFLAGS += ${IFLAGS} ${LFLAGS}
+
+-SRCS = strcasestr.c authuser.c ftw.c
+-OBJS = strcasestr.o authuser.o ftw.o
++SRCS = authuser.c ftw.c
++OBJS = authuser.o ftw.o
++
++HAVE_STRSTR!= (nm ${LIBC} | grep -q strcasestr) || echo "NO"
++
++.if ${HAVE_STRSTR} == "NO"
++SRCS += strcasestr.c
++OBJS += strcasestr.o
++.endif