diff -ru ./blif2vst/Makefile ../sis-1.2.1/blif2vst/Makefile
--- ./blif2vst/Makefile	Fri Jul 15 01:46:34 1994
+++ ../sis-1.2.1/blif2vst/Makefile	Tue Nov 18 19:14:29 1997
@@ -15,7 +15,7 @@
 # for HPUX
 SHELL	= /bin/sh
 
-MAKE = /bin/make
+MAKE = make
 AR = ar
 RANLIB = ranlib
 CPLUSPLUS = g++
@@ -23,8 +23,8 @@
 OCTTOOLS	= /projects/octtools/octtools/$(MACHINE)
 SIS	= /usr/eesww/sis
 UTILS	= ${OCTTOOLS}/utils
-XINCLOC = -I/usr/local/X11R4/include
-XLIBLOC = -L/usr/local/X11R4/lib
+XINCLOC = -I/usr/X11R6/include
+XLIBLOC = -L/usr/X11R6/lib
 
 LINTCREATEFLAG = -C
 LINTEXTRAS =
diff -ru ./espresso/Makefile ../sis-1.2.1/espresso/Makefile
--- ./espresso/Makefile	Thu May 14 17:41:00 1992
+++ ../sis-1.2.1/espresso/Makefile	Sun Nov 16 17:16:17 1997
@@ -67,7 +67,7 @@
 # for HPUX
 SHELL	= /bin/sh
 
-MAKE = /bin/make
+MAKE = make
 
 CAD	= /octtools/release-3.0
 CADROOT	= ~octtools
@@ -97,9 +97,9 @@
 # tools required for this tool
 TOOLREQUIRE = 
 
-SRC	= cofactor.c cols.c compl.c contain.c cubestr.c cvrin.c cvrm.c cvrmisc.c cvrout.c dominate.c equiv.c espresso.c essen.c exact.c expand.c gasp.c getopt.c gimpel.c globals.c hack.c indep.c irred.c main.c map.c matrix.c mincov.c opo.c pair.c part.c primes.c reduce.c rows.c set.c setc.c sharp.c sminterf.c solution.c sparse.c unate.c verify.c
-LSRC	= cofactor.c cols.c compl.c contain.c cubestr.c cvrin.c cvrm.c cvrmisc.c cvrout.c dominate.c equiv.c espresso.c essen.c exact.c expand.c gasp.c getopt.c gimpel.c globals.c hack.c indep.c irred.c main.c map.c matrix.c mincov.c opo.c pair.c part.c primes.c reduce.c rows.c set.c setc.c sharp.c sminterf.c solution.c sparse.c unate.c verify.c
-OBJ	= cofactor.o cols.o compl.o contain.o cubestr.o cvrin.o cvrm.o cvrmisc.o cvrout.o dominate.o equiv.o espresso.o essen.o exact.o expand.o gasp.o getopt.o gimpel.o globals.o hack.o indep.o irred.o main.o map.o matrix.o mincov.o opo.o pair.o part.o primes.o reduce.o rows.o set.o setc.o sharp.o sminterf.o solution.o sparse.o unate.o verify.o
+SRC	= cofactor.c cols.c compl.c contain.c cubestr.c cvrin.c cvrm.c cvrmisc.c cvrout.c dominate.c equiv.c espresso.c essen.c exact.c expand.c gasp.c gimpel.c globals.c hack.c indep.c irred.c main.c map.c matrix.c mincov.c opo.c pair.c part.c primes.c reduce.c rows.c set.c setc.c sharp.c sminterf.c solution.c sparse.c unate.c verify.c
+LSRC	= cofactor.c cols.c compl.c contain.c cubestr.c cvrin.c cvrm.c cvrmisc.c cvrout.c dominate.c equiv.c espresso.c essen.c exact.c expand.c gasp.c gimpel.c globals.c hack.c indep.c irred.c main.c map.c matrix.c mincov.c opo.c pair.c part.c primes.c reduce.c rows.c set.c setc.c sharp.c sminterf.c solution.c sparse.c unate.c verify.c
+OBJ	= cofactor.o cols.o compl.o contain.o cubestr.o cvrin.o cvrm.o cvrmisc.o cvrout.o dominate.o equiv.o espresso.o essen.o exact.o expand.o gasp.o gimpel.o globals.o hack.o indep.o irred.o main.o map.o matrix.o mincov.o opo.o pair.o part.o primes.o reduce.o rows.o set.o setc.o sharp.o sminterf.o solution.o sparse.o unate.o verify.o
 HDR	= espresso.h main.h mincov.h mincov_int.h sparse.h sparse_int.h
 
 CADBIN	= ${CAD}/bin
diff -ru ./jedi/Makefile ../sis-1.2.1/jedi/Makefile
--- ./jedi/Makefile	Sun Jan 17 02:52:25 1993
+++ ../sis-1.2.1/jedi/Makefile	Sun Nov 16 17:16:17 1997
@@ -67,7 +67,7 @@
 # for HPUX
 SHELL	= /bin/sh
 
-MAKE = /bin/make
+MAKE = make
 
 CAD	= /octtools/release-3.0
 CADROOT	= ~octtools
@@ -97,9 +97,9 @@
 # tools required for this tool
 TOOLREQUIRE = 
 
-SRC	= cluster.c expand.c getopt.c hill.c hot.c jedi.c options.c random.c read.c rp.c util.c weights.c write.c
-LSRC	= cluster.c expand.c getopt.c hill.c hot.c jedi.c options.c random.c read.c rp.c util.c weights.c write.c
-OBJ	= cluster.o expand.o getopt.o hill.o hot.o jedi.o options.o random.o read.o rp.o util.o weights.o write.o
+SRC	= cluster.c expand.c hill.c hot.c jedi.c options.c random.c read.c rp.c util.c weights.c write.c
+LSRC	= cluster.c expand.c hill.c hot.c jedi.c options.c random.c read.c rp.c util.c weights.c write.c
+OBJ	= cluster.o expand.o hill.o hot.o jedi.o options.o random.o read.o rp.o util.o weights.o write.o
 HDR	= jedi.h jedi_int.h rp.h rp_int.h util.h
 
 CADBIN	= ${CAD}/bin
diff -ru ./nova/Makefile ../sis-1.2.1/nova/Makefile
--- ./nova/Makefile	Thu May 14 17:41:12 1992
+++ ../sis-1.2.1/nova/Makefile	Tue Nov 18 19:14:09 1997
@@ -48,7 +48,7 @@
 # for HPUX
 SHELL	= /bin/sh
 
-MAKE = /bin/make
+MAKE = make
 AR = ar
 RANLIB = ranlib
 CPLUSPLUS = g++
@@ -57,8 +57,8 @@
 OCTTOOLS= ${CAD}
 CADROOT	= $$OCTTOOLS
 UTILS	= ${OCTTOOLS}/utils
-XINCLOC = -I/usr/local/X11R4/include
-XLIBLOC = -L/usr/local/X11R4/lib
+XINCLOC = -I/usr/X11R6/include
+XLIBLOC = -L/usr/X11R6/lib
 
 LINTCREATEFLAG = -C
 LINTEXTRAS =
diff -ru ./nova/exact_backtrack.c ../sis-1.2.1/nova/exact_backtrack.c
--- ./nova/exact_backtrack.c	Thu May 14 17:41:14 1992
+++ ../sis-1.2.1/nova/exact_backtrack.c	Sun Nov 16 18:58:57 1997
@@ -9,6 +9,10 @@
  */
 #include "nova.h"
 
+#ifdef __FreeBSD__
+extern char *a_inter_b(char *a, char *b, int constr_card, int dim);
+#endif
+
 /******************************************************************************
 *                         Upper level backtracking                            *
 ******************************************************************************/
@@ -836,7 +840,11 @@
     SONS_LINK *son_scanner;
     CONSTRAINT_E *scanner,*constrptr,*inter_ptr,*exist_son(); 
     char *new_code,*inter_code,*gen_newcode_cat1(),*gen_newcode_cat2(),
-	 *gen_newcode_cat3(),*a_inter_b();
+	 *gen_newcode_cat3()
+#ifndef __FreeBSD__
+	 ,*a_inter_b()
+#endif
+	 ;
     int level;
     BOOLEAN ok_to_code;
       
@@ -1161,7 +1169,11 @@
 {
 
     FATHERS_LINK *father_scanner;
-    char *ft_inter,*a_inter_b(),*prov_ptr;
+    char *ft_inter,
+#ifndef __FreeBSD__
+    *a_inter_b(),
+#endif
+    *prov_ptr;
     BOOLEAN flag;
     int i;
 
@@ -1340,7 +1352,11 @@
 {
 
     CONSTRAINT_E *constrptr;
-    char *inter_code,*inter_constr,*a_inter_b(),*c1_inter_c2();
+    char *inter_code,*inter_constr,
+#ifndef __FreeBSD_
+    *a_inter_b(),
+#endif
+    *c1_inter_c2();
     int i,state_pos1,state_pos2;
 
     for (i = graph_depth-1; i >= 0; i--) {
diff -ru ./options/Makefile ../sis-1.2.1/options/Makefile
--- ./options/Makefile	Sat Jul 16 00:53:39 1994
+++ ../sis-1.2.1/options/Makefile	Sun Nov 16 17:16:18 1997
@@ -67,7 +67,7 @@
 # for HPUX
 SHELL	= /bin/sh
 
-MAKE = /bin/make
+MAKE = make
 AR = ar
 RANLIB = ranlib
 CPLUSPLUS = g++
diff -ru ./port/port.h ../sis-1.2.1/port/port.h
--- ./port/port.h	Sun Nov 16 17:06:44 1997
+++ ../sis-1.2.1/port/port.h	Sun Nov 16 18:51:41 1997
@@ -110,7 +110,7 @@
 #define LACK_SYS5
 #endif
 
-#if defined(ultrix3) || defined(sunos4) || defined(_IBMR2) || defined(ultrix4) || defined(__osf__)
+#if defined(ultrix3) || defined(sunos4) || defined(_IBMR2) || defined(ultrix4) || defined(__osf__) || defined(__FreeBSD__)
 #define SIGNAL_FN	void
 #else
 /* sequent, ultrix2, 4.3BSD (vax, hp), sunos3 */
diff -ru ./sis/Makefile ../sis-1.2.1/sis/Makefile
--- ./sis/Makefile	Sat Jul 16 01:02:00 1994
+++ ../sis-1.2.1/sis/Makefile	Sun Nov 16 17:21:16 1997
@@ -13,7 +13,7 @@
 UNPACK	= unpack
 COPY = .
 SHELL = /bin/sh
-MAKE = /bin/make
+MAKE = make
 REQUIRE = oh oct utility st errtrap mm port
 LINTCREATEFLAG = -C
 LINTEXTRAS = -DOCT -DUSE_MM -DSIS
@@ -92,21 +92,21 @@
 	@for dir in $(DIRS); do				\
 	    (cd $$dir; 					\
 	     echo Making $$dir ...; 			\
-	     ${MAKE} CC=$(CC) 'CFLAGS=$(CFLAGS) $$(INCLUDE)' SIS=$(SIS) CADROOT=$(CADROOT) CAD=$(CAD) lib$$dir.a)\
+	     ${MAKE} CC=$(CC) 'CFLAGS=$(CFLAGS) $$(INCLUDE)' SIS=$(SIS) CADROOT=$(CADROOT) CAD=$(CAD) LIBDIR=$(LIBDIR) lib$$dir.a)\
 	done
 
 do_makeg:
 	@for dir in $(DIRS); do 			\
 	    (cd $$dir; 					\
 	     echo Making $$dir ...; 			\
-	     ${MAKE} CC=$(CC) 'CFLAGS=$(CFLAGSG) $$(INCLUDE)' SIS=$(SIS) CADROOT=$(CADROOT) CAD=$(CAD) lib$$dir.a)\
+	     ${MAKE} CC=$(CC) 'CFLAGS=$(CFLAGSG) $$(INCLUDE)' SIS=$(SIS) CADROOT=$(CADROOT) CAD=$(CAD) LIBDIR=$(LIBDIR) lib$$dir.a)\
 	done
 
 do_lintlib:
 	@-for dir in $(DIRS); do				\
 	    (cd $$dir; 					\
 	       echo Linting $$dir ...; 			\
-	       ${MAKE} SIS=$(SIS) LINTCREATEFLAG=${LINTCREATEFLAG} LINTEXTRAS=${LINTEXTRAS} CADROOT=$(CADROOT) CAD=$(CAD) llib-l$$dir.ln);	\
+	       ${MAKE} SIS=$(SIS) LINTCREATEFLAG=${LINTCREATEFLAG} LINTEXTRAS=${LINTEXTRAS} CADROOT=$(CADROOT) CAD=$(CAD) LIBDIR=$(LIBDIR) llib-l$$dir.ln);	\
 	done
 
 do_repack:
@@ -142,7 +142,7 @@
 	@for dir in $(DIRS); do				\
 	    (cd $$dir; 					\
 	     echo Cleaning $$dir ...; 			\
-	     ${MAKE} -i CAD=$(CAD) SIS=$(SIS) strip_depend >/dev/null	\
+	     ${MAKE} -i CAD=$(CAD) SIS=$(SIS) strip_depend >/dev/null;	\
 	     ${MAKE} -i CAD=$(CAD) SIS=$(SIS) clean >/dev/null)	\
 	done
 
@@ -201,7 +201,7 @@
 	@for dir in $(DIRS); do				\
 	    (cd $$dir; 					\
 	     echo; echo "lint $$dir ...";		\
-	     ${MAKE} SIS=$(SIS) 'CFLAGS=$(CFLAGSG) $$(INCLUDE)' LINTCREATEFLAG=${LINTCREATEFLAG} LINTEXTRAS=${LINTEXTRAS} CADROOT=${CADROOT} CAD=$(CAD) lint)		\
+	     ${MAKE} SIS=$(SIS) 'CFLAGS=$(CFLAGSG) $$(INCLUDE)' LINTCREATEFLAG=${LINTCREATEFLAG} LINTEXTRAS=${LINTEXTRAS} CADROOT=${CADROOT} CAD=$(CAD) LIBDIR=$(LIBDIR) lint)		\
 	done
 
 wc:
@@ -221,7 +221,7 @@
 	    (cd $$dir; 					\
 	     sleep 1;					\
 	     echo $$dir;				\
-	     ${MAKE} CAD=$(CAD) tags)			\
+	     ${MAKE} CAD=$(CAD)				\
 	done
 	sort -o tags tags
 
diff -ru ./sis/Makefile.nooct ../sis-1.2.1/sis/Makefile.nooct
--- ./sis/Makefile.nooct	Sat Jul 16 00:56:21 1994
+++ ../sis-1.2.1/sis/Makefile.nooct	Sun Nov 16 17:16:18 1997
@@ -13,7 +13,7 @@
 UNPACK	= unpack
 COPY = .
 SHELL = /bin/sh
-MAKE = /bin/make
+MAKE = make
 REQUIRE = oh oct utility st errtrap mm port
 LINTCREATEFLAG = -C
 LINTEXTRAS = -DOCT -DUSE_MM -DSIS
diff -ru ./sis/astg/bwd_com.c ../sis-1.2.1/sis/astg/bwd_com.c
--- ./sis/astg/bwd_com.c	Sun Nov 16 17:06:45 1997
+++ ../sis-1.2.1/sis/astg/bwd_com.c	Tue Nov 18 19:06:43 1997
@@ -1216,7 +1216,7 @@
 	 ns = stg_get_num_states (stg);
 	 fprintf (siserr, "give the codes in the form state_name binary_code\n");
 	 for (i = 0; i < ns; i++) {
-		gets (buf1);
+		fgets (buf1, sizeof(buf1), stdin);
 		do {
 			sscanf (buf1, "%s %s", buf2, buf3);
 			state = stg_get_state_by_name (stg, buf2);
diff -ru ./sis/main/Makefile ../sis-1.2.1/sis/main/Makefile
--- ./sis/main/Makefile	Sat Jul 16 00:48:37 1994
+++ ../sis-1.2.1/sis/main/Makefile	Sun Nov 16 17:20:33 1997
@@ -61,7 +61,7 @@
 
 version.o: version.c
 	$(CC) $(CFLAGS) -c "-DCUR_DATE=\"`date`\"" \
-			"-DLIBRARY=\"$(SIS)/sis_lib\"" version.c
+			"-DLIBRARY=\"$(LIBDIR)/sis_lib\"" version.c
 
 #----------------------------------------------------------------------
 
diff -ru ./sis/util/pipefork.c ../sis-1.2.1/sis/util/pipefork.c
--- ./sis/util/pipefork.c	Thu Sep  9 19:24:32 1993
+++ ../sis-1.2.1/sis/util/pipefork.c	Sun Nov 16 18:45:12 1997
@@ -38,7 +38,7 @@
     int forkpid, waitpid;
     int topipe[2], frompipe[2];
     char buffer[1024];
-#if (defined hpux) || (defined __osf__) || (defined _IBMR2)
+#if (defined hpux) || (defined __osf__) || (defined _IBMR2) || (defined __FreeBSD__)
     int status;
 #else
     union wait status;
diff -ru ./sred/Makefile ../sis-1.2.1/sred/Makefile
--- ./sred/Makefile	Fri Mar 11 17:58:41 1994
+++ ../sis-1.2.1/sred/Makefile	Tue Nov 18 19:14:14 1997
@@ -17,7 +17,7 @@
 # for HPUX
 SHELL	= /bin/sh
 
-MAKE = /bin/make
+MAKE = make
 AR = ar
 RANLIB = ranlib
 CPLUSPLUS = g++
@@ -26,8 +26,8 @@
 # SIS	= /projects/classes/sis/$(MACHINE)
 SIS	= /usr/eesww/sis
 UTILS	= ${OCTTOOLS}/utils
-XINCLOC = -I/usr/local/X11R4/include
-XLIBLOC = -L/usr/local/X11R4/lib
+XINCLOC = -I/usr/X11R6/include
+XLIBLOC = -L/usr/X11R6/lib
 
 LINTCREATEFLAG = -C
 LINTEXTRAS =
diff -ru ./stamina/mimi/main.c ../sis-1.2.1/stamina/mimi/main.c
--- ./stamina/mimi/main.c	Sun Nov 16 17:06:59 1997
+++ ../sis-1.2.1/stamina/mimi/main.c	Sun Nov 16 19:00:14 1997
@@ -23,6 +23,10 @@
 struct u user;
 long t_start;
 
+#ifdef __FreeBSD__
+static usage(char *prog);
+#endif
+
 main(argc,argv)
 char **argv;
 {
diff -ru ./stamina/mimi/stack.c ../sis-1.2.1/stamina/mimi/stack.c
--- ./stamina/mimi/stack.c	Sat Jul 16 00:58:59 1994
+++ ../sis-1.2.1/stamina/mimi/stack.c	Thu Nov 20 12:43:18 1997
@@ -20,6 +20,10 @@
 static int **top_of_stack;
 static int **stack_ptr;
 
+#ifdef __FreeBSD__
+static _push(int *operand);
+#endif
+
 /* Emulation of the stack operation */
 /* This routine guarantees compact use of memory */
 /* But is must pay for it in terms of time */
@@ -85,9 +89,9 @@
 (void) printf("Push %s %s \n",states[state1]->state_name,states[state2]->state_name);
 #endif
 	if (state2 >  state1)
-	_push(&xstack[(num_st-state1-2)*(num_st-state1-1)/2-state2+num_st-1]);
+	_push((int *)&xstack[(num_st-state1-2)*(num_st-state1-1)/2-state2+num_st-1]);
 	else
-	_push(&xstack[(num_st-state2-2)*(num_st-state2-1)/2-state1+num_st-1]);
+	_push((int *)&xstack[(num_st-state2-2)*(num_st-state2-1)/2-state1+num_st-1]);
 }
 
 static
diff -ru ./utility/Makefile ../sis-1.2.1/utility/Makefile
--- ./utility/Makefile	Sat Jul 16 00:55:23 1994
+++ ../sis-1.2.1/utility/Makefile	Sun Nov 16 17:16:19 1997
@@ -67,7 +67,7 @@
 # for HPUX
 SHELL	= /bin/sh
 
-MAKE = /bin/make
+MAKE = make
 AR = ar
 RANLIB = ranlib
 CPLUSPLUS = g++
diff -ru ./utility/csystem.c ../sis-1.2.1/utility/csystem.c
--- ./utility/csystem.c	Sat Oct 24 01:31:44 1992
+++ ../sis-1.2.1/utility/csystem.c	Tue Nov 18 18:56:31 1997
@@ -17,8 +17,12 @@
 util_csystem(s)
 char *s;
 {
+#ifdef __FreeBSD__
+    sig_t istat, qstat;
+#else
     register SIGNAL_FN (*istat)(), (*qstat)();
-#if defined(_IBMR2) || defined(__osf__)
+#endif
+#if defined(_IBMR2) || defined(__osf__) || defined(__FreeBSD__)
     int status;    
 #else
     union wait status;
@@ -39,7 +43,7 @@
     if (w == -1) {		/* check for no children ?? */
 	retval = -1;
     } else {
-#if defined(_IBMR2) || defined(__osf__)
+#if defined(_IBMR2) || defined(__osf__) || defined(__FreeBSD__)
 	retval = status;
 #else
 	retval = status.w_status;
diff -ru ./utility/pipefork.c ../sis-1.2.1/utility/pipefork.c
--- ./utility/pipefork.c	Sat Apr 23 04:05:01 1994
+++ ../sis-1.2.1/utility/pipefork.c	Sun Nov 16 18:52:48 1997
@@ -37,7 +37,7 @@
     int forkpid, waitpid;
     int topipe[2], frompipe[2];
     char buffer[1024];
-#if defined(__hpux) || defined (__osf__)
+#if defined(__hpux) || defined (__osf__) || defined(__FreeBSD__)
     int status;
 #else
     union wait status;
diff -ru ./vst2blif/Makefile ../sis-1.2.1/vst2blif/Makefile
--- ./vst2blif/Makefile	Fri Jul 15 01:45:02 1994
+++ ../sis-1.2.1/vst2blif/Makefile	Tue Nov 18 19:14:02 1997
@@ -15,7 +15,7 @@
 # for HPUX
 SHELL	= /bin/sh
 
-MAKE = /bin/make
+MAKE = make
 AR = ar
 RANLIB = ranlib
 CPLUSPLUS = g++
@@ -23,8 +23,8 @@
 OCTTOOLS	= /projects/octtools/octtools/$(MACHINE)
 SIS	= /usr/eesww/sis
 UTILS	= ${OCTTOOLS}/utils
-XINCLOC = -I/usr/local/X11R4/include
-XLIBLOC = -L/usr/local/X11R4/lib
+XINCLOC = -I/usr/X11R6/include
+XLIBLOC = -L/usr/X11R6/lib
 
 LINTCREATEFLAG = -C
 LINTEXTRAS =
diff -ru ./xsis/main.c ../sis-1.2.1/xsis/main.c
--- ./xsis/main.c	Sat Jul 16 00:55:57 1994
+++ ../sis-1.2.1/xsis/main.c	Sun Nov 16 17:16:20 1997
@@ -242,7 +242,11 @@
 	xsis_world.child_status = XSIS_IDLE;
 	xsis_tty_block (xsis_world.sis_pty,0);
 	if (xsis_world.debug) printf("Starting %s, PID %d.\n",sis_exec,pid);
+#if defined(SIGCLD)
 	signal (SIGCLD,catch_sigcld);
+#else
+	signal (SIGCHLD,catch_sigcld);
+#endif
 	xsis_main (argc,argv);
 	close (master);
     }
@@ -253,7 +257,11 @@
 	    return (-1);
 	} else {
 	    terminfo.c_oflag &= ~ONLCR;	/* Don't map NL on output.	*/
+#if defined(TAB3)
 	    terminfo.c_oflag &= ~TAB3;	/* Don't expand tabs on output.	*/
+#else
+	    terminfo.c_oflag &= ~OXTABS;
+#endif
 	    terminfo.c_lflag |= ECHO;	/* Echo all input.		*/
 	    terminfo.c_lflag |= ICANON;	/* Use canonical input.		*/
 	    if (tcsetattr (slave, TCSADRAIN, &terminfo) != 0) {
diff -ru ./xsis/xutil.c ../sis-1.2.1/xsis/xutil.c
--- ./xsis/xutil.c	Sat Jul 16 00:56:03 1994
+++ ../sis-1.2.1/xsis/xutil.c	Sun Nov 16 17:16:19 1997
@@ -49,7 +49,9 @@
     /*	Similar to perror but print errno value also for debugging. */
 
     extern int sys_nerr;
+#if !defined(__FreeBSD__)
     extern char *sys_errlist[];
+#endif
 
     if (errno >= 0 && errno < sys_nerr) {
 	fprintf(stderr,"%s: %s (errno=%d)\n",s,sys_errlist[errno],errno);
