Index: cpukit/Makefile.am
===================================================================
--- cpukit/Makefile.am	(revision 18f63c0004cc3348bc785a642da82d2a3d46db5d)
+++ cpukit/Makefile.am	(revision 54bdf0c7e5d689da76d41ccbbf2c9dc830fd8c4e)
@@ -112,4 +112,5 @@
 
 include_rtems_HEADERS += include/rtems/bspIo.h
+include_rtems_HEADERS += include/rtems/inttypes.h
 include_rtems_HEADERS += include/rtems/print.h
 include_rtems_HEADERS += include/rtems/printer.h
Index: cpukit/include/rtems/inttypes.h
===================================================================
--- cpukit/include/rtems/inttypes.h	(revision 54bdf0c7e5d689da76d41ccbbf2c9dc830fd8c4e)
+++ cpukit/include/rtems/inttypes.h	(revision 54bdf0c7e5d689da76d41ccbbf2c9dc830fd8c4e)
@@ -0,0 +1,78 @@
+/**
+ * @file rtems/inttypes.h
+ *
+ * @brief Provide printf() PRIxxx Constante Beyond Standards
+ *
+ * This include file defines PRIxxx constants beyond those in
+ * the C and POSIX standards. These are used to write portable
+ * printf() format strings for POSIX and RTEMS types not in
+ * <inttypes.h>
+ */
+
+/*
+ *  COPYRIGHT (c) 2017 On-Line Applications Research Corporation.
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.org/license/LICENSE.
+ */
+
+#ifndef _RTEMS_INTTYPES_H
+#define _RTEMS_INTTYPES_H
+
+#include <inttypes.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup RTEMS inttypes.h Extensions
+ *
+ * This module defines portable PRIxxx constants beyond those
+ * in the C and POSIX standard.
+ */
+
+/** Helper macro to print "modet" in octal */
+#if SIZEOF_MODE_T == 8
+#define PRIomode_t PRIo64
+#elif SIZEOF_MODE_T == 4
+#define PRIomode_t PRIo32
+#else
+#error "PRIomode_t: unsupport size of mode_t"
+#endif
+
+/** Helper macro to print "off_t" in octal */
+#if SIZEOF_OFF_T == 8
+#define PRIooff_t PRIo64
+#elif SIZEOF_OFF_T == 4
+#define PRIooff_t PRIo32
+#else
+#error "PRIooff_t: unsupported size of off_t"
+#endif
+
+/** Helper macro to print "off_t" in decimal */
+#if SIZEOF_OFF_T == 8
+#define PRIdoff_t PRId64
+#elif SIZEOF_OFF_T == 4
+#define PRIdoff_t PRId32
+#else
+#error "PRIdoff_t: unsupported size of off_t"
+#endif
+
+/** Helper macro to print "time_t" in decimal */
+#if SIZEOF_TIME_T == 8
+#define PRIdtime_t PRId64
+#elif SIZEOF_TIME_T == 4
+#define PRIdtime_t PRId32
+#else
+#error "PRIdtime_t: unsupported size of time_t"
+#endif
+
+/**@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: cpukit/libdl/rtl-shell.c
===================================================================
--- cpukit/libdl/rtl-shell.c	(revision 18f63c0004cc3348bc785a642da82d2a3d46db5d)
+++ cpukit/libdl/rtl-shell.c	(revision 54bdf0c7e5d689da76d41ccbbf2c9dc830fd8c4e)
@@ -21,14 +21,5 @@
 
 #include <inttypes.h>
-
-/*
- *  Flag the targets where off_t is 32 bits. This is not a compiler type
- *  so we can't rely on prerdefines.
- */
-#if defined(__moxie__)
-#define PRIdoff_t PRIo32
-#else
-#define PRIdoff_t PRIo64
-#endif
+#include <rtems/inttypes.h>
 
 #include <stdio.h>
Index: cpukit/libfs/src/nfsclient/src/dirutils.c
===================================================================
--- cpukit/libfs/src/nfsclient/src/dirutils.c	(revision 18f63c0004cc3348bc785a642da82d2a3d46db5d)
+++ cpukit/libfs/src/nfsclient/src/dirutils.c	(revision 54bdf0c7e5d689da76d41ccbbf2c9dc830fd8c4e)
@@ -71,20 +71,5 @@
 
 #include <inttypes.h> /* PRI* */
-
-#if SIZEOF_MODE_T == 8
-#define PRIomode_t PRIo64
-#elif SIZEOF_MODE_T == 4
-#define PRIomode_t PRIo32
-#else
-#error "unsupport size of mode_t"
-#endif
-
-#if SIZEOF_OFF_T == 8
-#define PRIdoff_t PRIo64
-#elif SIZEOF_OFF_T == 4
-#define PRIdoff_t PRIo32
-#else
-#error "unsupported size of off_t"
-#endif
+#include <rtems/inttypes.h> /* extended PRI* */
 
 #ifdef HAVE_CEXP
@@ -143,5 +128,5 @@
 	}
 
-	printf("%10li, %10" PRIdoff_t "b, %5i.%-5i 0%04" PRIomode_t " %s%s\n",
+	printf("%10li, %10" PRIooff_t "b, %5i.%-5i 0%04" PRIomode_t " %s%s\n",
 				buf->st_ino,
 				buf->st_size,
Index: cpukit/libfs/src/rfs/rtems-rfs-dir.c
===================================================================
--- cpukit/libfs/src/rfs/rtems-rfs-dir.c	(revision 18f63c0004cc3348bc785a642da82d2a3d46db5d)
+++ cpukit/libfs/src/rfs/rtems-rfs-dir.c	(revision 54bdf0c7e5d689da76d41ccbbf2c9dc830fd8c4e)
@@ -29,13 +29,6 @@
 
 #include <inttypes.h>
+#include <rtems/inttypes.h>
 #include <string.h>
-
-#if SIZEOF_OFF_T == 8
-#define PRIooff_t PRIo64
-#elif SIZEOF_OFF_T == 4
-#define PRIooff_t PRIo32
-#else
-#error "unsupported size of off_t"
-#endif
 
 #include <rtems/rfs/rtems-rfs-block.h>
Index: cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c
===================================================================
--- cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c	(revision 18f63c0004cc3348bc785a642da82d2a3d46db5d)
+++ cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c	(revision 54bdf0c7e5d689da76d41ccbbf2c9dc830fd8c4e)
@@ -22,13 +22,6 @@
 
 #include <inttypes.h>
+#include <rtems/inttypes.h>
 #include <string.h>
-
-#if SIZEOF_OFF_T == 8
-#define PRIdoff_t PRId64
-#elif SIZEOF_OFF_T == 4
-#define PRIdoff_t PRId32
-#else
-#error "unsupported size of off_t"
-#endif
 
 #include <rtems/rfs/rtems-rfs-file.h>
Index: cpukit/libfs/src/rfs/rtems-rfs-rtems.c
===================================================================
--- cpukit/libfs/src/rfs/rtems-rfs-rtems.c	(revision 18f63c0004cc3348bc785a642da82d2a3d46db5d)
+++ cpukit/libfs/src/rfs/rtems-rfs-rtems.c	(revision 54bdf0c7e5d689da76d41ccbbf2c9dc830fd8c4e)
@@ -26,11 +26,5 @@
 #include <stdlib.h>
 
-#if SIZEOF_MODE_T == 8
-#define PRIomode_t PRIo64
-#elif SIZEOF_MODE_T == 4
-#define PRIomode_t PRIo32
-#else
-#error "unsupport size of mode_t"
-#endif
+#include <rtems/inttypes.h>
 
 #include <rtems/rfs/rtems-rfs-file.h>
Index: cpukit/libmisc/shell/main_time.c
===================================================================
--- cpukit/libmisc/shell/main_time.c	(revision 18f63c0004cc3348bc785a642da82d2a3d46db5d)
+++ cpukit/libmisc/shell/main_time.c	(revision 54bdf0c7e5d689da76d41ccbbf2c9dc830fd8c4e)
@@ -23,14 +23,6 @@
 #include <rtems.h>
 #include <rtems/shell.h>
+#include <rtems/inttypes.h>
 #include "internal.h"
-
-/* Helper macro to print "time_t" */
-#if SIZEOF_TIME_T == 8
-#define PRIdtime_t PRId64
-#elif SIZEOF_TIME_T == 4
-#define PRIdtime_t PRId32
-#else
-#error "PRIdtime_t: unsupported size of time_t"
-#endif
 
 static int rtems_shell_main_time(
Index: cpukit/preinstall.am
===================================================================
--- cpukit/preinstall.am	(revision 18f63c0004cc3348bc785a642da82d2a3d46db5d)
+++ cpukit/preinstall.am	(revision 54bdf0c7e5d689da76d41ccbbf2c9dc830fd8c4e)
@@ -264,4 +264,8 @@
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/bspIo.h
 
+$(PROJECT_INCLUDE)/rtems/inttypes.h: include/rtems/inttypes.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/inttypes.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/inttypes.h
+
 $(PROJECT_INCLUDE)/rtems/print.h: include/rtems/print.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/print.h
