From 2b1fecd252fb19e34970c6da9dda73edb7b75785 Mon Sep 17 00:00:00 2001 From: ache Date: Wed, 10 Oct 2001 03:23:29 +0000 Subject: Fix broken strcasestr() implementation. Use FreeBSD's strcasestr() if present. --- ftp/wu-ftpd+ipv6/Makefile | 2 +- ftp/wu-ftpd+ipv6/files/patch-af | 29 +++++++++++++++++++++++++++++ ftp/wu-ftpd+ipv6/files/patch-aj | 8 ++++++++ ftp/wu-ftpd+ipv6/files/patch-al | 39 ++++++++++++++++++++------------------- ftp/wu-ftpd/Makefile | 2 +- ftp/wu-ftpd/files/patch-af | 29 +++++++++++++++++++++++++++++ ftp/wu-ftpd/files/patch-aj | 8 ++++++++ ftp/wu-ftpd/files/patch-al | 39 ++++++++++++++++++++------------------- 8 files changed, 116 insertions(+), 40 deletions(-) create mode 100644 ftp/wu-ftpd+ipv6/files/patch-af create mode 100644 ftp/wu-ftpd+ipv6/files/patch-aj create mode 100644 ftp/wu-ftpd/files/patch-af create mode 100644 ftp/wu-ftpd/files/patch-aj (limited to 'ftp') diff --git a/ftp/wu-ftpd+ipv6/Makefile b/ftp/wu-ftpd+ipv6/Makefile index e337214c2c96..12990fd04ea6 100644 --- a/ftp/wu-ftpd+ipv6/Makefile +++ b/ftp/wu-ftpd+ipv6/Makefile @@ -9,7 +9,7 @@ PORTNAME= wu-ftpd PORTVERSION= 2.6.1 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= ftp DIST_SUBDIR= wu-ftpd MASTER_SITES= ftp://ftp.wu-ftpd.org/pub/wu-ftpd/ 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 + #include + /* + * 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 diff --git a/ftp/wu-ftpd/Makefile b/ftp/wu-ftpd/Makefile index e337214c2c96..12990fd04ea6 100644 --- a/ftp/wu-ftpd/Makefile +++ b/ftp/wu-ftpd/Makefile @@ -9,7 +9,7 @@ PORTNAME= wu-ftpd PORTVERSION= 2.6.1 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= ftp DIST_SUBDIR= wu-ftpd MASTER_SITES= ftp://ftp.wu-ftpd.org/pub/wu-ftpd/ diff --git a/ftp/wu-ftpd/files/patch-af b/ftp/wu-ftpd/files/patch-af new file mode 100644 index 000000000000..fd46f44ebbd3 --- /dev/null +++ b/ftp/wu-ftpd/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 + #include + /* + * 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/files/patch-aj b/ftp/wu-ftpd/files/patch-aj new file mode 100644 index 000000000000..c6478879e93a --- /dev/null +++ b/ftp/wu-ftpd/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/files/patch-al b/ftp/wu-ftpd/files/patch-al index 40568f198e15..1a9774087352 100644 --- a/ftp/wu-ftpd/files/patch-al +++ b/ftp/wu-ftpd/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 -- cgit