Index: boot/arch/arm32/include/types.h
===================================================================
--- boot/arch/arm32/include/types.h	(revision 5b46ec8b4cb1d1075e4c18e9f366fca913758c8c)
+++ boot/arch/arm32/include/types.h	(revision e330da6e8c9b0dc3c32eed16c06b64b13f0a6963)
@@ -45,4 +45,6 @@
 typedef uint32_t pfn_t;
 
+typedef int32_t ptrdiff_t;
+
 typedef struct {
 	/** Address where the task was placed. */
Index: boot/arch/ia64/include/types.h
===================================================================
--- boot/arch/ia64/include/types.h	(revision 5b46ec8b4cb1d1075e4c18e9f366fca913758c8c)
+++ boot/arch/ia64/include/types.h	(revision e330da6e8c9b0dc3c32eed16c06b64b13f0a6963)
@@ -40,4 +40,6 @@
 typedef uint64_t uintptr_t;
 
+typedef int64_t ptrdiff_t;
+
 typedef struct {
 	void *addr;
Index: boot/arch/mips32/include/types.h
===================================================================
--- boot/arch/mips32/include/types.h	(revision 5b46ec8b4cb1d1075e4c18e9f366fca913758c8c)
+++ boot/arch/mips32/include/types.h	(revision e330da6e8c9b0dc3c32eed16c06b64b13f0a6963)
@@ -37,4 +37,6 @@
 typedef uint32_t uintptr_t;
 
+typedef int32_t ptrdiff_t;
+
 typedef struct {
 	/** Address where the task was placed. */
Index: boot/arch/ppc32/include/types.h
===================================================================
--- boot/arch/ppc32/include/types.h	(revision 5b46ec8b4cb1d1075e4c18e9f366fca913758c8c)
+++ boot/arch/ppc32/include/types.h	(revision e330da6e8c9b0dc3c32eed16c06b64b13f0a6963)
@@ -38,4 +38,6 @@
 typedef int32_t native_t;
 
+typedef int32_t ptrdiff_t;
+
 typedef struct {
 	void *addr;
Index: boot/arch/riscv64/include/types.h
===================================================================
--- boot/arch/riscv64/include/types.h	(revision 5b46ec8b4cb1d1075e4c18e9f366fca913758c8c)
+++ boot/arch/riscv64/include/types.h	(revision e330da6e8c9b0dc3c32eed16c06b64b13f0a6963)
@@ -37,4 +37,6 @@
 typedef uint64_t uintptr_t;
 
+typedef int64_t ptrdiff_t;
+
 typedef struct {
 	void *start;
Index: boot/arch/sparc64/include/types.h
===================================================================
--- boot/arch/sparc64/include/types.h	(revision 5b46ec8b4cb1d1075e4c18e9f366fca913758c8c)
+++ boot/arch/sparc64/include/types.h	(revision e330da6e8c9b0dc3c32eed16c06b64b13f0a6963)
@@ -38,4 +38,6 @@
 typedef int64_t native_t;
 
+typedef int64_t ptrdiff_t;
+
 typedef struct {
 	void *addr;
Index: boot/generic/src/printf_core.c
===================================================================
--- boot/generic/src/printf_core.c	(revision 5b46ec8b4cb1d1075e4c18e9f366fca913758c8c)
+++ boot/generic/src/printf_core.c	(revision e330da6e8c9b0dc3c32eed16c06b64b13f0a6963)
@@ -605,7 +605,10 @@
 			
 			switch (uc) {
-			/** @todo Unimplemented qualifiers:
-			 *        t ptrdiff_t - ISO C 99
-			 */
+			case 't':
+				/* ptrdiff_t */
+				if (sizeof(ptrdiff_t) == sizeof(int32_t))
+					qualifier = PrintfQualifierInt;
+				else
+					qualifier = PrintfQualifierLongLong;
 			case 'h':
 				/* Char or short */
Index: kernel/generic/include/typedefs.h
===================================================================
--- kernel/generic/include/typedefs.h	(revision 5b46ec8b4cb1d1075e4c18e9f366fca913758c8c)
+++ kernel/generic/include/typedefs.h	(revision e330da6e8c9b0dc3c32eed16c06b64b13f0a6963)
@@ -61,4 +61,6 @@
 typedef volatile uint32_t ioport32_t;
 
+typedef native_t ptrdiff_t;
+
 #ifdef __32_BITS__
 
Index: kernel/generic/src/printf/printf_core.c
===================================================================
--- kernel/generic/src/printf/printf_core.c	(revision 5b46ec8b4cb1d1075e4c18e9f366fca913758c8c)
+++ kernel/generic/src/printf/printf_core.c	(revision e330da6e8c9b0dc3c32eed16c06b64b13f0a6963)
@@ -733,7 +733,10 @@
 			
 			switch (uc) {
-			/** @todo Unimplemented qualifiers:
-			 *        t ptrdiff_t - ISO C 99
-			 */
+			case 't':
+				/* ptrdiff_t */
+				if (sizeof(ptrdiff_t) == sizeof(int32_t))
+					qualifier = PrintfQualifierInt;
+				else
+					qualifier = PrintfQualifierLongLong;
 			case 'h':
 				/* Char or short */
Index: kernel/test/print/print2.c
===================================================================
--- kernel/test/print/print2.c	(revision 5b46ec8b4cb1d1075e4c18e9f366fca913758c8c)
+++ kernel/test/print/print2.c	(revision e330da6e8c9b0dc3c32eed16c06b64b13f0a6963)
@@ -52,4 +52,13 @@
 	TPRINTF("Real output:     [%#x] [%#5.3x] [%#-5.3x] [%#3.5x] [%#-3.5x]\n\n", 17, 18, 19, 20, 21);
 	
+	char ch[12];
+	ptrdiff_t d, neg_d;
+	
+	d = &ch[0] - &ch[12];
+	neg_d = (unsigned)(-d);
+	TPRINTF("Testing printf(\"%%td %%tu %%tx %%ti %%to\", d, neg_d, neg_d, d, neg_d):\n");
+	TPRINTF("Expected output: [-12] [12] [c] [-12] [14]\n");
+	TPRINTF("Real output:     [%td] [%tu] [%tx] [%ti] [%to]\n\n", d, neg_d, neg_d, d, neg_d);
+	
 	sysarg_t nat = UINTN_C(0x12345678);
 	
Index: uspace/app/tester/print/print2.c
===================================================================
--- uspace/app/tester/print/print2.c	(revision 5b46ec8b4cb1d1075e4c18e9f366fca913758c8c)
+++ uspace/app/tester/print/print2.c	(revision e330da6e8c9b0dc3c32eed16c06b64b13f0a6963)
@@ -53,4 +53,13 @@
 	TPRINTF("Real output:     [%#x] [%#5.3x] [%#-5.3x] [%#3.5x] [%#-3.5x]\n\n", 17, 18, 19, 20, 21);
 	
+	char ch[12];
+	ptrdiff_t d, neg_d;
+	
+	d = &ch[0] - &ch[12];
+	neg_d = (unsigned)(-d);
+	TPRINTF("Testing printf(\"%%td %%tu %%tx %%ti %%to\", d, neg_d, neg_d, d, neg_d):\n");
+	TPRINTF("Expected output: [-12] [12] [c] [-12] [14]\n");
+	TPRINTF("Real output:     [%td] [%tu] [%tx] [%ti] [%to]\n\n", d, neg_d, neg_d, d, neg_d);
+	
 	return NULL;
 }
Index: uspace/lib/c/generic/io/printf_core.c
===================================================================
--- uspace/lib/c/generic/io/printf_core.c	(revision 5b46ec8b4cb1d1075e4c18e9f366fca913758c8c)
+++ uspace/lib/c/generic/io/printf_core.c	(revision e330da6e8c9b0dc3c32eed16c06b64b13f0a6963)
@@ -1448,7 +1448,10 @@
 			
 			switch (uc) {
-			/** @todo Unimplemented qualifiers:
-			 *        t ptrdiff_t - ISO C 99
-			 */
+			case 't':
+				/* ptrdiff_t */
+				if (sizeof(ptrdiff_t) == sizeof(int32_t))
+					qualifier = PrintfQualifierInt;
+				else
+					qualifier = PrintfQualifierLongLong;
 			case 'h':
 				/* Char or short */
