Diffs for skey under Linux

1. 	Makefile entry for Linux. Also fixes some missing dependancies
2.	skey.c changed to not include sgtty.h blindly
3.	setpriority only used if PRIO_* is defined.



--- Makefile.old	Wed Feb 16 15:56:40 1994
+++ Makefile	Wed Feb 16 16:43:35 1994
@@ -8,7 +8,7 @@
 MANDIR  =  /usr/local/man/man8
 DESTDIR =  /usr/local/bin
 
-CFLAGS	=  -g -DUSE_ECHO
+CFLAGS	=  -g #-DUSE_ECHO
 
 LIB     =  libskey.a
 LIBOBJS =  skeylogin.o skeysubr.o md4.o put.o
@@ -19,6 +19,7 @@
 	@echo "Please specify the type of system you are compiling on:"
 	@echo ""
 	@echo " bsd             Berkeley 4.x, 386BSD, Aviion DG/UX"
+	@echo " linux		Linux"
 	@echo " sunos4          Sun SunOS 4.x"
 	@echo " sunos5          Sun SunOS 5.x (Solaris 2.x)"
 	@echo " ultrix          Dec Ultrix 4.1.x"
@@ -37,10 +38,13 @@
 
 install:
 	chmod u+s keyinit keysh
-	mv key $(BIN)
-	mv keyinit $(BIN)
-	mv keysh $(BIN)
+	mv key $(DESTDIR)
+	mv keyinit $(DESTDIR)
+	mv keysh $(DESTDIR)
 
+linux:
+	make all SYS=sysv RANLIB="echo" CFLAGS="$(CFLAGS) -DSYSV -DPOSIX"
+
 sunos5:
 	make all SYS=$@ RANLIB="echo" CFLAGS="$(CFLAGS) -DSYSV -DSOLARIS \
         -DSIGVOID"
@@ -54,13 +58,13 @@
 sysv:
 	make all SYS=$@ RANLIB="echo" CFLAGS="$(CFLAGS) -DSYSV"
 
-key:    skey.c
+key:    skey.c $(LIB)
 	$(CC) -o $@ $(CFLAGS) skey.c $(LIB) $(SYSLIBS)
 
-keyinit: skeyinit.c
+keyinit: skeyinit.c $(LIB)
 	$(CC) -o $@ $(CFLAGS) skeyinit.c $(LIB) $(SYSLIBS)
 
-keysh:  skeysh.c
+keysh:  skeysh.c $(LIB)
 	$(CC) -o $@ $(CFLAGS) skeysh.c $(LIB) $(SYSLIBS)
 
 $(LIB): $(LIBOBJS)
--- skey.c.old	Wed Feb 16 15:54:34 1994
+++ skey.c	Wed Feb 16 16:34:49 1994
@@ -30,7 +30,9 @@
 #include <dos.h>
 #else				/* Assume BSD unix */
 #include <fcntl.h>
+#ifndef POSIX
 #include <sgtty.h>
+#endif
 #endif
 #include "md4.h"
 #include "skey.h"
--- skeyinit.c.old	Wed Feb 16 16:01:06 1994
+++ skeyinit.c	Wed Feb 16 16:01:15 1994
@@ -12,7 +12,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <pwd.h>
-#incoude <sys/resource.h>
+#include <sys/resource.h>
 #include <time.h>
 
 #ifdef __svr4__
@@ -95,16 +95,20 @@
   }
 
   salt = pp->pw_passwd;
-
+#ifdef PRIO_PROCESS
   setpriority (PRIO_PROCESS, 0, -4);
+#endif
 
   if (getuid () != 0) {
+#ifdef PRIO_PROCESS
      setpriority (PRIO_PROCESS, 0, -4);
+#endif
 
      pw = getpass ("Password:");
      p = crypt (pw, salt);
-
+#ifdef PRIO_PROCESS
      setpriority(PRIO_PROCESS, 0, 0);
+#endif
 
      if (pp && strcmp(p, pp->pw_passwd)) {
         printf ("Password incorrect.\n");
