Added DOS 386/486 support.
authorHenry M. Wu <edu/mit/csail/zurich/mhwu>
Sat, 29 Feb 1992 19:39:41 +0000 (19:39 +0000)
committerHenry M. Wu <edu/mit/csail/zurich/mhwu>
Sat, 29 Feb 1992 19:39:41 +0000 (19:39 +0000)
v7/src/microcode/bchdmp.c
v7/src/microcode/bchdrn.h
v7/src/microcode/bchgcc.h
v7/src/microcode/bchutl.c

index 1d5e93cdc241eb1bb32ddcd82401ffeb8879dafd..70567605d75634f9ff6a46a851de7c33821f3e23 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchdmp.c,v 9.60 1992/02/10 13:53:22 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchdmp.c,v 9.61 1992/02/29 19:33:03 mhwu Exp $
 
 Copyright (c) 1987-1992 Massachusetts Institute of Technology
 
@@ -38,15 +38,43 @@ MIT in each case. */
 
 #include "scheme.h"
 #include "prims.h"
-#include "uxio.h"
 #include "osfile.h"
 #include "trap.h"
 #include "lookup.h"            /* UNCOMPILED_VARIABLE */
 #define In_Fasdump
 #include "bchgcc.h"
 #include "fasl.h"
+
+\f
+#ifdef DOS386
+#include "msdos.h"
+#include "dosio.h"
+
+int
+DEFUN (ftruncate, (fd, size), int fd AND unsigned long size)
+{
+  return size;
+}
+
+void
+DEFUN (mktemp, (fname), unsigned char * fname)
+{ /* Should call tmpname */
+  return;
+}
+
+#define FASDUMP_FILENAME "\\tmp\\fasdump.bin"
+
+#else
+
 #include "ux.h"
+#include "uxio.h"
+extern int EXFUN (unlink, (CONST char *));
 
+#define FASDUMP_FILENAME "/tmp/fasdumpXXXXXX"
+
+#endif /* DOS386 */
+
+\f
 static Tchannel dump_channel;
 
 #define Write_Data(size, buffer)                                       \
@@ -244,8 +272,6 @@ DEFUN (fasdump_exit, (length), long length)
 
   if (length == 0)
   {
-    extern int EXFUN (unlink, (CONST char *));
-
     (void) (unlink (dump_file_name));
   }
   dump_file_name = ((char *) NULL);
@@ -775,7 +801,7 @@ DEFINE_PRIMITIVE ("PRIMITIVE-FASDUMP", Prim_prim_fasdump, 3, 3, 0)
     Tchannel channel, temp_channel;
     char temp_name [19];
     {
-      char * scan1 = "/tmp/fasdumpXXXXXX";
+      char * scan1 = FASDUMP_FILENAME;
       char * scan2 = temp_name;
       while (1)
        if (((*scan2++) = (*scan1++)) == '\0')
index e32fd81a940ec3cee7a4f55f75bf1fdf43f1ee19..06c5b82bd68963d9eb59159b237d359e6138f6f5 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchdrn.h,v 1.2 1991/11/04 16:53:08 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchdrn.h,v 1.3 1992/02/29 19:35:23 mhwu Exp $
 
 Copyright (c) 1991 Massachusetts Institute of Technology
 
@@ -46,9 +46,11 @@ MIT in each case. */
 #if defined(_POSIX) || defined(_SUNOS4)
 #  include <unistd.h>
 #else
+#ifndef DOS386
   extern int EXFUN (read, (int, PTR, unsigned int));
   extern int EXFUN (write, (int, PTR, unsigned int));
 #endif
+#endif
 
 #if defined(HAVE_POSIX_SIGNALS) && defined(HAVE_BSD_SIGNALS)
 #  define RE_INSTALL_HANDLER(signum,handler)   do { } while (0)
index ff5a1be50b686758e78bde9ba38877f10eafaeb6..287d11f4085db810705128c5410a0bf9eefadcfd 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchgcc.h,v 9.43 1992/02/10 13:52:43 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchgcc.h,v 9.44 1992/02/29 19:36:55 mhwu Exp $
 
 Copyright (c) 1987-1992 Massachusetts Institute of Technology
 
@@ -43,7 +43,9 @@ MIT in each case. */
 #else
 #include <fcntl.h>
 #endif
+#ifndef DOS386
 #include <sys/param.h>
+#endif
 
 extern char * EXFUN (error_name, (int));
 
index d134d58330cf87a44568902832dc2e12cc9fc77f..168ed098484c95855324c9becdf0dded8cd329df 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchutl.c,v 1.1 1991/10/29 22:35:01 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchutl.c,v 1.2 1992/02/29 19:39:41 mhwu Exp $
 
 Copyright (c) 1991 Massachusetts Institute of Technology
 
@@ -33,7 +33,14 @@ promotional, or sales literature without prior written consent from
 MIT in each case. */
 
 #include <errno.h>
+#ifndef EINTR
+#define EINTR 1999
+#endif
+
+#ifndef DOS386
 #include <unistd.h>
+#endif
+
 #include "ansidecl.h"
 
 extern char * EXFUN (error_name, (int));