qpopper 2.3 NEWS-OS 4 support patch
===================================

* ABSOLUTELY NO WARRANTY
* Tested: NEWS-OS 4.2.1a+R with many un-official patch 
  (you can get them from ftp://ftp.sony.co.jp/).

Have fun!

- KOJIMA Hajime <kjm@rins.ryukoku.ac.jp>

diff -uN ../qpopper2.3/INSTALL qpopper2.3/INSTALL
--- ../qpopper2.3/INSTALL	Sat Mar 29 13:30:36 1997
+++ qpopper2.3/INSTALL	Wed Apr 23 13:34:40 1997
@@ -151,7 +151,7 @@
 
 	    s) POPUID=\"pop\" - Username of the owner of the apop database.
 
-	    t) GNUPASS - This define specifies the use of the (modified :-)
+	    t) GNU_PASS - This define specifies the use of the (modified :-)
 			GNU getpass routine which allows longer than 8 char
 			passwords to be entered when using popauth.  There
 			is also a define within popauth (NO_GETLINE) if you
diff -uN ../qpopper2.3/Makefile qpopper2.3/Makefile
--- ../qpopper2.3/Makefile	Sat Mar 29 13:30:36 1997
+++ qpopper2.3/Makefile	Wed Apr 23 13:28:55 1997
@@ -36,7 +36,6 @@
 	@echo "    make solaris2 (SVR4 w/Solaris 2.x specific mods)"
 	@echo "    make 44bsd"
 	@echo "    make bsdi"
-	@echo "    make next"
 	@echo "    make isc"
 	@echo "    make aix"
 	@echo "    make ultrix"
@@ -53,6 +52,7 @@
 	@echo "    make linux"
 	@echo "    make next"
 	@echo "    make osf1"
+	@echo "    make newsos4"
 	@echo ""
 
 sunos:
@@ -114,6 +114,9 @@
 
 next:
 	make -f make.next
+
+newsos4:
+	make -f make.newsos4
 
 tar: ${SRCS} ${DOCS} ${MAKEFILE}
 	rm -f ${TAR} *.Z*
Common subdirectories: ../qpopper2.3/doc and qpopper2.3/doc
diff -uN ../qpopper2.3/make.newsos4 qpopper2.3/make.newsos4
--- ../qpopper2.3/make.newsos4	Thu Jan  1 09:00:00 1970
+++ qpopper2.3/make.newsos4	Wed Apr 23 13:40:23 1997
@@ -0,0 +1,88 @@
+#@(#)@(#)Makefile	2.5  2.5 4/3/91
+
+CSRCS		=	flock.c pop_dele.c pop_dropcopy.c \
+			pop_get_command.c pop_get_subcommand.c pop_init.c \
+			pop_last.c pop_list.c pop_log.c pop_lower.c \
+			pop_msg.c pop_parse.c pop_pass.c pop_quit.c \
+			pop_rset.c pop_send.c pop_stat.c pop_updt.c \
+			pop_user.c pop_xtnd.c pop_xmit.c popper.c \
+			pop_bull.c xtnd_xlst.c pop_uidl.c mktemp.c \
+			pop_rpop.c pop_apop.c md5.c pop_auth.c
+
+OBJS		=	flock.o pop_dele.o pop_dropcopy.o \
+			pop_get_command.o pop_get_subcommand.o pop_init.o \
+			pop_last.o pop_list.o pop_log.o pop_lower.o \
+			pop_msg.o pop_parse.o pop_pass.o pop_quit.o \
+			pop_rset.o pop_send.o pop_stat.o pop_updt.o \
+			pop_user.o pop_xtnd.o pop_xmit.o popper.o \
+			pop_bull.o xtnd_xlst.o pop_uidl.o mktemp.o \
+			pop_rpop.o pop_apop.o md5.o pop_auth.o
+
+DOCS		=	README pop3.rfc1081 pop3e.rfc1082 popper.8
+
+INCLUDES	=	popper.h version.h
+
+SRCS		=	${CSRCS} ${INCLUDES}
+
+SCCS		=	/usr/ucb/sccs
+
+REL		=
+
+#CC = gcc -fstrength-reduce -fpcc-struct-return 
+CC = cc
+
+MAKEFILE	=	Makefile
+
+#               Defines are described in the INSTALL document.
+
+CFLAGS		=	-DHAVE_VSPRINTF -DHAVE_UNISTD_H -DNEWSOS4 \
+			-DAPOP=\"/etc/pop.auth\" -DPOPUID=\"pop\"
+
+TARGET		=	popper.newsos4
+
+TAR		=	${TARGET}.tar
+
+INSTALLDIR	=	/usr/local/lib
+
+MANPAGE		=	popper.8
+
+CATPAGE		=	popper.0
+
+MANDIR		=	/usr/local/man/cat8
+
+
+all: ${TARGET} popauth
+
+
+${TARGET}: ${OBJS}
+	${CC}  ${OBJS} -o ${TARGET} -ldbm
+
+popauth: popauth.o flock.o
+	${CC}  -o popauth popauth.o  flock.o -ldbm
+
+tar: ${SRCS} ${DOCS} ${MAKEFILE}
+	rm -f ${TAR} *.Z*
+	tar -cvf ${TAR} ${SRCS} ${DOCS} ${MAKEFILE}
+	compress ${TAR}
+	uuencode ${TAR}.Z ${TAR}.Z > ${TAR}.Z.uuencoded
+	split -300 ${TAR}.Z.uuencoded
+	mv xaa ${TAR}.Z.uuencoded.xaa
+	mv xab ${TAR}.Z.uuencoded.xab
+	mv xac ${TAR}.Z.uuencoded.xac
+	mv xad ${TAR}.Z.uuencoded.xad
+	mv xae ${TAR}.Z.uuencoded.xae
+
+clean:
+	rm -f core *.o *.Z*
+	${SCCS} clean
+
+sources: ${SRCS}
+
+${SRCS}:
+	${SCCS} get ${REL} $@ -p | expand -4 > $@
+
+${DOCS}:
+	${SCCS} get README -p | expand -4 > README
+	${SCCS} get popper.8 -p | expand -4 > popper.8
+	
+${OBJS}:    popper.h version.h
diff -uN ../qpopper2.3/pop_bull.c qpopper2.3/pop_bull.c
--- ../qpopper2.3/pop_bull.c	Sat Mar 29 13:30:36 1997
+++ qpopper2.3/pop_bull.c	Wed Apr 23 13:26:11 1997
@@ -10,6 +10,9 @@
 #include <sys/types.h>
 #include <sys/dir.h>
 #else
+# ifdef NEWSOS4
+#  include <sys/types.h>
+# endif
 #include <dirent.h>
 # ifdef NEXT
 #  include <sys/dir.h>
diff -uN ../qpopper2.3/pop_msg.c qpopper2.3/pop_msg.c
--- ../qpopper2.3/pop_msg.c	Sat Mar 29 13:30:36 1997
+++ qpopper2.3/pop_msg.c	Wed Apr 23 13:24:48 1997
@@ -17,6 +17,7 @@
 #include <strings.h>
 #endif
 #include <varargs.h>
+#include <ctype.h>
 #include "popper.h"
 
 /* 
diff -uN ../qpopper2.3/pop_xmit.c qpopper2.3/pop_xmit.c
--- ../qpopper2.3/pop_xmit.c	Sat Mar 29 13:30:36 1997
+++ qpopper2.3/pop_xmit.c	Wed Apr 23 13:24:25 1997
@@ -121,14 +121,14 @@
 							MAIL_COMMAND, errno));
         default:
 
-#ifdef NEXT
+#if defined(NEXT) || defined(NEWSOS4)
             while((id = wait(&stat)) >=0 && id != pid);
 #else
             id = waitpid(pid, &stat, 0);
 #endif
             if (!p->debug) (void)unlink (temp_xmit);
 
-#ifdef NEXT
+#if defined(NEXT) || defined(NEWSOS4)
             if (!WIFEXITED (stat))
 #else
             if ((!WIFEXITED (stat)) || (WEXITSTATUS (stat) != 0))
Binary files ../qpopper2.3/popauth and qpopper2.3/popauth differ
diff -uN ../qpopper2.3/popper.h qpopper2.3/popper.h
--- ../qpopper2.3/popper.h	Tue Apr  1 05:10:18 1997
+++ qpopper2.3/popper.h	Wed Apr 23 13:23:56 1997
@@ -189,6 +189,11 @@
 #define PID_T		int
 #endif
 
+#ifdef NEWSOS4
+#undef PID_T
+#define PID_T		int
+#endif
+
 #ifdef CHECK_SHELL
 #define WILDCARD_SHELL	"/POPPER/ANY/SHELL/"
 #endif
