Index: cpukit/ChangeLog
===================================================================
--- cpukit/ChangeLog	(revision f9925bcc246e3d923259d5816d9bfe8f1d0714fd)
+++ cpukit/ChangeLog	(revision 2feeb261d0596d642a9a022491b3e8c178ec8baa)
@@ -7,4 +7,10 @@
 	CACHED.
 	* libblock/src/ide_part_table.c: Free memory in case of an error.
+
+2009-11-30	Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+	* libcsupport/src/vprintk.c: Fixed output of unsigned integers.
+	Changed type of boolean variables to bool.  Use unsigned integer type
+	for radix and width parameters.
 
 2009-11-30	Sebastian Huber <sebastian.huber@embedded-brains.de>
Index: cpukit/libcsupport/src/vprintk.c
===================================================================
--- cpukit/libcsupport/src/vprintk.c	(revision f9925bcc246e3d923259d5816d9bfe8f1d0714fd)
+++ cpukit/libcsupport/src/vprintk.c	(revision 2feeb261d0596d642a9a022491b3e8c178ec8baa)
@@ -23,12 +23,13 @@
 #include <stdarg.h>
 #include <stdio.h>
+#include <stdbool.h>
 #include <rtems/bspIo.h>
 
 static void printNum(
   long num,
-  int base,
-  int sign,
-  int maxwidth,
-  int lead
+  unsigned base,
+  bool sign,
+  unsigned maxwidth,
+  char lead
 );
 
@@ -47,14 +48,13 @@
 )
 {
-  char     c;
-  int      lflag, base, sign, width, lead, minus;
+  for (; *fmt != '\0'; fmt++) {
+    unsigned base = 0;
+    unsigned width = 0;
+    bool lflag = false;
+    bool minus = false;
+    bool sign = false;
+    char lead = ' ';
+    char c;
 
-  for (; *fmt != '\0'; fmt++) {
-    lflag = 0;
-    base  = 0;
-    sign = 0;
-    width = 0;
-    minus = 0;
-    lead = ' ';
     if (*fmt != '%') {
       BSP_output_char(*fmt);
@@ -67,24 +67,24 @@
     }
     if (*fmt == '-' ) {
-      minus = 1;
+      minus = true;
       fmt++;
     }
     while (*fmt >= '0' && *fmt <= '9' ) {
       width *= 10;
-      width += (*fmt - '0');
+      width += ((unsigned) *fmt - '0');
       fmt++;
     }
 
     if ((c = *fmt) == 'l') {
-      lflag = 1;
+      lflag = true;
       c = *++fmt;
     }
     if ( c == 'c' ) {
-      char chr = (char) va_arg(ap, int);
+      char chr = va_arg(ap, char);
       BSP_output_char(chr);
       continue;
     }
     if ( c == 's' ) {
-      int i, len;
+      unsigned i, len;
       char *s, *str;
 
@@ -123,14 +123,14 @@
     /* must be a numeric format or something unsupported */
     if ( c == 'o' || c == 'O' ) {
-      base = 8; sign = 0;
+      base = 8; sign = false;
     } else if ( c == 'i' || c == 'I' ||
                 c == 'd' || c == 'D' ) {
-      base = 10; sign = 1;
+      base = 10; sign = true;
     } else if ( c == 'u' || c == 'U' ) {
-      base = 10; sign = 0;
+      base = 10; sign = false;
     } else if ( c == 'x' || c == 'X' ) {
-      base = 16; sign = 0;
+      base = 16; sign = false;
     } else if ( c == 'p' ) {
-      base = 16; sign = 0; lflag = 1;
+      base = 16; sign = false; lflag = true;
     } else {
       BSP_output_char(c);
@@ -156,29 +156,32 @@
 static void printNum(
   long num,
-  int base,
-  int sign,
-  int maxwidth,
-  int lead
+  unsigned base,
+  bool sign,
+  unsigned maxwidth,
+  char lead
 )
 {
-  long n;
-  int count;
+  unsigned long unsigned_num;
+  unsigned long n;
+  unsigned count;
   char toPrint[20];
 
-  if ( (sign == 1) && ((long)num <  0) ) {
+  if ( sign && (num <  0) ) {
     BSP_output_char('-');
-    num = -num;
+    unsigned_num = (unsigned long) -num;
     if (maxwidth) maxwidth--;
+  } else {
+    unsigned_num = (unsigned long) num;
   }
 
   count = 0;
-  while ((n = num / base) > 0) {
-    toPrint[count++] = (char) (num - (n*base));
-    num = n;
+  while ((n = unsigned_num / base) > 0) {
+    toPrint[count++] = (char) (unsigned_num - (n * base));
+    unsigned_num = n;
   }
-  toPrint[count++] = (char) num;
+  toPrint[count++] = (char) unsigned_num;
 
   for (n=maxwidth ; n > count; n-- )
-    BSP_output_char((char) lead);
+    BSP_output_char(lead);
 
   for (n = 0; n < count; n++) {
