Index: uspace/app/mkfat/mkfat.c
===================================================================
--- uspace/app/mkfat/mkfat.c	(revision b79d450c48dd4e1488486327295df7c5c51e93b7)
+++ uspace/app/mkfat/mkfat.c	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -44,4 +44,6 @@
 #include <devmap.h>
 #include <byteorder.h>
+#include <sys/types.h>
+#include <inttypes.h>
 #include <errno.h>
 #include "fat.h"
@@ -157,5 +159,6 @@
 		printf(NAME ": Warning, failed to obtain block device size.\n");
 	} else {
-		printf(NAME ": Block device has %llu blocks.\n", dev_nblocks);
+		printf(NAME ": Block device has %" PRIu64 " blocks.\n",
+		    (uint64_t) dev_nblocks);
 		cfg.total_sectors = dev_nblocks;
 	}
Index: uspace/app/taskdump/taskdump.c
===================================================================
--- uspace/app/taskdump/taskdump.c	(revision b79d450c48dd4e1488486327295df7c5c51e93b7)
+++ uspace/app/taskdump/taskdump.c	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -245,5 +245,5 @@
 	printf("Threads:\n");
 	for (i = 0; i < n_threads; i++) {
-		printf(" [%d] hash: 0x%lx\n", 1+i, thash_buf[i]);
+		printf(" [%d] hash: %p\n", 1+i, thash_buf[i]);
 
 		thread_dump(thash_buf[i]);
@@ -289,5 +289,5 @@
 	printf("Address space areas:\n");
 	for (i = 0; i < n_areas; i++) {
-		printf(" [%d] flags: %c%c%c%c base: 0x%lx size: 0x%lx\n", 1+i,
+		printf(" [%d] flags: %c%c%c%c base: %p size: %p\n", 1+i,
 		    (ainfo_buf[i].flags & AS_AREA_READ) ? 'R' : '-',
 		    (ainfo_buf[i].flags & AS_AREA_WRITE) ? 'W' : '-',
@@ -328,5 +328,5 @@
 
 	sym_pc = fmt_sym_address(pc);
-	printf("Thread 0x%lx crashed at %s. FP = 0x%lx\n", thash, sym_pc, fp);
+	printf("Thread %p crashed at %s. FP = %p\n", thash, sym_pc, fp);
 	free(sym_pc);
 
Index: uspace/app/trace/ipcp.c
===================================================================
--- uspace/app/trace/ipcp.c	(revision b79d450c48dd4e1488486327295df7c5c51e93b7)
+++ uspace/app/trace/ipcp.c	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -279,5 +279,5 @@
 
 	if ((display_mask & DM_IPC) != 0) {
-		printf("Response to 0x%lx: retval=%ld, args = (%lu, %lu, %lu, %lu, %lu)\n",
+		printf("Response to %p: retval=%ld, args = (%lu, %lu, %lu, %lu, %lu)\n",
 			hash, retval, IPC_GET_ARG1(*answer),
 			IPC_GET_ARG2(*answer), IPC_GET_ARG3(*answer),
@@ -336,5 +336,5 @@
 		/* Not a response */
 		if ((display_mask & DM_IPC) != 0) {
-			printf("Not a response (hash 0x%lx)\n", hash);
+			printf("Not a response (hash %p)\n", hash);
 		}
 		return;
Index: uspace/app/trace/trace.c
===================================================================
--- uspace/app/trace/trace.c	(revision b79d450c48dd4e1488486327295df7c5c51e93b7)
+++ uspace/app/trace/trace.c	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -198,5 +198,5 @@
 	printf("Threads:");
 	for (i = 0; i < n_threads; i++) {
-		printf(" [%d] (hash 0x%lx)", 1+i, thread_hash_buf[i]);
+		printf(" [%d] (hash %p)", 1+i, thread_hash_buf[i]);
 	}
 	printf("\ntotal of %u threads\n", tb_needed / sizeof(uintptr_t));
@@ -222,5 +222,5 @@
 	case V_HASH:
 	case V_PTR:
-		printf("0x%08lx", val);
+		printf("%p", val);
 		break;
 
@@ -508,5 +508,5 @@
 	}
 
-	printf("Start tracing thread [%d] (hash 0x%lx).\n", thread_id, thread_hash);
+	printf("Start tracing thread [%d] (hash %p).\n", thread_id, thread_hash);
 
 	while (!abort_trace) {
@@ -552,5 +552,5 @@
 				break;
 			case UDEBUG_EVENT_THREAD_E:
-				printf("Thread 0x%lx exited.\n", val0);
+				printf("Thread %p exited.\n", val0);
 				fibril_mutex_lock(&state_lock);
 				abort_trace = true;
Index: uspace/lib/libc/arch/amd64/include/inttypes.h
===================================================================
--- uspace/lib/libc/arch/amd64/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
+++ uspace/lib/libc/arch/amd64/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2010 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libcamd64
+ * @{
+ */
+/** @file Macros for format specifiers.
+ *
+ * Macros for formatting stdint types as specified in section
+ * 7.8.1 Macros for format specifiers of the C99 draft specification
+ * (ISO/IEC 9899:201x). Only some macros from the specification are
+ * implemented.
+ */
+
+#ifndef LIBC_amd64_INTTYPES_H_
+#define LIBC_amd64_INTTYPES_H_
+
+#define PRId8 "d"
+#define PRId16 "d"
+#define PRId32 "d"
+#define PRId64 "lld"
+#define PRIdPTR "lld"
+
+#define PRIo8 "o"
+#define PRIo16 "o"
+#define PRIo32 "o"
+#define PRIo64 "llo"
+#define PRIoPTR "llo"
+
+#define PRIu8 "u"
+#define PRIu16 "u"
+#define PRIu32 "u"
+#define PRIu64 "llu"
+#define PRIuPTR "llu"
+
+#define PRIx8 "x"
+#define PRIx16 "x"
+#define PRIx32 "x"
+#define PRIx64 "llx"
+#define PRIxPTR "llx"
+
+#define PRIX8 "X"
+#define PRIX16 "X"
+#define PRIX32 "X"
+#define PRIX64 "llX"
+#define PRIXPTR "llX"
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/libc/arch/arm32/include/inttypes.h
===================================================================
--- uspace/lib/libc/arch/arm32/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
+++ uspace/lib/libc/arch/arm32/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2010 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libcarm32
+ * @{
+ */
+/** @file Macros for format specifiers.
+ *
+ * Macros for formatting stdint types as specified in section
+ * 7.8.1 Macros for format specifiers of the C99 draft specification
+ * (ISO/IEC 9899:201x). Only some macros from the specification are
+ * implemented.
+ */
+
+#ifndef LIBC_arm32_INTTYPES_H_
+#define LIBC_arm32_INTTYPES_H_
+
+#define PRId8 "d"
+#define PRId16 "d"
+#define PRId32 "d"
+#define PRId64 "lld"
+#define PRIdPTR "d"
+
+#define PRIo8 "o"
+#define PRIo16 "o"
+#define PRIo32 "o"
+#define PRIo64 "llo"
+#define PRIoPTR "o"
+
+#define PRIu8 "u"
+#define PRIu16 "u"
+#define PRIu32 "u"
+#define PRIu64 "llu"
+#define PRIuPTR "u"
+
+#define PRIx8 "x"
+#define PRIx16 "x"
+#define PRIx32 "x"
+#define PRIx64 "llx"
+#define PRIxPTR "x"
+
+#define PRIX8 "X"
+#define PRIX16 "X"
+#define PRIX32 "X"
+#define PRIX64 "llX"
+#define PRIXPTR "X"
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/libc/arch/ia32/include/inttypes.h
===================================================================
--- uspace/lib/libc/arch/ia32/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
+++ uspace/lib/libc/arch/ia32/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2010 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libcia32
+ * @{
+ */
+/** @file Macros for format specifiers.
+ *
+ * Macros for formatting stdint types as specified in section
+ * 7.8.1 Macros for format specifiers of the C99 draft specification
+ * (ISO/IEC 9899:201x). Only some macros from the specification are
+ * implemented.
+ */
+
+#ifndef LIBC_ia32_INTTYPES_H_
+#define LIBC_ia32_INTTYPES_H_
+
+#define PRId8 "d"
+#define PRId16 "d"
+#define PRId32 "d"
+#define PRId64 "lld"
+#define PRIdPTR "d"
+
+#define PRIo8 "o"
+#define PRIo16 "o"
+#define PRIo32 "o"
+#define PRIo64 "llo"
+#define PRIoPTR "o"
+
+#define PRIu8 "u"
+#define PRIu16 "u"
+#define PRIu32 "u"
+#define PRIu64 "llu"
+#define PRIuPTR "u"
+
+#define PRIx8 "x"
+#define PRIx16 "x"
+#define PRIx32 "x"
+#define PRIx64 "llx"
+#define PRIxPTR "x"
+
+#define PRIX8 "X"
+#define PRIX16 "X"
+#define PRIX32 "X"
+#define PRIX64 "llX"
+#define PRIXPTR "X"
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/libc/arch/ia64/include/inttypes.h
===================================================================
--- uspace/lib/libc/arch/ia64/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
+++ uspace/lib/libc/arch/ia64/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2010 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libia64
+ * @{
+ */
+/** @file Macros for format specifiers.
+ *
+ * Macros for formatting stdint types as specified in section
+ * 7.8.1 Macros for format specifiers of the C99 draft specification
+ * (ISO/IEC 9899:201x). Only some macros from the specification are
+ * implemented.
+ */
+
+#ifndef LIBC_ia64_INTTYPES_H_
+#define LIBC_ia64_INTTYPES_H_
+
+#define PRId8 "d"
+#define PRId16 "d"
+#define PRId32 "d"
+#define PRId64 "ld"
+#define PRIdPTR "ld"
+
+#define PRIo8 "o"
+#define PRIo16 "o"
+#define PRIo32 "o"
+#define PRIo64 "lo"
+#define PRIoPTR "lo"
+
+#define PRIu8 "u"
+#define PRIu16 "u"
+#define PRIu32 "u"
+#define PRIu64 "lu"
+#define PRIuPTR "lu"
+
+#define PRIx8 "x"
+#define PRIx16 "x"
+#define PRIx32 "x"
+#define PRIx64 "lx"
+#define PRIxPTR "lx"
+
+#define PRIX8 "X"
+#define PRIX16 "X"
+#define PRIX32 "X"
+#define PRIX64 "lX"
+#define PRIXPTR "lX"
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/libc/arch/mips32/include/inttypes.h
===================================================================
--- uspace/lib/libc/arch/mips32/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
+++ uspace/lib/libc/arch/mips32/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2010 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libcmips32
+ * @{
+ */
+/** @file Macros for format specifiers.
+ *
+ * Macros for formatting stdint types as specified in section
+ * 7.8.1 Macros for format specifiers of the C99 draft specification
+ * (ISO/IEC 9899:201x). Only some macros from the specification are
+ * implemented.
+ */
+
+#ifndef LIBC_mips32_INTTYPES_H_
+#define LIBC_mips32_INTTYPES_H_
+
+#define PRId8 "d"
+#define PRId16 "d"
+#define PRId32 "d"
+#define PRId64 "lld"
+#define PRIdPTR "d"
+
+#define PRIo8 "o"
+#define PRIo16 "o"
+#define PRIo32 "o"
+#define PRIo64 "llo"
+#define PRIoPTR "o"
+
+#define PRIu8 "u"
+#define PRIu16 "u"
+#define PRIu32 "u"
+#define PRIu64 "llu"
+#define PRIuPTR "u"
+
+#define PRIx8 "x"
+#define PRIx16 "x"
+#define PRIx32 "x"
+#define PRIx64 "llx"
+#define PRIxPTR "x"
+
+#define PRIX8 "X"
+#define PRIX16 "X"
+#define PRIX32 "X"
+#define PRIX64 "llX"
+#define PRIXPTR "x"
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/libc/arch/mips32eb/include/inttypes.h
===================================================================
--- uspace/lib/libc/arch/mips32eb/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
+++ uspace/lib/libc/arch/mips32eb/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -0,0 +1,1 @@
+../../mips32/include/inttypes.h
Index: uspace/lib/libc/arch/ppc32/include/inttypes.h
===================================================================
--- uspace/lib/libc/arch/ppc32/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
+++ uspace/lib/libc/arch/ppc32/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2010 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libcppc32
+ * @{
+ */
+/** @file Macros for format specifiers.
+ *
+ * Macros for formatting stdint types as specified in section
+ * 7.8.1 Macros for format specifiers of the C99 draft specification
+ * (ISO/IEC 9899:201x). Only some macros from the specification are
+ * implemented.
+ */
+
+#ifndef LIBC_ppc32_INTTYPES_H_
+#define LIBC_ppc32_INTTYPES_H_
+
+#define PRId8 "d"
+#define PRId16 "d"
+#define PRId32 "d"
+#define PRId64 "lld"
+#define PRIdPTR "d"
+
+#define PRIo8 "o"
+#define PRIo16 "o"
+#define PRIo32 "o"
+#define PRIo64 "llo"
+#define PRIoPTR "o"
+
+#define PRIu8 "u"
+#define PRIu16 "u"
+#define PRIu32 "u"
+#define PRIu64 "llu"
+#define PRIuPTR "u"
+
+#define PRIx8 "x"
+#define PRIx16 "x"
+#define PRIx32 "x"
+#define PRIx64 "llx"
+#define PRIxPTR "x"
+
+#define PRIX8 "X"
+#define PRIX16 "X"
+#define PRIX32 "X"
+#define PRIX64 "llX"
+#define PRIXPTR "X"
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/libc/arch/sparc64/include/inttypes.h
===================================================================
--- uspace/lib/libc/arch/sparc64/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
+++ uspace/lib/libc/arch/sparc64/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2010 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libcsparc64
+ * @{
+ */
+/** @file Macros for format specifiers.
+ *
+ * Macros for formatting stdint types as specified in section
+ * 7.8.1 Macros for format specifiers of the C99 draft specification
+ * (ISO/IEC 9899:201x). Only some macros from the specification are
+ * implemented.
+ */
+
+#ifndef LIBC_sparc64_INTTYPES_H_
+#define LIBC_sparc64_INTTYPES_H_
+
+#define PRId8 "d"
+#define PRId16 "d"
+#define PRId32 "d"
+#define PRId64 "lld"
+#define PRIdPTR "lld"
+
+#define PRIo8 "o"
+#define PRIo16 "o"
+#define PRIo32 "o"
+#define PRIo64 "llo"
+#define PRIoPTR "llo"
+
+#define PRIu8 "u"
+#define PRIu16 "u"
+#define PRIu32 "u"
+#define PRIu64 "llu"
+#define PRIuPTR "llu"
+
+#define PRIx8 "x"
+#define PRIx16 "x"
+#define PRIx32 "x"
+#define PRIx64 "llx"
+#define PRIxPTR "llx"
+
+#define PRIX8 "X"
+#define PRIX16 "X"
+#define PRIX32 "X"
+#define PRIX64 "llX"
+#define PRIXPTR "llX"
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/libc/include/inttypes.h
===================================================================
--- uspace/lib/libc/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
+++ uspace/lib/libc/include/inttypes.h	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2010 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_INTTYPES_H_
+#define LIBC_INTTYPES_H_
+
+#include <libarch/inttypes.h>
+
+#endif
+
+/** @}
+ */
Index: uspace/srv/bd/ata_bd/ata_bd.c
===================================================================
--- uspace/srv/bd/ata_bd/ata_bd.c	(revision b79d450c48dd4e1488486327295df7c5c51e93b7)
+++ uspace/srv/bd/ata_bd/ata_bd.c	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -59,4 +59,5 @@
 #include <devmap.h>
 #include <sys/types.h>
+#include <inttypes.h>
 #include <errno.h>
 #include <bool.h>
@@ -112,5 +113,5 @@
 	printf(NAME ": ATA disk driver\n");
 
-	printf("I/O address 0x%p/0x%p\n", ctl_physical, cmd_physical);
+	printf("I/O address %p/%p\n", ctl_physical, cmd_physical);
 
 	if (ata_bd_init() != EOK)
@@ -180,9 +181,9 @@
 	}
 
-	printf(" %llu blocks", d->blocks, d->blocks / (2 * 1024));
+	printf(" %" PRIu64 " blocks", d->blocks, d->blocks / (2 * 1024));
 
 	mbytes = d->blocks / (2 * 1024);
 	if (mbytes > 0)
-		printf(" %llu MB.", mbytes);
+		printf(" %" PRIu64 " MB.", mbytes);
 
 	printf("\n");
Index: uspace/srv/bd/part/guid_part/guid_part.c
===================================================================
--- uspace/srv/bd/part/guid_part/guid_part.c	(revision b79d450c48dd4e1488486327295df7c5c51e93b7)
+++ uspace/srv/bd/part/guid_part/guid_part.c	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -54,4 +54,5 @@
 #include <devmap.h>
 #include <sys/types.h>
+#include <inttypes.h>
 #include <libblock.h>
 #include <devmap.h>
@@ -196,6 +197,6 @@
 		size_mb = (part->length * block_size + 1024 * 1024 - 1)
 		    / (1024 * 1024);
-		printf(NAME ": Registered device %s: %llu blocks %llu MB.\n",
-		    name, part->length, size_mb);
+		printf(NAME ": Registered device %s: %" PRIu64 " blocks "
+		    "%" PRIu64 " MB.\n", name, (uint64_t) part->length, size_mb);
 
 		part->dev = dev;
Index: uspace/srv/bd/part/mbr_part/mbr_part.c
===================================================================
--- uspace/srv/bd/part/mbr_part/mbr_part.c	(revision b79d450c48dd4e1488486327295df7c5c51e93b7)
+++ uspace/srv/bd/part/mbr_part/mbr_part.c	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -64,4 +64,5 @@
 #include <devmap.h>
 #include <sys/types.h>
+#include <inttypes.h>
 #include <libblock.h>
 #include <devmap.h>
@@ -247,6 +248,7 @@
 		size_mb = (part->length * block_size + 1024 * 1024 - 1)
 		    / (1024 * 1024);
-		printf(NAME ": Registered device %s: %llu blocks %llu MB.\n",
-		    name, part->length, size_mb);
+		printf(NAME ": Registered device %s: %" PRIu64 " blocks "
+		    "%" PRIu64 " MB.\n",
+		    name, (uint64_t) part->length, size_mb);
 
 		part->dev = dev;
@@ -274,5 +276,5 @@
 	if (brb == NULL) {
 		printf(NAME ": Failed allocating memory.\n");
-		return ENOMEM;	
+		return ENOMEM;
 	}
 
@@ -289,5 +291,6 @@
 	sgn = uint16_t_le2host(brb->signature);
 	if (sgn != BR_SIGNATURE) {
-		printf(NAME ": Invalid boot record signature 0x%04X.\n", sgn);
+		printf(NAME ": Invalid boot record signature 0x%04" PRIX16
+		    ".\n", sgn);
 		return EINVAL;
 	}
@@ -339,6 +342,6 @@
 		sgn = uint16_t_le2host(brb->signature);
 		if (sgn != BR_SIGNATURE) {
-			printf(NAME ": Invalid boot record signature 0x%04X "
-			    " in EBR at %u.\n", sgn, ba);
+			printf(NAME ": Invalid boot record signature 0x%04"
+			    PRIX16 " in EBR at %" PRIu32 ".\n", sgn, ba);
 			return EINVAL;
 		}
Index: uspace/srv/loader/elf_load.c
===================================================================
--- uspace/srv/loader/elf_load.c	(revision b79d450c48dd4e1488486327295df7c5c51e93b7)
+++ uspace/srv/loader/elf_load.c	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -342,6 +342,6 @@
 	seg_ptr = (void *) seg_addr;
 
-	DPRINTF("Load segment at addr 0x%x, size 0x%x\n", seg_addr,
-		entry->p_memsz);	
+	DPRINTF("Load segment at addr %p, size 0x%x\n", seg_addr,
+		entry->p_memsz);
 
 	if (entry->p_align > 1) {
@@ -370,5 +370,5 @@
 	mem_sz = entry->p_memsz + (entry->p_vaddr - base);
 
-	DPRINTF("Map to seg_addr=0x%x-0x%x.\n", seg_addr,
+	DPRINTF("Map to seg_addr=%p-%p.\n", seg_addr,
 	entry->p_vaddr + bias + ALIGN_UP(entry->p_memsz, PAGE_SIZE));
 
@@ -384,5 +384,5 @@
 	}
 
-	DPRINTF("as_area_create(0x%lx, 0x%x, %d) -> 0x%lx\n",
+	DPRINTF("as_area_create(%p, 0x%x, %d) -> 0x%lx\n",
 		base + bias, mem_sz, flags, (uintptr_t)a);
 
@@ -461,5 +461,5 @@
 		elf->info->dynamic =
 		    (void *)((uint8_t *)entry->sh_addr + elf->bias);
-		DPRINTF("Dynamic section found at 0x%x.\n",
+		DPRINTF("Dynamic section found at %p.\n",
 			(uintptr_t)elf->info->dynamic);
 		break;
Index: uspace/srv/loader/main.c
===================================================================
--- uspace/srv/loader/main.c	(revision b79d450c48dd4e1488486327295df7c5c51e93b7)
+++ uspace/srv/loader/main.c	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -392,5 +392,5 @@
 		/* Dynamically linked program */
 		DPRINTF("Run ELF interpreter.\n");
-		DPRINTF("Entry point: 0x%lx\n", interp_info.entry);
+		DPRINTF("Entry point: %p\n", interp_info.entry);
 		
 		ipc_answer_0(rid, EOK);
Index: uspace/srv/taskmon/taskmon.c
===================================================================
--- uspace/srv/taskmon/taskmon.c	(revision b79d450c48dd4e1488486327295df7c5c51e93b7)
+++ uspace/srv/taskmon/taskmon.c	(revision fb6f1a5becf4ed481c7d009a226723cae1c82b9d)
@@ -70,5 +70,5 @@
 	}
 
-	printf(NAME ": Task %lld fault in thread 0x%lx.\n", taskid, thread);
+	printf(NAME ": Task %lld fault in thread %p.\n", taskid, thread);
 
 #ifdef CONFIG_VERBOSE_DUMPS
