Index: cpukit/ChangeLog
===================================================================
--- cpukit/ChangeLog	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ cpukit/ChangeLog	(revision 7c411bda5ba29eb8fb5be3841626a485c0d650cb)
@@ -1,2 +1,38 @@
+2009-09-14	Sebastian Huber <Sebastian.Huber@embedded-brains.de>
+
+	* score/src/wkspace.c: Removed work space area consistency checks.
+	* libblock/include/rtems/ide_part_table.h: Functions are now
+	deprecated.
+	* libcsupport/include/rtems/libcsupport.h, libcsupport/src/calloc.c,
+	libcsupport/src/malloc_boundary.c,
+	libcsupport/src/malloc_initialize.c,
+	libcsupport/src/malloc_report_statistics_plugin.c,
+	libcsupport/src/malloc_statistics_helpers.c,
+	libcsupport/src/malloc_walk.c, libcsupport/src/realloc.c,
+	rtems/inline/rtems/rtems/region.inl: Update for heap API changes.
+
+2009-09-14      Christian Mauderer <christian.mauderer@embedded-brains.de>
+
+	* libcsupport/src/vprintk.c: Fixed warnings. Print nothing in case the
+	pointer to the string is NULL.
+
+2009-09-14	Sebastian Huber <Sebastian.Huber@embedded-brains.de>
+
+	* score/src/wkspace.c: Removed work space area consistency checks.
+	* libblock/include/rtems/ide_part_table.h: Functions are now
+	deprecated.
+	* libcsupport/include/rtems/libcsupport.h, libcsupport/src/calloc.c,
+	libcsupport/src/malloc_boundary.c,
+	libcsupport/src/malloc_initialize.c,
+	libcsupport/src/malloc_report_statistics_plugin.c,
+	libcsupport/src/malloc_statistics_helpers.c,
+	libcsupport/src/malloc_walk.c, libcsupport/src/realloc.c,
+	rtems/inline/rtems/rtems/region.inl: Update for heap API changes.
+
+2009-09-14      Christian Mauderer <christian.mauderer@embedded-brains.de>
+
+	* libcsupport/src/vprintk.c: Fixed warnings. Print nothing in case the
+	pointer to the string is NULL.
+
 2009-09-13	Joel Sherrill <joel.sherrill@oarcorp.com>
 
Index: cpukit/libblock/include/rtems/ide_part_table.h
===================================================================
--- cpukit/libblock/include/rtems/ide_part_table.h	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ cpukit/libblock/include/rtems/ide_part_table.h	(revision 7c411bda5ba29eb8fb5be3841626a485c0d650cb)
@@ -166,6 +166,10 @@
  *      N/A
  */
-void
-rtems_ide_part_table_free(rtems_disk_desc_t *disk_desc);
+/**
+ * @deprecated Use the @ref rtems_bdpart "block device partition module" instead.
+ */
+void rtems_ide_part_table_free(
+  rtems_disk_desc_t *disk_desc
+) RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
 
 
@@ -182,6 +186,11 @@
  *      RTEMS_SUCCESSFUL if success, or -1 and corresponding errno else
  */
-rtems_status_code
-rtems_ide_part_table_get(const char *dev_name, rtems_disk_desc_t *disk_desc);
+/**
+ * @deprecated Use the @ref rtems_bdpart "block device partition module" instead.
+ */
+rtems_status_code rtems_ide_part_table_get(
+  const char *dev_name,
+  rtems_disk_desc_t *disk_desc
+) RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
 
 
@@ -196,6 +205,10 @@
  *      RTEMS_SUCCESSFUL if success, or -1 and corresponding errno else
  */
-rtems_status_code
-rtems_ide_part_table_initialize(char *dev_name);
+/**
+ * @deprecated Use the @ref rtems_bdpart "block device partition module" instead.
+ */
+rtems_status_code rtems_ide_part_table_initialize(
+  char *dev_name
+) RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
 
 #ifdef __cplusplus
Index: cpukit/libcsupport/include/rtems/libcsupport.h
===================================================================
--- cpukit/libcsupport/include/rtems/libcsupport.h	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ cpukit/libcsupport/include/rtems/libcsupport.h	(revision 7c411bda5ba29eb8fb5be3841626a485c0d650cb)
@@ -30,7 +30,7 @@
 
 void RTEMS_Malloc_Initialize(
-  void   *start,
-  size_t  length,
-  size_t  sbrk_amount
+  void *heap_begin,
+  uintptr_t heap_size,
+  size_t sbrk_amount
 );
 
Index: cpukit/libcsupport/src/calloc.c
===================================================================
--- cpukit/libcsupport/src/calloc.c	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ cpukit/libcsupport/src/calloc.c	(revision 7c411bda5ba29eb8fb5be3841626a485c0d650cb)
@@ -26,5 +26,5 @@
 {
   register char *cptr;
-  int            length;
+  size_t length;
 
   MSBUMP(calloc_calls, 1);
@@ -35,5 +35,5 @@
     memset( cptr, '\0', length );
 
-  MSBUMP(malloc_calls, -1);   /* subtract off the malloc */
+  MSBUMP(malloc_calls, (uint32_t) -1);   /* subtract off the malloc */
 
   return cptr;
Index: cpukit/libcsupport/src/malloc_boundary.c
===================================================================
--- cpukit/libcsupport/src/malloc_boundary.c	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ cpukit/libcsupport/src/malloc_boundary.c	(revision 7c411bda5ba29eb8fb5be3841626a485c0d650cb)
@@ -58,5 +58,5 @@
 struct mallocNode mallocNodeHead;
 
-void rtems_malloc_boundary_initialize(void)
+static void rtems_malloc_boundary_initialize(void)
 {
   mallocNodeHead.back = &mallocNodeHead;
@@ -64,10 +64,10 @@
 }
 
-uint32_t rtems_malloc_boundary_overhead(void)
+static uint32_t rtems_malloc_boundary_overhead(void)
 {
   return sizeof(struct mallocNode) + SENTINELSIZE;
 }
 
-void rtems_malloc_boundary_at_malloc(
+static void rtems_malloc_boundary_at_malloc(
   void     *pointer,
   size_t    size
@@ -100,7 +100,7 @@
 }
 
-void reportMallocError(const char *msg, struct mallocNode *mp);
+static void reportMallocError(const char *msg, struct mallocNode *mp);
 
-void rtems_malloc_boundary_at_free(
+static void rtems_malloc_boundary_at_free(
   void     *pointer
 )
@@ -128,5 +128,5 @@
 }
 
-void rtems_malloc_boundary_at_realloc(
+static void rtems_malloc_boundary_at_realloc(
   void     *pointer,
   size_t    size
@@ -150,5 +150,5 @@
 /*   &rtems_malloc_boundary_functions_table; */
 
-void reportMallocError(const char *msg, struct mallocNode *mp)
+static void reportMallocError(const char *msg, struct mallocNode *mp)
 {
     unsigned char *sp = (unsigned char *)mp->memory + mp->size;
@@ -179,5 +179,5 @@
 }
 
-void checkMallocArena(void)
+static void checkMallocArena(void)
 {
   struct mallocNode *mp;
Index: cpukit/libcsupport/src/malloc_initialize.c
===================================================================
--- cpukit/libcsupport/src/malloc_initialize.c	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ cpukit/libcsupport/src/malloc_initialize.c	(revision 7c411bda5ba29eb8fb5be3841626a485c0d650cb)
@@ -1,6 +1,9 @@
+/**
+ * @file
+ *
+ * @brief Malloc initialization implementation.
+ */
+
 /*
- *  RTEMS Malloc Family Implementation --Initialization
- *
- *
  *  COPYRIGHT (c) 1989-2007.
  *  On-Line Applications Research Corporation (OAR).
@@ -25,7 +28,7 @@
 #ifndef RTEMS_NEWLIB
 void RTEMS_Malloc_Initialize(
-  void   *start,
-  size_t  length,
-  size_t  sbrk_amount
+  void *heap_begin,
+  uintptr_t heap_size,
+  size_t sbrk_amount
 )
 {
@@ -36,18 +39,16 @@
 
 void RTEMS_Malloc_Initialize(
-  void   *start,
-  size_t  length,
-  size_t  sbrk_amount
+  void *heap_begin,
+  uintptr_t heap_size,
+  size_t sbrk_amount
 )
 {
-  uint32_t      status;
-  void         *starting_address;
-
   #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
     /*
      *  If configured, initialize the boundary support
      */
-    if (rtems_malloc_boundary_helpers)
+    if ( rtems_malloc_boundary_helpers != NULL ) {
       (*rtems_malloc_boundary_helpers->initialize)();
+    }
   #endif
 
@@ -55,6 +56,7 @@
    *  If configured, initialize the statistics support
    */
-  if ( rtems_malloc_statistics_helpers )
+  if ( rtems_malloc_statistics_helpers != NULL ) {
     (*rtems_malloc_statistics_helpers->initialize)();
+  }
 
   /*
@@ -63,14 +65,15 @@
   malloc_deferred_frees_initialize();
 
-  starting_address = start;
-
   /*
    *  Initialize the optional sbrk support for extending the heap
    */
-  if (rtems_malloc_sbrk_helpers) {
-    starting_address = (*rtems_malloc_sbrk_helpers->initialize)(
-      start,
+  if ( rtems_malloc_sbrk_helpers != NULL ) {
+    void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
+      heap_begin,
       sbrk_amount
     );
+
+    heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
+    heap_begin = new_heap_begin;
   }
 
@@ -93,7 +96,10 @@
    */
 
-  if ( !rtems_unified_work_area &&
-       rtems_configuration_get_do_zero_of_workspace() )
-     memset( starting_address, 0, length );
+  if (
+    !rtems_unified_work_area
+      && rtems_configuration_get_do_zero_of_workspace()
+  ) {
+     memset( heap_begin, 0, heap_size );
+  }
 
   /*
@@ -104,12 +110,13 @@
 
   if ( !rtems_unified_work_area ) {
-    status = _Protected_heap_Initialize( 
+    uintptr_t status = _Protected_heap_Initialize( 
       RTEMS_Malloc_Heap,
-      starting_address,
-      length,
+      heap_begin,
+      heap_size,
       CPU_HEAP_ALIGNMENT
     );
-    if ( !status )
-      rtems_fatal_error_occurred( status );
+    if ( status == 0 ) {
+      rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
+    }
   }
 
@@ -119,7 +126,7 @@
     if ( _Protected_heap_Walk( RTEMS_Malloc_Heap, 0, false ) ) {
       printk( "Malloc heap not initialized correctly\n" );
-      rtems_print_buffer( start, 32 );
+      rtems_print_buffer( heap_begin, 32 );
       printk( "\n" );
-      rtems_print_buffer( (start + length) - 48, 48 );
+      rtems_print_buffer( (heap_begin + heap_size) - 48, 48 );
       rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
     }
Index: cpukit/libcsupport/src/malloc_report_statistics_plugin.c
===================================================================
--- cpukit/libcsupport/src/malloc_report_statistics_plugin.c	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ cpukit/libcsupport/src/malloc_report_statistics_plugin.c	(revision 7c411bda5ba29eb8fb5be3841626a485c0d650cb)
@@ -26,5 +26,5 @@
 {
   rtems_malloc_statistics_t *s;
-  uint32_t                   allocated;
+  uintmax_t allocated;
 
   s = &rtems_malloc_statistics;
@@ -49,7 +49,8 @@
   (*print)(
     context,
-    "  Call counts:   malloc:%"PRIu32"   free:%"PRIu32
+    "  Call counts:   malloc:%"PRIu32"   memalign:%"PRIu32"   free:%"PRIu32
        "   realloc:%"PRIu32"   calloc:%"PRIu32"\n",
     s->malloc_calls,
+    s->memalign_calls,
     s->free_calls,
     s->realloc_calls,
Index: cpukit/libcsupport/src/malloc_statistics_helpers.c
===================================================================
--- cpukit/libcsupport/src/malloc_statistics_helpers.c	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ cpukit/libcsupport/src/malloc_statistics_helpers.c	(revision 7c411bda5ba29eb8fb5be3841626a485c0d650cb)
@@ -24,5 +24,5 @@
 
 
-void rtems_malloc_statistics_initialize( void )
+static void rtems_malloc_statistics_initialize( void )
 {
   /*
@@ -32,10 +32,10 @@
 }
 
-void rtems_malloc_statistics_at_malloc(
+static void rtems_malloc_statistics_at_malloc(
   void *pointer
 )
 {
-  intptr_t  actual_size = 0;
-  uint32_t  current_depth;
+  uintptr_t actual_size = 0;
+  uint32_t current_depth;
   rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
 
@@ -47,5 +47,5 @@
   MSBUMP(lifetime_allocated, actual_size);
 
-  current_depth = s->lifetime_allocated - s->lifetime_freed;
+  current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
   if (current_depth > s->max_depth)
       s->max_depth = current_depth;
@@ -56,9 +56,9 @@
  *  size and thus we skip updating the statistics.
  */
-void rtems_malloc_statistics_at_free(
+static void rtems_malloc_statistics_at_free(
   void *pointer
 )
 {
-  intptr_t size;
+  uintptr_t size;
 
   if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
Index: cpukit/libcsupport/src/malloc_walk.c
===================================================================
--- cpukit/libcsupport/src/malloc_walk.c	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ cpukit/libcsupport/src/malloc_walk.c	(revision 7c411bda5ba29eb8fb5be3841626a485c0d650cb)
@@ -23,5 +23,5 @@
 void malloc_walk(size_t source, size_t printf_enabled)
 {
-  _Protected_heap_Walk( RTEMS_Malloc_Heap, source, printf_enabled );
+  _Protected_heap_Walk( RTEMS_Malloc_Heap, (int) source, printf_enabled );
 }
 
Index: cpukit/libcsupport/src/realloc.c
===================================================================
--- cpukit/libcsupport/src/realloc.c	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ cpukit/libcsupport/src/realloc.c	(revision 7c411bda5ba29eb8fb5be3841626a485c0d650cb)
@@ -26,7 +26,7 @@
 )
 {
-  intptr_t old_size;
+  uintptr_t old_size;
   char    *new_area;
-  intptr_t resize;
+  uintptr_t resize;
 
   MSBUMP(realloc_calls, 1);
@@ -89,5 +89,5 @@
   new_area = malloc( size );
 
-  MSBUMP(malloc_calls, -1);   /* subtract off the malloc */
+  MSBUMP(malloc_calls, (uint32_t) -1);   /* subtract off the malloc */
 
   if ( !new_area ) {
Index: cpukit/libcsupport/src/vprintk.c
===================================================================
--- cpukit/libcsupport/src/vprintk.c	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ cpukit/libcsupport/src/vprintk.c	(revision 7c411bda5ba29eb8fb5be3841626a485c0d650cb)
@@ -26,9 +26,9 @@
 
 static void printNum(
-  long unsigned int num,
-  int               base,
-  int               sign,
-  int               maxwidth,
-  int               lead
+  long num,
+  int base,
+  int sign,
+  int maxwidth,
+  int lead
 );
 
@@ -47,5 +47,5 @@
 )
 {
-  char     c, *str;
+  char     c;
   int      lflag, base, sign, width, lead, minus;
 
@@ -81,12 +81,17 @@
     }
     if ( c == 'c' ) {
-      BSP_output_char(va_arg(ap, int));
+      char chr = (char) va_arg(ap, int);
+      BSP_output_char(chr);
       continue;
     }
     if ( c == 's' ) {
       int i, len;
-      char *s;
+      char *s, *str;
 
       str = va_arg(ap, char *);
+
+      if ( str == NULL ) {
+        str = "";
+      }
 
       /* calculate length of string */
@@ -134,5 +139,5 @@
 
     printNum(
-      lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int),
+      lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
       base,
       sign,
@@ -150,14 +155,14 @@
  */
 static void printNum(
-  long unsigned int num,
-  int               base,
-  int               sign,
-  int               maxwidth,
-  int               lead
+  long num,
+  int base,
+  int sign,
+  int maxwidth,
+  int lead
 )
 {
-  long unsigned int n;
-  int               count;
-  char              toPrint[20];
+  long n;
+  int count;
+  char toPrint[20];
 
   if ( (sign == 1) && ((long)num <  0) ) {
@@ -169,11 +174,11 @@
   count = 0;
   while ((n = num / base) > 0) {
-    toPrint[count++] = (num - (n*base));
+    toPrint[count++] = (char) (num - (n*base));
     num = n;
   }
-  toPrint[count++] = num;
+  toPrint[count++] = (char) num;
 
   for (n=maxwidth ; n > count; n-- )
-    BSP_output_char(lead);
+    BSP_output_char((char) lead);
 
   for (n = 0; n < count; n++) {
Index: cpukit/rtems/inline/rtems/rtems/region.inl
===================================================================
--- cpukit/rtems/inline/rtems/rtems/region.inl	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ cpukit/rtems/inline/rtems/rtems/region.inl	(revision 7c411bda5ba29eb8fb5be3841626a485c0d650cb)
@@ -79,8 +79,8 @@
 RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment (
   Region_Control *the_region,
-  intptr_t        size
+  uintptr_t       size
 )
 {
-   return _Heap_Allocate( &the_region->Memory, size );
+  return _Heap_Allocate( &the_region->Memory, size );
 }
 
Index: cpukit/score/src/wkspace.c
===================================================================
--- cpukit/score/src/wkspace.c	(revision e7de563acf2b05afcce38c9d2354c0a76237de0d)
+++ cpukit/score/src/wkspace.c	(revision 7c411bda5ba29eb8fb5be3841626a485c0d650cb)
@@ -34,17 +34,7 @@
 void _Workspace_Handler_initialization(void)
 {
-  uint32_t    memory_available;
-  void       *starting_address;
-  size_t      size;
-
-  starting_address = Configuration.work_space_start;
-  size             = Configuration.work_space_size;
-
-  if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
-    _Internal_error_Occurred(
-      INTERNAL_ERROR_CORE,
-      true,
-      INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
-    );
+  uintptr_t memory_available = 0;
+  void *starting_address = Configuration.work_space_start;
+  uintptr_t size = Configuration.work_space_size;
 
   if ( Configuration.do_zero_of_workspace )
