Index: c/build-tools/cklength.c
===================================================================
--- c/build-tools/cklength.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/build-tools/cklength.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -11,17 +11,4 @@
  *
  * $Id$
- * $Log$
- * Revision 1.4  1995/10/06  20:00:38  joel
- * SPARC merged and successfully tested w/o interrupt support
- *
- * Revision 1.3  1995/10/06 16:32:20  joel
- * moved to new development machine and went to gcc 2.7.0
- *
- * Revision 1.2  1995/05/31  16:44:26  joel
- * fixing revision
- *
- * Revision 1.1.1.1  1995/05/11  17:35:11  joel
- * Release 3.1.15
- *
  */
 
@@ -275,6 +262,6 @@
         if (error_flag & ERR_FATAL)
         {
-            error(0, local_errno ? "fatal error, exiting" : "exiting");
-            exit(local_errno);
+            error(0, "fatal error, exiting");
+            exit(local_errno ? local_errno : 1);
         }
         else
Index: c/build-tools/eolstrip.c
===================================================================
--- c/build-tools/eolstrip.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/build-tools/eolstrip.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -9,17 +9,4 @@
  *
  * $Id$
- * $Log$
- * Revision 1.4  1995/10/06  20:00:39  joel
- * SPARC merged and successfully tested w/o interrupt support
- *
- * Revision 1.3  1995/10/06 16:32:21  joel
- * moved to new development machine and went to gcc 2.7.0
- *
- * Revision 1.2  1995/05/31  16:44:28  joel
- * fixing revision
- *
- * Revision 1.1.1.1  1995/05/11  17:35:12  joel
- * Release 3.1.15
- *
  */
 
@@ -262,6 +249,6 @@
         if (error_flag & ERR_FATAL)
         {
-            error(0, local_errno ? "fatal error, exiting" : "exiting");
-            exit(local_errno);
+            error(0, "fatal error, exiting");
+            exit(local_errno ? local_errno : 1);
         }
         else
Index: c/build-tools/src/cklength.c
===================================================================
--- c/build-tools/src/cklength.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/build-tools/src/cklength.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -11,17 +11,4 @@
  *
  * $Id$
- * $Log$
- * Revision 1.4  1995/10/06  20:00:38  joel
- * SPARC merged and successfully tested w/o interrupt support
- *
- * Revision 1.3  1995/10/06 16:32:20  joel
- * moved to new development machine and went to gcc 2.7.0
- *
- * Revision 1.2  1995/05/31  16:44:26  joel
- * fixing revision
- *
- * Revision 1.1.1.1  1995/05/11  17:35:11  joel
- * Release 3.1.15
- *
  */
 
@@ -275,6 +262,6 @@
         if (error_flag & ERR_FATAL)
         {
-            error(0, local_errno ? "fatal error, exiting" : "exiting");
-            exit(local_errno);
+            error(0, "fatal error, exiting");
+            exit(local_errno ? local_errno : 1);
         }
         else
Index: c/build-tools/src/eolstrip.c
===================================================================
--- c/build-tools/src/eolstrip.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/build-tools/src/eolstrip.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -9,17 +9,4 @@
  *
  * $Id$
- * $Log$
- * Revision 1.4  1995/10/06  20:00:39  joel
- * SPARC merged and successfully tested w/o interrupt support
- *
- * Revision 1.3  1995/10/06 16:32:21  joel
- * moved to new development machine and went to gcc 2.7.0
- *
- * Revision 1.2  1995/05/31  16:44:28  joel
- * fixing revision
- *
- * Revision 1.1.1.1  1995/05/11  17:35:12  joel
- * Release 3.1.15
- *
  */
 
@@ -262,6 +249,6 @@
         if (error_flag & ERR_FATAL)
         {
-            error(0, local_errno ? "fatal error, exiting" : "exiting");
-            exit(local_errno);
+            error(0, "fatal error, exiting");
+            exit(local_errno ? local_errno : 1);
         }
         else
Index: c/build-tools/src/unhex.c
===================================================================
--- c/build-tools/src/unhex.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/build-tools/src/unhex.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -709,6 +709,6 @@
         if (error_flag & ERR_FATAL)
         {
-            error(0, local_errno ? "fatal error, exiting" : "exiting");
-            exit(local_errno);
+            error(0, "fatal error, exiting");
+            exit(local_errno ? local_errno : 1);
         }
         else
Index: c/build-tools/unhex.c
===================================================================
--- c/build-tools/unhex.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/build-tools/unhex.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -709,6 +709,6 @@
         if (error_flag & ERR_FATAL)
         {
-            error(0, local_errno ? "fatal error, exiting" : "exiting");
-            exit(local_errno);
+            error(0, "fatal error, exiting");
+            exit(local_errno ? local_errno : 1);
         }
         else
Index: c/src/exec/libcsupport/include/rtems/assoc.h
===================================================================
--- c/src/exec/libcsupport/include/rtems/assoc.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/libcsupport/include/rtems/assoc.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,4 +1,4 @@
 /*
- *	@(#)assoc.h	1.2 - 95/06/28
+ *	@(#)assoc.h	1.4 - 95/10/25
  *	
  *
@@ -14,5 +14,5 @@
 
 typedef struct {
-    char *name;
+    const char   *name;
     unsigned32   local_value;
     unsigned32   remote_value;
@@ -25,19 +25,19 @@
 #define RTEMS_ASSOC_DEFAULT_NAME "(default)"
 
-rtems_assoc_t *rtems_assoc_ptr_by_name(rtems_assoc_t *, char *);
-rtems_assoc_t *rtems_assoc_ptr_by_value(rtems_assoc_t *, unsigned32);
-rtems_assoc_t *rtems_assoc_ptr_by_remote(rtems_assoc_t *, unsigned32);
+const rtems_assoc_t *rtems_assoc_ptr_by_name(const rtems_assoc_t *, const char *);
+const rtems_assoc_t *rtems_assoc_ptr_by_value(const rtems_assoc_t *, unsigned32);
+const rtems_assoc_t *rtems_assoc_ptr_by_remote(const rtems_assoc_t *, unsigned32);
 
-unsigned32   rtems_assoc_remote_by_local(rtems_assoc_t *, unsigned32);
-unsigned32   rtems_assoc_local_by_remote(rtems_assoc_t *, unsigned32);
-unsigned32   rtems_assoc_remote_by_name(rtems_assoc_t *, char *);
-unsigned32   rtems_assoc_local_by_name(rtems_assoc_t *, char *);
-char        *rtems_assoc_name_by_local(rtems_assoc_t *, unsigned32);
-char        *rtems_assoc_name_by_remote(rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_remote_by_local(const rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_local_by_remote(const rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_remote_by_name(const rtems_assoc_t *, const char *);
+unsigned32   rtems_assoc_local_by_name(const rtems_assoc_t *, const char *);
+const char  *rtems_assoc_name_by_local(const rtems_assoc_t *, unsigned32);
+const char  *rtems_assoc_name_by_remote(const rtems_assoc_t *, unsigned32);
 
-unsigned32   rtems_assoc_remote_by_local_bitfield(rtems_assoc_t *, unsigned32);
-char        *rtems_assoc_name_by_local_bitfield(rtems_assoc_t *, unsigned32, char *);
-char        *rtems_assoc_name_by_remote_bitfield(rtems_assoc_t *, unsigned32, char *);
-unsigned32   rtems_assoc_local_by_remote_bitfield(rtems_assoc_t *ap, unsigned32);
+unsigned32   rtems_assoc_remote_by_local_bitfield(const rtems_assoc_t *, unsigned32);
+char  *rtems_assoc_name_by_local_bitfield(const rtems_assoc_t *, unsigned32, char *);
+char  *rtems_assoc_name_by_remote_bitfield(const rtems_assoc_t *, unsigned32, char *);
+unsigned32   rtems_assoc_local_by_remote_bitfield(const rtems_assoc_t *, unsigned32);
 
 
Index: c/src/exec/libcsupport/include/rtems/error.h
===================================================================
--- c/src/exec/libcsupport/include/rtems/error.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/libcsupport/include/rtems/error.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,4 +1,5 @@
+
 /*
- *	@(#)error.h	1.1 - 95/08/02
+ *	@(#)error.h	1.3 - 95/10/25
  *	
  *
@@ -7,4 +8,7 @@
  *  $Id$
  */
+
+#ifndef __RTEMS_ERROR_h
+#define __RTEMS_ERROR_h
 
 /*
@@ -19,8 +23,10 @@
                              RTEMS_ERROR_PANIC) /* all */
 
-char *rtems_status_text(rtems_status_code);
-int   rtems_error(int error_code, char *printf_format, ...);
-void  rtems_panic(char *printf_format, ...);
+const char *rtems_status_text(rtems_status_code);
+int   rtems_error(int error_code, const char *printf_format, ...);
+void  rtems_panic(const char *printf_format, ...);
 
 extern int rtems_panic_in_progress;
 
+#endif
+/* end of include file */
Index: c/src/exec/libcsupport/include/rtems/libcsupport.h
===================================================================
--- c/src/exec/libcsupport/include/rtems/libcsupport.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/libcsupport/include/rtems/libcsupport.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -30,5 +30,8 @@
 );
 
+extern void malloc_dump(void);
 extern void libc_init(int reentrant);
+extern int  host_errno(void);
+extern void fix_syscall_errno(void);
 
 #ifdef __cplusplus
@@ -36,7 +39,4 @@
 #endif
 
-extern int  host_errno(void);
-extern void fix_syscall_errno(void);
-
 #endif
 /* end of include file */
Index: c/src/exec/libcsupport/src/assoc.c
===================================================================
--- c/src/exec/libcsupport/src/assoc.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/libcsupport/src/assoc.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,5 +1,5 @@
 /*
- *	@(#)assoc.c	1.4 - 95/08/02
- *	
+ *	@(#)assoc.c	1.6 - 95/10/25
+ *
  *
  * assoc.c
@@ -9,5 +9,4 @@
  */
 
-
 #include <rtems.h>
 #include "assoc.h"
@@ -19,11 +18,11 @@
 #define rtems_assoc_is_default(ap)  ((ap)->name && STREQ(ap->name, RTEMS_ASSOC_DEFAULT_NAME))
 
-rtems_assoc_t *
+const rtems_assoc_t *
 rtems_assoc_ptr_by_name(
-    rtems_assoc_t *ap,
-    char *name
-  )
-{
-    rtems_assoc_t *default_ap = 0;
+    const rtems_assoc_t *ap,
+    const char *name
+  )
+{
+    const rtems_assoc_t *default_ap = 0;
 
     if (rtems_assoc_is_default(ap))
@@ -37,11 +36,11 @@
 }
 
-rtems_assoc_t *
+const rtems_assoc_t *
 rtems_assoc_ptr_by_local(
-    rtems_assoc_t *ap,
-    unsigned32     local_value
-  )
-{
-    rtems_assoc_t *default_ap = 0;
+    const rtems_assoc_t *ap,
+    unsigned32     local_value
+  )
+{
+    const rtems_assoc_t *default_ap = 0;
 
     if (rtems_assoc_is_default(ap))
@@ -56,11 +55,11 @@
 
 
-rtems_assoc_t *
+const rtems_assoc_t *
 rtems_assoc_ptr_by_remote(
-    rtems_assoc_t *ap,
-    unsigned32     remote_value
-  )
-{
-    rtems_assoc_t *default_ap = 0;
+    const rtems_assoc_t *ap,
+    unsigned32     remote_value
+  )
+{
+    const rtems_assoc_t *default_ap = 0;
 
     if (rtems_assoc_is_default(ap))
@@ -81,9 +80,9 @@
 unsigned32
 rtems_assoc_remote_by_local(
-    rtems_assoc_t *ap,
-    unsigned32     local_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     local_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_local(ap, local_value);
     if (nap)
@@ -95,9 +94,9 @@
 unsigned32
 rtems_assoc_local_by_remote(
-    rtems_assoc_t *ap,
-    unsigned32     remote_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     remote_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_remote(ap, remote_value);
     if (nap)
@@ -109,9 +108,9 @@
 unsigned32
 rtems_assoc_remote_by_name(
-    rtems_assoc_t *ap,
-    char          *name
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    const char          *name
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_name(ap, name);
     if (nap)
@@ -123,9 +122,9 @@
 unsigned32
 rtems_assoc_local_by_name(
-    rtems_assoc_t *ap,
-    char          *name
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    const char          *name
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_name(ap, name);
     if (nap)
@@ -140,23 +139,27 @@
  */
 
-char *
+const char *
 rtems_assoc_name_bad(
     unsigned32 bad_value
 )
 {
+#ifdef RTEMS_DEBUG
     static char bad_buffer[32];
 
     sprintf(bad_buffer, "< %d [0x%x] >", bad_value, bad_value);
+#else
+    static char bad_buffer[32] = "<assoc.c: BAD NAME>";
+#endif
     return bad_buffer;
 }
 
 
-char *
+const char *
 rtems_assoc_name_by_local(
-    rtems_assoc_t *ap,
-    unsigned32     local_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     local_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_local(ap, local_value);
     if (nap)
@@ -166,11 +169,11 @@
 }
 
-char *
+const char *
 rtems_assoc_name_by_remote(
-    rtems_assoc_t *ap,
-    unsigned32     remote_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     remote_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_remote(ap, remote_value);
     if (nap)
@@ -186,5 +189,5 @@
 
 unsigned32 rtems_assoc_remote_by_local_bitfield(
-    rtems_assoc_t *ap,
+    const rtems_assoc_t *ap,
     unsigned32     local_value
   )
@@ -202,5 +205,5 @@
 
 unsigned32 rtems_assoc_local_by_remote_bitfield(
-    rtems_assoc_t *ap,
+    const rtems_assoc_t *ap,
     unsigned32     remote_value
   )
@@ -216,6 +219,7 @@
 }
 
-char *rtems_assoc_name_by_remote_bitfield(
-    rtems_assoc_t *ap,
+char *
+rtems_assoc_name_by_remote_bitfield(
+    const rtems_assoc_t *ap,
     unsigned32     value,
     char          *buffer
@@ -237,6 +241,7 @@
 }
 
-char *rtems_assoc_name_by_local_bitfield(
-    rtems_assoc_t *ap,
+char *
+rtems_assoc_name_by_local_bitfield(
+    const rtems_assoc_t *ap,
     unsigned32     value,
     char          *buffer
Index: c/src/exec/libcsupport/src/error.c
===================================================================
--- c/src/exec/libcsupport/src/error.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/libcsupport/src/error.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,9 +1,8 @@
 /*
- *	@(#)error.c	1.2 - 95/08/02
+ *	@(#)error.c	1.6 - 95/12/12
  *	
  *
- * report errors and panics to RTEMS' stderr.
- * Currently just used by RTEMS monitor.
- *
+ *  report errors and panics to RTEMS' stderr.
+ *  Currently just used by RTEMS monitor.
  *
  *  $Id$
@@ -98,5 +97,5 @@
 
 
-char *
+const char *
 rtems_status_text(
     rtems_status_code status
@@ -109,5 +108,5 @@
 static int rtems_verror(
     unsigned32   error_flag,
-    char        *printf_format,
+    const char   *printf_format,
     va_list      arglist
 )
@@ -182,5 +181,5 @@
 int rtems_error(
     int   error_flag,
-    char *printf_format,
+    const char *printf_format,
     ...
   )
@@ -201,5 +200,5 @@
 
 void rtems_panic(
-    char *printf_format,
+    const char *printf_format,
     ...
   )
Index: c/src/exec/libcsupport/src/libio.c
===================================================================
--- c/src/exec/libcsupport/src/libio.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/libcsupport/src/libio.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -16,5 +16,5 @@
 #include <stdio.h>                      /* O_RDONLY, et.al. */
 #include <fcntl.h>                      /* O_RDONLY, et.al. */
-#include <sys/fcntl.h>                      /* O_RDONLY, et.al. */
+
 #if defined(solaris2)
 #define O_NDELAY O_NONBLOCK
@@ -22,4 +22,5 @@
 #define O_NDELAY _FNBIO
 #endif
+
 #include <errno.h>
 #include <string.h>                     /* strcmp */
@@ -209,5 +210,5 @@
             rc = rtems_semaphore_create(
               RTEMS_LIBIO_IOP_SEM(iop - rtems_libio_iops),
-              1, 
+              1,
               RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
               RTEMS_NO_PRIORITY,
Index: c/src/exec/libcsupport/src/no_libc.c
===================================================================
--- c/src/exec/libcsupport/src/no_libc.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/libcsupport/src/no_libc.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,3 +1,3 @@
-#if  !defined(RTEMS_LIBC) && !defined(RTEMS_NEWLIB) && !defined(RTEMS_UNIX)
+#if  !defined(RTEMS_NEWLIB) && !defined(RTEMS_UNIX)
 
 /*  no_libc.h
Index: c/src/exec/rtems/headers/types.h
===================================================================
--- c/src/exec/rtems/headers/types.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/rtems/headers/types.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -34,10 +34,16 @@
 typedef unsigned16      rtems_unsigned16; /* unsigned 16-bit value */
 typedef unsigned32      rtems_unsigned32; /* unsigned 32-bit value */
-typedef unsigned64      rtems_unsigned64; /* unsigned 64-bit value */
 
 typedef signed8         rtems_signed8;    /* signed 8-bit value  */
 typedef signed16        rtems_signed16;   /* signed 16-bit value */
 typedef signed32        rtems_signed32;   /* signed 32-bit value */
+
+/*
+ * some C++ compilers (eg: HP's) don't do 'long long'
+ */
+#if defined(__GNUC__)
+typedef unsigned64      rtems_unsigned64; /* unsigned 64-bit value */
 typedef signed64        rtems_signed64;   /* signed 64-bit value */
+#endif
 
 typedef single_precision rtems_single;    /* single precision float */
Index: c/src/exec/rtems/include/rtems/rtems/types.h
===================================================================
--- c/src/exec/rtems/include/rtems/rtems/types.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/rtems/include/rtems/rtems/types.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -34,10 +34,16 @@
 typedef unsigned16      rtems_unsigned16; /* unsigned 16-bit value */
 typedef unsigned32      rtems_unsigned32; /* unsigned 32-bit value */
-typedef unsigned64      rtems_unsigned64; /* unsigned 64-bit value */
 
 typedef signed8         rtems_signed8;    /* signed 8-bit value  */
 typedef signed16        rtems_signed16;   /* signed 16-bit value */
 typedef signed32        rtems_signed32;   /* signed 32-bit value */
+
+/*
+ * some C++ compilers (eg: HP's) don't do 'long long'
+ */
+#if defined(__GNUC__)
+typedef unsigned64      rtems_unsigned64; /* unsigned 64-bit value */
 typedef signed64        rtems_signed64;   /* signed 64-bit value */
+#endif
 
 typedef single_precision rtems_single;    /* single precision float */
Index: c/src/exec/score/cpu/hppa1.1/cpu.c
===================================================================
--- c/src/exec/score/cpu/hppa1.1/cpu.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/score/cpu/hppa1.1/cpu.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -25,27 +25,14 @@
 void hppa_external_interrupt_disable(unsigned32);
 void hppa_external_interrupt(unsigned32, CPU_Interrupt_frame *);
-
-/*
- * Our interrupt handlers take a 2nd argument:
- *   a pointer to a CPU_Interrupt_frame
- * So we use our own prototype instead of rtems_isr_entry
- */
-
-typedef void ( *hppa_rtems_isr_entry )(
-    ISR_Vector_number,
-    CPU_Interrupt_frame *
- );
-
-
-/*
- * who are we?  cpu number
- * Not used by executive proper, just kept (or not) as a convenience
- * for libcpu and libbsp stuff that wants it.
- *
- * Defaults to 0.  If the BSP doesn't like it, it can change it.
- */
-
-int cpu_number;                 /* from 0; cpu number in a multi cpu system */
-
+void hppa_cpu_halt(unsigned32);
+
+/*
+ * The first level interrupt handler for first 32 interrupts/traps.
+ * Indexed by vector; generally each entry is _Generic_ISR_Handler.
+ * Some TLB traps may have their own first level handler.
+ */
+
+extern void _Generic_ISR_Handler(void);
+unsigned32 HPPA_first_level_interrupt_handler[HPPA_INTERNAL_INTERRUPTS];
 
 /*  _CPU_Initialize
@@ -87,4 +74,18 @@
 
     /*
+     * Init the first level interrupt handlers
+     */
+
+    for (i=0; i <= HPPA_INTERNAL_INTERRUPTS; i++)
+        HPPA_first_level_interrupt_handler[i] = (unsigned32) _Generic_ISR_Handler;
+
+    /*
+     * Init the 2nd level interrupt handlers
+     */
+
+    for (i=0; i <= CPU_INTERRUPT_NUMBER_OF_VECTORS; i++)
+        _ISR_Vector_table[i] = (ISR_Handler_entry) hppa_cpu_halt;
+
+    /*
      * Stabilize the interrupt stuff
      */
@@ -97,4 +98,31 @@
 
     iva_table = (unsigned32) IVA_Table;
+#if defined(hppa1_1)
+    /*
+     * HACK:  (from PA72000 TRM, page 4-19)
+     * "The hardware TLB miss handler will never attempt to service
+     *  a non-access TLB miss or a TLB protection violation.  It
+     *  will only attempt to service TLB accesses that would cause
+     *  Trap Numbers 6 (Instruction TLB miss) and 15 (Data TLB miss)."
+     *
+     * The LPA instruction is used to translate a virtual address to
+     * a physical address, however, if the requested virtual address
+     * is not currently resident in the TLB, the hardware TLB miss
+     * handler will NOT insert it.  In this situation Trap Number
+     * #17 is invoked (Non-access Data TLB miss fault).
+     *
+     * To work around this, a dummy data access is first performed
+     * to the virtual address prior to the LPA.  The dummy access
+     * causes the TLB entry to be inserted (if not already present)
+     * and then the following LPA instruction will not generate
+     * a non-access data TLB miss fault.
+     *
+     * It is unclear whether or not this behaves the same way for
+     * the PA8000.
+     * 
+     */
+    iva = *(volatile unsigned32 *)iva_table;  /* dummy access */
+#endif
+
     HPPA_ASM_LPA(0, iva_table, iva);
     set_iva(iva);
@@ -113,6 +141,6 @@
     HPPA_ASM_SSM(0, level);	/* change no bits; just get copy */
     if (level & HPPA_PSW_I)
-        return 1;
-    return 0;
+        return 0;
+    return 1;
 }
 
@@ -185,10 +213,6 @@
  *
  *  TODO:
- *    delete interrupt.c etc.
  *    Count interrupts
  *    make sure interrupts disabled properly
- *    should handler check again for more interrupts before exit?
- *    How to enable interrupts from an interrupt handler?
- *    Make sure there is an entry for everything in ISR_Vector_Table
  */
 
@@ -209,14 +233,12 @@
 
     /* mark them all unused */
-
     DISABLE(~0);
     DISMISS(~0);
 
     /* install the external interrupt handler */
-  _CPU_ISR_install_vector(
-    HPPA_INTERRUPT_EXTERNAL_INTERRUPT,
-    (proc_ptr)hppa_external_interrupt,
-    &ignore
-  );
+    _CPU_ISR_install_vector(
+        HPPA_INTERRUPT_EXTERNAL_INTERRUPT,
+	(proc_ptr)hppa_external_interrupt, &ignore
+);
 }
 
@@ -257,17 +279,19 @@
        vector, iframe->Interrupt.pcoqfront);
 */
-    DISMISS(VECTOR_TO_MASK(vector));
-    DISABLE(VECTOR_TO_MASK(vector));
-}
-
-void
-hppa_external_interrupt_report_spurious(unsigned32           spurious,
+}
+
+void
+hppa_external_interrupt_report_spurious(unsigned32           spurious_mask,
                                         CPU_Interrupt_frame *iframe)
 {
     int v;
     for (v=0; v < HPPA_EXTERNAL_INTERRUPTS; v++)
-        if (VECTOR_TO_MASK(v) & spurious)
+        if (VECTOR_TO_MASK(v) & spurious_mask)
+        {
+            DISMISS(VECTOR_TO_MASK(v));
+            DISABLE(VECTOR_TO_MASK(v));
             hppa_external_interrupt_spurious_handler(v, iframe);
-    DISMISS(spurious);
+        }
+    DISMISS(spurious_mask);
 }
 
@@ -305,5 +329,5 @@
                 DISMISS(m);
                 mask &= ~m;
-                (*handler)(global_vector, iframe);
+                handler(global_vector, iframe);
             }
         }
@@ -311,10 +335,10 @@
         if (mask != 0) {
             if ( _CPU_Table.spurious_handler )
-              (*((hppa_rtems_isr_entry) _CPU_Table.spurious_handler))(
-                  mask,
-                  iframe
-                );
+            {
+                handler = (hppa_rtems_isr_entry) _CPU_Table.spurious_handler;
+                handler(mask, iframe);
+            }
             else
-              hppa_external_interrupt_report_spurious(mask, iframe);
+                hppa_external_interrupt_report_spurious(mask, iframe);
         }
     }
@@ -331,6 +355,5 @@
 
 void
-hppa_cpu_halt(unsigned32 type_of_halt,
-              unsigned32 the_error)
+hppa_cpu_halt(unsigned32 the_error)
 {
     unsigned32 isrlevel;
@@ -338,5 +361,5 @@
     _CPU_ISR_Disable(isrlevel);
 
-    asm volatile( "copy %0,%%r1" : : "r" (the_error) );
+    HPPA_ASM_LABEL("_hppa_cpu_halt");
     HPPA_ASM_BREAK(1, 0);
 }
Index: c/src/exec/score/cpu/hppa1.1/cpu.h
===================================================================
--- c/src/exec/score/cpu/hppa1.1/cpu.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/score/cpu/hppa1.1/cpu.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -197,4 +197,15 @@
 
 /*
+ * Our interrupt handlers take a 2nd argument:
+ *   a pointer to a CPU_Interrupt_frame
+ * So we use our own prototype instead of rtems_isr_entry
+ */
+
+typedef void ( *hppa_rtems_isr_entry )(
+    unsigned32,
+    CPU_Interrupt_frame *
+ );
+
+/*
  * The following table contains the information required to configure
  * the HPPA specific parameters.
@@ -227,5 +238,5 @@
   unsigned32   external_interrupt[HPPA_EXTERNAL_INTERRUPTS];
 
-  void       (*spurious_handler)( unsigned32 mask, CPU_Interrupt_frame *);
+  hppa_rtems_isr_entry spurious_handler;
 
   unsigned32   itimer_clicks_per_microsecond; /* for use by Clock driver */
@@ -239,12 +250,16 @@
 EXTERN void               *_CPU_Interrupt_stack_high;
 
+/* entry points */
+void hppa_external_interrupt_spurious_handler(unsigned32, CPU_Interrupt_frame *);
+
 #endif          /* ! ASM */
 
 /*
- *  context size area for floating point
+ *  context sizes
  */
 
 #ifndef ASM
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
+#define CPU_CONTEXT_SIZE     sizeof( Context_Control )
+#define CPU_CONTEXT_FP_SIZE  sizeof( Context_Control_fp )
 #endif
 
@@ -440,7 +455,7 @@
  */
 
-void    hppa_cpu_halt(unsigned32 type_of_halt, unsigned32 the_error);
+void    hppa_cpu_halt(unsigned32 the_error);
 #define _CPU_Fatal_halt( _error ) \
-    hppa_cpu_halt(0, _error)
+    hppa_cpu_halt(_error)
 
 /* end of Fatal Error manager macros */
Index: c/src/exec/score/cpu/hppa1.1/cpu_asm.s
===================================================================
--- c/src/exec/score/cpu/hppa1.1/cpu_asm.s	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/score/cpu/hppa1.1/cpu_asm.s	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -50,4 +50,5 @@
 isr_arg0           .reg    %cr24
 isr_r9             .reg    %cr25
+isr_r8             .reg    %cr26
 
 #
@@ -106,28 +107,23 @@
 #  The following macro and the 32 instantiations of the macro
 #  are necessary to determine which interrupt vector occurred.
-#  The following macro allows a unique entry point to be defined
-#  for each vector.
-#
-# r9 was loaded with the vector before branching here
-#   scratch registers available:   gr1, gr8, gr9, gr16, gr17, gr24
-#
-# NOTE:
-#  .align 32   doesn not seem to work in the continuation below
-#  so just have to count 8 instructions
-#
-# NOTE:
-#    this whole scheme needs to be rethought for TLB traps which
-#    have requirements about what tlb faults they can incur.
-#    ref:  TLB Operation Requirements in 1.1 arch book
+#
+#  r9 is loaded with the vector number and then we jump to
+#    the first level interrupt handler.  In most cases this
+#    is _Generic_ISR_Handler.  In a few cases (such as TLB misc)
+#    it may be to some other entry point.
+#
+
+# table for first level interrupt handlers
+        .import   HPPA_first_level_interrupt_handler, data
 
 #define THANDLER(vector) \
-        mtctl   %r9,  isr_r9 !         \
-        b       _Generic_ISR_Handler!        \
-        ldi     vector, %r9!       \
-        nop ! \
-        nop ! \
-        nop ! \
-        nop ! \
-        nop
+        mtctl   %r9,  isr_r9 ! \
+        mtctl   %r8,  isr_r8 ! \
+        ldi     vector, %r9  ! \
+        ldil    L%HPPA_first_level_interrupt_handler,%r8 ! \
+        ldo     R%HPPA_first_level_interrupt_handler(%r8),%r8 ! \
+        ldwx,s  %r9(%r8),%r8 ! \
+        bv      0(%r8) ! \
+        mfctl   isr_r8, %r8
 
         .align 4096
@@ -211,8 +207,4 @@
 	.ENTRY
 
-# Turn on the D bit in psw so we can start saving stuff on stack
-# (interrupt context pieces that need to be saved before the RFI)
-
-        ssm       HPPA_PSW_D, %r0
         mtctl     arg0, isr_arg0
 
@@ -236,29 +228,4 @@
         mfctl     %sar, arg0
         stw       arg0, SAR_OFFSET(sp)
-
-# Prepare to re-enter virtual mode
-# We need Q in case the interrupt handler enables interrupts
-#
-
-        ldil      L%CPU_PSW_DEFAULT, arg0
-        ldo       R%CPU_PSW_DEFAULT(arg0), arg0
-        mtctl     arg0, ipsw
-
-# Now jump to "rest_of_isr_handler" with the rfi
-# We are assuming the space queues are all correct already
-
-	ldil 	  L%rest_of_isr_handler, arg0
-	ldo	  R%rest_of_isr_handler(arg0), arg0
-	mtctl	  arg0, pcoq
-	ldo	  4(arg0), arg0
-	mtctl	  arg0, pcoq
-
-        rfi
-	nop
-
-# At this point we are back in virtual mode and all our
-#  normal addressing is once again ok.
-
-rest_of_isr_handler:
 
 #
@@ -282,5 +249,5 @@
         stw         %r7,R7_OFFSET(sp)
         stw         %r8,R8_OFFSET(sp)
-        stw         %r9,R9_OFFSET(sp)
+# skip r9
         stw         %r10,R10_OFFSET(sp)
         stw         %r11,R11_OFFSET(sp)
@@ -299,5 +266,5 @@
         stw         %r24,R24_OFFSET(sp)
         stw         %r25,R25_OFFSET(sp)
-        stw         %r26,R26_OFFSET(sp)
+# skip arg0
         stw         %r27,R27_OFFSET(sp)
         stw         %r28,R28_OFFSET(sp)
@@ -325,5 +292,31 @@
 # At this point we are done with isr_arg0, and isr_r9 control registers
 #
-
+# Prepare to re-enter virtual mode
+# We need Q in case the interrupt handler enables interrupts
+#
+
+        ldil      L%CPU_PSW_DEFAULT, arg0
+        ldo       R%CPU_PSW_DEFAULT(arg0), arg0
+        mtctl     arg0, ipsw
+
+# Now jump to "rest_of_isr_handler" with the rfi
+# We are assuming the space queues are all correct already
+
+	ldil 	  L%rest_of_isr_handler, arg0
+	ldo	  R%rest_of_isr_handler(arg0), arg0
+	mtctl	  arg0, pcoq
+	ldo	  4(arg0), arg0
+	mtctl	  arg0, pcoq
+
+        rfi
+	nop
+
+# At this point we are back in virtual mode and all our
+#  normal addressing is once again ok.
+#
+#  It is now ok to take an exception or trap
+#
+
+rest_of_isr_handler:
 
 # Point to beginning of float context and
@@ -409,5 +402,5 @@
 # (_ISR_Nest_level == 0)
 
-        rsm        HPPA_PSW_I, %r0
+        rsm        HPPA_PSW_I + HPPA_PSW_R, %r0
         ldw        -4(sp), sp
 
@@ -449,4 +442,5 @@
 	comibt,=,n 0,%r8,isr_restore
 
+
 # OK, something happened while in ISR and we need to switch to a task
 # other than the one which was interrupted or the
@@ -466,7 +460,8 @@
         ldo        -128(sp),sp
 
-        rsm        HPPA_PSW_I, %r0
-
 isr_restore:
+
+# enable interrupts during most of restore
+        ssm        HPPA_PSW_I, %r0
 
 # Get a pointer to beginning of our stack frame
@@ -489,19 +484,4 @@
 	.EXPORT _CPU_Context_restore
 _CPU_Context_restore:
-
-# Turn off Q & I so we can write pcoq
-        rsm        HPPA_PSW_Q + HPPA_PSW_I, %r0
-
-        ldw        IPSW_OFFSET(arg0), %r8
-        mtctl      %r8, ipsw
-
-        ldw        SAR_OFFSET(arg0), %r9
-        mtctl      %r9, sar
-
-        ldw        PCOQFRONT_OFFSET(arg0), %r10
-        mtctl      %r10, pcoq
-
-        ldw        PCOQBACK_OFFSET(arg0), %r11
-        mtctl      %r11, pcoq
 
 #
@@ -532,6 +512,6 @@
         ldw         R23_OFFSET(arg0),%r23
         ldw         R24_OFFSET(arg0),%r24
-        ldw         R25_OFFSET(arg0),%r25
-# skipping r26 (aka arg0) until we are done with it
+# skipping r25; used as scratch register below
+# skipping r26 (arg0) until we are done with it
         ldw         R27_OFFSET(arg0),%r27
         ldw         R28_OFFSET(arg0),%r28
@@ -540,5 +520,22 @@
         ldw         R31_OFFSET(arg0),%r31
 
-# Must load r26 last since it is arg0
+# Turn off Q & R & I so we can write interrupt control registers
+        rsm        HPPA_PSW_Q + HPPA_PSW_R + HPPA_PSW_I, %r0
+
+        ldw        IPSW_OFFSET(arg0), %r25
+        mtctl      %r25, ipsw
+
+        ldw        SAR_OFFSET(arg0), %r25
+        mtctl      %r25, sar
+
+        ldw        PCOQFRONT_OFFSET(arg0), %r25
+        mtctl      %r25, pcoq
+
+        ldw        PCOQBACK_OFFSET(arg0), %r25
+        mtctl      %r25, pcoq
+
+# Load r25 with interrupts off
+        ldw         R25_OFFSET(arg0),%r25
+# Must load r26 (arg0) last
         ldw         R26_OFFSET(arg0),%r26
 
Index: c/src/exec/score/cpu/hppa1.1/hppa.h
===================================================================
--- c/src/exec/score/cpu/hppa1.1/hppa.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/score/cpu/hppa1.1/hppa.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,5 +1,5 @@
 /*
- *	@(#)hppa.h	1.13 - 95/09/21
- *	
+ * @(#)hppa.h	1.17 - 95/12/13
+ * 
  *
  *  Description:
@@ -210,4 +210,5 @@
 #define HPPA_INTERRUPT_EXTERNAL_INTERVAL_TIMER         HPPA_INTERRUPT_EXTERNAL_0
 #define HPPA_EXTERNAL_INTERRUPTS                       32
+#define HPPA_INTERNAL_INTERRUPTS                       32
 
 /* BSP defined interrupts begin here */
@@ -647,5 +648,9 @@
 
 
-#ifndef ASM
+/*
+ * this won't work in ASM or non-GNU compilers
+ */
+
+#if !defined(ASM) && defined(__GNUC__)
 
 /*
@@ -700,19 +705,13 @@
 EMIT_CONTROLS(tr7, HPPA_CR31);               /* CR31 */
 
+#endif /* ASM and GNU */
+
 /*
  * If and How to invoke the debugger (a ROM debugger generally)
  */
-
-#ifdef SIMHPPA_ROM
-/* invoke the pflow debugger */
-#define CPU_INVOKE_DEBUGGER  \
+#define CPU_INVOKE_DEBUGGER \
     do { \
-        extern void debugger_break(void); \
-        debugger_break(); \
+        HPPA_ASM_BREAK(1,1); \
     } while (0)
-#endif
-
-
-#endif /* ASM */
 
 #ifdef __cplusplus
Index: c/src/exec/score/cpu/unix/cpu.c
===================================================================
--- c/src/exec/score/cpu/unix/cpu.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/score/cpu/unix/cpu.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -88,5 +88,5 @@
 
   sigemptyset(&posix_empty_mask);
- 
+
   /*
    * Block all the signals except SIGTRAP for the debugger
@@ -603,5 +603,4 @@
   extern boolean     _Context_Switch_necessary;
 
-
   if (_ISR_Nest_level++ == 0) {
       /* switch to interrupt stack */
@@ -636,17 +635,32 @@
 void _CPU_Stray_signal(int sig_num)
 {
-  char buffer[ 4 ];   
-
-  /* 
-   *  We avoid using the stdio section of the library.
-   *  The following is generally safe.
-   */
-
-  buffer[ 0 ] = (sig_num >> 4) + 0x30;
-  buffer[ 1 ] = (sig_num & 0xf) + 0x30;
-  buffer[ 2 ] = '\n';
-
-  write( 2, "Stray signal 0x", 12 );
-  write( 2, buffer, 3 );
+  char buffer[ 4 ];
+ 
+  /*
+   * print "stray" msg about ones which that might mean something
+   * Avoid using the stdio section of the library.
+   * The following is generally safe.
+   */
+ 
+  switch (sig_num)
+  {
+      case SIGCLD:
+          break;
+ 
+      default:
+      {
+          /*
+           *  We avoid using the stdio section of the library.
+           *  The following is generally safe.
+           */
+ 
+          buffer[ 0 ] = (sig_num >> 4) + 0x30;
+          buffer[ 1 ] = (sig_num & 0xf) + 0x30;
+          buffer[ 2 ] = '\n';
+ 
+          write( 2, "Stray signal 0x", 12 );
+          write( 2, buffer, 3 );
+      }
+  }
  
   /*
Index: c/src/exec/score/cpu/unix/cpu.h
===================================================================
--- c/src/exec/score/cpu/unix/cpu.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/score/cpu/unix/cpu.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -279,5 +279,9 @@
  */
 
+#ifdef __GNUC__
 #define CPU_STRUCTURE_ALIGNMENT          __attribute__ ((aligned (32)))
+#else
+#define CPU_STRUCTURE_ALIGNMENT
+#endif
 
 /*
Index: c/src/exec/score/cpu/unix/unixtypes.h
===================================================================
--- c/src/exec/score/cpu/unix/unixtypes.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/score/cpu/unix/unixtypes.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -25,4 +25,12 @@
 
 /*
+ * some C++ compilers (eg: HP's) don't do 'signed' or 'volatile'
+ */
+#if defined(__cplusplus) && !defined(__GNUC__)
+#define signed
+#define volatile
+#endif
+
+/*
  *  This section defines the basic types for this processor.
  */
@@ -31,5 +39,4 @@
 typedef unsigned short unsigned16;     /* unsigned 16-bit integer */
 typedef unsigned int   unsigned32;     /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
 
 typedef unsigned16     Priority_Bit_map_control;
@@ -38,5 +45,12 @@
 typedef signed short     signed16;     /* 16-bit signed integer */
 typedef signed int       signed32;     /* 32-bit signed integer */
+
+/*
+ * some C++ compilers (eg: HP's) don't do 'long long'
+ */
+#if defined(__GNUC__)
+typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
 typedef signed long long signed64;     /* 64 bit signed integer */
+#endif
 
 typedef unsigned32 boolean;     /* Boolean value   */
Index: c/src/exec/score/headers/system.h
===================================================================
--- c/src/exec/score/headers/system.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/score/headers/system.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -57,12 +57,13 @@
 
 #ifdef USE_INLINES
-#define STATIC static
-#define INLINE __inline__
+# define STATIC static
+# ifdef __GNUC__
+#  define INLINE __inline__
+# else
+#  define INLINE inline
+# endif
 #else
-/*
-#error Only the GNU C compiler is currently supported!!!
-*/
-#define STATIC
-#define INLINE
+# define STATIC
+# define INLINE
 #endif
 
Index: c/src/exec/score/include/rtems/system.h
===================================================================
--- c/src/exec/score/include/rtems/system.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/score/include/rtems/system.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -57,12 +57,13 @@
 
 #ifdef USE_INLINES
-#define STATIC static
-#define INLINE __inline__
+# define STATIC static
+# ifdef __GNUC__
+#  define INLINE __inline__
+# else
+#  define INLINE inline
+# endif
 #else
-/*
-#error Only the GNU C compiler is currently supported!!!
-*/
-#define STATIC
-#define INLINE
+# define STATIC
+# define INLINE
 #endif
 
Index: c/src/exec/score/inline/address.inl
===================================================================
--- c/src/exec/score/inline/address.inl	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/score/inline/address.inl	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -59,5 +59,5 @@
 )
 {
-  return (left - right);
+  return ((char *) left - (char *) right);
 }
 
Index: c/src/exec/score/inline/coremsg.inl
===================================================================
--- c/src/exec/score/inline/coremsg.inl	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/score/inline/coremsg.inl	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -18,4 +18,6 @@
 #define __CORE_MESSAGE_QUEUE_inl
 
+#include <string.h>   /* needed for memcpy */
+ 
 /*PAGE
  *
Index: c/src/exec/score/inline/rtems/score/address.inl
===================================================================
--- c/src/exec/score/inline/rtems/score/address.inl	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/score/inline/rtems/score/address.inl	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -59,5 +59,5 @@
 )
 {
-  return (left - right);
+  return ((char *) left - (char *) right);
 }
 
Index: c/src/exec/score/inline/rtems/score/coremsg.inl
===================================================================
--- c/src/exec/score/inline/rtems/score/coremsg.inl	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/score/inline/rtems/score/coremsg.inl	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -18,4 +18,6 @@
 #define __CORE_MESSAGE_QUEUE_inl
 
+#include <string.h>   /* needed for memcpy */
+ 
 /*PAGE
  *
Index: c/src/exec/score/inline/rtems/score/thread.inl
===================================================================
--- c/src/exec/score/inline/rtems/score/thread.inl	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/score/inline/rtems/score/thread.inl	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -242,9 +242,11 @@
   Objects_Classes      the_class;
   Objects_Information *information;
+  Thread_Control      *tp = (Thread_Control *) 0;
  
   if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
     _Thread_Disable_dispatch();
     *location = OBJECTS_LOCAL;
-    return( _Thread_Executing );
+    tp = _Thread_Executing;
+    goto done;
   }
  
@@ -253,5 +255,5 @@
   if ( the_class > OBJECTS_CLASSES_LAST ) {
     *location = OBJECTS_ERROR;
-    return (Thread_Control *) 0;
+    goto done;
   }
  
@@ -260,9 +262,13 @@
   if ( !information || !information->is_thread ) {
     *location = OBJECTS_ERROR;
-    return (Thread_Control *) 0;
+    goto done;
   }
  
-  return (Thread_Control *) _Objects_Get( information, id, location );
-}
+  tp = (Thread_Control *) _Objects_Get( information, id, location );
+ 
+done:
+  return tp;
+}
+
 
 /*
Index: c/src/exec/score/inline/thread.inl
===================================================================
--- c/src/exec/score/inline/thread.inl	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/exec/score/inline/thread.inl	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -242,9 +242,11 @@
   Objects_Classes      the_class;
   Objects_Information *information;
+  Thread_Control      *tp = (Thread_Control *) 0;
  
   if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
     _Thread_Disable_dispatch();
     *location = OBJECTS_LOCAL;
-    return( _Thread_Executing );
+    tp = _Thread_Executing;
+    goto done;
   }
  
@@ -253,5 +255,5 @@
   if ( the_class > OBJECTS_CLASSES_LAST ) {
     *location = OBJECTS_ERROR;
-    return (Thread_Control *) 0;
+    goto done;
   }
  
@@ -260,9 +262,13 @@
   if ( !information || !information->is_thread ) {
     *location = OBJECTS_ERROR;
-    return (Thread_Control *) 0;
+    goto done;
   }
  
-  return (Thread_Control *) _Objects_Get( information, id, location );
-}
+  tp = (Thread_Control *) _Objects_Get( information, id, location );
+ 
+done:
+  return tp;
+}
+
 
 /*
Index: c/src/lib/include/rtems/assoc.h
===================================================================
--- c/src/lib/include/rtems/assoc.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/include/rtems/assoc.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,4 +1,4 @@
 /*
- *	@(#)assoc.h	1.2 - 95/06/28
+ *	@(#)assoc.h	1.4 - 95/10/25
  *	
  *
@@ -14,5 +14,5 @@
 
 typedef struct {
-    char *name;
+    const char   *name;
     unsigned32   local_value;
     unsigned32   remote_value;
@@ -25,19 +25,19 @@
 #define RTEMS_ASSOC_DEFAULT_NAME "(default)"
 
-rtems_assoc_t *rtems_assoc_ptr_by_name(rtems_assoc_t *, char *);
-rtems_assoc_t *rtems_assoc_ptr_by_value(rtems_assoc_t *, unsigned32);
-rtems_assoc_t *rtems_assoc_ptr_by_remote(rtems_assoc_t *, unsigned32);
+const rtems_assoc_t *rtems_assoc_ptr_by_name(const rtems_assoc_t *, const char *);
+const rtems_assoc_t *rtems_assoc_ptr_by_value(const rtems_assoc_t *, unsigned32);
+const rtems_assoc_t *rtems_assoc_ptr_by_remote(const rtems_assoc_t *, unsigned32);
 
-unsigned32   rtems_assoc_remote_by_local(rtems_assoc_t *, unsigned32);
-unsigned32   rtems_assoc_local_by_remote(rtems_assoc_t *, unsigned32);
-unsigned32   rtems_assoc_remote_by_name(rtems_assoc_t *, char *);
-unsigned32   rtems_assoc_local_by_name(rtems_assoc_t *, char *);
-char        *rtems_assoc_name_by_local(rtems_assoc_t *, unsigned32);
-char        *rtems_assoc_name_by_remote(rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_remote_by_local(const rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_local_by_remote(const rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_remote_by_name(const rtems_assoc_t *, const char *);
+unsigned32   rtems_assoc_local_by_name(const rtems_assoc_t *, const char *);
+const char  *rtems_assoc_name_by_local(const rtems_assoc_t *, unsigned32);
+const char  *rtems_assoc_name_by_remote(const rtems_assoc_t *, unsigned32);
 
-unsigned32   rtems_assoc_remote_by_local_bitfield(rtems_assoc_t *, unsigned32);
-char        *rtems_assoc_name_by_local_bitfield(rtems_assoc_t *, unsigned32, char *);
-char        *rtems_assoc_name_by_remote_bitfield(rtems_assoc_t *, unsigned32, char *);
-unsigned32   rtems_assoc_local_by_remote_bitfield(rtems_assoc_t *ap, unsigned32);
+unsigned32   rtems_assoc_remote_by_local_bitfield(const rtems_assoc_t *, unsigned32);
+char  *rtems_assoc_name_by_local_bitfield(const rtems_assoc_t *, unsigned32, char *);
+char  *rtems_assoc_name_by_remote_bitfield(const rtems_assoc_t *, unsigned32, char *);
+unsigned32   rtems_assoc_local_by_remote_bitfield(const rtems_assoc_t *, unsigned32);
 
 
Index: c/src/lib/include/rtems/error.h
===================================================================
--- c/src/lib/include/rtems/error.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/include/rtems/error.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,4 +1,5 @@
+
 /*
- *	@(#)error.h	1.1 - 95/08/02
+ *	@(#)error.h	1.3 - 95/10/25
  *	
  *
@@ -7,4 +8,7 @@
  *  $Id$
  */
+
+#ifndef __RTEMS_ERROR_h
+#define __RTEMS_ERROR_h
 
 /*
@@ -19,8 +23,10 @@
                              RTEMS_ERROR_PANIC) /* all */
 
-char *rtems_status_text(rtems_status_code);
-int   rtems_error(int error_code, char *printf_format, ...);
-void  rtems_panic(char *printf_format, ...);
+const char *rtems_status_text(rtems_status_code);
+int   rtems_error(int error_code, const char *printf_format, ...);
+void  rtems_panic(const char *printf_format, ...);
 
 extern int rtems_panic_in_progress;
 
+#endif
+/* end of include file */
Index: c/src/lib/include/rtems/libcsupport.h
===================================================================
--- c/src/lib/include/rtems/libcsupport.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/include/rtems/libcsupport.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -30,5 +30,8 @@
 );
 
+extern void malloc_dump(void);
 extern void libc_init(int reentrant);
+extern int  host_errno(void);
+extern void fix_syscall_errno(void);
 
 #ifdef __cplusplus
@@ -36,7 +39,4 @@
 #endif
 
-extern int  host_errno(void);
-extern void fix_syscall_errno(void);
-
 #endif
 /* end of include file */
Index: c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h
===================================================================
--- c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -67,9 +67,34 @@
 
 /*
+ * Todo: this should be put somewhere else
+ */
+
+#undef CLOCK_DRIVER_TABLE_ENTRY
+#define CLOCK_DRIVER_TABLE_ENTRY { Clock_initialize, NULL, NULL, NULL, NULL, Clock_control }
+rtems_device_driver Clock_control(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void *pargp
+);
+
+/*
  * We printf() to a buffer if multiprocessing, *or* if this is set.
- * ref: src/lib/libbsp/hppa/simhppa/iosupp/consupp.c
+ * ref: src/lib/libbsp/hppa/pxfl/iosupp/consupp.c
  */
 
 extern int use_print_buffer;
+
+/*
+ * When not doing printf to a buffer, we do printf thru RTEMS libio
+ * and our tty driver.  Set it up so that console is right.
+ */
+
+#define CONSOLE_DRIVER_TABLE_ENTRY \
+  { tty_initialize, tty_open, tty_close, tty_read, tty_write, tty_control }
+
+/*
+ * How many libio files we want
+ */
+#define BSP_LIBIO_MAX_FDS       20
 
 /*
@@ -98,4 +123,6 @@
 rtems_isr_entry set_vector(rtems_isr_entry, rtems_vector_number, int);
 
+rtems_isr_entry set_vector(rtems_isr_entry, rtems_vector_number, int);
+
 void bsp_start( void );
 void bsp_cleanup( void );
Index: c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c
===================================================================
--- c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -36,5 +36,4 @@
 
 #include <bsp.h>
-#include <runway.h>
 
 #include <shm.h>
@@ -44,14 +43,14 @@
 
 #define HPPA_RUNWAY_PROC_HPA_BASE  ((void *) 0xFFFA0000)
- 
+
 /* given a processor number, where is its HPA? */
 #define HPPA_RUNWAY_HPA(cpu)   \
   ((rtems_unsigned32) (HPPA_RUNWAY_PROC_HPA_BASE + ((cpu) * 0x2000)))
- 
+
 #define HPPA_RUNWAY_REG_IO_EIR_OFFSET   0x000
 
 shm_config_table BSP_shm_cfgtbl;
 
-void Shm_Cause_interrupt_pxfl( rtems_unsigned32 node );
+extern void Shm_Cause_interrupt_pxfl( rtems_unsigned32 node );
 
 void Shm_Get_configuration(
Index: c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c
===================================================================
--- c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -23,4 +23,6 @@
 
 #include <rtems.h>
+#include <rtems/error.h>
+
 #include <shm.h>
 
@@ -39,4 +41,5 @@
     case NO_INTERRUPT:
        break;
+
     case LONG:
       u32   = (rtems_unsigned32 *)intr->address;
@@ -45,6 +48,4 @@
     default:
       fprintf( stderr, "Shm_Cause_interrupt_pxfl: Unsupported length!!!\n" );
-      rtems_shutdown_executive( 0 );
-      break;
   }
 }
Index: c/src/lib/libbsp/shmdr/getlq.c
===================================================================
--- c/src/lib/libbsp/shmdr/getlq.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libbsp/shmdr/getlq.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -23,5 +23,5 @@
 
 #include <rtems.h>
-#include "shm.h"
+#include <shm.h>
 
 Shm_Envelope_control *Shm_Locked_queue_Get(
Index: c/src/lib/libbsp/shmdr/shm.h
===================================================================
--- c/src/lib/libbsp/shmdr/shm.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libbsp/shmdr/shm.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -471,9 +471,5 @@
 void           Init_env_pool();
 void           Shm_Print_statistics( void );
-void           MPCI_Fatal(
-  Internal_errors_Source  source,
-  boolean                 is_internal,
-  rtems_unsigned32        error
- );
+void           MPCI_Fatal( Internal_errors_Source, boolean, rtems_unsigned32 );
 rtems_task     Shm_Cause_interrupt( rtems_unsigned32 );
 void           Shm_Poll();
Index: c/src/lib/libbsp/shmdr/shm_driver.h
===================================================================
--- c/src/lib/libbsp/shmdr/shm_driver.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libbsp/shmdr/shm_driver.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -471,9 +471,5 @@
 void           Init_env_pool();
 void           Shm_Print_statistics( void );
-void           MPCI_Fatal(
-  Internal_errors_Source  source,
-  boolean                 is_internal,
-  rtems_unsigned32        error
- );
+void           MPCI_Fatal( Internal_errors_Source, boolean, rtems_unsigned32 );
 rtems_task     Shm_Cause_interrupt( rtems_unsigned32 );
 void           Shm_Poll();
Index: c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c
===================================================================
--- c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -28,8 +28,9 @@
 #include <bsp.h>
 #include <shm.h>
+#include <sys/types.h>    /* pid_t */
 
 shm_config_table BSP_shm_cfgtbl;
 
-int              semid;
+int semid;
 
 void Shm_Cause_interrupt_unix(
Index: c/src/lib/libbsp/unix/posix/shmsupp/intr.c
===================================================================
--- c/src/lib/libbsp/unix/posix/shmsupp/intr.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libbsp/unix/posix/shmsupp/intr.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -22,4 +22,5 @@
 #include <bsp.h>
 #include <shm.h>
+#include <sys/types.h>      /* pid_t */
 
 void Shm_Cause_interrupt_unix(
@@ -30,4 +31,4 @@
   intr = &Shm_Interrupt_table[node];
  
-  _CPU_SHM_Send_interrupt( (int) intr->address, (int) intr->value );
+  _CPU_SHM_Send_interrupt( (pid_t) intr->address, intr->value );
 }
Index: c/src/lib/libbsp/unix/posix/shmsupp/lock.c
===================================================================
--- c/src/lib/libbsp/unix/posix/shmsupp/lock.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libbsp/unix/posix/shmsupp/lock.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -20,6 +20,4 @@
 #include <bsp.h>
 #include <shm.h>
-
-extern int      semid;
 
 /*
Index: c/src/lib/libbsp/unix/posix/startup/no-ctor.c
===================================================================
--- c/src/lib/libbsp/unix/posix/startup/no-ctor.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
+++ c/src/lib/libbsp/unix/posix/startup/no-ctor.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -0,0 +1,16 @@
+/*
+ *  rtems, floss, libc are always compiled with GNU compilers
+ *  application code may be compiled with some other C++ compiler
+ *  that has a different global constructor technique.
+ *
+ *  For the simple case, where the app has no global constructors or
+ *  is compiled by g++, we provide this empty routine
+ *  In order to get both g++ constructors (RTEMS::RTEMS, for example)
+ *  and application constructors run, we provide this routine.
+ *
+ *  $Id$
+ */
+
+void invoke_non_gnu_constructors(void)
+{
+}
Index: c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc
===================================================================
--- c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,4 +1,4 @@
+// 
 // 	@(#)rtems-ctor.cc	1.6 - 95/04/25
-// 
 //
 
@@ -82,4 +82,6 @@
 
 extern "C" {
+    extern void invoke_non_gnu_constructors(void);
+
     int
     main(int argc,
@@ -95,4 +97,10 @@
         else
             rtems_progname = "RTEMS";
+
+        /*
+         * run any non-gnu constructors we may need
+         */
+        
+        invoke_non_gnu_constructors();
 
         /*
Index: c/src/lib/libc/assoc.c
===================================================================
--- c/src/lib/libc/assoc.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libc/assoc.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,5 +1,5 @@
 /*
- *	@(#)assoc.c	1.4 - 95/08/02
- *	
+ *	@(#)assoc.c	1.6 - 95/10/25
+ *
  *
  * assoc.c
@@ -9,5 +9,4 @@
  */
 
-
 #include <rtems.h>
 #include "assoc.h"
@@ -19,11 +18,11 @@
 #define rtems_assoc_is_default(ap)  ((ap)->name && STREQ(ap->name, RTEMS_ASSOC_DEFAULT_NAME))
 
-rtems_assoc_t *
+const rtems_assoc_t *
 rtems_assoc_ptr_by_name(
-    rtems_assoc_t *ap,
-    char *name
-  )
-{
-    rtems_assoc_t *default_ap = 0;
+    const rtems_assoc_t *ap,
+    const char *name
+  )
+{
+    const rtems_assoc_t *default_ap = 0;
 
     if (rtems_assoc_is_default(ap))
@@ -37,11 +36,11 @@
 }
 
-rtems_assoc_t *
+const rtems_assoc_t *
 rtems_assoc_ptr_by_local(
-    rtems_assoc_t *ap,
-    unsigned32     local_value
-  )
-{
-    rtems_assoc_t *default_ap = 0;
+    const rtems_assoc_t *ap,
+    unsigned32     local_value
+  )
+{
+    const rtems_assoc_t *default_ap = 0;
 
     if (rtems_assoc_is_default(ap))
@@ -56,11 +55,11 @@
 
 
-rtems_assoc_t *
+const rtems_assoc_t *
 rtems_assoc_ptr_by_remote(
-    rtems_assoc_t *ap,
-    unsigned32     remote_value
-  )
-{
-    rtems_assoc_t *default_ap = 0;
+    const rtems_assoc_t *ap,
+    unsigned32     remote_value
+  )
+{
+    const rtems_assoc_t *default_ap = 0;
 
     if (rtems_assoc_is_default(ap))
@@ -81,9 +80,9 @@
 unsigned32
 rtems_assoc_remote_by_local(
-    rtems_assoc_t *ap,
-    unsigned32     local_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     local_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_local(ap, local_value);
     if (nap)
@@ -95,9 +94,9 @@
 unsigned32
 rtems_assoc_local_by_remote(
-    rtems_assoc_t *ap,
-    unsigned32     remote_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     remote_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_remote(ap, remote_value);
     if (nap)
@@ -109,9 +108,9 @@
 unsigned32
 rtems_assoc_remote_by_name(
-    rtems_assoc_t *ap,
-    char          *name
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    const char          *name
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_name(ap, name);
     if (nap)
@@ -123,9 +122,9 @@
 unsigned32
 rtems_assoc_local_by_name(
-    rtems_assoc_t *ap,
-    char          *name
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    const char          *name
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_name(ap, name);
     if (nap)
@@ -140,23 +139,27 @@
  */
 
-char *
+const char *
 rtems_assoc_name_bad(
     unsigned32 bad_value
 )
 {
+#ifdef RTEMS_DEBUG
     static char bad_buffer[32];
 
     sprintf(bad_buffer, "< %d [0x%x] >", bad_value, bad_value);
+#else
+    static char bad_buffer[32] = "<assoc.c: BAD NAME>";
+#endif
     return bad_buffer;
 }
 
 
-char *
+const char *
 rtems_assoc_name_by_local(
-    rtems_assoc_t *ap,
-    unsigned32     local_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     local_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_local(ap, local_value);
     if (nap)
@@ -166,11 +169,11 @@
 }
 
-char *
+const char *
 rtems_assoc_name_by_remote(
-    rtems_assoc_t *ap,
-    unsigned32     remote_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     remote_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_remote(ap, remote_value);
     if (nap)
@@ -186,5 +189,5 @@
 
 unsigned32 rtems_assoc_remote_by_local_bitfield(
-    rtems_assoc_t *ap,
+    const rtems_assoc_t *ap,
     unsigned32     local_value
   )
@@ -202,5 +205,5 @@
 
 unsigned32 rtems_assoc_local_by_remote_bitfield(
-    rtems_assoc_t *ap,
+    const rtems_assoc_t *ap,
     unsigned32     remote_value
   )
@@ -216,6 +219,7 @@
 }
 
-char *rtems_assoc_name_by_remote_bitfield(
-    rtems_assoc_t *ap,
+char *
+rtems_assoc_name_by_remote_bitfield(
+    const rtems_assoc_t *ap,
     unsigned32     value,
     char          *buffer
@@ -237,6 +241,7 @@
 }
 
-char *rtems_assoc_name_by_local_bitfield(
-    rtems_assoc_t *ap,
+char *
+rtems_assoc_name_by_local_bitfield(
+    const rtems_assoc_t *ap,
     unsigned32     value,
     char          *buffer
Index: c/src/lib/libc/assoc.h
===================================================================
--- c/src/lib/libc/assoc.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libc/assoc.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,4 +1,4 @@
 /*
- *	@(#)assoc.h	1.2 - 95/06/28
+ *	@(#)assoc.h	1.4 - 95/10/25
  *	
  *
@@ -14,5 +14,5 @@
 
 typedef struct {
-    char *name;
+    const char   *name;
     unsigned32   local_value;
     unsigned32   remote_value;
@@ -25,19 +25,19 @@
 #define RTEMS_ASSOC_DEFAULT_NAME "(default)"
 
-rtems_assoc_t *rtems_assoc_ptr_by_name(rtems_assoc_t *, char *);
-rtems_assoc_t *rtems_assoc_ptr_by_value(rtems_assoc_t *, unsigned32);
-rtems_assoc_t *rtems_assoc_ptr_by_remote(rtems_assoc_t *, unsigned32);
+const rtems_assoc_t *rtems_assoc_ptr_by_name(const rtems_assoc_t *, const char *);
+const rtems_assoc_t *rtems_assoc_ptr_by_value(const rtems_assoc_t *, unsigned32);
+const rtems_assoc_t *rtems_assoc_ptr_by_remote(const rtems_assoc_t *, unsigned32);
 
-unsigned32   rtems_assoc_remote_by_local(rtems_assoc_t *, unsigned32);
-unsigned32   rtems_assoc_local_by_remote(rtems_assoc_t *, unsigned32);
-unsigned32   rtems_assoc_remote_by_name(rtems_assoc_t *, char *);
-unsigned32   rtems_assoc_local_by_name(rtems_assoc_t *, char *);
-char        *rtems_assoc_name_by_local(rtems_assoc_t *, unsigned32);
-char        *rtems_assoc_name_by_remote(rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_remote_by_local(const rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_local_by_remote(const rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_remote_by_name(const rtems_assoc_t *, const char *);
+unsigned32   rtems_assoc_local_by_name(const rtems_assoc_t *, const char *);
+const char  *rtems_assoc_name_by_local(const rtems_assoc_t *, unsigned32);
+const char  *rtems_assoc_name_by_remote(const rtems_assoc_t *, unsigned32);
 
-unsigned32   rtems_assoc_remote_by_local_bitfield(rtems_assoc_t *, unsigned32);
-char        *rtems_assoc_name_by_local_bitfield(rtems_assoc_t *, unsigned32, char *);
-char        *rtems_assoc_name_by_remote_bitfield(rtems_assoc_t *, unsigned32, char *);
-unsigned32   rtems_assoc_local_by_remote_bitfield(rtems_assoc_t *ap, unsigned32);
+unsigned32   rtems_assoc_remote_by_local_bitfield(const rtems_assoc_t *, unsigned32);
+char  *rtems_assoc_name_by_local_bitfield(const rtems_assoc_t *, unsigned32, char *);
+char  *rtems_assoc_name_by_remote_bitfield(const rtems_assoc_t *, unsigned32, char *);
+unsigned32   rtems_assoc_local_by_remote_bitfield(const rtems_assoc_t *, unsigned32);
 
 
Index: c/src/lib/libc/error.c
===================================================================
--- c/src/lib/libc/error.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libc/error.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,9 +1,8 @@
 /*
- *	@(#)error.c	1.2 - 95/08/02
+ *	@(#)error.c	1.6 - 95/12/12
  *	
  *
- * report errors and panics to RTEMS' stderr.
- * Currently just used by RTEMS monitor.
- *
+ *  report errors and panics to RTEMS' stderr.
+ *  Currently just used by RTEMS monitor.
  *
  *  $Id$
@@ -98,5 +97,5 @@
 
 
-char *
+const char *
 rtems_status_text(
     rtems_status_code status
@@ -109,5 +108,5 @@
 static int rtems_verror(
     unsigned32   error_flag,
-    char        *printf_format,
+    const char   *printf_format,
     va_list      arglist
 )
@@ -182,5 +181,5 @@
 int rtems_error(
     int   error_flag,
-    char *printf_format,
+    const char *printf_format,
     ...
   )
@@ -201,5 +200,5 @@
 
 void rtems_panic(
-    char *printf_format,
+    const char *printf_format,
     ...
   )
Index: c/src/lib/libc/error.h
===================================================================
--- c/src/lib/libc/error.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libc/error.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,4 +1,5 @@
+
 /*
- *	@(#)error.h	1.1 - 95/08/02
+ *	@(#)error.h	1.3 - 95/10/25
  *	
  *
@@ -7,4 +8,7 @@
  *  $Id$
  */
+
+#ifndef __RTEMS_ERROR_h
+#define __RTEMS_ERROR_h
 
 /*
@@ -19,8 +23,10 @@
                              RTEMS_ERROR_PANIC) /* all */
 
-char *rtems_status_text(rtems_status_code);
-int   rtems_error(int error_code, char *printf_format, ...);
-void  rtems_panic(char *printf_format, ...);
+const char *rtems_status_text(rtems_status_code);
+int   rtems_error(int error_code, const char *printf_format, ...);
+void  rtems_panic(const char *printf_format, ...);
 
 extern int rtems_panic_in_progress;
 
+#endif
+/* end of include file */
Index: c/src/lib/libc/libcsupport.h
===================================================================
--- c/src/lib/libc/libcsupport.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libc/libcsupport.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -30,5 +30,8 @@
 );
 
+extern void malloc_dump(void);
 extern void libc_init(int reentrant);
+extern int  host_errno(void);
+extern void fix_syscall_errno(void);
 
 #ifdef __cplusplus
@@ -36,7 +39,4 @@
 #endif
 
-extern int  host_errno(void);
-extern void fix_syscall_errno(void);
-
 #endif
 /* end of include file */
Index: c/src/lib/libc/libio.c
===================================================================
--- c/src/lib/libc/libio.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libc/libio.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -16,5 +16,5 @@
 #include <stdio.h>                      /* O_RDONLY, et.al. */
 #include <fcntl.h>                      /* O_RDONLY, et.al. */
-#include <sys/fcntl.h>                      /* O_RDONLY, et.al. */
+
 #if defined(solaris2)
 #define O_NDELAY O_NONBLOCK
@@ -22,4 +22,5 @@
 #define O_NDELAY _FNBIO
 #endif
+
 #include <errno.h>
 #include <string.h>                     /* strcmp */
@@ -209,5 +210,5 @@
             rc = rtems_semaphore_create(
               RTEMS_LIBIO_IOP_SEM(iop - rtems_libio_iops),
-              1, 
+              1,
               RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
               RTEMS_NO_PRIORITY,
Index: c/src/lib/libc/no_libc.c
===================================================================
--- c/src/lib/libc/no_libc.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libc/no_libc.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,3 +1,3 @@
-#if  !defined(RTEMS_LIBC) && !defined(RTEMS_NEWLIB) && !defined(RTEMS_UNIX)
+#if  !defined(RTEMS_NEWLIB) && !defined(RTEMS_UNIX)
 
 /*  no_libc.h
Index: c/src/lib/libmisc/assoc/assoc.c
===================================================================
--- c/src/lib/libmisc/assoc/assoc.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libmisc/assoc/assoc.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,5 +1,5 @@
 /*
- *	@(#)assoc.c	1.4 - 95/08/02
- *	
+ *	@(#)assoc.c	1.6 - 95/10/25
+ *
  *
  * assoc.c
@@ -9,5 +9,4 @@
  */
 
-
 #include <rtems.h>
 #include "assoc.h"
@@ -19,11 +18,11 @@
 #define rtems_assoc_is_default(ap)  ((ap)->name && STREQ(ap->name, RTEMS_ASSOC_DEFAULT_NAME))
 
-rtems_assoc_t *
+const rtems_assoc_t *
 rtems_assoc_ptr_by_name(
-    rtems_assoc_t *ap,
-    char *name
-  )
-{
-    rtems_assoc_t *default_ap = 0;
+    const rtems_assoc_t *ap,
+    const char *name
+  )
+{
+    const rtems_assoc_t *default_ap = 0;
 
     if (rtems_assoc_is_default(ap))
@@ -37,11 +36,11 @@
 }
 
-rtems_assoc_t *
+const rtems_assoc_t *
 rtems_assoc_ptr_by_local(
-    rtems_assoc_t *ap,
-    unsigned32     local_value
-  )
-{
-    rtems_assoc_t *default_ap = 0;
+    const rtems_assoc_t *ap,
+    unsigned32     local_value
+  )
+{
+    const rtems_assoc_t *default_ap = 0;
 
     if (rtems_assoc_is_default(ap))
@@ -56,11 +55,11 @@
 
 
-rtems_assoc_t *
+const rtems_assoc_t *
 rtems_assoc_ptr_by_remote(
-    rtems_assoc_t *ap,
-    unsigned32     remote_value
-  )
-{
-    rtems_assoc_t *default_ap = 0;
+    const rtems_assoc_t *ap,
+    unsigned32     remote_value
+  )
+{
+    const rtems_assoc_t *default_ap = 0;
 
     if (rtems_assoc_is_default(ap))
@@ -81,9 +80,9 @@
 unsigned32
 rtems_assoc_remote_by_local(
-    rtems_assoc_t *ap,
-    unsigned32     local_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     local_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_local(ap, local_value);
     if (nap)
@@ -95,9 +94,9 @@
 unsigned32
 rtems_assoc_local_by_remote(
-    rtems_assoc_t *ap,
-    unsigned32     remote_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     remote_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_remote(ap, remote_value);
     if (nap)
@@ -109,9 +108,9 @@
 unsigned32
 rtems_assoc_remote_by_name(
-    rtems_assoc_t *ap,
-    char          *name
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    const char          *name
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_name(ap, name);
     if (nap)
@@ -123,9 +122,9 @@
 unsigned32
 rtems_assoc_local_by_name(
-    rtems_assoc_t *ap,
-    char          *name
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    const char          *name
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_name(ap, name);
     if (nap)
@@ -140,23 +139,27 @@
  */
 
-char *
+const char *
 rtems_assoc_name_bad(
     unsigned32 bad_value
 )
 {
+#ifdef RTEMS_DEBUG
     static char bad_buffer[32];
 
     sprintf(bad_buffer, "< %d [0x%x] >", bad_value, bad_value);
+#else
+    static char bad_buffer[32] = "<assoc.c: BAD NAME>";
+#endif
     return bad_buffer;
 }
 
 
-char *
+const char *
 rtems_assoc_name_by_local(
-    rtems_assoc_t *ap,
-    unsigned32     local_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     local_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_local(ap, local_value);
     if (nap)
@@ -166,11 +169,11 @@
 }
 
-char *
+const char *
 rtems_assoc_name_by_remote(
-    rtems_assoc_t *ap,
-    unsigned32     remote_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     remote_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_remote(ap, remote_value);
     if (nap)
@@ -186,5 +189,5 @@
 
 unsigned32 rtems_assoc_remote_by_local_bitfield(
-    rtems_assoc_t *ap,
+    const rtems_assoc_t *ap,
     unsigned32     local_value
   )
@@ -202,5 +205,5 @@
 
 unsigned32 rtems_assoc_local_by_remote_bitfield(
-    rtems_assoc_t *ap,
+    const rtems_assoc_t *ap,
     unsigned32     remote_value
   )
@@ -216,6 +219,7 @@
 }
 
-char *rtems_assoc_name_by_remote_bitfield(
-    rtems_assoc_t *ap,
+char *
+rtems_assoc_name_by_remote_bitfield(
+    const rtems_assoc_t *ap,
     unsigned32     value,
     char          *buffer
@@ -237,6 +241,7 @@
 }
 
-char *rtems_assoc_name_by_local_bitfield(
-    rtems_assoc_t *ap,
+char *
+rtems_assoc_name_by_local_bitfield(
+    const rtems_assoc_t *ap,
     unsigned32     value,
     char          *buffer
Index: c/src/lib/libmisc/assoc/assoc.h
===================================================================
--- c/src/lib/libmisc/assoc/assoc.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libmisc/assoc/assoc.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,4 +1,4 @@
 /*
- *	@(#)assoc.h	1.2 - 95/06/28
+ *	@(#)assoc.h	1.4 - 95/10/25
  *	
  *
@@ -14,5 +14,5 @@
 
 typedef struct {
-    char *name;
+    const char   *name;
     unsigned32   local_value;
     unsigned32   remote_value;
@@ -25,19 +25,19 @@
 #define RTEMS_ASSOC_DEFAULT_NAME "(default)"
 
-rtems_assoc_t *rtems_assoc_ptr_by_name(rtems_assoc_t *, char *);
-rtems_assoc_t *rtems_assoc_ptr_by_value(rtems_assoc_t *, unsigned32);
-rtems_assoc_t *rtems_assoc_ptr_by_remote(rtems_assoc_t *, unsigned32);
+const rtems_assoc_t *rtems_assoc_ptr_by_name(const rtems_assoc_t *, const char *);
+const rtems_assoc_t *rtems_assoc_ptr_by_value(const rtems_assoc_t *, unsigned32);
+const rtems_assoc_t *rtems_assoc_ptr_by_remote(const rtems_assoc_t *, unsigned32);
 
-unsigned32   rtems_assoc_remote_by_local(rtems_assoc_t *, unsigned32);
-unsigned32   rtems_assoc_local_by_remote(rtems_assoc_t *, unsigned32);
-unsigned32   rtems_assoc_remote_by_name(rtems_assoc_t *, char *);
-unsigned32   rtems_assoc_local_by_name(rtems_assoc_t *, char *);
-char        *rtems_assoc_name_by_local(rtems_assoc_t *, unsigned32);
-char        *rtems_assoc_name_by_remote(rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_remote_by_local(const rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_local_by_remote(const rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_remote_by_name(const rtems_assoc_t *, const char *);
+unsigned32   rtems_assoc_local_by_name(const rtems_assoc_t *, const char *);
+const char  *rtems_assoc_name_by_local(const rtems_assoc_t *, unsigned32);
+const char  *rtems_assoc_name_by_remote(const rtems_assoc_t *, unsigned32);
 
-unsigned32   rtems_assoc_remote_by_local_bitfield(rtems_assoc_t *, unsigned32);
-char        *rtems_assoc_name_by_local_bitfield(rtems_assoc_t *, unsigned32, char *);
-char        *rtems_assoc_name_by_remote_bitfield(rtems_assoc_t *, unsigned32, char *);
-unsigned32   rtems_assoc_local_by_remote_bitfield(rtems_assoc_t *ap, unsigned32);
+unsigned32   rtems_assoc_remote_by_local_bitfield(const rtems_assoc_t *, unsigned32);
+char  *rtems_assoc_name_by_local_bitfield(const rtems_assoc_t *, unsigned32, char *);
+char  *rtems_assoc_name_by_remote_bitfield(const rtems_assoc_t *, unsigned32, char *);
+unsigned32   rtems_assoc_local_by_remote_bitfield(const rtems_assoc_t *, unsigned32);
 
 
Index: c/src/lib/libmisc/error/error.c
===================================================================
--- c/src/lib/libmisc/error/error.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libmisc/error/error.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,9 +1,8 @@
 /*
- *	@(#)error.c	1.2 - 95/08/02
+ *	@(#)error.c	1.6 - 95/12/12
  *	
  *
- * report errors and panics to RTEMS' stderr.
- * Currently just used by RTEMS monitor.
- *
+ *  report errors and panics to RTEMS' stderr.
+ *  Currently just used by RTEMS monitor.
  *
  *  $Id$
@@ -98,5 +97,5 @@
 
 
-char *
+const char *
 rtems_status_text(
     rtems_status_code status
@@ -109,5 +108,5 @@
 static int rtems_verror(
     unsigned32   error_flag,
-    char        *printf_format,
+    const char   *printf_format,
     va_list      arglist
 )
@@ -182,5 +181,5 @@
 int rtems_error(
     int   error_flag,
-    char *printf_format,
+    const char *printf_format,
     ...
   )
@@ -201,5 +200,5 @@
 
 void rtems_panic(
-    char *printf_format,
+    const char *printf_format,
     ...
   )
Index: c/src/lib/libmisc/error/error.h
===================================================================
--- c/src/lib/libmisc/error/error.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libmisc/error/error.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,4 +1,5 @@
+
 /*
- *	@(#)error.h	1.1 - 95/08/02
+ *	@(#)error.h	1.3 - 95/10/25
  *	
  *
@@ -7,4 +8,7 @@
  *  $Id$
  */
+
+#ifndef __RTEMS_ERROR_h
+#define __RTEMS_ERROR_h
 
 /*
@@ -19,8 +23,10 @@
                              RTEMS_ERROR_PANIC) /* all */
 
-char *rtems_status_text(rtems_status_code);
-int   rtems_error(int error_code, char *printf_format, ...);
-void  rtems_panic(char *printf_format, ...);
+const char *rtems_status_text(rtems_status_code);
+int   rtems_error(int error_code, const char *printf_format, ...);
+void  rtems_panic(const char *printf_format, ...);
 
 extern int rtems_panic_in_progress;
 
+#endif
+/* end of include file */
Index: c/src/lib/libmisc/monitor/mon-monitor.c
===================================================================
--- c/src/lib/libmisc/monitor/mon-monitor.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libmisc/monitor/mon-monitor.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,5 +1,6 @@
 /*
- *	@(#)monitor.c	1.18 - 95/08/02
+ *	@(#)monitor.c	1.22 - 95/11/02
  *	
+ *
  *
  * RTEMS monitor main body
@@ -18,4 +19,8 @@
  *      remote request/response stuff should be cleaned up
  *         maybe we can use real rpc??
+ *      'info' commadn to print out:
+ *           interrupt stack location, direction and size
+ *           floating point config stuff
+ *           interrupt config stuff
  *
  *  $Id$
@@ -228,5 +233,5 @@
       "  A continue from the debugger will return to the monitor.\n",
       0,
-      CPU_INVOKE_DEBUGGER,
+      rtems_monitor_debugger_cmd,
       0,
     },
@@ -297,4 +302,16 @@
 }
 
+void
+rtems_monitor_debugger_cmd(
+    int        argc,
+    char     **argv,
+    unsigned32 command_arg,
+    boolean    verbose
+)
+{
+#ifdef CPU_INVOKE_DEBUGGER
+    CPU_INVOKE_DEBUGGER;
+#endif
+}
 
 void
@@ -339,20 +356,12 @@
  *              400a7090 ? _Configuration_Table
  *
- *
  *      We ignore the type field.
- *
- *  Parameters:
- *
- *
- *  Returns:
- *
  *
  *  Side Effects:
  *      Creates and fills in 'rtems_monitor_symbols' table
  *
- *  Notes:
- *
- *
- *  Deficiencies/ToDo:
+ *  TODO
+ *      there should be a BSP #define or something like that
+ *         to do this;  Assuming stdio is crazy.
  *      Someday this should know BFD
  *              Maybe we could get objcopy to just copy the symbol areas
@@ -374,5 +383,5 @@
         return;
 
-#ifdef simhppa
+#ifdef SIMHPPA
     fp = fdopen(8, "r");                /* don't ask; don't tell */
 #else
Index: c/src/lib/libmisc/monitor/mon-prmisc.c
===================================================================
--- c/src/lib/libmisc/monitor/mon-prmisc.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libmisc/monitor/mon-prmisc.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -71,5 +71,5 @@
     unsigned32 b;
     unsigned32 length = 0;
-    char *name;
+    const char *name;
 
     for (b = 1; b; b <<= 1)
Index: c/src/lib/libmisc/monitor/monitor.h
===================================================================
--- c/src/lib/libmisc/monitor/monitor.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/lib/libmisc/monitor/monitor.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,5 +1,6 @@
 /*
- *      @(#)monitor.h	1.14 - 95/08/02
+ *      @(#)monitor.h	1.20 - 95/12/12
  *      
+ *
  *  $Id$
  */
@@ -319,4 +320,5 @@
 void    rtems_monitor_fatal_cmd(int, char **, unsigned32, boolean);
 void    rtems_monitor_continue_cmd(int, char **, unsigned32, boolean);
+void    rtems_monitor_debugger_cmd(int, char **, unsigned32, boolean);
 void    rtems_monitor_node_cmd(int, char **, unsigned32, boolean);
 void    rtems_monitor_symbols_loadup(void);
Index: c/src/libchip/shmdr/getlq.c
===================================================================
--- c/src/libchip/shmdr/getlq.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/libchip/shmdr/getlq.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -23,5 +23,5 @@
 
 #include <rtems.h>
-#include "shm.h"
+#include <shm.h>
 
 Shm_Envelope_control *Shm_Locked_queue_Get(
Index: c/src/libchip/shmdr/shm_driver.h
===================================================================
--- c/src/libchip/shmdr/shm_driver.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/libchip/shmdr/shm_driver.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -471,9 +471,5 @@
 void           Init_env_pool();
 void           Shm_Print_statistics( void );
-void           MPCI_Fatal(
-  Internal_errors_Source  source,
-  boolean                 is_internal,
-  rtems_unsigned32        error
- );
+void           MPCI_Fatal( Internal_errors_Source, boolean, rtems_unsigned32 );
 rtems_task     Shm_Cause_interrupt( rtems_unsigned32 );
 void           Shm_Poll();
Index: c/src/libmisc/assoc/assoc.c
===================================================================
--- c/src/libmisc/assoc/assoc.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/libmisc/assoc/assoc.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,5 +1,5 @@
 /*
- *	@(#)assoc.c	1.4 - 95/08/02
- *	
+ *	@(#)assoc.c	1.6 - 95/10/25
+ *
  *
  * assoc.c
@@ -9,5 +9,4 @@
  */
 
-
 #include <rtems.h>
 #include "assoc.h"
@@ -19,11 +18,11 @@
 #define rtems_assoc_is_default(ap)  ((ap)->name && STREQ(ap->name, RTEMS_ASSOC_DEFAULT_NAME))
 
-rtems_assoc_t *
+const rtems_assoc_t *
 rtems_assoc_ptr_by_name(
-    rtems_assoc_t *ap,
-    char *name
-  )
-{
-    rtems_assoc_t *default_ap = 0;
+    const rtems_assoc_t *ap,
+    const char *name
+  )
+{
+    const rtems_assoc_t *default_ap = 0;
 
     if (rtems_assoc_is_default(ap))
@@ -37,11 +36,11 @@
 }
 
-rtems_assoc_t *
+const rtems_assoc_t *
 rtems_assoc_ptr_by_local(
-    rtems_assoc_t *ap,
-    unsigned32     local_value
-  )
-{
-    rtems_assoc_t *default_ap = 0;
+    const rtems_assoc_t *ap,
+    unsigned32     local_value
+  )
+{
+    const rtems_assoc_t *default_ap = 0;
 
     if (rtems_assoc_is_default(ap))
@@ -56,11 +55,11 @@
 
 
-rtems_assoc_t *
+const rtems_assoc_t *
 rtems_assoc_ptr_by_remote(
-    rtems_assoc_t *ap,
-    unsigned32     remote_value
-  )
-{
-    rtems_assoc_t *default_ap = 0;
+    const rtems_assoc_t *ap,
+    unsigned32     remote_value
+  )
+{
+    const rtems_assoc_t *default_ap = 0;
 
     if (rtems_assoc_is_default(ap))
@@ -81,9 +80,9 @@
 unsigned32
 rtems_assoc_remote_by_local(
-    rtems_assoc_t *ap,
-    unsigned32     local_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     local_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_local(ap, local_value);
     if (nap)
@@ -95,9 +94,9 @@
 unsigned32
 rtems_assoc_local_by_remote(
-    rtems_assoc_t *ap,
-    unsigned32     remote_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     remote_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_remote(ap, remote_value);
     if (nap)
@@ -109,9 +108,9 @@
 unsigned32
 rtems_assoc_remote_by_name(
-    rtems_assoc_t *ap,
-    char          *name
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    const char          *name
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_name(ap, name);
     if (nap)
@@ -123,9 +122,9 @@
 unsigned32
 rtems_assoc_local_by_name(
-    rtems_assoc_t *ap,
-    char          *name
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    const char          *name
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_name(ap, name);
     if (nap)
@@ -140,23 +139,27 @@
  */
 
-char *
+const char *
 rtems_assoc_name_bad(
     unsigned32 bad_value
 )
 {
+#ifdef RTEMS_DEBUG
     static char bad_buffer[32];
 
     sprintf(bad_buffer, "< %d [0x%x] >", bad_value, bad_value);
+#else
+    static char bad_buffer[32] = "<assoc.c: BAD NAME>";
+#endif
     return bad_buffer;
 }
 
 
-char *
+const char *
 rtems_assoc_name_by_local(
-    rtems_assoc_t *ap,
-    unsigned32     local_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     local_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_local(ap, local_value);
     if (nap)
@@ -166,11 +169,11 @@
 }
 
-char *
+const char *
 rtems_assoc_name_by_remote(
-    rtems_assoc_t *ap,
-    unsigned32     remote_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     remote_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_remote(ap, remote_value);
     if (nap)
@@ -186,5 +189,5 @@
 
 unsigned32 rtems_assoc_remote_by_local_bitfield(
-    rtems_assoc_t *ap,
+    const rtems_assoc_t *ap,
     unsigned32     local_value
   )
@@ -202,5 +205,5 @@
 
 unsigned32 rtems_assoc_local_by_remote_bitfield(
-    rtems_assoc_t *ap,
+    const rtems_assoc_t *ap,
     unsigned32     remote_value
   )
@@ -216,6 +219,7 @@
 }
 
-char *rtems_assoc_name_by_remote_bitfield(
-    rtems_assoc_t *ap,
+char *
+rtems_assoc_name_by_remote_bitfield(
+    const rtems_assoc_t *ap,
     unsigned32     value,
     char          *buffer
@@ -237,6 +241,7 @@
 }
 
-char *rtems_assoc_name_by_local_bitfield(
-    rtems_assoc_t *ap,
+char *
+rtems_assoc_name_by_local_bitfield(
+    const rtems_assoc_t *ap,
     unsigned32     value,
     char          *buffer
Index: c/src/libmisc/assoc/assoc.h
===================================================================
--- c/src/libmisc/assoc/assoc.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/libmisc/assoc/assoc.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,4 +1,4 @@
 /*
- *	@(#)assoc.h	1.2 - 95/06/28
+ *	@(#)assoc.h	1.4 - 95/10/25
  *	
  *
@@ -14,5 +14,5 @@
 
 typedef struct {
-    char *name;
+    const char   *name;
     unsigned32   local_value;
     unsigned32   remote_value;
@@ -25,19 +25,19 @@
 #define RTEMS_ASSOC_DEFAULT_NAME "(default)"
 
-rtems_assoc_t *rtems_assoc_ptr_by_name(rtems_assoc_t *, char *);
-rtems_assoc_t *rtems_assoc_ptr_by_value(rtems_assoc_t *, unsigned32);
-rtems_assoc_t *rtems_assoc_ptr_by_remote(rtems_assoc_t *, unsigned32);
+const rtems_assoc_t *rtems_assoc_ptr_by_name(const rtems_assoc_t *, const char *);
+const rtems_assoc_t *rtems_assoc_ptr_by_value(const rtems_assoc_t *, unsigned32);
+const rtems_assoc_t *rtems_assoc_ptr_by_remote(const rtems_assoc_t *, unsigned32);
 
-unsigned32   rtems_assoc_remote_by_local(rtems_assoc_t *, unsigned32);
-unsigned32   rtems_assoc_local_by_remote(rtems_assoc_t *, unsigned32);
-unsigned32   rtems_assoc_remote_by_name(rtems_assoc_t *, char *);
-unsigned32   rtems_assoc_local_by_name(rtems_assoc_t *, char *);
-char        *rtems_assoc_name_by_local(rtems_assoc_t *, unsigned32);
-char        *rtems_assoc_name_by_remote(rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_remote_by_local(const rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_local_by_remote(const rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_remote_by_name(const rtems_assoc_t *, const char *);
+unsigned32   rtems_assoc_local_by_name(const rtems_assoc_t *, const char *);
+const char  *rtems_assoc_name_by_local(const rtems_assoc_t *, unsigned32);
+const char  *rtems_assoc_name_by_remote(const rtems_assoc_t *, unsigned32);
 
-unsigned32   rtems_assoc_remote_by_local_bitfield(rtems_assoc_t *, unsigned32);
-char        *rtems_assoc_name_by_local_bitfield(rtems_assoc_t *, unsigned32, char *);
-char        *rtems_assoc_name_by_remote_bitfield(rtems_assoc_t *, unsigned32, char *);
-unsigned32   rtems_assoc_local_by_remote_bitfield(rtems_assoc_t *ap, unsigned32);
+unsigned32   rtems_assoc_remote_by_local_bitfield(const rtems_assoc_t *, unsigned32);
+char  *rtems_assoc_name_by_local_bitfield(const rtems_assoc_t *, unsigned32, char *);
+char  *rtems_assoc_name_by_remote_bitfield(const rtems_assoc_t *, unsigned32, char *);
+unsigned32   rtems_assoc_local_by_remote_bitfield(const rtems_assoc_t *, unsigned32);
 
 
Index: c/src/libmisc/error/error.c
===================================================================
--- c/src/libmisc/error/error.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/libmisc/error/error.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,9 +1,8 @@
 /*
- *	@(#)error.c	1.2 - 95/08/02
+ *	@(#)error.c	1.6 - 95/12/12
  *	
  *
- * report errors and panics to RTEMS' stderr.
- * Currently just used by RTEMS monitor.
- *
+ *  report errors and panics to RTEMS' stderr.
+ *  Currently just used by RTEMS monitor.
  *
  *  $Id$
@@ -98,5 +97,5 @@
 
 
-char *
+const char *
 rtems_status_text(
     rtems_status_code status
@@ -109,5 +108,5 @@
 static int rtems_verror(
     unsigned32   error_flag,
-    char        *printf_format,
+    const char   *printf_format,
     va_list      arglist
 )
@@ -182,5 +181,5 @@
 int rtems_error(
     int   error_flag,
-    char *printf_format,
+    const char *printf_format,
     ...
   )
@@ -201,5 +200,5 @@
 
 void rtems_panic(
-    char *printf_format,
+    const char *printf_format,
     ...
   )
Index: c/src/libmisc/error/error.h
===================================================================
--- c/src/libmisc/error/error.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/libmisc/error/error.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,4 +1,5 @@
+
 /*
- *	@(#)error.h	1.1 - 95/08/02
+ *	@(#)error.h	1.3 - 95/10/25
  *	
  *
@@ -7,4 +8,7 @@
  *  $Id$
  */
+
+#ifndef __RTEMS_ERROR_h
+#define __RTEMS_ERROR_h
 
 /*
@@ -19,8 +23,10 @@
                              RTEMS_ERROR_PANIC) /* all */
 
-char *rtems_status_text(rtems_status_code);
-int   rtems_error(int error_code, char *printf_format, ...);
-void  rtems_panic(char *printf_format, ...);
+const char *rtems_status_text(rtems_status_code);
+int   rtems_error(int error_code, const char *printf_format, ...);
+void  rtems_panic(const char *printf_format, ...);
 
 extern int rtems_panic_in_progress;
 
+#endif
+/* end of include file */
Index: c/src/libmisc/monitor/mon-monitor.c
===================================================================
--- c/src/libmisc/monitor/mon-monitor.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/libmisc/monitor/mon-monitor.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,5 +1,6 @@
 /*
- *	@(#)monitor.c	1.18 - 95/08/02
+ *	@(#)monitor.c	1.22 - 95/11/02
  *	
+ *
  *
  * RTEMS monitor main body
@@ -18,4 +19,8 @@
  *      remote request/response stuff should be cleaned up
  *         maybe we can use real rpc??
+ *      'info' commadn to print out:
+ *           interrupt stack location, direction and size
+ *           floating point config stuff
+ *           interrupt config stuff
  *
  *  $Id$
@@ -228,5 +233,5 @@
       "  A continue from the debugger will return to the monitor.\n",
       0,
-      CPU_INVOKE_DEBUGGER,
+      rtems_monitor_debugger_cmd,
       0,
     },
@@ -297,4 +302,16 @@
 }
 
+void
+rtems_monitor_debugger_cmd(
+    int        argc,
+    char     **argv,
+    unsigned32 command_arg,
+    boolean    verbose
+)
+{
+#ifdef CPU_INVOKE_DEBUGGER
+    CPU_INVOKE_DEBUGGER;
+#endif
+}
 
 void
@@ -339,20 +356,12 @@
  *              400a7090 ? _Configuration_Table
  *
- *
  *      We ignore the type field.
- *
- *  Parameters:
- *
- *
- *  Returns:
- *
  *
  *  Side Effects:
  *      Creates and fills in 'rtems_monitor_symbols' table
  *
- *  Notes:
- *
- *
- *  Deficiencies/ToDo:
+ *  TODO
+ *      there should be a BSP #define or something like that
+ *         to do this;  Assuming stdio is crazy.
  *      Someday this should know BFD
  *              Maybe we could get objcopy to just copy the symbol areas
@@ -374,5 +383,5 @@
         return;
 
-#ifdef simhppa
+#ifdef SIMHPPA
     fp = fdopen(8, "r");                /* don't ask; don't tell */
 #else
Index: c/src/libmisc/monitor/mon-prmisc.c
===================================================================
--- c/src/libmisc/monitor/mon-prmisc.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/libmisc/monitor/mon-prmisc.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -71,5 +71,5 @@
     unsigned32 b;
     unsigned32 length = 0;
-    char *name;
+    const char *name;
 
     for (b = 1; b; b <<= 1)
Index: c/src/libmisc/monitor/monitor.h
===================================================================
--- c/src/libmisc/monitor/monitor.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/libmisc/monitor/monitor.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,5 +1,6 @@
 /*
- *      @(#)monitor.h	1.14 - 95/08/02
+ *      @(#)monitor.h	1.20 - 95/12/12
  *      
+ *
  *  $Id$
  */
@@ -319,4 +320,5 @@
 void    rtems_monitor_fatal_cmd(int, char **, unsigned32, boolean);
 void    rtems_monitor_continue_cmd(int, char **, unsigned32, boolean);
+void    rtems_monitor_debugger_cmd(int, char **, unsigned32, boolean);
 void    rtems_monitor_node_cmd(int, char **, unsigned32, boolean);
 void    rtems_monitor_symbols_loadup(void);
Index: c/src/tests/sptests/sp09/screen02.c
===================================================================
--- c/src/tests/sptests/sp09/screen02.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/tests/sptests/sp09/screen02.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -189,4 +189,4 @@
     "rtems_task_wake_when before current time"
   );
-  puts( " -  RTEMS_INVALID_CLOCK" );
+  puts( " - RTEMS_INVALID_CLOCK" );
 }
Index: c/src/tests/sptests/sp11/sp11.scn
===================================================================
--- c/src/tests/sptests/sp11/sp11.scn	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/tests/sptests/sp11/sp11.scn	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -30,5 +30,5 @@
 TA1 - rtems_clock_get - 08:15:05   02/12/1988
 TA1 - rtems_event_send - send RTEMS_EVENT_3 to self
-TA1 - rtems_event_receive - RTEMS_EVENT_3 or RTEMS_EVENT_22 - NO_WAIT and ANY 
+TA1 - rtems_event_receive - RTEMS_EVENT_3 or RTEMS_EVENT_22 - NO_WAIT and ANY
 TA1 - RTEMS_EVENT_3 received - eventout => 00000008
 TA1 - rtems_event_send - send RTEMS_EVENT_4 to self
@@ -64,8 +64,8 @@
 TA1 - rtems_event_send - sending RTEMS_EVENT_10 to self in 1 day
 TA1 - rtems_event_send - sending RTEMS_EVENT_11 to self in 2 days
-TA1 - rtems_clock_set - 07:15:00 02/12/1988
+TA1 - rtems_clock_set - 07:15:00   02/12/1988
 TA1 - set time backwards
 TA1 - no events received
-TA1 - rtems_clock_set - 07:15:00 02/14/1988
+TA1 - rtems_clock_set - 07:15:00   02/14/1988
 TA1 - set time forwards (leave a timer)
 TA1 - RTEMS_EVENT_10 received
Index: c/src/tests/support/include/tmacros.h
===================================================================
--- c/src/tests/support/include/tmacros.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/tests/support/include/tmacros.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -22,6 +22,5 @@
 #endif
 
-#include <rtems.h>
-#include <bsp.h>
+#include <bsp.h>    /* includes <rtems.h> */
 
 #include <stdio.h>
@@ -41,21 +40,27 @@
 
 #define fatal_directive_status( stat, desired, msg ) \
-     { \
+     do { \
        if ( (stat) != (desired) ) { \
          printf( "\n%s FAILED -- expected (%d) got (%d)\n", \
                  (msg), (desired), (stat) ); \
+         fflush(stdout); \
          exit( stat ); \
        } \
-     }
+     } while ( 0 ) 
 
 #define sprint_time(str,s1,tb,s2) \
+  do { \
     sprintf( (str), "%s%02d:%02d:%02d   %02d/%02d/%04d%s", \
        s1, (tb)->hour, (tb)->minute, (tb)->second, \
-       (tb)->month, (tb)->day, (tb)->year, s2 );
+       (tb)->month, (tb)->day, (tb)->year, s2 ); \
+  } while ( 0 )
 
 #define print_time(s1,tb,s2) \
+  do { \
     printf( "%s%02d:%02d:%02d   %02d/%02d/%04d%s", \
        s1, (tb)->hour, (tb)->minute, (tb)->second, \
-       (tb)->month, (tb)->day, (tb)->year, s2 );
+       (tb)->month, (tb)->day, (tb)->year, s2 ); \
+    fflush(stdout); \
+  } while ( 0 )
 
 #define put_dot( c ) putchar( c ); fflush( stdout )
Index: c/src/tests/tools/generic/difftest
===================================================================
--- c/src/tests/tools/generic/difftest	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ c/src/tests/tools/generic/difftest	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -56,5 +56,5 @@
     esac
 done
-((shiftcount = $OPTIND - 1))
+shiftcount=`expr $OPTIND - 1`
 shift $shiftcount
 
Index: cpukit/libcsupport/include/rtems/assoc.h
===================================================================
--- cpukit/libcsupport/include/rtems/assoc.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ cpukit/libcsupport/include/rtems/assoc.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,4 +1,4 @@
 /*
- *	@(#)assoc.h	1.2 - 95/06/28
+ *	@(#)assoc.h	1.4 - 95/10/25
  *	
  *
@@ -14,5 +14,5 @@
 
 typedef struct {
-    char *name;
+    const char   *name;
     unsigned32   local_value;
     unsigned32   remote_value;
@@ -25,19 +25,19 @@
 #define RTEMS_ASSOC_DEFAULT_NAME "(default)"
 
-rtems_assoc_t *rtems_assoc_ptr_by_name(rtems_assoc_t *, char *);
-rtems_assoc_t *rtems_assoc_ptr_by_value(rtems_assoc_t *, unsigned32);
-rtems_assoc_t *rtems_assoc_ptr_by_remote(rtems_assoc_t *, unsigned32);
+const rtems_assoc_t *rtems_assoc_ptr_by_name(const rtems_assoc_t *, const char *);
+const rtems_assoc_t *rtems_assoc_ptr_by_value(const rtems_assoc_t *, unsigned32);
+const rtems_assoc_t *rtems_assoc_ptr_by_remote(const rtems_assoc_t *, unsigned32);
 
-unsigned32   rtems_assoc_remote_by_local(rtems_assoc_t *, unsigned32);
-unsigned32   rtems_assoc_local_by_remote(rtems_assoc_t *, unsigned32);
-unsigned32   rtems_assoc_remote_by_name(rtems_assoc_t *, char *);
-unsigned32   rtems_assoc_local_by_name(rtems_assoc_t *, char *);
-char        *rtems_assoc_name_by_local(rtems_assoc_t *, unsigned32);
-char        *rtems_assoc_name_by_remote(rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_remote_by_local(const rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_local_by_remote(const rtems_assoc_t *, unsigned32);
+unsigned32   rtems_assoc_remote_by_name(const rtems_assoc_t *, const char *);
+unsigned32   rtems_assoc_local_by_name(const rtems_assoc_t *, const char *);
+const char  *rtems_assoc_name_by_local(const rtems_assoc_t *, unsigned32);
+const char  *rtems_assoc_name_by_remote(const rtems_assoc_t *, unsigned32);
 
-unsigned32   rtems_assoc_remote_by_local_bitfield(rtems_assoc_t *, unsigned32);
-char        *rtems_assoc_name_by_local_bitfield(rtems_assoc_t *, unsigned32, char *);
-char        *rtems_assoc_name_by_remote_bitfield(rtems_assoc_t *, unsigned32, char *);
-unsigned32   rtems_assoc_local_by_remote_bitfield(rtems_assoc_t *ap, unsigned32);
+unsigned32   rtems_assoc_remote_by_local_bitfield(const rtems_assoc_t *, unsigned32);
+char  *rtems_assoc_name_by_local_bitfield(const rtems_assoc_t *, unsigned32, char *);
+char  *rtems_assoc_name_by_remote_bitfield(const rtems_assoc_t *, unsigned32, char *);
+unsigned32   rtems_assoc_local_by_remote_bitfield(const rtems_assoc_t *, unsigned32);
 
 
Index: cpukit/libcsupport/include/rtems/error.h
===================================================================
--- cpukit/libcsupport/include/rtems/error.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ cpukit/libcsupport/include/rtems/error.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,4 +1,5 @@
+
 /*
- *	@(#)error.h	1.1 - 95/08/02
+ *	@(#)error.h	1.3 - 95/10/25
  *	
  *
@@ -7,4 +8,7 @@
  *  $Id$
  */
+
+#ifndef __RTEMS_ERROR_h
+#define __RTEMS_ERROR_h
 
 /*
@@ -19,8 +23,10 @@
                              RTEMS_ERROR_PANIC) /* all */
 
-char *rtems_status_text(rtems_status_code);
-int   rtems_error(int error_code, char *printf_format, ...);
-void  rtems_panic(char *printf_format, ...);
+const char *rtems_status_text(rtems_status_code);
+int   rtems_error(int error_code, const char *printf_format, ...);
+void  rtems_panic(const char *printf_format, ...);
 
 extern int rtems_panic_in_progress;
 
+#endif
+/* end of include file */
Index: cpukit/libcsupport/include/rtems/libcsupport.h
===================================================================
--- cpukit/libcsupport/include/rtems/libcsupport.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ cpukit/libcsupport/include/rtems/libcsupport.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -30,5 +30,8 @@
 );
 
+extern void malloc_dump(void);
 extern void libc_init(int reentrant);
+extern int  host_errno(void);
+extern void fix_syscall_errno(void);
 
 #ifdef __cplusplus
@@ -36,7 +39,4 @@
 #endif
 
-extern int  host_errno(void);
-extern void fix_syscall_errno(void);
-
 #endif
 /* end of include file */
Index: cpukit/libcsupport/src/assoc.c
===================================================================
--- cpukit/libcsupport/src/assoc.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ cpukit/libcsupport/src/assoc.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,5 +1,5 @@
 /*
- *	@(#)assoc.c	1.4 - 95/08/02
- *	
+ *	@(#)assoc.c	1.6 - 95/10/25
+ *
  *
  * assoc.c
@@ -9,5 +9,4 @@
  */
 
-
 #include <rtems.h>
 #include "assoc.h"
@@ -19,11 +18,11 @@
 #define rtems_assoc_is_default(ap)  ((ap)->name && STREQ(ap->name, RTEMS_ASSOC_DEFAULT_NAME))
 
-rtems_assoc_t *
+const rtems_assoc_t *
 rtems_assoc_ptr_by_name(
-    rtems_assoc_t *ap,
-    char *name
-  )
-{
-    rtems_assoc_t *default_ap = 0;
+    const rtems_assoc_t *ap,
+    const char *name
+  )
+{
+    const rtems_assoc_t *default_ap = 0;
 
     if (rtems_assoc_is_default(ap))
@@ -37,11 +36,11 @@
 }
 
-rtems_assoc_t *
+const rtems_assoc_t *
 rtems_assoc_ptr_by_local(
-    rtems_assoc_t *ap,
-    unsigned32     local_value
-  )
-{
-    rtems_assoc_t *default_ap = 0;
+    const rtems_assoc_t *ap,
+    unsigned32     local_value
+  )
+{
+    const rtems_assoc_t *default_ap = 0;
 
     if (rtems_assoc_is_default(ap))
@@ -56,11 +55,11 @@
 
 
-rtems_assoc_t *
+const rtems_assoc_t *
 rtems_assoc_ptr_by_remote(
-    rtems_assoc_t *ap,
-    unsigned32     remote_value
-  )
-{
-    rtems_assoc_t *default_ap = 0;
+    const rtems_assoc_t *ap,
+    unsigned32     remote_value
+  )
+{
+    const rtems_assoc_t *default_ap = 0;
 
     if (rtems_assoc_is_default(ap))
@@ -81,9 +80,9 @@
 unsigned32
 rtems_assoc_remote_by_local(
-    rtems_assoc_t *ap,
-    unsigned32     local_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     local_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_local(ap, local_value);
     if (nap)
@@ -95,9 +94,9 @@
 unsigned32
 rtems_assoc_local_by_remote(
-    rtems_assoc_t *ap,
-    unsigned32     remote_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     remote_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_remote(ap, remote_value);
     if (nap)
@@ -109,9 +108,9 @@
 unsigned32
 rtems_assoc_remote_by_name(
-    rtems_assoc_t *ap,
-    char          *name
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    const char          *name
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_name(ap, name);
     if (nap)
@@ -123,9 +122,9 @@
 unsigned32
 rtems_assoc_local_by_name(
-    rtems_assoc_t *ap,
-    char          *name
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    const char          *name
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_name(ap, name);
     if (nap)
@@ -140,23 +139,27 @@
  */
 
-char *
+const char *
 rtems_assoc_name_bad(
     unsigned32 bad_value
 )
 {
+#ifdef RTEMS_DEBUG
     static char bad_buffer[32];
 
     sprintf(bad_buffer, "< %d [0x%x] >", bad_value, bad_value);
+#else
+    static char bad_buffer[32] = "<assoc.c: BAD NAME>";
+#endif
     return bad_buffer;
 }
 
 
-char *
+const char *
 rtems_assoc_name_by_local(
-    rtems_assoc_t *ap,
-    unsigned32     local_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     local_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_local(ap, local_value);
     if (nap)
@@ -166,11 +169,11 @@
 }
 
-char *
+const char *
 rtems_assoc_name_by_remote(
-    rtems_assoc_t *ap,
-    unsigned32     remote_value
-  )
-{
-    rtems_assoc_t *nap;
+    const rtems_assoc_t *ap,
+    unsigned32     remote_value
+  )
+{
+    const rtems_assoc_t *nap;
     nap = rtems_assoc_ptr_by_remote(ap, remote_value);
     if (nap)
@@ -186,5 +189,5 @@
 
 unsigned32 rtems_assoc_remote_by_local_bitfield(
-    rtems_assoc_t *ap,
+    const rtems_assoc_t *ap,
     unsigned32     local_value
   )
@@ -202,5 +205,5 @@
 
 unsigned32 rtems_assoc_local_by_remote_bitfield(
-    rtems_assoc_t *ap,
+    const rtems_assoc_t *ap,
     unsigned32     remote_value
   )
@@ -216,6 +219,7 @@
 }
 
-char *rtems_assoc_name_by_remote_bitfield(
-    rtems_assoc_t *ap,
+char *
+rtems_assoc_name_by_remote_bitfield(
+    const rtems_assoc_t *ap,
     unsigned32     value,
     char          *buffer
@@ -237,6 +241,7 @@
 }
 
-char *rtems_assoc_name_by_local_bitfield(
-    rtems_assoc_t *ap,
+char *
+rtems_assoc_name_by_local_bitfield(
+    const rtems_assoc_t *ap,
     unsigned32     value,
     char          *buffer
Index: cpukit/libcsupport/src/error.c
===================================================================
--- cpukit/libcsupport/src/error.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ cpukit/libcsupport/src/error.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,9 +1,8 @@
 /*
- *	@(#)error.c	1.2 - 95/08/02
+ *	@(#)error.c	1.6 - 95/12/12
  *	
  *
- * report errors and panics to RTEMS' stderr.
- * Currently just used by RTEMS monitor.
- *
+ *  report errors and panics to RTEMS' stderr.
+ *  Currently just used by RTEMS monitor.
  *
  *  $Id$
@@ -98,5 +97,5 @@
 
 
-char *
+const char *
 rtems_status_text(
     rtems_status_code status
@@ -109,5 +108,5 @@
 static int rtems_verror(
     unsigned32   error_flag,
-    char        *printf_format,
+    const char   *printf_format,
     va_list      arglist
 )
@@ -182,5 +181,5 @@
 int rtems_error(
     int   error_flag,
-    char *printf_format,
+    const char *printf_format,
     ...
   )
@@ -201,5 +200,5 @@
 
 void rtems_panic(
-    char *printf_format,
+    const char *printf_format,
     ...
   )
Index: cpukit/libcsupport/src/libio.c
===================================================================
--- cpukit/libcsupport/src/libio.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ cpukit/libcsupport/src/libio.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -16,5 +16,5 @@
 #include <stdio.h>                      /* O_RDONLY, et.al. */
 #include <fcntl.h>                      /* O_RDONLY, et.al. */
-#include <sys/fcntl.h>                      /* O_RDONLY, et.al. */
+
 #if defined(solaris2)
 #define O_NDELAY O_NONBLOCK
@@ -22,4 +22,5 @@
 #define O_NDELAY _FNBIO
 #endif
+
 #include <errno.h>
 #include <string.h>                     /* strcmp */
@@ -209,5 +210,5 @@
             rc = rtems_semaphore_create(
               RTEMS_LIBIO_IOP_SEM(iop - rtems_libio_iops),
-              1, 
+              1,
               RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
               RTEMS_NO_PRIORITY,
Index: cpukit/libcsupport/src/no_libc.c
===================================================================
--- cpukit/libcsupport/src/no_libc.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ cpukit/libcsupport/src/no_libc.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,3 +1,3 @@
-#if  !defined(RTEMS_LIBC) && !defined(RTEMS_NEWLIB) && !defined(RTEMS_UNIX)
+#if  !defined(RTEMS_NEWLIB) && !defined(RTEMS_UNIX)
 
 /*  no_libc.h
Index: cpukit/libmisc/monitor/mon-monitor.c
===================================================================
--- cpukit/libmisc/monitor/mon-monitor.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ cpukit/libmisc/monitor/mon-monitor.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,5 +1,6 @@
 /*
- *	@(#)monitor.c	1.18 - 95/08/02
+ *	@(#)monitor.c	1.22 - 95/11/02
  *	
+ *
  *
  * RTEMS monitor main body
@@ -18,4 +19,8 @@
  *      remote request/response stuff should be cleaned up
  *         maybe we can use real rpc??
+ *      'info' commadn to print out:
+ *           interrupt stack location, direction and size
+ *           floating point config stuff
+ *           interrupt config stuff
  *
  *  $Id$
@@ -228,5 +233,5 @@
       "  A continue from the debugger will return to the monitor.\n",
       0,
-      CPU_INVOKE_DEBUGGER,
+      rtems_monitor_debugger_cmd,
       0,
     },
@@ -297,4 +302,16 @@
 }
 
+void
+rtems_monitor_debugger_cmd(
+    int        argc,
+    char     **argv,
+    unsigned32 command_arg,
+    boolean    verbose
+)
+{
+#ifdef CPU_INVOKE_DEBUGGER
+    CPU_INVOKE_DEBUGGER;
+#endif
+}
 
 void
@@ -339,20 +356,12 @@
  *              400a7090 ? _Configuration_Table
  *
- *
  *      We ignore the type field.
- *
- *  Parameters:
- *
- *
- *  Returns:
- *
  *
  *  Side Effects:
  *      Creates and fills in 'rtems_monitor_symbols' table
  *
- *  Notes:
- *
- *
- *  Deficiencies/ToDo:
+ *  TODO
+ *      there should be a BSP #define or something like that
+ *         to do this;  Assuming stdio is crazy.
  *      Someday this should know BFD
  *              Maybe we could get objcopy to just copy the symbol areas
@@ -374,5 +383,5 @@
         return;
 
-#ifdef simhppa
+#ifdef SIMHPPA
     fp = fdopen(8, "r");                /* don't ask; don't tell */
 #else
Index: cpukit/libmisc/monitor/mon-prmisc.c
===================================================================
--- cpukit/libmisc/monitor/mon-prmisc.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ cpukit/libmisc/monitor/mon-prmisc.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -71,5 +71,5 @@
     unsigned32 b;
     unsigned32 length = 0;
-    char *name;
+    const char *name;
 
     for (b = 1; b; b <<= 1)
Index: cpukit/libmisc/monitor/monitor.h
===================================================================
--- cpukit/libmisc/monitor/monitor.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ cpukit/libmisc/monitor/monitor.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -1,5 +1,6 @@
 /*
- *      @(#)monitor.h	1.14 - 95/08/02
+ *      @(#)monitor.h	1.20 - 95/12/12
  *      
+ *
  *  $Id$
  */
@@ -319,4 +320,5 @@
 void    rtems_monitor_fatal_cmd(int, char **, unsigned32, boolean);
 void    rtems_monitor_continue_cmd(int, char **, unsigned32, boolean);
+void    rtems_monitor_debugger_cmd(int, char **, unsigned32, boolean);
 void    rtems_monitor_node_cmd(int, char **, unsigned32, boolean);
 void    rtems_monitor_symbols_loadup(void);
Index: cpukit/rtems/include/rtems/rtems/types.h
===================================================================
--- cpukit/rtems/include/rtems/rtems/types.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ cpukit/rtems/include/rtems/rtems/types.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -34,10 +34,16 @@
 typedef unsigned16      rtems_unsigned16; /* unsigned 16-bit value */
 typedef unsigned32      rtems_unsigned32; /* unsigned 32-bit value */
-typedef unsigned64      rtems_unsigned64; /* unsigned 64-bit value */
 
 typedef signed8         rtems_signed8;    /* signed 8-bit value  */
 typedef signed16        rtems_signed16;   /* signed 16-bit value */
 typedef signed32        rtems_signed32;   /* signed 32-bit value */
+
+/*
+ * some C++ compilers (eg: HP's) don't do 'long long'
+ */
+#if defined(__GNUC__)
+typedef unsigned64      rtems_unsigned64; /* unsigned 64-bit value */
 typedef signed64        rtems_signed64;   /* signed 64-bit value */
+#endif
 
 typedef single_precision rtems_single;    /* single precision float */
Index: cpukit/score/cpu/hppa1.1/cpu.c
===================================================================
--- cpukit/score/cpu/hppa1.1/cpu.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ cpukit/score/cpu/hppa1.1/cpu.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -25,27 +25,14 @@
 void hppa_external_interrupt_disable(unsigned32);
 void hppa_external_interrupt(unsigned32, CPU_Interrupt_frame *);
-
-/*
- * Our interrupt handlers take a 2nd argument:
- *   a pointer to a CPU_Interrupt_frame
- * So we use our own prototype instead of rtems_isr_entry
- */
-
-typedef void ( *hppa_rtems_isr_entry )(
-    ISR_Vector_number,
-    CPU_Interrupt_frame *
- );
-
-
-/*
- * who are we?  cpu number
- * Not used by executive proper, just kept (or not) as a convenience
- * for libcpu and libbsp stuff that wants it.
- *
- * Defaults to 0.  If the BSP doesn't like it, it can change it.
- */
-
-int cpu_number;                 /* from 0; cpu number in a multi cpu system */
-
+void hppa_cpu_halt(unsigned32);
+
+/*
+ * The first level interrupt handler for first 32 interrupts/traps.
+ * Indexed by vector; generally each entry is _Generic_ISR_Handler.
+ * Some TLB traps may have their own first level handler.
+ */
+
+extern void _Generic_ISR_Handler(void);
+unsigned32 HPPA_first_level_interrupt_handler[HPPA_INTERNAL_INTERRUPTS];
 
 /*  _CPU_Initialize
@@ -87,4 +74,18 @@
 
     /*
+     * Init the first level interrupt handlers
+     */
+
+    for (i=0; i <= HPPA_INTERNAL_INTERRUPTS; i++)
+        HPPA_first_level_interrupt_handler[i] = (unsigned32) _Generic_ISR_Handler;
+
+    /*
+     * Init the 2nd level interrupt handlers
+     */
+
+    for (i=0; i <= CPU_INTERRUPT_NUMBER_OF_VECTORS; i++)
+        _ISR_Vector_table[i] = (ISR_Handler_entry) hppa_cpu_halt;
+
+    /*
      * Stabilize the interrupt stuff
      */
@@ -97,4 +98,31 @@
 
     iva_table = (unsigned32) IVA_Table;
+#if defined(hppa1_1)
+    /*
+     * HACK:  (from PA72000 TRM, page 4-19)
+     * "The hardware TLB miss handler will never attempt to service
+     *  a non-access TLB miss or a TLB protection violation.  It
+     *  will only attempt to service TLB accesses that would cause
+     *  Trap Numbers 6 (Instruction TLB miss) and 15 (Data TLB miss)."
+     *
+     * The LPA instruction is used to translate a virtual address to
+     * a physical address, however, if the requested virtual address
+     * is not currently resident in the TLB, the hardware TLB miss
+     * handler will NOT insert it.  In this situation Trap Number
+     * #17 is invoked (Non-access Data TLB miss fault).
+     *
+     * To work around this, a dummy data access is first performed
+     * to the virtual address prior to the LPA.  The dummy access
+     * causes the TLB entry to be inserted (if not already present)
+     * and then the following LPA instruction will not generate
+     * a non-access data TLB miss fault.
+     *
+     * It is unclear whether or not this behaves the same way for
+     * the PA8000.
+     * 
+     */
+    iva = *(volatile unsigned32 *)iva_table;  /* dummy access */
+#endif
+
     HPPA_ASM_LPA(0, iva_table, iva);
     set_iva(iva);
@@ -113,6 +141,6 @@
     HPPA_ASM_SSM(0, level);	/* change no bits; just get copy */
     if (level & HPPA_PSW_I)
-        return 1;
-    return 0;
+        return 0;
+    return 1;
 }
 
@@ -185,10 +213,6 @@
  *
  *  TODO:
- *    delete interrupt.c etc.
  *    Count interrupts
  *    make sure interrupts disabled properly
- *    should handler check again for more interrupts before exit?
- *    How to enable interrupts from an interrupt handler?
- *    Make sure there is an entry for everything in ISR_Vector_Table
  */
 
@@ -209,14 +233,12 @@
 
     /* mark them all unused */
-
     DISABLE(~0);
     DISMISS(~0);
 
     /* install the external interrupt handler */
-  _CPU_ISR_install_vector(
-    HPPA_INTERRUPT_EXTERNAL_INTERRUPT,
-    (proc_ptr)hppa_external_interrupt,
-    &ignore
-  );
+    _CPU_ISR_install_vector(
+        HPPA_INTERRUPT_EXTERNAL_INTERRUPT,
+	(proc_ptr)hppa_external_interrupt, &ignore
+);
 }
 
@@ -257,17 +279,19 @@
        vector, iframe->Interrupt.pcoqfront);
 */
-    DISMISS(VECTOR_TO_MASK(vector));
-    DISABLE(VECTOR_TO_MASK(vector));
-}
-
-void
-hppa_external_interrupt_report_spurious(unsigned32           spurious,
+}
+
+void
+hppa_external_interrupt_report_spurious(unsigned32           spurious_mask,
                                         CPU_Interrupt_frame *iframe)
 {
     int v;
     for (v=0; v < HPPA_EXTERNAL_INTERRUPTS; v++)
-        if (VECTOR_TO_MASK(v) & spurious)
+        if (VECTOR_TO_MASK(v) & spurious_mask)
+        {
+            DISMISS(VECTOR_TO_MASK(v));
+            DISABLE(VECTOR_TO_MASK(v));
             hppa_external_interrupt_spurious_handler(v, iframe);
-    DISMISS(spurious);
+        }
+    DISMISS(spurious_mask);
 }
 
@@ -305,5 +329,5 @@
                 DISMISS(m);
                 mask &= ~m;
-                (*handler)(global_vector, iframe);
+                handler(global_vector, iframe);
             }
         }
@@ -311,10 +335,10 @@
         if (mask != 0) {
             if ( _CPU_Table.spurious_handler )
-              (*((hppa_rtems_isr_entry) _CPU_Table.spurious_handler))(
-                  mask,
-                  iframe
-                );
+            {
+                handler = (hppa_rtems_isr_entry) _CPU_Table.spurious_handler;
+                handler(mask, iframe);
+            }
             else
-              hppa_external_interrupt_report_spurious(mask, iframe);
+                hppa_external_interrupt_report_spurious(mask, iframe);
         }
     }
@@ -331,6 +355,5 @@
 
 void
-hppa_cpu_halt(unsigned32 type_of_halt,
-              unsigned32 the_error)
+hppa_cpu_halt(unsigned32 the_error)
 {
     unsigned32 isrlevel;
@@ -338,5 +361,5 @@
     _CPU_ISR_Disable(isrlevel);
 
-    asm volatile( "copy %0,%%r1" : : "r" (the_error) );
+    HPPA_ASM_LABEL("_hppa_cpu_halt");
     HPPA_ASM_BREAK(1, 0);
 }
Index: cpukit/score/cpu/unix/cpu.c
===================================================================
--- cpukit/score/cpu/unix/cpu.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ cpukit/score/cpu/unix/cpu.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -88,5 +88,5 @@
 
   sigemptyset(&posix_empty_mask);
- 
+
   /*
    * Block all the signals except SIGTRAP for the debugger
@@ -603,5 +603,4 @@
   extern boolean     _Context_Switch_necessary;
 
-
   if (_ISR_Nest_level++ == 0) {
       /* switch to interrupt stack */
@@ -636,17 +635,32 @@
 void _CPU_Stray_signal(int sig_num)
 {
-  char buffer[ 4 ];   
-
-  /* 
-   *  We avoid using the stdio section of the library.
-   *  The following is generally safe.
-   */
-
-  buffer[ 0 ] = (sig_num >> 4) + 0x30;
-  buffer[ 1 ] = (sig_num & 0xf) + 0x30;
-  buffer[ 2 ] = '\n';
-
-  write( 2, "Stray signal 0x", 12 );
-  write( 2, buffer, 3 );
+  char buffer[ 4 ];
+ 
+  /*
+   * print "stray" msg about ones which that might mean something
+   * Avoid using the stdio section of the library.
+   * The following is generally safe.
+   */
+ 
+  switch (sig_num)
+  {
+      case SIGCLD:
+          break;
+ 
+      default:
+      {
+          /*
+           *  We avoid using the stdio section of the library.
+           *  The following is generally safe.
+           */
+ 
+          buffer[ 0 ] = (sig_num >> 4) + 0x30;
+          buffer[ 1 ] = (sig_num & 0xf) + 0x30;
+          buffer[ 2 ] = '\n';
+ 
+          write( 2, "Stray signal 0x", 12 );
+          write( 2, buffer, 3 );
+      }
+  }
  
   /*
Index: cpukit/score/include/rtems/system.h
===================================================================
--- cpukit/score/include/rtems/system.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ cpukit/score/include/rtems/system.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -57,12 +57,13 @@
 
 #ifdef USE_INLINES
-#define STATIC static
-#define INLINE __inline__
+# define STATIC static
+# ifdef __GNUC__
+#  define INLINE __inline__
+# else
+#  define INLINE inline
+# endif
 #else
-/*
-#error Only the GNU C compiler is currently supported!!!
-*/
-#define STATIC
-#define INLINE
+# define STATIC
+# define INLINE
 #endif
 
Index: cpukit/score/inline/rtems/score/address.inl
===================================================================
--- cpukit/score/inline/rtems/score/address.inl	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ cpukit/score/inline/rtems/score/address.inl	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -59,5 +59,5 @@
 )
 {
-  return (left - right);
+  return ((char *) left - (char *) right);
 }
 
Index: cpukit/score/inline/rtems/score/coremsg.inl
===================================================================
--- cpukit/score/inline/rtems/score/coremsg.inl	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ cpukit/score/inline/rtems/score/coremsg.inl	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -18,4 +18,6 @@
 #define __CORE_MESSAGE_QUEUE_inl
 
+#include <string.h>   /* needed for memcpy */
+ 
 /*PAGE
  *
Index: cpukit/score/inline/rtems/score/thread.inl
===================================================================
--- cpukit/score/inline/rtems/score/thread.inl	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ cpukit/score/inline/rtems/score/thread.inl	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -242,9 +242,11 @@
   Objects_Classes      the_class;
   Objects_Information *information;
+  Thread_Control      *tp = (Thread_Control *) 0;
  
   if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
     _Thread_Disable_dispatch();
     *location = OBJECTS_LOCAL;
-    return( _Thread_Executing );
+    tp = _Thread_Executing;
+    goto done;
   }
  
@@ -253,5 +255,5 @@
   if ( the_class > OBJECTS_CLASSES_LAST ) {
     *location = OBJECTS_ERROR;
-    return (Thread_Control *) 0;
+    goto done;
   }
  
@@ -260,9 +262,13 @@
   if ( !information || !information->is_thread ) {
     *location = OBJECTS_ERROR;
-    return (Thread_Control *) 0;
+    goto done;
   }
  
-  return (Thread_Control *) _Objects_Get( information, id, location );
-}
+  tp = (Thread_Control *) _Objects_Get( information, id, location );
+ 
+done:
+  return tp;
+}
+
 
 /*
Index: testsuites/sptests/sp09/screen02.c
===================================================================
--- testsuites/sptests/sp09/screen02.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ testsuites/sptests/sp09/screen02.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -189,4 +189,4 @@
     "rtems_task_wake_when before current time"
   );
-  puts( " -  RTEMS_INVALID_CLOCK" );
+  puts( " - RTEMS_INVALID_CLOCK" );
 }
Index: testsuites/sptests/sp11/sp11.scn
===================================================================
--- testsuites/sptests/sp11/sp11.scn	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ testsuites/sptests/sp11/sp11.scn	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -30,5 +30,5 @@
 TA1 - rtems_clock_get - 08:15:05   02/12/1988
 TA1 - rtems_event_send - send RTEMS_EVENT_3 to self
-TA1 - rtems_event_receive - RTEMS_EVENT_3 or RTEMS_EVENT_22 - NO_WAIT and ANY 
+TA1 - rtems_event_receive - RTEMS_EVENT_3 or RTEMS_EVENT_22 - NO_WAIT and ANY
 TA1 - RTEMS_EVENT_3 received - eventout => 00000008
 TA1 - rtems_event_send - send RTEMS_EVENT_4 to self
@@ -64,8 +64,8 @@
 TA1 - rtems_event_send - sending RTEMS_EVENT_10 to self in 1 day
 TA1 - rtems_event_send - sending RTEMS_EVENT_11 to self in 2 days
-TA1 - rtems_clock_set - 07:15:00 02/12/1988
+TA1 - rtems_clock_set - 07:15:00   02/12/1988
 TA1 - set time backwards
 TA1 - no events received
-TA1 - rtems_clock_set - 07:15:00 02/14/1988
+TA1 - rtems_clock_set - 07:15:00   02/14/1988
 TA1 - set time forwards (leave a timer)
 TA1 - RTEMS_EVENT_10 received
Index: testsuites/support/include/tmacros.h
===================================================================
--- testsuites/support/include/tmacros.h	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ testsuites/support/include/tmacros.h	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -22,6 +22,5 @@
 #endif
 
-#include <rtems.h>
-#include <bsp.h>
+#include <bsp.h>    /* includes <rtems.h> */
 
 #include <stdio.h>
@@ -41,21 +40,27 @@
 
 #define fatal_directive_status( stat, desired, msg ) \
-     { \
+     do { \
        if ( (stat) != (desired) ) { \
          printf( "\n%s FAILED -- expected (%d) got (%d)\n", \
                  (msg), (desired), (stat) ); \
+         fflush(stdout); \
          exit( stat ); \
        } \
-     }
+     } while ( 0 ) 
 
 #define sprint_time(str,s1,tb,s2) \
+  do { \
     sprintf( (str), "%s%02d:%02d:%02d   %02d/%02d/%04d%s", \
        s1, (tb)->hour, (tb)->minute, (tb)->second, \
-       (tb)->month, (tb)->day, (tb)->year, s2 );
+       (tb)->month, (tb)->day, (tb)->year, s2 ); \
+  } while ( 0 )
 
 #define print_time(s1,tb,s2) \
+  do { \
     printf( "%s%02d:%02d:%02d   %02d/%02d/%04d%s", \
        s1, (tb)->hour, (tb)->minute, (tb)->second, \
-       (tb)->month, (tb)->day, (tb)->year, s2 );
+       (tb)->month, (tb)->day, (tb)->year, s2 ); \
+    fflush(stdout); \
+  } while ( 0 )
 
 #define put_dot( c ) putchar( c ); fflush( stdout )
Index: tools/build/cklength.c
===================================================================
--- tools/build/cklength.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ tools/build/cklength.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -11,17 +11,4 @@
  *
  * $Id$
- * $Log$
- * Revision 1.4  1995/10/06  20:00:38  joel
- * SPARC merged and successfully tested w/o interrupt support
- *
- * Revision 1.3  1995/10/06 16:32:20  joel
- * moved to new development machine and went to gcc 2.7.0
- *
- * Revision 1.2  1995/05/31  16:44:26  joel
- * fixing revision
- *
- * Revision 1.1.1.1  1995/05/11  17:35:11  joel
- * Release 3.1.15
- *
  */
 
@@ -275,6 +262,6 @@
         if (error_flag & ERR_FATAL)
         {
-            error(0, local_errno ? "fatal error, exiting" : "exiting");
-            exit(local_errno);
+            error(0, "fatal error, exiting");
+            exit(local_errno ? local_errno : 1);
         }
         else
Index: tools/build/eolstrip.c
===================================================================
--- tools/build/eolstrip.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ tools/build/eolstrip.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -9,17 +9,4 @@
  *
  * $Id$
- * $Log$
- * Revision 1.4  1995/10/06  20:00:39  joel
- * SPARC merged and successfully tested w/o interrupt support
- *
- * Revision 1.3  1995/10/06 16:32:21  joel
- * moved to new development machine and went to gcc 2.7.0
- *
- * Revision 1.2  1995/05/31  16:44:28  joel
- * fixing revision
- *
- * Revision 1.1.1.1  1995/05/11  17:35:12  joel
- * Release 3.1.15
- *
  */
 
@@ -262,6 +249,6 @@
         if (error_flag & ERR_FATAL)
         {
-            error(0, local_errno ? "fatal error, exiting" : "exiting");
-            exit(local_errno);
+            error(0, "fatal error, exiting");
+            exit(local_errno ? local_errno : 1);
         }
         else
Index: tools/build/src/cklength.c
===================================================================
--- tools/build/src/cklength.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ tools/build/src/cklength.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -11,17 +11,4 @@
  *
  * $Id$
- * $Log$
- * Revision 1.4  1995/10/06  20:00:38  joel
- * SPARC merged and successfully tested w/o interrupt support
- *
- * Revision 1.3  1995/10/06 16:32:20  joel
- * moved to new development machine and went to gcc 2.7.0
- *
- * Revision 1.2  1995/05/31  16:44:26  joel
- * fixing revision
- *
- * Revision 1.1.1.1  1995/05/11  17:35:11  joel
- * Release 3.1.15
- *
  */
 
@@ -275,6 +262,6 @@
         if (error_flag & ERR_FATAL)
         {
-            error(0, local_errno ? "fatal error, exiting" : "exiting");
-            exit(local_errno);
+            error(0, "fatal error, exiting");
+            exit(local_errno ? local_errno : 1);
         }
         else
Index: tools/build/src/eolstrip.c
===================================================================
--- tools/build/src/eolstrip.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ tools/build/src/eolstrip.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -9,17 +9,4 @@
  *
  * $Id$
- * $Log$
- * Revision 1.4  1995/10/06  20:00:39  joel
- * SPARC merged and successfully tested w/o interrupt support
- *
- * Revision 1.3  1995/10/06 16:32:21  joel
- * moved to new development machine and went to gcc 2.7.0
- *
- * Revision 1.2  1995/05/31  16:44:28  joel
- * fixing revision
- *
- * Revision 1.1.1.1  1995/05/11  17:35:12  joel
- * Release 3.1.15
- *
  */
 
@@ -262,6 +249,6 @@
         if (error_flag & ERR_FATAL)
         {
-            error(0, local_errno ? "fatal error, exiting" : "exiting");
-            exit(local_errno);
+            error(0, "fatal error, exiting");
+            exit(local_errno ? local_errno : 1);
         }
         else
Index: tools/build/src/unhex.c
===================================================================
--- tools/build/src/unhex.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ tools/build/src/unhex.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -709,6 +709,6 @@
         if (error_flag & ERR_FATAL)
         {
-            error(0, local_errno ? "fatal error, exiting" : "exiting");
-            exit(local_errno);
+            error(0, "fatal error, exiting");
+            exit(local_errno ? local_errno : 1);
         }
         else
Index: tools/build/unhex.c
===================================================================
--- tools/build/unhex.c	(revision 5c491aef41558df022032b543d826ef4e49493b5)
+++ tools/build/unhex.c	(revision c64e4ed48285a0c944905bc02de89c20038f428b)
@@ -709,6 +709,6 @@
         if (error_flag & ERR_FATAL)
         {
-            error(0, local_errno ? "fatal error, exiting" : "exiting");
-            exit(local_errno);
+            error(0, "fatal error, exiting");
+            exit(local_errno ? local_errno : 1);
         }
         else
