Index: c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -30,4 +30,5 @@
 #include <bsp.h>
 #include <rtems/libio.h>
+#include <rtems/core/intthrd.h>
 
 #include <libcsupport.h>
@@ -86,7 +87,7 @@
      */
 
-    if (heir_task->name == rtems_build_name('I', 'D', 'L', 'E'))
+    if (heir_task == _Internal_threads_Idle_thread)
         CPU_HPPA_CLICKS_PER_TICK = fast_clock;
-    else if (current_task->name == rtems_build_name('I', 'D', 'L', 'E'))
+    else if (heir_task == _Internal_threads_Idle_thread)
         CPU_HPPA_CLICKS_PER_TICK = normal_clock;
 }
@@ -212,5 +213,5 @@
         memset(&fast_idle_extension, 0, sizeof(fast_idle_extension));
 
-        fast_idle_extension.task_switch  = fast_idle_switch_hook;
+        fast_idle_extension.thread_switch  = fast_idle_switch_hook;
 
         rc = rtems_extension_create(rtems_build_name('F', 'D', 'L', 'E'),
Index: c/src/lib/libbsp/i386/force386/console/console.c
===================================================================
--- c/src/lib/libbsp/i386/force386/console/console.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/i386/force386/console/console.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -267,5 +267,7 @@
     outbyte( buffer[ count ] );
   }
-  return maximum;
+
+  rw_args->bytes_moved = maximum;
+  return 0;
 }
  
Index: c/src/lib/libbsp/i386/force386/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/i386/force386/startup/bspstart.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/i386/force386/startup/bspstart.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -75,14 +75,39 @@
     else
         libc_init(0);                /* non-reentrant */
-
+}
+
+/*
+ *  Function:   bsp_pretasking_hook
+ *  Created:    95/03/10
+ *
+ *  Description:
+ *      BSP pretasking hook.  Called just before drivers are initialized.
+ *      Used to setup libc and install any BSP extensions.
+ *
+ *  NOTES:
+ *      Must not use libc (to do io) from here, since drivers are
+ *      not yet initialized.
+ *
+ */
+ 
+void
+bsp_pretasking_hook(void)
+{
+    bsp_libc_init();
+ 
+#ifdef STACK_CHECKER_ON
     /*
      *  Initialize the stack bounds checker
+     *  We can either turn it on here or from the app.
      */
-
-#ifdef STACK_CHECKER_ON
+ 
     Stack_check_Initialize();
 #endif
-
-}
+ 
+#ifdef RTEMS_DEBUG
+    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
+#endif
+}
+ 
 
 /*
@@ -136,7 +161,7 @@
    */
 
-  Cpu_table.pretasking_hook = NULL;
-
-  Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
+  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
+
+  Cpu_table.predriver_hook = NULL;
 
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
Index: c/src/lib/libbsp/i386/go32/console/console.c
===================================================================
--- c/src/lib/libbsp/i386/go32/console/console.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/i386/go32/console/console.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -238,5 +238,7 @@
     outbyte( buffer[ count ] );
   }
-  return maximum;
+
+  rw_args->bytes_moved = maximum;
+  return 0;
 }
  
Index: c/src/lib/libbsp/i386/go32/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/i386/go32/startup/bspstart.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/i386/go32/startup/bspstart.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -82,15 +82,40 @@
     else
         libc_init(0);                /* non-reentrant */
-
+}
+ 
+/*
+ *  Function:   bsp_pretasking_hook
+ *  Created:    95/03/10
+ *
+ *  Description:
+ *      BSP pretasking hook.  Called just before drivers are initialized.
+ *      Used to setup libc and install any BSP extensions.
+ *
+ *  NOTES:
+ *      Must not use libc (to do io) from here, since drivers are
+ *      not yet initialized.
+ *
+ */
+ 
+void
+bsp_pretasking_hook(void)
+{
+    bsp_libc_init();
+ 
+#ifdef STACK_CHECKER_ON
     /*
      *  Initialize the stack bounds checker
+     *  We can either turn it on here or from the app.
      */
-
-#ifdef STACK_CHECKER_ON
+ 
     Stack_check_Initialize();
 #endif
-
-}
- 
+ 
+#ifdef RTEMS_DEBUG
+    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
+#endif
+}
+ 
+
 /*
  * After drivers are setup, register some "filenames"
@@ -139,6 +164,6 @@
     rtems_progname = "RTEMS";
 
-  Cpu_table.pretasking_hook	= NULL;
-  Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
+  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
+  Cpu_table.predriver_hook = NULL;
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
Index: c/src/lib/libbsp/i960/cvme961/console/console.c
===================================================================
--- c/src/lib/libbsp/i960/cvme961/console/console.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/i960/cvme961/console/console.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -193,5 +193,7 @@
     outbyte( buffer[ count ] );
   }
-  return maximum;
+
+  rw_args->bytes_moved = maximum;
+  return 0;
 }
  
Index: c/src/lib/libbsp/i960/cvme961/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/i960/cvme961/startup/bspstart.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/i960/cvme961/startup/bspstart.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -77,12 +77,39 @@
     else
         libc_init(0);                /* non-reentrant */
+}
+
+/*
+ *  Function:   bsp_pretasking_hook
+ *  Created:    95/03/10
+ *
+ *  Description:
+ *      BSP pretasking hook.  Called just before drivers are initialized.
+ *      Used to setup libc and install any BSP extensions.
+ *
+ *  NOTES:
+ *      Must not use libc (to do io) from here, since drivers are
+ *      not yet initialized.
+ *
+ */
+ 
+void
+bsp_pretasking_hook(void)
+{
+    bsp_libc_init();
+ 
+#ifdef STACK_CHECKER_ON
     /*
      *  Initialize the stack bounds checker
+     *  We can either turn it on here or from the app.
      */
-
-#ifdef STACK_CHECKER_ON
+ 
     Stack_check_Initialize();
 #endif
-}
+ 
+#ifdef RTEMS_DEBUG
+    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
+#endif
+}
+ 
 
 /*
@@ -153,7 +180,7 @@
    */
 
-  Cpu_table.pretasking_hook = NULL;
-
-  Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
+  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
+
+  Cpu_table.predriver_hook = NULL;
 
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
Index: c/src/lib/libbsp/m68k/dmv152/console/console.c
===================================================================
--- c/src/lib/libbsp/m68k/dmv152/console/console.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/m68k/dmv152/console/console.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -231,5 +231,7 @@
     outbyte( buffer[ count ] );
   }
-  return maximum;
+
+  rw_args->bytes_moved = maximum;
+  return 0;
 }
 
Index: c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -76,13 +76,39 @@
     else
         libc_init(0);                /* non-reentrant */
-
+}
+
+/*
+ *  Function:   bsp_pretasking_hook
+ *  Created:    95/03/10
+ *
+ *  Description:
+ *      BSP pretasking hook.  Called just before drivers are initialized.
+ *      Used to setup libc and install any BSP extensions.
+ *
+ *  NOTES:
+ *      Must not use libc (to do io) from here, since drivers are
+ *      not yet initialized.
+ *
+ */
+ 
+void
+bsp_pretasking_hook(void)
+{
+    bsp_libc_init();
+ 
+#ifdef STACK_CHECKER_ON
     /*
      *  Initialize the stack bounds checker
+     *  We can either turn it on here or from the app.
      */
-
-#ifdef STACK_CHECKER_ON
+ 
     Stack_check_Initialize();
 #endif
-}
+ 
+#ifdef RTEMS_DEBUG
+    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
+#endif
+}
+ 
 
 /*
@@ -159,7 +185,7 @@
    */
 
-  Cpu_table.pretasking_hook = NULL;
-
-  Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
+  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
+
+  Cpu_table.predriver_hook = NULL;
 
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
Index: c/src/lib/libbsp/m68k/gen68302/console/console.c
===================================================================
--- c/src/lib/libbsp/m68k/gen68302/console/console.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/m68k/gen68302/console/console.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -286,5 +286,7 @@
     outbyte( buffer[ count ] );
   }
-  return maximum;
+
+  rw_args->bytes_moved = maximum;
+  return 0;
 }
 
Index: c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -83,13 +83,39 @@
     else
         libc_init(0);                /* non-reentrant */
-
+}
+
+/*
+ *  Function:   bsp_pretasking_hook
+ *  Created:    95/03/10
+ *
+ *  Description:
+ *      BSP pretasking hook.  Called just before drivers are initialized.
+ *      Used to setup libc and install any BSP extensions.
+ *
+ *  NOTES:
+ *      Must not use libc (to do io) from here, since drivers are
+ *      not yet initialized.
+ *
+ */
+ 
+void
+bsp_pretasking_hook(void)
+{
+    bsp_libc_init();
+ 
+#ifdef STACK_CHECKER_ON
     /*
      *  Initialize the stack bounds checker
-     */
-
-#ifdef STACK_CHECKER_ON
+     *  We can either turn it on here or from the app.
+     */
+ 
     Stack_check_Initialize();
 #endif
-}
+ 
+#ifdef RTEMS_DEBUG
+    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
+#endif
+}
+ 
 
 /*
@@ -193,7 +219,7 @@
    */
 
-  Cpu_table.pretasking_hook = NULL;
-
-  Cpu_table.predriver_hook = bsp_libc_init;    /* RTEMS resources available */
+  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
+
+  Cpu_table.predriver_hook = NULL;
 
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
Index: c/src/lib/libbsp/m68k/idp/console/console.c
===================================================================
--- c/src/lib/libbsp/m68k/idp/console/console.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/m68k/idp/console/console.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -266,5 +266,7 @@
     outbyte( buffer[ count ], minor  );
   }
-  return maximum;
+
+  rw_args->bytes_moved = maximum;
+  return 0;
 }
 
Index: c/src/lib/libbsp/m68k/idp/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/m68k/idp/startup/bspstart.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/m68k/idp/startup/bspstart.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -84,11 +84,36 @@
 	else
         libc_init(0);                /* non-reentrant */
- 
+}
+
+/*
+ *  Function:   bsp_pretasking_hook
+ *  Created:    95/03/10
+ *
+ *  Description:
+ *      BSP pretasking hook.  Called just before drivers are initialized.
+ *      Used to setup libc and install any BSP extensions.
+ *
+ *  NOTES:
+ *      Must not use libc (to do io) from here, since drivers are
+ *      not yet initialized.
+ *
+ */
+ 
+void
+bsp_pretasking_hook(void)
+{
+    bsp_libc_init();
+ 
+#ifdef STACK_CHECKER_ON
     /*
      *  Initialize the stack bounds checker
+     *  We can either turn it on here or from the app.
      */
  
-#ifdef STACK_CHECKER_ON
     Stack_check_Initialize();
+#endif
+ 
+#ifdef RTEMS_DEBUG
+    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
 #endif
 }
@@ -167,10 +192,10 @@
    */
  
-  Cpu_table.pretasking_hook = NULL;
- 
-  Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
- 
+  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
+
+  Cpu_table.predriver_hook = NULL;
+
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
- 
+
   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
 
Index: c/src/lib/libbsp/m68k/mvme136/console/console.c
===================================================================
--- c/src/lib/libbsp/m68k/mvme136/console/console.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/m68k/mvme136/console/console.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -206,5 +206,7 @@
     outbyte( buffer[ count ] );
   }
-  return maximum;
+
+  rw_args->bytes_moved = maximum;
+  return 0;
 }
 
Index: c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -54,8 +54,4 @@
     extern int end;
     rtems_unsigned32        heap_start;
-
-#ifdef RTEMS_DEBUG
-    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
-#endif
 
     heap_start = (rtems_unsigned32) &end;
@@ -81,13 +77,39 @@
     else
         libc_init(0);                /* non-reentrant */
-
+}
+
+/*
+ *  Function:   bsp_pretasking_hook
+ *  Created:    95/03/10
+ *
+ *  Description:
+ *      BSP pretasking hook.  Called just before drivers are initialized.
+ *      Used to setup libc and install any BSP extensions.
+ *
+ *  NOTES:
+ *      Must not use libc (to do io) from here, since drivers are
+ *      not yet initialized.
+ *
+ */
+ 
+void
+bsp_pretasking_hook(void)
+{
+    bsp_libc_init();
+ 
+#ifdef STACK_CHECKER_ON
     /*
      *  Initialize the stack bounds checker
+     *  We can either turn it on here or from the app.
      */
-
-#ifdef STACK_CHECKER_ON
+ 
     Stack_check_Initialize();
 #endif
-}
+ 
+#ifdef RTEMS_DEBUG
+    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
+#endif
+}
+ 
 
 /*
@@ -153,7 +175,7 @@
    */
 
-  Cpu_table.pretasking_hook = NULL;
-
-  Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
+  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
+
+  Cpu_table.predriver_hook = NULL;
 
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
Index: c/src/lib/libbsp/m68k/mvme162/console/console.c
===================================================================
--- c/src/lib/libbsp/m68k/mvme162/console/console.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/m68k/mvme162/console/console.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -238,5 +238,7 @@
     outbyte( buffer[ count ], minor  );
   }
-  return maximum;
+
+  rw_args->bytes_moved = maximum;
+  return 0;
 }
 
Index: c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -83,13 +83,39 @@
     else
         libc_init(0);                /* non-reentrant */
-
+}
+
+/*
+ *  Function:   bsp_pretasking_hook
+ *  Created:    95/03/10
+ *
+ *  Description:
+ *      BSP pretasking hook.  Called just before drivers are initialized.
+ *      Used to setup libc and install any BSP extensions.
+ *
+ *  NOTES:
+ *      Must not use libc (to do io) from here, since drivers are
+ *      not yet initialized.
+ *
+ */
+ 
+void
+bsp_pretasking_hook(void)
+{
+    bsp_libc_init();
+ 
+#ifdef STACK_CHECKER_ON
     /*
      *  Initialize the stack bounds checker
+     *  We can either turn it on here or from the app.
      */
-
-#ifdef STACK_CHECKER_ON
+ 
     Stack_check_Initialize();
 #endif
-}
+ 
+#ifdef RTEMS_DEBUG
+    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
+#endif
+}
+ 
 
 /*
@@ -166,7 +192,7 @@
    */
 
-  Cpu_table.pretasking_hook = NULL;
-
-  Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
+  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
+
+  Cpu_table.predriver_hook = NULL;
 
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
Index: c/src/lib/libbsp/no_cpu/no_bsp/console/console.c
===================================================================
--- c/src/lib/libbsp/no_cpu/no_bsp/console/console.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/no_cpu/no_bsp/console/console.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -205,5 +205,7 @@
     outbyte( buffer[ count ] );
   }
-  return maximum;
+
+  rw_args->bytes_moved = maximum;
+  return 0;
 }
 
Index: c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -84,13 +84,39 @@
     else
         libc_init(0);                /* non-reentrant */
-
+}
+
+/*
+ *  Function:   bsp_pretasking_hook
+ *  Created:    95/03/10
+ *
+ *  Description:
+ *      BSP pretasking hook.  Called just before drivers are initialized.
+ *      Used to setup libc and install any BSP extensions.
+ *
+ *  NOTES:
+ *      Must not use libc (to do io) from here, since drivers are
+ *      not yet initialized.
+ *
+ */
+ 
+void
+bsp_pretasking_hook(void)
+{
+    bsp_libc_init();
+ 
+#ifdef STACK_CHECKER_ON
     /*
      *  Initialize the stack bounds checker
-     */
-
-#ifdef STACK_CHECKER_ON
+     *  We can either turn it on here or from the app.
+     */
+ 
     Stack_check_Initialize();
 #endif
-}
+ 
+#ifdef RTEMS_DEBUG
+    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
+#endif
+}
+ 
 
 /*
@@ -120,5 +146,5 @@
 }
 
-int main(
+int bsp_start(
   int argc,
   char **argv,
@@ -197,7 +223,7 @@
    */
 
-  Cpu_table.pretasking_hook = NULL;
-
-  Cpu_table.predriver_hook = bsp_libc_init;    /* RTEMS resources available */
+  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
+
+  Cpu_table.predriver_hook = NULL;
 
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
Index: c/src/lib/libbsp/no_cpu/no_bsp/startup/main.c
===================================================================
--- c/src/lib/libbsp/no_cpu/no_bsp/startup/main.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/no_cpu/no_bsp/startup/main.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -20,8 +20,9 @@
 int main(
   int   argc,
-  char **argv
+  char **argv,
+  char **environp
 )
 {
-  bsp_start();
+  bsp_start( argc, argv, environp );
 
   /*
Index: c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -102,12 +102,39 @@
         libc_init(0);                /* non-reentrant */
 
+}
+
+/*
+ *  Function:   bsp_pretasking_hook
+ *  Created:    95/03/10
+ *
+ *  Description:
+ *      BSP pretasking hook.  Called just before drivers are initialized.
+ *      Used to setup libc and install any BSP extensions.
+ *
+ *  NOTES:
+ *      Must not use libc (to do io) from here, since drivers are
+ *      not yet initialized.
+ *
+ */
+ 
+void
+bsp_pretasking_hook(void)
+{
+    bsp_libc_init();
+ 
+#ifdef STACK_CHECKER_ON
     /*
      *  Initialize the stack bounds checker
-     */
-
-#ifdef STACK_CHECKER_ON
+     *  We can either turn it on here or from the app.
+     */
+ 
     Stack_check_Initialize();
 #endif
-}
+ 
+#ifdef RTEMS_DEBUG
+    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
+#endif
+}
+ 
 
 /*
@@ -205,11 +232,7 @@
    */
 
-  /*
-   *  we do not use the pretasking_hook
-   */
-
-  Cpu_table.pretasking_hook = NULL;
-
-  Cpu_table.predriver_hook = bsp_libc_init;    /* RTEMS resources available */
+  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
+
+  Cpu_table.predriver_hook = NULL;
 
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
Index: c/src/lib/libmisc/monitor/mon-object.c
===================================================================
--- c/src/lib/libmisc/monitor/mon-object.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libmisc/monitor/mon-object.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -131,5 +131,5 @@
 #warning "TONY... FIX ME!!!!!"
 #if defined(hppa1_1)
-#error "TONY... I SAID TO FIX ME!!!!!  <HAHAHAHAHA>" 
+#warning "TONY... I SAID TO FIX ME!!!!!  <HAHAHAHAHA>" 
 #endif
         id = _Objects_Build_id(0, default_node, rtems_get_index(id));
Index: c/src/lib/libmisc/monitor/mon-queue.c
===================================================================
--- c/src/lib/libmisc/monitor/mon-queue.c	(revision b3ac6a8dfe10aeaf3a9c59fd145bddfff119480e)
+++ c/src/lib/libmisc/monitor/mon-queue.c	(revision 3652ad356bf13abe0963c992cbbda96476d31609)
@@ -19,7 +19,7 @@
 
     canonical_queue->attributes = rtems_queue->attribute_set;
-    canonical_queue->maximum_message_size = rtems_queue->maximum_message_size;
-    canonical_queue->maximum_pending_messages = rtems_queue->maximum_pending_messages;
-    canonical_queue->number_of_pending_messages = rtems_queue->number_of_pending_messages;
+    canonical_queue->maximum_message_size = rtems_queue->message_queue.maximum_message_size;
+    canonical_queue->maximum_pending_messages = rtems_queue->message_queue.maximum_pending_messages;
+    canonical_queue->number_of_pending_messages = rtems_queue->message_queue.number_of_pending_messages;
 }
 
