wu-ftpd-2.4.2-beta-15 for NEWS-OS 4.2 patch
-------------------------------------------

* This patch is based on Hiroyuki Katayama's "wu-ftpd-2.4 NEWS-OS 4.x
  support patch".  It was posted to fj.sys.news newsgroup, message-id
  is <KATA.95Jan8141908@demeter.rokoh.gen.u-tokyo.ac.jp>.  You can 
  get this article from:

  <ftp://ftp.st.ryukoku.ac.jp/pub/sony-news/netnews-digest/wu-ftpd-2.4-newsos4.part5>

  A little modificatin was added by me, for wu-ftpd 2.4.2-beta-15.

* To use this patch, you need to install 'missing-func-news' library 
  (-lmissing) and GNU gcc before wu-ftpd install.  You can get 
  'missing-func-news' library from:

  <ftp://ftp.st.ryukoku.ac.jp/pub/sony-news/missing-func-news/>

  You can get GNU gcc from many GNU mirror sites in the world, and
  you can read installation memo from:

  <http://www-jkn.ee.uec.ac.jp/root/usr.local.src/>

  Its very nice.

* This patch will support NEWS-OS 4.2 or later, but I tested this patch
  on NEWS-OS 4.2.1C only.

- kjm@rins.ryukoku.ac.jp

diff -urN ../mimas/wu-ftpd-2.4.2-beta-15.org/build wu-ftpd-2.4.2-beta-15/build
--- ../mimas/wu-ftpd-2.4.2-beta-15.org/build	Sat Sep 13 00:44:00 1997
+++ wu-ftpd-2.4.2-beta-15/build	Fri Nov 14 19:58:13 1997
@@ -19,6 +19,7 @@
   hpx    : HP-UX
   lnx    : Linux (tested on 1.3.X and 2.0.0)
   nbs    : NetBSD 1.X
+  n42    : NEWS-OS 4.2 with gcc/libmissing
   nx2    : NeXTstep 2.x
   nx3    : NeXTstep 3.x
   osf    : OSF/1
diff -urN ../mimas/wu-ftpd-2.4.2-beta-15.org/makefiles/Makefile.n42 wu-ftpd-2.4.2-beta-15/makefiles/Makefile.n42
--- ../mimas/wu-ftpd-2.4.2-beta-15.org/makefiles/Makefile.n42	Thu Jan  1 09:00:00 1970
+++ wu-ftpd-2.4.2-beta-15/makefiles/Makefile.n42	Thu Nov 13 17:40:18 1997
@@ -0,0 +1,30 @@
+BINDIR=		/usr/etc
+ETCDIR=		/usr/etc
+MANDIR=		/usr/man
+MANEXT=		8
+INSTALL=	/bin/install
+
+all:
+	@ echo 'Use the "build" command (shell script) to make ftpd.'
+	@ echo 'You can say "build help" for details on how it works.'
+
+install: bin/ftpd bin/ftpcount bin/ftpshut
+	-mv -f ${ETCDIR}/ftpd ${ETCDIR}/ftpd-old
+	@echo installing binaries.
+	${INSTALL} -c -o bin -g bin -m 755 bin/ftpd ${ETCDIR}/ftpd
+	${INSTALL} -c -o bin -g bin -m 755 bin/ftpshut ${BINDIR}/ftpshut
+	${INSTALL} -c -o bin -g bin -m 755 bin/ftpcount ${BINDIR}/ftpcount
+	${INSTALL} -c -o bin -g bin -m 755 bin/ftpwho ${BINDIR}/ftpwho
+	@echo installing manpages.
+	${INSTALL} -c -o bin -g bin -m 755 doc/ftpd.8 ${MANDIR}/man8/ftpd.8
+	${INSTALL} -c -o bin -g bin -m 755 doc/ftpcount.1 ${MANDIR}/man1/ftpcount.1
+	${INSTALL} -c -o bin -g bin -m 755 doc/ftpwho.1 ${MANDIR}/man1/ftpwho.1
+	${INSTALL} -c -o bin -g bin -m 755 doc/ftpshut.8 ${MANDIR}/man8/ftpshut.8
+	${INSTALL} -c -o bin -g bin -m 755 doc/ftpaccess.5 ${MANDIR}/man5/ftpaccess.5
+	${INSTALL} -c -o bin -g bin -m 755 doc/ftphosts.5 ${MANDIR}/man5/ftphosts.5
+	${INSTALL} -c -o bin -g bin -m 755 doc/ftpconversions.5 ${MANDIR}/man5/ftpconversions.5
+	${INSTALL} -c -o bin -g bin -m 755 doc/xferlog.5 ${MANDIR}/man5/xferlog.5
+
+
+
+
diff -urN ../mimas/wu-ftpd-2.4.2-beta-15.org/src/config/config.n42 wu-ftpd-2.4.2-beta-15/src/config/config.n42
--- ../mimas/wu-ftpd-2.4.2-beta-15.org/src/config/config.n42	Thu Jan  1 09:00:00 1970
+++ wu-ftpd-2.4.2-beta-15/src/config/config.n42	Thu Nov 13 19:19:36 1997
@@ -0,0 +1,36 @@
+#define HAVE_SYMLINK
+/* #define BSD */
+#undef  HAVE_DIRENT
+#undef  HAVE_D_NAMLEN
+#define HAVE_FLOCK
+#undef  HAVE_FTW
+#undef  HAVE_GETCWD
+#define HAVE_GETDTABLESIZE
+#undef  HAVE_PSTAT
+#define HAVE_ST_BLKSIZE
+#undef  HAVE_SYSINFO
+#define HAVE_UT_UT_HOST
+#define HAVE_VPRINTF
+#define OVERWRITE
+#undef  REGEX
+#define SETPROCTITLE
+#undef  SHADOW_PASSWORD
+#define UPLOAD
+#undef  USG
+
+/* #include <malloc.h> */
+#include <stdlib.h>
+#include <unistd.h>
+#include <ctype.h>
+
+#ifndef FACILITY
+#define FACILITY LOG_DAEMON
+#endif
+
+#define	NGROUPS_MAX	16
+
+typedef void	SIGNAL_TYPE;
+typedef unsigned short	mode_t;
+typedef int	pid_t;
+
+#include "../config.h"
diff -urN ../mimas/wu-ftpd-2.4.2-beta-15.org/src/makefiles/Makefile.n42 wu-ftpd-2.4.2-beta-15/src/makefiles/Makefile.n42
--- ../mimas/wu-ftpd-2.4.2-beta-15.org/src/makefiles/Makefile.n42	Thu Jan  1 09:00:00 1970
+++ wu-ftpd-2.4.2-beta-15/src/makefiles/Makefile.n42	Fri Nov 14 19:59:40 1997
@@ -0,0 +1,60 @@
+# Makefile for NEWS-OS 4.2.1 with gcc/libmissing
+# This configuration has not been verified by Stan Barber
+# $Id$
+#
+CC       = gcc
+IFLAGS   = -I.. -I../support
+LFLAGS   = -L../support
+CFLAGS   = -O -DNO_MALLOC_PROTO ${IFLAGS} ${LFLAGS}
+LIBES    = -lsupport -L/usr/local/lib -lmissing
+LIBC     = /lib/libc.a
+LINTFLAGS=	
+LKERB    = -lauth -lckrb -lkrb -ldes
+MKDEP    = ../util/mkdep
+
+SRCS   = ftpd.c ftpcmd.c glob.c logwtmp.c popen.c vers.c access.c extensions.c \
+	 realpath.c acl.c private.c authenticate.c conversions.c hostacc.c \
+	 sigfix.c
+OBJS   = ftpd.o ftpcmd.o glob.o logwtmp.o popen.o vers.o access.o extensions.o \
+	 realpath.o acl.o private.o authenticate.o conversions.o hostacc.o \
+	 sigfix.o
+
+all: ftpd ftpcount ftpshut ckconfig
+
+ftpcount:	ftpcount.c pathnames.h vers.o
+	${CC} ${CFLAGS} -o $@ ftpcount.c vers.o ${LIBES}
+
+ftpshut:    ftpshut.c pathnames.h vers.o
+	${CC} ${CFLAGS} -o $@ ftpshut.c vers.o ${LIBES}
+
+ftpd: ${OBJS} ${LIBC}
+	${CC} ${CFLAGS} -o $@ ${OBJS} ${LIBES}
+
+ckconfig:   ckconfig.c
+	${CC} ${CFLAGS} -o $@ ckconfig.c
+
+index:	index.o ${LIBC}
+	${CC} -Bstatic -o $@ index.o
+
+vers.c: ftpcmd.c
+	sh newvers.sh
+
+vers.o: vers.c
+	${CC} ${CFLAGS} -c vers.c
+
+
+clean:
+	rm -f ${OBJS} ftpd ftpcmd.c ftpshut ftpshut.o ftpcount ftpcount.o
+	rm -f core index index.o ckconfig ckconfig.o
+
+cleandir: clean
+	rm -f tags .depend
+
+depend: ${SRCS}
+	${MKDEP} ${CFLAGS} ${SRCS}
+
+lint: ${SRCS}
+	lint ${CFLAGS} ${LINTFLAGS} ${SRCS}
+
+tags: ${SRCS}
+	ctags ${SRCS}
diff -urN ../mimas/wu-ftpd-2.4.2-beta-15.org/src/vers.c wu-ftpd-2.4.2-beta-15/src/vers.c
--- ../mimas/wu-ftpd-2.4.2-beta-15.org/src/vers.c	Thu Jan  1 09:00:00 1970
+++ wu-ftpd-2.4.2-beta-15/src/vers.c	Thu Nov 13 19:58:34 1997
@@ -0,0 +1 @@
+char version[] = "Version wu-2.4.2-academ[BETA-15](1) Thu Nov 13 19:58:34 JST 1997";
diff -urN ../mimas/wu-ftpd-2.4.2-beta-15.org/support/ftw.c wu-ftpd-2.4.2-beta-15/support/ftw.c
--- ../mimas/wu-ftpd-2.4.2-beta-15.org/support/ftw.c	Mon Mar  3 18:28:41 1997
+++ wu-ftpd-2.4.2-beta-15/support/ftw.c	Thu Nov 13 17:41:28 1997
@@ -32,7 +32,6 @@
 
 #include <sys/param.h>
 #include <sys/stat.h>
-#include <sys/stat.h>
 
 #include "ftw.h"
 
diff -urN ../mimas/wu-ftpd-2.4.2-beta-15.org/support/isdigit.c wu-ftpd-2.4.2-beta-15/support/isdigit.c
--- ../mimas/wu-ftpd-2.4.2-beta-15.org/support/isdigit.c	Thu Jan  1 09:00:00 1970
+++ wu-ftpd-2.4.2-beta-15/support/isdigit.c	Thu Nov 13 19:06:37 1997
@@ -0,0 +1,10 @@
+int
+isdigit(c)
+int c;
+{
+    if ( c >= '0' && c <= '9' )
+        return c;
+    else
+        return 0;
+}
+
diff -urN ../mimas/wu-ftpd-2.4.2-beta-15.org/support/makefiles/Makefile.n42 wu-ftpd-2.4.2-beta-15/support/makefiles/Makefile.n42
--- ../mimas/wu-ftpd-2.4.2-beta-15.org/support/makefiles/Makefile.n42	Thu Jan  1 09:00:00 1970
+++ wu-ftpd-2.4.2-beta-15/support/makefiles/Makefile.n42	Fri Nov 14 19:59:02 1997
@@ -0,0 +1,57 @@
+#
+# $Id$
+#
+CC     = gcc
+AR     = ar cq
+RANLIB = ranlib
+LIBC   = /lib/libc.a
+IFLAGS = 
+LFLAGS = 
+CFLAGS = -O -DNO_MALLOC_PROTO -DDEBUG ${IFLAGS} ${LFLAGS}
+
+SRCS   = getusershell.c fnmatch.c strcasestr.c strsep.c \
+		authuser.c ftw.c isdigit.c snprintf.c
+OBJS   = getusershell.o fnmatch.o strcasestr.o strsep.o \
+		authuser.o ftw.o isdigit.o snprintf.o
+
+all: $(OBJS)
+	-rm -f libsupport.a
+	${AR} libsupport.a $(OBJS)
+	${RANLIB} libsupport.a
+
+clean:
+	-rm -f *.o libsupport.a
+
+ftp.h:
+	install -c -m 444 ftp.h /usr/include/arpa
+
+fnmatch.o: fnmatch.c
+	${CC} ${CFLAGS} -c fnmatch.c
+
+getusershell.o: getusershell.c
+	${CC} ${CFLAGS} -c getusershell.c
+
+strerror.o: strerror.c
+	${CC} ${CFLAGS} -c strerror.c
+
+strdup.o: strdup.c
+	${CC} ${CFLAGS} -c strdup.c
+
+strcasestr.o: strcasestr.c
+	${CC} ${CFLAGS} -c strcasestr.c
+
+strsep.o: strsep.c
+	${CC} ${CFLAGS} -c strsep.c
+
+authuser.o: authuser.c
+	${CC} ${CFLAGS} -c authuser.c
+
+ftw.o: ftw.c
+	${CC} ${CFLAGS} -c ftw.c
+
+isdigit.o: isdigit.c
+	${CC} ${CFLAGS} -c isdigit.c
+
+snprintf.o: snprintf.c
+	${CC} ${CFLAGS} -c snprintf.c
+
diff -urN ../mimas/wu-ftpd-2.4.2-beta-15.org/support/strcasestr.c wu-ftpd-2.4.2-beta-15/support/strcasestr.c
--- ../mimas/wu-ftpd-2.4.2-beta-15.org/support/strcasestr.c	Mon Mar  3 18:29:27 1997
+++ wu-ftpd-2.4.2-beta-15/support/strcasestr.c	Thu Nov 13 19:10:41 1997
@@ -25,6 +25,7 @@
 #endif /* LIBC_SCCS and not lint */
 
 #include <string.h>
+#include "../src/config.h"
 /*
  * Find the first occurrence of find in s.
  */
