diff -ur ./Makefile.in ../../work/hercules-2.16.5/Makefile.in
--- ./Makefile.in	Mon Jul  8 14:55:57 2002
+++ ../../work/hercules-2.16.5/Makefile.in	Mon Dec 16 17:17:45 2002
@@ -116,7 +116,7 @@
 	   ipl.c assist.c dat.c \
 	   stack.c cpu.c vstore.c \
 	   general1.c general2.c plo.c \
-	   control.c io.c \
+	   control.c io.c hc.c \
 	   decimal.c service.c opcode.c \
 	   diagnose.c diagmssf.c vm.c \
 	   channel.c ckddasd.c fbadasd.c \
@@ -327,7 +327,7 @@
 	version.$(OBJEXT) ipl.$(OBJEXT) assist.$(OBJEXT) dat.$(OBJEXT) \
 	stack.$(OBJEXT) cpu.$(OBJEXT) vstore.$(OBJEXT) \
 	general1.$(OBJEXT) general2.$(OBJEXT) plo.$(OBJEXT) \
-	control.$(OBJEXT) io.$(OBJEXT) decimal.$(OBJEXT) \
+	control.$(OBJEXT) io.$(OBJEXT) hc.$(OBJEXT) decimal.$(OBJEXT) \
 	service.$(OBJEXT) opcode.$(OBJEXT) diagnose.$(OBJEXT) \
 	diagmssf.$(OBJEXT) vm.$(OBJEXT) channel.$(OBJEXT) \
 	ckddasd.$(OBJEXT) fbadasd.$(OBJEXT) tapedev.$(OBJEXT) \
@@ -402,6 +402,7 @@
 @AMDEP_TRUE@	./$(DEPDIR)/channel.Po ./$(DEPDIR)/ckd2cckd.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/ckddasd.Po ./$(DEPDIR)/cmpsc.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/config.Po ./$(DEPDIR)/console.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/hc.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/control.Po ./$(DEPDIR)/cpu.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/ctcadpt.Po ./$(DEPDIR)/dasdcat.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/dasdinit.Po ./$(DEPDIR)/dasdisup.Po \
@@ -608,6 +609,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/console.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctcadpt.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dasdcat.Po@am__quote@
Only in ../../work/hercules-2.16.5: Makefile.in.orig
diff -ur ./configure.ac ../../work/hercules-2.16.5/configure.ac
--- ./configure.ac	Mon Jul  8 14:55:42 2002
+++ ../../work/hercules-2.16.5/configure.ac	Mon Dec 16 17:17:45 2002
@@ -153,6 +153,16 @@
                                [AC_DEFINE([HAVE_U_INT])],
                                [AC_MSG_ERROR([Unable to find fixed-size data types])] )] )
 
+dnl AC_MSG_NOTICE([Checking for SCSI tape support and what type])
+AC_CHECK_HEADER(sys/mtio.h,
+		[AC_DEFINE([HAVE_MTIO_H])])
+
+AC_TRY_COMPILE([#include mtio.h],
+		[mtget test;
+		 int result;
+		 result = test.mt_gstat; ],
+		[AC_DEFINE([GNU_MTIO_SUPPORT])])
+
 # Compiler characteristics
 
 AC_C_BIGENDIAN
@@ -375,5 +385,9 @@
             [Define to debug correct fthreads LOCK handling (requires fthreads)])
 AH_TEMPLATE([PKGDATADIR],
             [Directory where the HTTP server will find documents])
+AH_TEMPLATE([HAVE_MTIO_H],
+	    Define if your system has sys/mtio.h])
+AH_TEMPLATE([GNU_MTIO_SUPPORT],
+	    [Define if you have the GNU version of mtio.h (Linux)])
 
 AC_OUTPUT(Makefile util/Makefile html/Makefile)
Only in ../../work/hercules-2.16.5: configure.ac.orig
Only in ../../work/hercules-2.16.5: hc.c
Only in ../../work/hercules-2.16.5: hc.c.orig
diff -ur ./opcode.c ../../work/hercules-2.16.5/opcode.c
--- ./opcode.c	Wed Jul  3 04:04:41 2002
+++ ../../work/hercules-2.16.5/opcode.c	Mon Dec 16 17:17:45 2002
@@ -1276,8 +1276,8 @@
  /*0100*/ GENx___x___x___ ,
  /*0101*/ GENx___x390x900 (program_return,E,"PR"),
  /*0102*/ GENx___x390x900 (update_tree,E,"UPT"),
- /*0103*/ GENx___x___x___ ,
- /*0104*/ GENx___x___x___ ,
+ /*0103*/ GENx370x390x900 (hconsole_get_char,E,"HCGC"),
+ /*0104*/ GENx370x390x900 (hconsole_put_char,E,"HCPC"),
  /*0105*/ GENx___x___x___ ,                                     /* CMSG      */
  /*0106*/ GENx___x___x___ ,                                     /* TMSG      */
  /*0107*/ GENx___x390x900 (set_clock_programmable_field,E,"SCKPF"),
Only in ../../work/hercules-2.16.5: opcode.c.orig
diff -ur ./opcode.h ../../work/hercules-2.16.5/opcode.h
--- ./opcode.h	Mon Mar 11 18:40:40 2002
+++ ../../work/hercules-2.16.5/opcode.h	Mon Dec 16 17:17:45 2002
@@ -1599,6 +1599,11 @@
 DEF_INST(dummy_instruction);
 
 
+/* Instructions in hc.c */
+DEF_INST(hconsole_get_char);
+DEF_INST(hconsole_put_char);
+
+
 /* Instructions in assist.c */
 DEF_INST(svc_assist);
 DEF_INST(obtain_local_lock);
Only in ../../work/hercules-2.16.5: opcode.h.orig
Only in ../../work/hercules-2.16.5: tapecopy.c.rej
Only in ../../work/hercules-2.16.5: tapedev.c.rej
diff -ur ./version.c ../../work/hercules-2.16.5/version.c
--- ./version.c	Mon Dec 16 17:15:30 2002
+++ ../../work/hercules-2.16.5/version.c	Mon Dec 16 17:17:48 2002
@@ -20,6 +20,14 @@
 
 static const char *build_info[] = {
 
+#if defined(GNU_MTIO_SUPPORT)
+    "Using GNU tape handling",
+#elif defined(HAVE_MTIO_H)
+    "Using generic UNIX tape handling",
+#else
+    "No SCSI tape support",
+#endif
+
 #if defined(CUSTOM_BUILD_STRING)
     CUSTOM_BUILD_STRING,
 #endif
diff -ur ./version.c.orig ../../work/hercules-2.16.5/version.c.orig
--- ./version.c.orig	Mon May 20 23:02:41 2002
+++ ../../work/hercules-2.16.5/version.c.orig	Mon Dec 16 17:17:29 2002
@@ -106,6 +106,14 @@
     "No HET BZIP2 support",
 #endif
 
+#if defined(GNU_MTIO_SUPPORT)
+	 "Using GNU tape handling",
+#elif defined(HAVE_MTIO_H)
+	 "Using generic Unix tape handling",
+#else
+	 "No SCSI tape support",
+#endif
+
   " "
 
 };
Only in .: version.c.orig.rej
