Make it work under BSD.
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sat, 6 Feb 1993 05:36:04 +0000 (05:36 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sat, 6 Feb 1993 05:36:04 +0000 (05:36 +0000)
v7/src/microcode/hppacach.h
v7/src/microcode/m/hp9k800.h

index 9203d6e0b59b0b353c787a3e252a57e1318ede0c..6d3b0050cc7376fbe724fa508976db96af817368 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/hppacach.h,v 1.3 1990/12/01 00:21:04 cph Rel $
+$Id: hppacach.h,v 1.4 1993/02/06 05:34:46 gjr Exp $
 
-Copyright (c) 1990 Massachusetts Institute of Technology
+Copyright (c) 1990-1993 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -38,12 +38,15 @@ MIT in each case. */
 #define I_CACHE                1
 #define D_CACHE                2
 
+#include <fcntl.h>
+
+#ifdef _HPUX
 #include <sys/utsname.h>
 #include <sys/types.h>
 #include <sys/param.h>
 #include <machine/cpu.h>
 #include <machine/pdc_rqsts.h>
-#include <fcntl.h>
+#endif /* _HPUX */
 \f
 /* PDC_CACHE (processor dependent code cache information call)
    return data destructuring.
@@ -117,9 +120,26 @@ struct pdc_cache_result
   struct tlb_info DT_info;
 };
 
+#ifdef _HPUX
+
+#  define HARDWARE_SIZE sizeof (utsname.machine)
+
+#else /* not _HPUX */
+/* Presumably BSD */
+
+#  define HARDWARE_SIZE 9
+
+struct pdc_cache_rtn_block
+{
+  struct pdc_cache_result goodies;
+  int filler[2];
+};
+
+#endif /* _HPUX */
+
 struct pdc_cache_dump
 {
-  char hardware[sizeof (utsname.machine)];
+  char hardware[HARDWARE_SIZE];
   struct pdc_cache_rtn_block cache_format;
 };
 
index 2976e26963917c6cd1d042fead71f596f46c144f..e9ff730130c41e645b4fd12fed0147fd174b984a 100644 (file)
@@ -1,9 +1,9 @@
 /* -*-C-*-
-   Machine file for HP9000 series  600, 700, 800.
+   Machine file for HP9000 series 600, 700, 800.
 
-$Id: hp9k800.h,v 1.10 1992/11/18 15:30:56 gjr Exp $
+$Id: hp9k800.h,v 1.11 1993/02/06 05:36:04 gjr Exp $
 
-Copyright (c) 1989-1992 Massachusetts Institute of Technology
+Copyright (c) 1989-1993 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -37,6 +37,8 @@ MIT in each case. */
 #define PROC_TYPE PROC_TYPE_HPPA
 #endif /* PROC_TYPE */
 
+#if defined(hpux) || defined(__hpux)
+
 #if defined(HAVE_STARBASE_GRAPHICS) && !defined(STARBASE_DEVICE_DRIVERS)
 /* Add additional Starbase device drivers here. */
 #  define STARBASE_DEVICE_DRIVERS -ldd98550
@@ -55,3 +57,16 @@ MIT in each case. */
 #  define C_SWITCH_MACHINE
 #  define M4_SWITCH_MACHINE -DTYPE_CODE_LENGTH=6 -DGCC
 #endif
+
+#else /* not hpux or __hpux */
+
+/* Utah BSD */
+
+#ifndef ALTERNATE_CC
+#  define C_SWITCH_MACHINE -Dhp9000s800
+#  define M4_SWITCH_MACHINE -P "define(TYPE_CODE_LENGTH,6)" -P "define(HPC,1)"
+#else
+#  define M4_SWITCH_MACHINE -P "define(TYPE_CODE_LENGTH,6)" -P "define(GCC,1)"
+#endif
+
+#endif /* hpux or __hpux */