--- bootp-2.4.3/Makefile
+++ bootp-2.4.3/Makefile	1995/06/11 11:15:32
@@ -9,10 +9,10 @@
 # OPTion DEFinitions:
 # Remove the -DVEND_CMU if you don't wish to support the "CMU vendor format"
 # in addition to the RFC1048 format.  Leaving out DEBUG saves little.
-OPTDEFS= -DSYSLOG -DVEND_CMU -DDEBUG
+OPTDEFS= -DSYSLOG -DVEND_CMU -DDEBUG $(O) -Wall
 
 # Uncomment and edit this to choose the facility code used for syslog.
-# LOG_FACILITY= "-DLOG_BOOTP=LOG_LOCAL2"
+LOG_FACILITY= "-DLOG_BOOTP=LOG_DAEMON"
 
 # SYStem DEFinitions:
 # Either uncomment some of the following, or do:
@@ -27,18 +27,18 @@
 # FILE DEFinitions:
 # The next few lines may be uncommented and changed to alter the default
 # filenames bootpd uses for its configuration and dump files.
-#CONFFILE= -DCONFIG_FILE=\"/usr/etc/bootptab\"
-#DUMPFILE= -DDUMPTAB_FILE=\"/usr/etc/bootpd.dump\"
-#FILEDEFS= $(CONFFILE) $(DUMPFILE)
+CONFFILE= -DCONFIG_FILE=\"/etc/bootptab\"
+DUMPFILE= -DDUMPTAB_FILE=\"/tmp/bootpd.dump\"
+FILEDEFS= $(CONFFILE) $(DUMPFILE)
 
 # MORE DEFinitions (whatever you might want to add)
 # One might define NDEBUG (to remove "assert()" checks).
 MOREDEFS=
 
-INSTALL=/usr/bin/install
+INSTALL=install
 DESTDIR=
-BINDIR=/usr/etc
-MANDIR=/usr/local/man
+BINDIR=/usr/sbin
+MANDIR=/usr/man
 
 CFLAGS= $(OPTDEFS) $(SYSDEFS) $(FILEDEFS) $(MOREDEFS)
 PROGS= bootpd bootpef bootpgw bootptest
@@ -48,7 +48,7 @@
 
 system: install
 
-install: $(PROGS)
+install: $(PROGS) install.man
 	-for f in $(PROGS) ;\
 	do \
 		$(INSTALL) -c -s $$f $(DESTDIR)$(BINDIR) ;\
@@ -98,10 +98,6 @@
 # IRIX 5.X (Silicon Graphics)
 irix:
 	$(MAKE) SYSDEFS= SYSLIBS=
-
-# Linux 1.1.80+ on [34]86
-linux:
-	$(MAKE) SYSDEFS="-O6 -Wall -fomit-frame-pointer"
 
 # SunOS 4.X
 sunos4:
--- bootp-2.4.3/dumptab.c
+++ bootp-2.4.3/dumptab.c	1995/06/11 11:09:46
@@ -150,7 +150,7 @@
 			if (hp->flags.bootsize_auto) {
 				fprintf(fp, "auto:");
 			} else {
-				fprintf(fp, "%d:", hp->bootsize);
+				fprintf(fp, "%ld:", hp->bootsize);
 			}
 		}
 		if (hp->flags.cookie_server) {
@@ -218,10 +218,10 @@
 			fprintf(fp, ":");
 		}
 		if (hp->flags.msg_size) {
-			fprintf(fp, "\\\n\t:ms=%d:", hp->msg_size);
+			fprintf(fp, "\\\n\t:ms=%ld:", hp->msg_size);
 		}
 		if (hp->flags.min_wait) {
-			fprintf(fp, "\\\n\t:mw=%d:", hp->min_wait);
+			fprintf(fp, "\\\n\t:mw=%ld:", hp->min_wait);
 		}
 		if (hp->flags.name_server) {
 			fprintf(fp, "\\\n\t:ns=");
--- bootp-2.4.3/hwaddr.c
+++ bootp-2.4.3/hwaddr.c	1995/06/10 19:48:40
@@ -117,7 +117,7 @@
 	char *p;
 
 	bzero((caddr_t) &arpreq, sizeof(arpreq));
-	arpreq.arp_flags = ATF_INUSE | ATF_COM;
+	arpreq.arp_flags = ATF_COM;
 
 	/* Set up the protocol address. */
 	arpreq.arp_pa.sa_family = AF_INET;
--- bootp-2.4.3/print-bootp.c
+++ bootp-2.4.3/print-bootp.c	1995/06/11 11:10:46
@@ -120,7 +120,7 @@
 		printf(" hops:%d", bp->bp_hops);
 
 	if (bp->bp_xid)
-		printf(" xid:%d", ntohl(bp->bp_xid));
+		printf(" xid:%ld", ntohl(bp->bp_xid));
 
 	if (bp->bp_secs)
 		printf(" secs:%d", ntohs(bp->bp_secs));
@@ -336,7 +336,7 @@
 		case 'l':				/* Long words */
 			while (len >= 4) {
 				bcopy((char *) bp, (char *) &ul, 4);
-				printf("%d", ntohl(ul));
+				printf("%ld", ntohl(ul));
 				bp += 4;
 				len -= 4;
 				if (len) printf(",");
--- bootpc.v031/Makefile
+++ bootpc.v031/Makefile	1995/08/15 14:52:58
@@ -2,7 +2,7 @@
 # V0.29
 
 PROG=bootpc
-CFLAGS=-O2 -ansi -Wall -pedantic -m486
+CFLAGS=$(O) -Wall -pedantic
 
 # list the Cfiles here
 CFILES=bootpc.c
@@ -11,7 +11,7 @@
 CHEADS=bootp.h
 
 # the delete command
-RM=/bin/rm
+RM=rm
 
 # we generate this from the list of C files above
 OBJS=$(CFILES:.c=.o)
@@ -21,9 +21,11 @@
 
 all:	$(PROG)
 
+install:
+	install -s bootpc /sbin/
+
 clean:
 	${RM} -f ${OBJS} ${PROG}
 
 ${PROG}: ${OBJS}
 	${CC} -o ${PROG} ${CFLAGS} ${OBJS}
-	strip ${PROG}
--- bootpc.v031/bootpc.c
+++ bootpc.v031/bootpc.c	1995/08/15 14:59:14
@@ -82,7 +82,6 @@
 static int debug   = 0 ;   /* debug mode or not 14/02/94 JSP */
 static int subnet  = 0 ;   /* if we have seen a subnet TAG yet (sigh) */
 
-int errno ;
 
 int main(int argc,
 	 char *argv[])
--- dip-3.3.7n/Makefile
+++ dip-3.3.7n/Makefile	1995/08/15 15:08:00
@@ -36,21 +36,25 @@
 # that's exactly what I don't follow :-) - you'd need to define
 # -DFSSTND and add this define to CFLAGS or such.
 
-SKEYDEF	= -DSKEY
-SKEYLIB	= -L. -L/usr/local/lib -lskey
+#SKEYDEF	= -DSKEY
+#SKEYLIB	= -L. -L/usr/local/lib -lskey
 
-CC	= gcc-ss
+CC	= gcc
 #CC	= gcc-elf
 
-CFLAGS	= -DLINUX $(SKEYDEF) -DSECUREID -pipe -O6 -Wall -m486 -fomit-frame-pointer
+CFLAGS	= $(SKEYDEF) -Wall $(O) -DFSSTND
 
 LD	= ld
 #LD	= gcc-elf
 
-LDFLAGS	= -s -qmagic
+LDFLAGS	= -s
 #LDFLAGS = -v -s
 
+ifdef USE_NEW_ELF
+SYSOBJS = /usr/lib/crt1.o
+else
 SYSOBJS = /usr/lib/crt0.o
+endif
 LIBS	= $(SKEYLIB) `$(CC) --print-libgcc-file-name` -lc
 
 # Object modules.
@@ -68,8 +72,7 @@
 	-@echo "DIP is built successfully."
 
 install:	all
-	-@cp /usr/sbin/dip ./dip-
-	install -c -o root -g uucp -m 04755 -s dip /usr/sbin
+	install -c -o root -g uucp -m 04754 -s dip /usr/sbin/
 	ln -sf /usr/sbin/dip /usr/sbin/diplogin
 	install -c -m 0444 dip.8 /usr/man/man8
 	-@echo "DIP is installed. Now please install/configure /etc/diphosts."
@@ -81,7 +84,7 @@
 		ar rcs protocols.a $(PROTOS)
 
 clean:
-		rm -f core *.o *.a
+		rm -f core *.o *.a dip
 
 clobber:	clean
 		rm -f dip
--- dip-3.3.7n/attach.c
+++ dip-3.3.7n/attach.c	1995/06/10 21:13:01
@@ -478,7 +478,9 @@
   char buff[1024];
   static int flag = 0;
   extern int opt_i;
+#ifdef CONFIG_IP_ACCT
   u_long b_in=0, b_out=0, p_in=0, p_out=0;
+#endif
   char  *p;
   char in_b[10], out_b[10];
 
--- dip-3.3.7n/dip.h
+++ dip-3.3.7n/dip.h	1995/06/11 12:07:12
@@ -40,6 +40,7 @@
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
+#include <linux/ip.h>
 #include <arpa/inet.h>
 #include <arpa/nameser.h>
 #include <netinet/in.h>
--- dip-3.3.7n/pathnames.h
+++ dip-3.3.7n/pathnames.h	1995/06/10 21:05:31
@@ -16,7 +16,7 @@
 
 /* Pathnames of some customizable files. */
 #define _PATH_ETC_DIPHOSTS	"/etc/diphosts"
-#define _PATH_DIP_PID		"/etc/dip.pid"
+#define _PATH_DIP_PID		"/var/run/dip.pid"
 
 #ifdef FSSTND
 #define _PATH_LOCKD		"/var/lock"	        /* lock files	*/
--- dip-3.3.7n/tty.c
+++ dip-3.3.7n/tty.c	1995/06/10 21:05:58
@@ -28,7 +28,7 @@
  */
 #include "dip.h"
 #include <sys/stat.h>
-#ifdef LINUX
+#ifdef __linux__
 #   include <linux/fs.h>
 #   include <linux/tty.h>
 #ifndef NO_SERIAL
@@ -594,7 +594,7 @@
 int
 tty_speed(char *speed)
 {
-#if defined(LINUX)
+#if defined(__linux__)
   struct serial_struct info;
   int spd;
 
--- icmpinfo-1.10/CHANGES.NetKit
+++ icmpinfo-1.10/CHANGES.NetKit	1995/01/02 18:29:57
@@ -0,0 +1,7 @@
+Last update: 08/08/94
+
+- changed the makefile (added an install target)
+- added icmpinfo.c an option ('-k') to kill an icmpinfo background job
+- added pid.c (functions: create pid file, kill process, signal handler)
+
+Peter Tobias <tobias@server.et-inf.fho-emden.de>
--- icmpinfo-1.10/Makefile
+++ icmpinfo-1.10/Makefile	1995/06/11 12:11:40
@@ -13,7 +13,7 @@
 #LDLIBS= -lsocket -lnsl
 
 # To override default compiler flags :
-#CFLAGS=-g
+CFLAGS=$(O) -Wall
 
 # To change default compiler
 #CC=gcc
@@ -22,11 +22,17 @@
 
 LDFLAGS= $(CFLAGS)
 
-OBJECTS= recvping.o print.o err.o icmpinfo.o
+OBJECTS= recvping.o print.o err.o icmpinfo.o pid.o
 TARGET = icmpinfo
 
+all:	$(TARGET)
+
 $(TARGET):  $(OBJECTS)
 	$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LDLIBS)
+
+install: $(TARGET)
+	install -s -m 0755 icmpinfo /usr/sbin
+	install -m 0644 icmpinfo.man /usr/man/man1/icmpinfo.1
 
 tgz: clean
 	rm -f CHECKSUMS.asc
--- icmpinfo-1.10/icmpinfo.c
+++ icmpinfo-1.10/icmpinfo.c	1995/06/11 12:20:14
@@ -40,6 +40,12 @@
 
 #include  "defs.h"
 
+void pid_kill (void);
+void pid_file (void);
+int  recv_ping (void);
+int  err_quit(char*);
+int  err_sys(char*);
+
 /*
  *			P I N G . C
  *
@@ -60,7 +66,7 @@
  *	This program has to run SUID to ROOT to access the ICMP socket.
  */
 
-char	usage[] = "Usage:  icmpinfo [-v[v[v]]] [-s] [-n] [-p] [-l]\n   -v : more and more info\n   -s : show local interface address\n   -n : no name query (dot ip only)\n   -p : no port -> service name query\n   -l : fork + syslog output\nv1.10 - 8/1994 - dl";
+char	usage[] = "Usage:  icmpinfo [-v[v[v]]] [-s] [-n] [-p] [-l] [-k]\n   -v : more and more info\n   -s : show local interface address\n   -n : no name query (dot ip only)\n   -p : no port -> service name query\n   -l : fork + syslog output\n   -k : kill background process\nv1.10 - 8/1994 - dl";
 char	*pname;
 
 int main(argc, argv)
@@ -99,6 +105,10 @@
 			case 's':
 				showsrcip++;
 				break;
+			case 'k':
+				pid_kill();
+				exit(0);
+				break;
 			case 'h':
 		        default :
 				err_quit(usage);
@@ -128,6 +138,7 @@
 	  openlog("icmpinfo",0,LOG_DAEMON);
 	  syslog(LOG_NOTICE,"started, PID=%d.",getpid());
 	  setsid();
+	  pid_file();
 	  close(0);
 	  close(1);
 	  close(2);
--- icmpinfo-1.10/icmpinfo.man
+++ icmpinfo-1.10/icmpinfo.man	1995/01/02 18:29:57
@@ -6,7 +6,7 @@
 .SH SYNOPSIS
 
 .B icmpinfo
-[\-v[v[v]]] [\-n] [\-p] [\-s] [\-l]
+[\-v[v[v]]] [\-n] [\-p] [\-s] [\-l] [\-k]
 
 .SH DESCRIPTION
 .BR Icmpinfo
@@ -60,6 +60,13 @@
 .I "\-l"
 Forks and use the syslog(3) facility to record events (recomended use).
 (root only option).
+
+.TP
+.I "\-k"
+Kills the background process started with the
+.I "\-l"
+option.
+
 .SH WARNINGS
 The packet decoding is planned for ICMP Unreachable outputs and might
 not be significant for all other Icmp types. Output can be shorter
--- icmpinfo-1.10/pid.c
+++ icmpinfo-1.10/pid.c	1995/06/11 12:12:31
@@ -0,0 +1,53 @@
+#include <stdio.h>
+#include <signal.h>
+#include <unistd.h>
+
+#define PIDFILE                 "/var/run/icmpinfo.pid"
+
+extern char *pname;
+
+void sig_handler(int);
+void pid_file(void);
+void pid_kill(void);
+
+void pid_file(void)
+{
+    FILE *fp;
+
+    if ((fp = fopen(PIDFILE, "w")) != (FILE *)NULL) {
+        fprintf(fp, "%d\n", getpid());
+        fclose(fp);
+    }
+    else
+    {
+        fprintf(stderr, "\n%s: Could not write PID file `%s', terminating.\n",
+            pname, PIDFILE);
+        exit(1);
+    }
+    signal(SIGHUP, sig_handler);
+    signal(SIGINT, sig_handler);
+    signal(SIGTERM, sig_handler);
+}
+
+void sig_handler(int sig)
+{
+    unlink(PIDFILE);
+    exit(0);
+}
+
+void pid_kill(void)
+{
+    FILE *fp;
+    int pid;
+
+    if ((fp = fopen(PIDFILE, "r")) != (FILE *)NULL)
+    {
+        if (fscanf(fp, "%d", &pid) == 1)
+        {
+            kill(pid, SIGHUP);
+            sleep(1);
+        }
+        fclose(fp);
+    }
+}
+ 
--- icmpinfo-1.10/print.c
+++ icmpinfo-1.10/print.c	1995/06/11 12:17:07
@@ -122,7 +122,7 @@
 	      if (cc>=offsetof(struct icmp,icmp_dun)+sizeof(struct ip)+offsetof(struct tcphdr,th_seq)+sizeof(tp->th_seq))
 		{
 		  if (noportquery) {
-		      sprintf(prbuf+strlen(prbuf)," sp=%d dp=%d seq=0x%8.8x",
+		      sprintf(prbuf+strlen(prbuf)," sp=%d dp=%d seq=0x%8.8lx",
 			  ntohs(tp->th_sport),ntohs(tp->th_dport),
                           ntohl(tp->th_seq));
 		  } else {
@@ -132,11 +132,11 @@
 		    else
 		      sprintf(prbuf+strlen(prbuf)," sp=%d",tp->th_sport);
 		    if ((servent=getservbyport(ntohs(tp->th_dport),NULL))) 
-		      sprintf(prbuf+strlen(prbuf)," dp=%d [%s] seq=0x%8.8x",
+		      sprintf(prbuf+strlen(prbuf)," dp=%d [%s] seq=0x%8.8lx",
 			      ntohs(tp->th_dport),servent->s_name,
 			      ntohl(tp->th_seq));
 		    else
-		      sprintf(prbuf+strlen(prbuf)," dp=%d seq=0x%8.8x",
+		      sprintf(prbuf+strlen(prbuf)," dp=%d seq=0x%8.8lx",
 			      ntohs(tp->th_dport),ntohl(tp->th_seq));
 		  }
 		}
--- icmpinfo-1.10/recvping.c
+++ icmpinfo-1.10/recvping.c	1995/06/11 12:15:38
@@ -6,6 +6,9 @@
 
 #include	"defs.h"
 
+int err_ret(char *);
+int pr_pack(char *, int, struct sockaddr_in *);
+
 int recv_ping()
 {
 	register int		n;
--- netdate/netdate.8
+++ netdate/netdate.8	1994/12/11 23:38:24
@@ -53,40 +53,41 @@
 if that host supplies it.
 .SH EXAMPLE
 The most accurate hosts are named first in each example.
-Some such call on \fInetdate\fP should be put at the end of \fB/etc/rc.local\fP,
+Some such call on \fInetdate\fP should be put at the end of
+\fB/etc/rc.d/rc.local\fP,
 so that the time will be set properly on system startup.
-It is also useful to have a shell script, e.g., \fB/etc/timehosts\fP,
+It is also useful to have a shell script, e.g., \fB/sbin/timehosts\fP,
 which contains a call on \fInetdate\fP with arguments appropriate
 to the local system, so that it is easy to set the time manually.
-.SH "netdate -l 30 udp dcn\-gateway tcp neighbor"
-\fIDcn\-gateway\fP is a hypothetical host which usually keeps time
+.SH "netdate -l 30 udp dcn\-gate tcp neighbor"
+\fIDcn\-gate\fP is a hypothetical host which usually keeps time
 accurate to within milliseconds of Coordinated Universal Time,
 but may occasionally be eight hours off.
 \fINeighbor\fP is a neighbor of the local host which keeps time
 with moderate accuracy.
-The time will be set to that of \fIdcn\-gateway\fP if that and \fIneighbor\fP
+The time will be set to that of \fIdcn\-gate\fP if that and \fIneighbor\fP
 agree to within thirty seconds, else it will not be set at all.
 This is almost good enough for most circumstances, but won't do
 when the local host's time is known to be wrong (e.g., after
 a long downtime or a bad crash) and must be set to something.
 If one of the hosts named is inaccurate or not responding, there is a problem.
-.SH "netdate -l 30 udp dcn\-gateway tcp neighbor neighbor2"
+.SH "netdate -l 30 udp dcn\-gate tcp neighbor neighbor2"
 Only two of the three hosts named must agree on the time.
 The time will still be set (to that of the first neighbor),
-even if \fIdcn\-gateway\fP is far off as long as the two neighbors agree.
+even if \fIdcn\-gate\fP is far off as long as the two neighbors agree.
 This is probably good enough for most cases.
 One can arbitrarily gerrymander the vote for more insurance
 (and less clarity), as in the following example.
-.SH "netdate\ udp\ dcn\-gateway\ dcn1\ tcp\ bbn\-unix\ localhost\ neighbor"
+.SH "netdate\ udp\ dcn\-gate\ dcn1\ tcp\ bbn\-unix\ localhost\ neighbor"
 Here \fIdcn1\fP and \fIbbn\-unix\fP are more hypothetical very accurate
 timekeepers, at least one of which keeps time independently from
-\fIdcn\-gateway\fP, one hopes.
+\fIdcn\-gate\fP, one hopes.
 It is very likely that the time will be set to that one of those three
 very accurate hosts, as long as at least two of them agree, or at least
 one of them agrees with the neighbor or the local host's time.
 If all the foreign hosts disagree, the time will not be set,
 since \fBlocalhost\fP will be chosen as best.
-.SH "netdate\ \-l\ 3\ localhost\ localhost\ udp\ dcn\-gateway\ dcn1\ tcp\ bbn\-unix"
+.SH "netdate\ \-l\ 3\ localhost\ localhost\ udp\ dcn\-gate\ dcn1\ tcp\ bbn\-unix"
 This example gives \fBlocalhost\fP two votes and declares it to usually
 have the most accurate time.
 All three foreign hosts must agree within three seconds
@@ -95,9 +96,9 @@
 Thus the time will be set only if it really needs to be.
 .SH FILES
 .nf
-/etc/inet/services	for the time service port number
-/etc/inet/protocols	for the protocol numbers
-/etc/wtmp	to record time-setting
+/etc/services	for the time service port number
+/etc/protocols	for the protocol numbers
+/var/adm/wtmp	to record time-setting
 .SH SEE ALSO
 ARPANET Request for Comments 868, gettimeofday(2), date(1),
 WWV (USA):
--- netdate/netdate.c
+++ netdate/netdate.c	1994/12/11 23:43:54
@@ -42,7 +42,7 @@
 #include <setjmp.h>
 #include <signal.h>
 #include <utmp.h>
-#define WTMP "/etc/wtmp"
+#define WTMP "/var/adm/wtmp"
 
 struct utmp wtmp[2] = {
 	{ 0, 0, "|", "", 0, "", "", 0},
@@ -52,7 +52,7 @@
 char *service = "time";
 char *defaultproto = "udp";
 /* difference between 1900 (RFC868) and 1970 (UNIX) base times */
-#define NETBASE	2208988800
+#define NETBASE	2208988800u
 
 long limit = 5;
 #define MAXHOSTS 20
@@ -98,7 +98,7 @@
 	fprintf (stderr,
 "usage: %s [ -l limit ] host ...\n"
 "%s tries to find a group of at least two hosts whose times agree\n"
-"within %d seconds, and sets the time to that of the first host in the group.\n",
+"within %ld seconds, and sets the time to that of the first host in the group.\n",
 		whoami, whoami, limit);
 	fprintf (stderr,
 "The limit may be set with the -l option.  Setting it to zero (or supplying\n"
@@ -155,7 +155,7 @@
 	if (*argv == NULL)
 		usage();
 	if (debug)
-		fprintf (stderr, "%s: rdate %d; verbose %d; limit %d.\n", 
+		fprintf (stderr, "%s: rdate %d; verbose %d; limit %ld.\n", 
 			whoami, rdate, verbose, limit);
 	for (thishost = &timehosts[0]; *argv != NULL; argv++) {
 		if (thishost >= tophost) {
@@ -189,7 +189,7 @@
 		exit(1);
 	if ((thishost = mungediffs(thishost)) == NULL) {
 		fprintf (stderr,
-			"No two hosts agree on the time within %d seconds\n",
+			"No two hosts agree on the time within %ld seconds\n",
 			limit);
 		exit(1);
 	}
@@ -284,7 +284,7 @@
 			}
 		}
 		if (verbose) {
-			printf (" %d\n", thishost -> count);
+			printf (" %ld\n", thishost -> count);
 			(void)fflush(stdout);
 		}
 		if (thishost -> count > goodhost -> count)
@@ -312,13 +312,13 @@
 	&& abs((thishost -> then.tv_sec - now.tv_sec) - thishost -> difference)
 	    > limit) {
 		fprintf (stderr,
-		"Time from %s has varied more than the limit of %d seconds\n",
+		"Time from %s has varied more than the limit of %ld seconds\n",
 			thishost -> hostname, limit);
 		printit(thishost);
 		exit(1);
 	}
 	if (settimeofday (&thishost -> then, (struct timezone *)0) == -1)
-		perror ("netdate; settimeofday");
+		perror ("netdate: settimeofday");
 	else {
 		int wf;
 		if ((wf = open(WTMP, 1)) >= 0) {
@@ -348,12 +348,12 @@
 		(void)sprintf(newstring, "%s ", thishost -> hostname);
 		tvsub(&diff, &thishost -> then, &now);
 		printdiff(&newstring[strlen(newstring)], &diff);
-		printf ("%-24s %.19s.%03d", newstring,
+		printf ("%-24s %.19s.%03ld", newstring,
 			ctime((unsigned long *)&thishost -> then.tv_sec),
 				thishost -> then.tv_usec / 1000);
 		if (verbose) {
 			tp = localtime((unsigned long *)&thishost -> acked);
-			printf(" at %02d:%02d:%02d.%03d",
+			printf(" at %02d:%02d:%02d.%03ld",
 				tp -> tm_hour, tp -> tm_min, tp -> tm_sec,
 				thishost -> acked.tv_usec / 1000);
 			tvsub(&diff, &thishost -> acked, &thishost -> asked);
--- nfs-server-2.2beta2/Makefile.Linux
+++ nfs-server-2.2beta2/Makefile.Linux	1995/08/15 14:18:51
@@ -0,0 +1,17 @@
+flags = bindir=/usr/sbin CFLAGS="${O} -I../tcp_wrappers_7.2" \
+	LDFLAGS=" -L ../tcp_wrappers_7.2 -s"
+
+Makefile:
+	$(flags) sh configure --prefix=/usr
+
+all:	Makefile
+	make $(flags)
+
+install:
+	make install $(flags)
+
+clean:
+	if test -f Makefile; then \
+		make distclean; \
+	fi
+
--- nfs-server-2.2beta2/Makefile.in
+++ nfs-server-2.2beta2/Makefile.in	1995/08/15 15:41:53
@@ -33,7 +33,7 @@
 
 # General compile options and libs:
 DEFS = @DEFS@ $(NFSD_DEFS)
-LIBS = libns.a @LIBS@
+LIBS = libns.a
 
 # Compile options for nfsd:
 # CALL_PROFILING
@@ -53,9 +53,9 @@
 bindir = $(exec_prefix)/sbin
 infodir = $(prefix)/info
 man5dir = $(prefix)/man/man5
-man5ext = .5
+man5ext =
 man8dir = $(prefix)/man/man8
-man8ext = .8
+man8ext =
 
 # Prefix to be prepended to each installed RPC program, normally `rpc.'.
 rpcprefix = rpc.
@@ -138,7 +138,7 @@
 	        $(man8dir)/$(binprefix)$$manp$(man8ext); \
 	    if [ 'x$(rpcprefix)' != 'x' ]; then \
 	        rm -f $(man8dir)/$(rpcprefix)$(binprefix)$$manp$(man8ext); \
-	        ln $(man8dir)/$(binprefix)$$manp$(man8ext) \
+	        ln -s $(man8dir)/$(binprefix)$$manp$(man8ext) \
 	            $(man8dir)/$(rpcprefix)$(binprefix)$$manp$(man8ext); \
 	    fi \
 	done
@@ -245,7 +245,7 @@
 mostlyclean: clean
 
 distclean: clean
-	rm -f Makefile config.status config.cache config.log site.h site.mk
+	rm -f Makefile config.status config.cache config.log
 
 realclean: distclean
 	rm -f TAGS nfs-server.info*
--- pidentd-2.6.1/Makefile
+++ pidentd-2.6.1/Makefile	1995/06/11 14:31:06
@@ -15,7 +15,7 @@
 #
 TAR=tar
 MAKE=make
-DESTROOT=/usr/local
+DESTROOT=/usr
 DESTDIR=$(DESTROOT)/sbin
 MANROOT=$(DESTROOT)/man
 MANDIR=$(MANROOT)/man8
@@ -42,7 +42,7 @@
 # GLIBS=-lident -ldes
 GLIBS=
 
-CFLAGS=-O
+CFLAGS=$(O)
 
 all:
 	@echo "Please specify the type of system you wish to build for."
@@ -97,7 +97,7 @@
 #
 linux:
 	@echo "Building for Linux 0.99.13q or later ..."
-	@(cd src ; $(MAKE) CC="$(CC)" LDFLAGS="$(LDFLAGS)" LIBS="$(GLIBS)" CFLAGS="$(CFLAGS) -DLINUX -DNO_KVM $(GDEFS)" KSRC=linux in.identd)
+	@(cd src ; $(MAKE) CC="$(CC)" LDFLAGS="$(LDFLAGS)" LIBS="$(GLIBS)" CFLAGS="$(CFLAGS) -Wall -DLINUX -DNO_KVM $(GDEFS)" KSRC=linux in.identd)
 
 
 #
@@ -386,8 +386,8 @@
 	@exit 1
 
 install: in.identd
-	cp identd.8  $(MANDIR)/identd.8
-	cp in.identd $(DESTDIR)/in.identd
+	install -m 644 identd.8  $(MANDIR)/in.identd.8
+	install -s in.identd $(DESTDIR)/in.identd
 
 tests:
 	(cd testdir ; make)
--- pidentd-2.6.1/Makefile.Linux
+++ pidentd-2.6.1/Makefile.Linux	1995/06/10 19:29:24
@@ -0,0 +1,9 @@
+all:
+	make linux
+
+install:
+	make install
+
+clean:
+	make clean
+
--- pidentd-2.6.1/src/identd.c
+++ pidentd-2.6.1/src/identd.c	1995/06/11 12:58:04
@@ -62,7 +62,7 @@
 extern int errno;
 #endif
 
-#ifdef SOLARIS
+#if defined(SOLARIS) || defined(__linux__)
 #  include <unistd.h>
 #  include <stdlib.h>
 #  include <string.h>
--- pidentd-2.6.1/src/kernel/linux.c
+++ pidentd-2.6.1/src/kernel/linux.c	1995/06/11 13:03:50
@@ -28,6 +28,7 @@
 {
     FILE *fp;
     long dummy;
+    int idummy;
     char buf[512];
     struct in_addr myladdr, myraddr;
     int mylport, myrport;
@@ -48,7 +49,7 @@
     while (fgets(buf, sizeof(buf)-1, fp))
     {
 	if (sscanf(buf,"%d: %lX:%x %lX:%x %x %lX:%lX %x:%lX %lx %d",
-		   &dummy, &myladdr, &mylport, &myraddr, &myrport,
+		   &idummy, &myladdr, &mylport, &myraddr, &myrport,
 		   &dummy, &dummy, &dummy, &dummy, &dummy, &dummy,
 		   uid) == 12)
 	{
--- pidentd-2.6.1/src/parse.c
+++ pidentd-2.6.1/src/parse.c	1995/06/11 12:58:46
@@ -38,7 +38,7 @@
 extern int errno;
 #endif
 
-#ifdef SOLARIS
+#if defined(SOLARIS) || defined(__linux__)
 #  include <string.h>
 #  include <stdlib.h>
 #endif
--- tcp_wrappers_7.2/Makefile
+++ tcp_wrappers_7.2/Makefile	1995/06/10 19:12:30
@@ -62,7 +62,7 @@
 # Ultrix 4.x SunOS 4.x ConvexOS 10.x Dynix/ptx
 #REAL_DAEMON_DIR=/usr/etc/...
 #
-# SysV.4 Solaris 2.x OSF AIX
+# SysV.4 Solaris 2.x OSF AIX Linux
 #REAL_DAEMON_DIR=/usr/sbin/...
 #
 # BSD 4.4
@@ -136,9 +136,9 @@
 	EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all
 
 linux:
-	@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
-	LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \
-	NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER" all
+	@make REAL_DAEMON_DIR=/usr/sbin STYLE=$(STYLE) \
+	LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
+	NETGROUP= TLI= EXTRA_CFLAGS= all
 
 # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x.
 hpux hpux8 hpux9:
@@ -337,6 +337,7 @@
 #LIBS	= -lsocket -linet -lnsl -lnfs	# PTX
 #LIBS	= -linet -lnsl_s -ldbm		# ISC
 #LIBS	= -lnet				# Unicos
+#LIBS	=				# Linux
 #LIBS	= -linet -lsyslog -ldbm
 #LIBS	= -lsyslog -lsocket -lnsl
 
@@ -375,6 +376,7 @@
 # around this. The workaround does no harm on other Solaris versions.
 
 BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS
+BUGS =
 #BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DINET_ADDR_BUG
 #BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DSOLARIS_24_GETHOSTBYNAME_BUG
 
@@ -392,7 +394,7 @@
 # If your system supports vsyslog(), comment out the following definition.
 # If in doubt leave it in, it won't harm.
 
-VSYSLOG	= -Dvsyslog=myvsyslog
+#VSYSLOG	= -Dvsyslog=myvsyslog
 
 # End of the system dependencies.
 #################################
@@ -411,7 +413,7 @@
 # Uncomment the next definition to turn on the language extensions
 # (examples: allow, deny, banners, twist and spawn).
 # 
-#STYLE	= -DPROCESS_OPTIONS	# Enable language extensions.
+STYLE	= -DPROCESS_OPTIONS	# Enable language extensions.
 
 ################################################################
 # Optional: Changing the default disposition of logfile records
@@ -434,7 +436,7 @@
 #
 # The LOG_XXX names below are taken from the /usr/include/syslog.h file.
 
-FACILITY= LOG_MAIL	# LOG_MAIL is what most sendmail daemons use
+FACILITY= LOG_DAEMON	# LOG_MAIL is what most sendmail daemons use
 
 # The syslog priority at which successful connections are logged.
 
@@ -450,7 +452,7 @@
 # off by default because it causes problems on sites that don't use DNS
 # and with Solaris < 2.4.
 #
-# DOT= -DAPPEND_DOT
+DOT= -DAPPEND_DOT
 
 ##################################################
 # Optional: Always attempt remote username lookups
@@ -470,7 +472,7 @@
 # still do selective username lookups as documented in the hosts_access.5
 # and hosts_options.5 manual pages (`nroff -man' format).
 #
-#AUTH	= -DALWAYS_RFC931
+AUTH	= -DALWAYS_RFC931
 #
 # The default username lookup timeout is 10 seconds. This may not be long
 # enough for slow hosts or networks, but is enough to irritate PC users.
@@ -567,7 +569,7 @@
 #
 # Uncomment the following macro definition if your getsockopt() is OK.
 #
-# KILL_OPT= -DKILL_IP_OPTIONS
+KILL_OPT= -DKILL_IP_OPTIONS
 
 ## End configuration options
 ############################
@@ -577,7 +579,7 @@
 SHELL	= /bin/sh
 .c.o:;	$(CC) $(CFLAGS) -c $*.c
 
-CFLAGS	= -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
+CFLAGS	= $(O) -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
 	$(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
 	-DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
 	-DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
--- tcp_wrappers_7.2/Makefile.Linux
+++ tcp_wrappers_7.2/Makefile.Linux	1995/06/11 14:06:25
@@ -0,0 +1,15 @@
+
+all:
+	make linux O="${O}"
+
+install: all
+	install -s -m755 tcpd tcpdchk tcpdmatch safe_finger try-from /usr/sbin/
+	install -m644 tcpd.8 tcpdchk.8 tcpdmatch.8 /usr/man/man8/
+	install -m644 hosts_access.3 /usr/man/man3/
+	install -m644 hosts_access.5 hosts_options.5 /usr/man/man5/
+	install -m644 libwrap.a /usr/lib/
+	install -m644 tcpd.h /usr/include/
+
+clean:
+	make clean
+
--- tcp_wrappers_7.2/safe_finger.c
+++ tcp_wrappers_7.2/safe_finger.c	1995/06/10 19:12:30
@@ -31,7 +31,7 @@
 
 /* Local stuff */
 
-char    path[] = "PATH=/bin:/usr/bin:/usr/ucb:/usr/bsd:/etc:/usr/etc:/usr/sbin";
+char    path[] = "PATH=/bin:/usr/bin:/usr/sbin";
 
 #define	TIME_LIMIT	60		/* Do not keep listinging forever */
 #define	INPUT_LENGTH	100000		/* Do not keep listinging forever */
--- ytalk-3.0.2/Imakefile
+++ ytalk-3.0.2/Imakefile	1995/08/15 14:26:59
@@ -1,78 +1,96 @@
-#### Imakefile for YTalk version 3.0 ####
-#
-#			   NOTICE
-#
-# Copyright (c) 1990,1992,1993 Britt Yenne.  All rights reserved.
-# 
-# This software is provided AS-IS.  The author gives no warranty,
-# real or assumed, and takes no responsibility whatsoever for any 
-# use or misuse of this software, or any damage created by its use
-# or misuse.
-# 
-# This software may be freely copied and distributed provided that
-# no part of this NOTICE is deleted or edited in any manner.
-# 
-
-###################################
-## CONFIGURATION  (The Fun Part) ##
-###################################
-#
-# If your machine does not support TERMIOS (example: any NeXT running
-# NeXTStep up to and including version 3.1), then uncomment the following
-# line.
+/*
+ * ### Imakefile for YTalk version 3.0 ####
+ *
+ *			   NOTICE
+ *
+ * Copyright (c) 1990,1992,1993 Britt Yenne.  All rights reserved.
+ * 
+ * This software is provided AS-IS.  The author gives no warranty,
+ * real or assumed, and takes no responsibility whatsoever for any 
+ * use or misuse of this software, or any damage created by its use
+ * or misuse.
+ * 
+ * This software may be freely copied and distributed provided that
+ * no part of this NOTICE is deleted or edited in any manner.
+ * 
+ */
+
+/*
+ * ###################################
+ * ## CONFIGURATION  (The Fun Part) ##
+ * ###################################
+ *
+ * If your machine does not support TERMIOS (example: any NeXT running
+ * NeXTStep up to and including version 3.1), then uncomment the following
+ * line.
+ */
  
-#TDEFS = -DUSE_SGTTY
+/* TDEFS = -DUSE_SGTTY */
 
-#
-# If you are running an older Sun OS using YP (now known as NIS), you might
-# need to uncomment the next line if ytalk asks you "Who are you?"
-
-#SLIBS = -lsun
-
-#
-# If you are on a sun running solaris 2.* you might need to uncomment the 
-# following line.
-
-#SLIBS = -lnsl -lsocket
-
-#
-# If your machine has a 64-bit architecture or uses 64-bit 'long's, then you
-# will need to uncomment the following line.
-
-#BDEFS = -DY64BIT
-
-#
-# If you have (or want) a system-wide .ytalkrc file, uncomment the next
-# line and set it to the correct pathname.  The backslashes must remain
-# before each double-quote.
-
-#RCDEF = -DSYSTEM_YTALKRC=\"/usr/local/etc/ytalkrc\"
-
-#
-# If you plan to install ytalk on your system, you may want to modify
-# the following lines.  Y_BINDIR is where the binary will be placed.
-# Y_MANDIR is where the manpage will be placed.
+/*
+ * If you are running an older Sun OS using YP (now known as NIS), you might
+ * need to uncomment the next line if ytalk asks you "Who are you?"
+ */
+
+/* SLIBS = -lsun */
+
+/*
+ * If you are on a sun running solaris 2.* you might need to uncomment the 
+ * following line.
+ */
+
+/* SLIBS = -lnsl -lsocket */
+
+/*
+ * If your machine has a 64-bit architecture or uses 64-bit 'long's, then you
+ * will need to uncomment the following line.
+ */
+
+/* BDEFS = -DY64BIT */
+
+/*
+ * If you have (or want) a system-wide .ytalkrc file, uncomment the next
+ * line and set it to the correct pathname.  The backslashes must remain
+ * before each double-quote.
+ */
+
+/* RCDEF = -DSYSTEM_YTALKRC=\"/usr/local/etc/ytalkrc\" */
+
+/*
+ * If you plan to install ytalk on your system, you may want to modify
+ * the following lines.  Y_BINDIR is where the binary will be placed.
+ * Y_MANDIR is where the manpage will be placed.
+ */
 
 Y_BINDIR = /usr/local/bin
 Y_MANDIR = /usr/local/man/man1
 
-############################################################
-## Past this point, you shouldn't need to modify anything ##
-############################################################
-LIB = -lcurses -ltermcap $(SLIBS) $(XLIB)
+/*
+ * ############################################################
+ * ## Past this point, you shouldn't need to modify anything ##
+ * ############################################################
+ */
+
+#ifdef TermcapLibrary
+TERMLIB=TermcapLibrary
+#else
+TERMLIB=-lcurses -ltermcap
+#endif
+
+LIB = $(TERMLIB) $(SLIBS) $(XLIB)
 DEFINES = -DUSE_X11 -I/usr/local/include $(TDEFS) $(BDEFS) $(RCDEF)
 LDFLAGS = $(LDOPTIONS)
 OBJ = main.o term.o user.o fd.o comm.o menu.o socket.o rc.o exec.o cwin.o \
       xwin.o
 PRG = ytalk
 
-all:	$(PRG) ytalk.cat
+all:	$(PRG)
 
 $(PRG):	$(OBJ)
 	$(CC) $(LDFLAGS) -o $(PRG) $(OBJ) $(LIB)
     
 ytalk.cat:	ytalk.1
-	nroff -man ytalk.1 > ytalk.cat
+	gnroff -man ytalk.1 > ytalk.cat
 
 start:	Imakefile
 	sed 's/^DEFINES.*X11/CFLAGS =/' < Imakefile > Makefile
--- ytalk-3.0.2/Makefile.Linux
+++ ytalk-3.0.2/Makefile.Linux	1994/08/30 08:16:56
@@ -0,0 +1,13 @@
+Makefile: Imakefile
+	xmkmf
+
+all:	Makefile
+	make
+
+install: all
+	install -s ytalk /usr/bin/
+	install -m644 ytalk.1 /usr/man/man1/
+
+clean:
+	rm -f Makefile ytalk.cat ytalk *.o
+
--- ytalk-3.0.2/socket.c
+++ ytalk-3.0.2/socket.c	1995/08/15 14:49:46
@@ -428,6 +428,7 @@
 	if(n != sizeof(m1))
 	    show_error("Warning: cannot write to old talk daemon");
 
+select_again:
 	tv.tv_sec = 4L;
 	tv.tv_usec = 0L;
 	sel = (1 << talkd[ntalk].fd) | (1 << talkd[otalk].fd);
@@ -444,9 +445,21 @@
 	    for(d = 1; d <= daemons; d++)
 		if(sel & (1 << talkd[d].fd))
 		{
-		    out |= (1 << d);
-		    if(recv(talkd[d].fd, errstr, talkd[d].rlen, 0) < 0)
+		    int recl;
+
+		    recl=recv(talkd[d].fd, errstr, talkd[d].rlen, 0);
+		    if (recl<0 && errno==ECONNREFUSED)
+		    {
+		    	/* at least one of the daemons doesn't exist at all;
+		    	 * but we don't know which one.  We need to try to
+		    	 * select() again.
+		    	 */
+		    	 goto select_again;
+		    }
+		    else if (recl<0)
 			show_error("find_daemon: recv() failed");
+
+		    out |= (1 << d);
 		}
 
 	    tv.tv_sec = 0L;
