Index: cpukit/libdl/rtl-mdreloc-sparc.c
===================================================================
--- cpukit/libdl/rtl-mdreloc-sparc.c	(revision 956d76ccaf68f10c8aabcdd72ab85e8ffd7f2176)
+++ cpukit/libdl/rtl-mdreloc-sparc.c	(revision 9c12bcfdc52d7887c26d97bfcb8eb5fc86f2bc1a)
@@ -36,4 +36,5 @@
 #include <sys/cdefs.h>
 
+#include <inttypes.h>
 #include <stdio.h>
 
@@ -216,6 +217,6 @@
     if (value != 0 && *where != 0) {
       if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC))
-        printf("rtl: reloc base_rel(%s): where=%p, *where 0x%lx, "
-               "addend=0x%lx, base %p\n",
+        printf("rtl: reloc base_rel(%s): where=%p, *where 0x%" PRIu32 ", "
+               "addend=0x%" PRIu32 ", base %p\n",
                rtems_rtl_obj_oname (obj),
                where, *where, rela->r_addend, sect->base);
Index: cpukit/libdl/rtl-obj.c
===================================================================
--- cpukit/libdl/rtl-obj.c	(revision 956d76ccaf68f10c8aabcdd72ab85e8ffd7f2176)
+++ cpukit/libdl/rtl-obj.c	(revision 9c12bcfdc52d7887c26d97bfcb8eb5fc86f2bc1a)
@@ -429,5 +429,5 @@
 
     if (rtems_rtl_trace (RTEMS_RTL_TRACE_SECTION))
-      printf ("rtl: sect: add: %-2d: %s (%zu) 0x%08lx\n",
+      printf ("rtl: sect: add: %-2d: %s (%zu) 0x%08" PRIu32 "\n",
               section, name, size, flags);
   }
Index: cpukit/libmisc/rtems-fdt/rtems-fdt-shell.c
===================================================================
--- cpukit/libmisc/rtems-fdt/rtems-fdt-shell.c	(revision 956d76ccaf68f10c8aabcdd72ab85e8ffd7f2176)
+++ cpukit/libmisc/rtems-fdt/rtems-fdt-shell.c	(revision 9c12bcfdc52d7887c26d97bfcb8eb5fc86f2bc1a)
@@ -487,5 +487,5 @@
 
   printf ("0x%08" PRIx32 " => (value & 0x%08" PRIx32 ") == 0x%08" PRIx32 \
-          " for %" PRIu32 " seconds\n",
+          " for %ld seconds\n",
           address, mask, test, rtems_fdt_test_timeout);
 
@@ -534,5 +534,5 @@
   if (argc == 1)
   {
-    printf ("timeout: %" PRIu32 " seconds\n", rtems_fdt_test_timeout);
+    printf ("timeout: %ld seconds\n", rtems_fdt_test_timeout);
     return 0;
   }
Index: cpukit/libmisc/shell/main_pci.c
===================================================================
--- cpukit/libmisc/shell/main_pci.c	(revision 956d76ccaf68f10c8aabcdd72ab85e8ffd7f2176)
+++ cpukit/libmisc/shell/main_pci.c	(revision 9c12bcfdc52d7887c26d97bfcb8eb5fc86f2bc1a)
@@ -13,4 +13,5 @@
 #endif
 
+#include <inttypes.h>
 #include <limits.h>
 #include <stdlib.h>
@@ -137,5 +138,6 @@
       result = pci_cfg_r32(pciid, offset, &data32);
       if (result == PCISTS_OK)
-        printf(" r32[0x%02x]: 0x%08lx  DEC=%lu\n", offset, data32, data32);
+        printf(" r32[0x%02x]: 0x%08" PRIx32 "  DEC=%" PRIu32 "\n",
+               offset, data32, data32);
       break;
 
@@ -178,5 +180,6 @@
       result = pci_cfg_w32(pciid, offset, data);
       if (result == PCISTS_OK)
-        printf(" w32[0x%02x]: 0x%08lx  DEC=%lu\n", offset, data, data);
+        printf(" w32[0x%02x]: 0x%08" PRIx32 "  DEC=%" PRIu32 "\n",
+               offset, data, data);
       break;
 
@@ -363,6 +366,6 @@
   printf(" SUB VENDOR:    0x%04x\n", dev->subvendor);
   printf(" SUB DEVICE:    0x%04x\n", dev->subdevice);
-  printf(" CLASS:         0x%06lx\n", dev->classrev >> 8);
-  printf(" REVISION:      0x%02lx\n", dev->classrev & 0xff);
+  printf(" CLASS:         0x%06" PRIx32 "\n", dev->classrev >> 8);
+  printf(" REVISION:      0x%02" PRIx32 "\n", dev->classrev & 0xff);
   printf(" IRQ:           %d\n", dev->sysirq);
 
@@ -388,5 +391,6 @@
     }
 
-    printf("  %s[%d]:  %08lx-%08lx\n", str1, i, res->start, res->end - 1);
+    printf("  %s[%d]:  %08" PRIx32 "-%08" PRIx32 "\n",
+           str1, i, res->start, res->end - 1);
   }
 
Index: cpukit/libpci/pci_bus.c
===================================================================
--- cpukit/libpci/pci_bus.c	(revision 956d76ccaf68f10c8aabcdd72ab85e8ffd7f2176)
+++ cpukit/libpci/pci_bus.c	(revision 9c12bcfdc52d7887c26d97bfcb8eb5fc86f2bc1a)
@@ -27,4 +27,5 @@
 #define PCIBUS_INFO
 
+#include <inttypes.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -302,5 +303,5 @@
 			PCI_DEV_EXPAND(devinfo->pcidev));
 	print_line(p, buf);
-	sprintf(buf, "PCIID        0x%lx", (uint32_t)devinfo->pcidev);
+	sprintf(buf, "PCIID        0x%" PRIx16 "", devinfo->pcidev);
 	print_line(p, buf);
 	sprintf(buf, "VENDOR ID:   %04x", devinfo->id.vendor);
@@ -312,5 +313,5 @@
 	sprintf(buf, "SUBDEV ID:   %04x", devinfo->id.subdevice);
 	print_line(p, buf);
-	sprintf(buf, "CLASS:       %lx", devinfo->id.class);
+	sprintf(buf, "CLASS:       %" PRIx32, devinfo->id.class);
 	print_line(p, buf);
 	sprintf(buf, "REVISION:    %x", devinfo->rev);
@@ -344,5 +345,6 @@
 			continue;
 
-		sprintf(buf, " %s[%d]:  %08lx-%08lx [PCIADR %lx]",
+		sprintf(buf, " %s[%d]:  %08" PRIx32 "-%08" PRIx32
+			" [PCIADR %" PRIx32 "]",
 			str1, i, pcibusres->address,
 			pcibusres->address + pcibusres->size - 1, pcistart);
Index: cpukit/libpci/pci_cfg_print_code.c
===================================================================
--- cpukit/libpci/pci_cfg_print_code.c	(revision 956d76ccaf68f10c8aabcdd72ab85e8ffd7f2176)
+++ cpukit/libpci/pci_cfg_print_code.c	(revision 9c12bcfdc52d7887c26d97bfcb8eb5fc86f2bc1a)
@@ -10,4 +10,5 @@
 
 #include <rtems.h>
+#include <inttypes.h>
 #include <stdio.h>
 #include <string.h>
@@ -50,10 +51,10 @@
 		printf("%s{\n", prefix);
 		printf("%s\t.next = NULL,\n", prefix);
-		printf("%s\t.size = 0x%08lx,\n", prefix, res->size);
-		printf("%s\t.boundary = 0x%08lx,\n", prefix, res->boundary);
+		printf("%s\t.size = 0x%08" PRIx32 ",\n", prefix, res->size);
+		printf("%s\t.boundary = 0x%08" PRIx32 ",\n", prefix, res->boundary);
 		printf("%s\t.flags = 0x%x,\n", prefix, res->flags);
 		printf("%s\t.bar = %d,\n", prefix, i);
-		printf("%s\t.start = 0x%08lx,\n", prefix, res->start);
-		printf("%s\t.end = 0x%08lx,\n", prefix, res->end);
+		printf("%s\t.start = 0x%08" PRIx32 ",\n", prefix, res->start);
+		printf("%s\t.end = 0x%08" PRIx32 ",\n", prefix, res->end);
 		printf("%s},\n", prefix);
 	}
@@ -89,5 +90,5 @@
 	printf("%s.subvendor = 0x%04x,\n", prefix, dev->subvendor);
 	printf("%s.subdevice = 0x%04x,\n", prefix, dev->subdevice);
-	printf("%s.classrev = 0x%08lx,\n", prefix, dev->classrev);
+	printf("%s.classrev = 0x%08" PRIx32 ",\n", prefix, dev->classrev);
 	printf("%s.command = 0,\n", prefix);
 }
Index: cpukit/libpci/pci_print.c
===================================================================
--- cpukit/libpci/pci_print.c	(revision 956d76ccaf68f10c8aabcdd72ab85e8ffd7f2176)
+++ cpukit/libpci/pci_print.c	(revision 9c12bcfdc52d7887c26d97bfcb8eb5fc86f2bc1a)
@@ -8,4 +8,5 @@
  */
 
+#include <inttypes.h>
 #include <stdio.h>
 #include <pci.h>
@@ -43,9 +44,10 @@
 	printf("\nBus %x Slot %x function: %x [0x%x] %s\n",
 		PCI_DEV_EXPAND(dev), dev, str);
-	printf("\tVendor id: 0x%lx, device id: 0x%lx\n",
+	printf("\tVendor id: 0x%" PRIx32 ", device id: 0x%" PRIx32 "\n",
 		id & 0xffff, id >> 16);
 	if (maxbars == 2) {
 		PCI_CFG_R32(dev, PCIR_PRIBUS_1, &tmp);
-		printf("\tPrimary: %lx  Secondary: %lx  Subordinate: %lx\n",
+		printf("\tPrimary: %" PRIx32 "  Secondary: %" PRIx32
+			"  Subordinate: %" PRIx32 "\n",
 			tmp & 0xff, (tmp >> 8) & 0xff, (tmp >> 16) & 0xff);
 	}
@@ -83,5 +85,6 @@
 				tmp2 = tmp2 / (1024*1024);
 			}
-			printf("\tBAR %d: %lx [%lu%s]\n", pos, tmp, tmp2, str);
+			printf("\tBAR %d: %" PRIx32 " [%" PRIu32 "%s]\n",
+				pos, tmp, tmp2, str);
 		}
 	}
@@ -106,5 +109,5 @@
 		}
 		str2 = tmp & 1 ? "ENABLED" : "DISABLED";
-		printf("\tROM:   %08lx [%lu%s] (%s)\n",
+		printf("\tROM:   %08" PRIx32 " [%" PRIu32 "%s] (%s)\n",
 			tmp, tmp2, str, str2);
 	}
@@ -123,6 +126,6 @@
 			if (limit < base)
 				str = "DISABLED";
-			printf("\tI/O:   BASE: 0x%08lx, LIMIT: 0x%08lx (%s)\n",
-				base, limit, str);
+			printf("\tI/O:   BASE: 0x%08" PRIx32 ", LIMIT: 0x%08"
+				PRIx32 " (%s)\n", base, limit, str);
 		}
 
@@ -134,6 +137,6 @@
 			if (limit < base)
 				str = "DISABLED";
-			printf("\tMEMIO: BASE: 0x%08lx, LIMIT: 0x%08lx (%s)\n",
-				base, limit, str);
+			printf("\tMEMIO: BASE: 0x%08" PRIx32 ", LIMIT: 0x%08"
+				PRIx32 " (%s)\n", base, limit, str);
 		}
 
@@ -145,6 +148,6 @@
 			if (limit < base)
 				str = "DISABLED";
-			printf("\tMEM:   BASE: 0x%08lx, LIMIT: 0x%08lx (%s)\n",
-					base, limit, str);
+			printf("\tMEM:   BASE: 0x%08" PRIx32 ", LIMIT: 0x%08"
+				PRIx32 " (%s)\n", base, limit, str);
 		}
 	}
Index: testsuites/fstests/fsrfsbitmap01/test.c
===================================================================
--- testsuites/fstests/fsrfsbitmap01/test.c	(revision 956d76ccaf68f10c8aabcdd72ab85e8ffd7f2176)
+++ testsuites/fstests/fsrfsbitmap01/test.c	(revision 9c12bcfdc52d7887c26d97bfcb8eb5fc86f2bc1a)
@@ -49,5 +49,5 @@
     if (rc > 0)
     {
-      printf (" %2d. Test bit %" PRId32 " in range (%" PRId32 ",%ld] is %s: ",
+      printf (" %2d. Test bit %" PRId32 " in range (%" PRId32 ",%zu] is %s: ",
             test, bit + count, bit, bit + size - 1, !set ? "set" : "clear");
       printf ("FAIL (%s)\n", strerror (rc));
@@ -58,5 +58,5 @@
     if (!result)
     {
-      printf (" %2d. Test bit %" PRId32 " in range (%" PRId32 ",%ld] is %s: ",
+      printf (" %2d. Test bit %" PRId32 " in range (%" PRId32 ",%zu] is %s: ",
               test, bit + count, bit, bit + size - 1, !set ? "set" : "clear");
       printf (" %s\n", !result ? "pass" : "FAIL");
@@ -65,5 +65,5 @@
   }
 
-  printf (" %2d. Test bit range (%" PRId32 ",%ld] all %s: pass\n",
+  printf (" %2d. Test bit range (%" PRId32 ",%zu] all %s: pass\n",
           test, bit, bit + size - 1, set ? "set" : "clear");
 
@@ -92,5 +92,5 @@
     rtems_rfs_bitmap_map_clear (control, bit + i);
 
-  printf (" %2d. Cleared bits (%" PRId32 ", %ld] (%zd)\n",
+  printf (" %2d. Cleared bits (%" PRId32 ", %zu] (%zu)\n",
           test, bit, bit + size - 1, size);
 
@@ -129,5 +129,5 @@
   }
 
-  printf (" %2d. Alloc'ed all bits (%" PRId32 ", %ld] (%zd)\n",
+  printf (" %2d. Alloc'ed all bits (%" PRId32 ", %zu] (%zu)\n",
           test, bit, bit + size - 1, size);
 
@@ -185,5 +185,5 @@
   handle.bnum = 1;
 
-  printf ("\nRFS Bitmap Test : size = %zd (%zd)\n",
+  printf ("\nRFS Bitmap Test : size = %zu (%zu)\n",
           size, rtems_rfs_bitmap_elements (size));
 
@@ -221,5 +221,5 @@
   rc = rtems_rfs_bitmap_map_alloc (&control, size - 1, &result, &bit);
   result = result && (bit == (size - 1));
-  printf ("  4. Find bit (size - 1) with seed = (size - 1) (%zd): %s (%s): bit = %" PRId32 "\n",
+  printf ("  4. Find bit (size - 1) with seed = (size - 1) (%zu): %s (%s): bit = %" PRId32 "\n",
           size - 1, result ? "pass" : "FAIL", strerror (rc), bit);
   rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
@@ -234,5 +234,5 @@
 
   rc = rtems_rfs_bitmap_map_test (&control, size - 1, &result);
-  printf ("  6. Test bit (size - 1) (%zd): %s (%s)\n",
+  printf ("  6. Test bit (size - 1) (%zu): %s (%s)\n",
           size - 1, result ? "pass" : "FAIL", strerror (rc));
   rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
@@ -285,5 +285,5 @@
 
   rc = rtems_rfs_bitmap_map_clear (&control, size - 1);
-  printf (" 14. Clear bit (size - 1) (%zd): %s (%s)\n",
+  printf (" 14. Clear bit (size - 1) (%zu): %s (%s)\n",
           size - 1, rc == 0 ? "pass" : "FAIL", strerror (rc));
   rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
@@ -301,10 +301,10 @@
   rc = rtems_rfs_bitmap_map_alloc (&control, size / 2, &result, &bit);
   result = result && (bit == 0);
-  printf (" 17. Find bit with seed = (size / 2) (%zd): %s (%s): bit = %" PRId32 "\n",
+  printf (" 17. Find bit with seed = (size / 2) (%zu): %s (%s): bit = %" PRId32 "\n",
           size / 2, result ? "pass" : "FAIL", strerror (rc), bit);
   rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
 
   rc = rtems_rfs_bitmap_map_clear (&control, size - 1);
-  printf (" 18. Clear bit (size - 1) (%zd): %s, (%s)\n",
+  printf (" 18. Clear bit (size - 1) (%zu): %s, (%s)\n",
           size - 1, rc == 0 ? "pass" : "FAIL", strerror (rc));
   rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
@@ -312,5 +312,5 @@
   rc = rtems_rfs_bitmap_map_alloc (&control, size / 2, &result, &bit);
   result = result && (bit == (size - 1));
-  printf (" 19. Find bit with seed = (size / 2) (%zd): %s (%s): bit = %" PRId32 "\n",
+  printf (" 19. Find bit with seed = (size / 2) (%zu): %s (%s): bit = %" PRId32 "\n",
           size / 2, result ? "pass" : "FAIL", strerror (rc), bit);
   rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
@@ -322,15 +322,15 @@
   rc = rtems_rfs_bitmap_map_alloc (&control, (size / 2) - 1, &result, &bit);
   result = result && (bit == 0);
-  printf (" 21. Find bit with seed = ((size / 2) - 1) (%zd): %s (%s): bit = %" PRId32 "\n",
+  printf (" 21. Find bit with seed = ((size / 2) - 1) (%zu): %s (%s): bit = %" PRId32 "\n",
           (size / 2) - 1, result ? "pass" : "FAIL", strerror (rc), bit);
   rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
 
   rc = rtems_rfs_bitmap_map_clear (&control, size - 1);
-  printf (" 22. Clear bit (size - 1) (%zd): %s (%s)\n",
+  printf (" 22. Clear bit (size - 1) (%zu): %s (%s)\n",
           size - 1, rc == 0 ? "pass" : "FAIL", strerror (rc));
 
   rc = rtems_rfs_bitmap_map_alloc (&control, (size / 2) - 1, &result, &bit);
   result = result && (bit == (size - 1));
-  printf (" 23. Find bit with seed = ((size / 2) - 1) (%zd): %s (%s): bit = %" PRId32 "\n",
+  printf (" 23. Find bit with seed = ((size / 2) - 1) (%zu): %s (%s): bit = %" PRId32 "\n",
           (size / 2) - 1, result ? "pass" : "FAIL", strerror (rc), bit);
   rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
@@ -373,5 +373,5 @@
   clear = rtems_rfs_bitmap_map_free (&control);
   result = clear == (last_bit - first_bit);
-  printf (" 27. Check free count is %zd: %" PRId32 ": %s (%s)\n",
+  printf (" 27. Check free count is %zu: %" PRId32 ": %s (%s)\n",
           clear, last_bit - first_bit,
           result ? "pass" : "FAIL", strerror (rc));
@@ -379,5 +379,5 @@
   rc = rtems_rfs_bitmap_create_search (&control);
   result = clear == rtems_rfs_bitmap_map_free (&control);
-  printf (" 28. Create search check free count is %zd: %zd: %s (%s)\n",
+  printf (" 28. Create search check free count is %zu: %zu: %s (%s)\n",
           clear, rtems_rfs_bitmap_map_free (&control),
           result ? "pass" : "FAIL", strerror (rc));
@@ -455,5 +455,5 @@
   printf (" Bit set value       : %d\n", RTEMS_RFS_BITMAP_BIT_SET);
   printf (" Bit clear value     : %d\n", RTEMS_RFS_BITMAP_BIT_CLEAR);
-  printf (" Num bit per element : %zd\n", rtems_rfs_bitmap_element_bits ());
+  printf (" Num bit per element : %zu\n", rtems_rfs_bitmap_element_bits ());
 
 #if INT_MAX >= 0x23984237
