Index: boot/genarch/src/multiplication.c
===================================================================
--- boot/genarch/src/multiplication.c	(revision 0e54b4a5733c2db7fa4803ceb19ce70c2d13f3aa)
+++ boot/genarch/src/multiplication.c	(revision 851f33aff2fffc3d825f1b8b525fdf9ad2b9cb53)
@@ -33,14 +33,10 @@
 
 #include <genarch/multiplication.h>
+#include <typedefs.h>
 
-/** Set 1 to return MAX_INT64 or MIN_INT64 on overflow */
+/** Set 1 to return INT64_MAX or INT64_MIN on overflow */
 #ifndef SOFTINT_CHECK_OF
-	#define SOFTINT_CHECK_OF 0
+	#define SOFTINT_CHECK_OF  0
 #endif
-
-#define MAX_UINT16  (0xFFFFu)
-#define MAX_UINT32  (0xFFFFFFFFu)
-#define MAX_INT64   (0x7FFFFFFFFFFFFFFFll)
-#define MIN_INT64   (0x8000000000000000ll)
 
 /** Multiply two integers and return long long as result.
@@ -51,7 +47,7 @@
 static unsigned long long mul(unsigned int a, unsigned int b) {
 	unsigned int a1 = a >> 16;
-	unsigned int a2 = a & MAX_UINT16;
+	unsigned int a2 = a & UINT16_MAX;
 	unsigned int b1 = b >> 16;
-	unsigned int b2 = b & MAX_UINT16;
+	unsigned int b2 = b & UINT16_MAX;
 	
 	unsigned long long t1 = a1 * b1;
@@ -85,10 +81,10 @@
 	unsigned long long b1 = b >> 32;
 	
-	unsigned long long a2 = a & (MAX_UINT32);
-	unsigned long long b2 = b & (MAX_UINT32);
+	unsigned long long a2 = a & (UINT32_MAX);
+	unsigned long long b2 = b & (UINT32_MAX);
 	
 	if (SOFTINT_CHECK_OF && (a1 != 0) && (b1 != 0)) {
 		/* Error (overflow) */
-		return (neg ? MIN_INT64 : MAX_INT64);
+		return (neg ? INT64_MIN : INT64_MAX);
 	}
 	
@@ -98,7 +94,7 @@
 	unsigned long long t1 = mul(a1, b2) + mul(b1, a2);
 	
-	if ((SOFTINT_CHECK_OF) && (t1 > MAX_UINT32)) {
+	if ((SOFTINT_CHECK_OF) && (t1 > UINT32_MAX)) {
 		/* Error (overflow) */
-		return (neg ? MIN_INT64 : MAX_INT64);
+		return (neg ? INT64_MIN : INT64_MAX);
 	}
 	
@@ -112,5 +108,5 @@
 	if ((SOFTINT_CHECK_OF) && ((t2 < t1) || (t2 & (1ull << 63)))) {
 		/* Error (overflow) */
-		return (neg ? MIN_INT64 : MAX_INT64);
+		return (neg ? INT64_MIN : INT64_MAX);
 	}
 	
Index: boot/generic/include/stdint.h
===================================================================
--- boot/generic/include/stdint.h	(revision 851f33aff2fffc3d825f1b8b525fdf9ad2b9cb53)
+++ boot/generic/include/stdint.h	(revision 851f33aff2fffc3d825f1b8b525fdf9ad2b9cb53)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2006 Josef Cejka
+ * 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.
+ */
+
+/** @file
+ */
+
+#ifndef BOOT_STDINT_H_
+#define BOOT_STDINT_H_
+
+#define INT8_MIN  (0x80)
+#define INT8_MAX  (0x7F)
+
+#define UINT8_MIN  (0u)
+#define UINT8_MAX  (0xFFu)
+
+#define INT16_MIN  (0x8000)
+#define INT16_MAX  (0x7FFF)
+
+#define UINT16_MIN  (0u)
+#define UINT16_MAX  (0xFFFFu)
+
+#define INT32_MIN  (0x80000000l)
+#define INT32_MAX  (0x7FFFFFFFl)
+
+#define UINT32_MIN  (0ul)
+#define UINT32_MAX  (0xFFFFFFFFul)
+
+#define INT64_MIN  (0x8000000000000000ll)
+#define INT64_MAX  (0x7FFFFFFFFFFFFFFFll)
+
+#define UINT64_MIN  (0ull)
+#define UINT64_MAX  (0xFFFFFFFFFFFFFFFFull)
+
+#endif
+
+/** @}
+ */
Index: boot/generic/include/typedefs.h
===================================================================
--- boot/generic/include/typedefs.h	(revision 0e54b4a5733c2db7fa4803ceb19ce70c2d13f3aa)
+++ boot/generic/include/typedefs.h	(revision 851f33aff2fffc3d825f1b8b525fdf9ad2b9cb53)
@@ -33,4 +33,5 @@
 #define BOOT_TYPEDEFS_H_
 
+#include <stdint.h>
 #include <arch/common.h>
 #include <arch/types.h>
