Index: uspace/lib/softint/generic/division.c
===================================================================
--- uspace/lib/softint/generic/division.c	(revision 5a6a42f4d0f7e33bc079117b49c6e2ad4840ea1c)
+++ uspace/lib/softint/generic/division.c	(revision 795448f8063376ee6a3c51df46d8ed2f4efaf83e)
@@ -188,4 +188,18 @@
 }
 
+int __divmodsi3(int a, int b, int *c)
+{
+	unsigned int rem;
+	int result = (int) divandmod32(ABSVAL(a), ABSVAL(b), &rem);
+	
+	if (SGN(a) == SGN(b)) {
+		*c = rem;
+		return result;
+	}
+	
+	*c = -rem;
+	return -result;
+}
+
 unsigned int __udivmodsi3(unsigned int a, unsigned int b,
     unsigned int *c)
@@ -194,4 +208,18 @@
 }
 
+long long __divmoddi3(long long a, long long b, long long *c)
+{
+	unsigned long long rem;
+	long long result = (int) divandmod64(ABSVAL(a), ABSVAL(b), &rem);
+	
+	if (SGN(a) == SGN(b)) {
+		*c = rem;
+		return result;
+	}
+	
+	*c = -rem;
+	return -result;
+}
+
 unsigned long long __udivmoddi3(unsigned long long a, unsigned long long b,
     unsigned long long *c)
Index: uspace/lib/softint/include/comparison.h
===================================================================
--- uspace/lib/softint/include/comparison.h	(revision 5a6a42f4d0f7e33bc079117b49c6e2ad4840ea1c)
+++ uspace/lib/softint/include/comparison.h	(revision 795448f8063376ee6a3c51df46d8ed2f4efaf83e)
@@ -38,8 +38,8 @@
 
 /* Signed comparison (a < b => 0, a == b => 1, a > b => 2). */
-int __cmpdi2 (long long a, long long b);
+extern int __cmpdi2(long long, long long);
 
 /* Unsigned comparison (a < b => 0, a == b => 1, a > b => 2). */
-int __ucmpdi2 (unsigned long long a, unsigned long long b);
+extern int __ucmpdi2(unsigned long long, unsigned long long);
 
 #endif
Index: uspace/lib/softint/include/division.h
===================================================================
--- uspace/lib/softint/include/division.h	(revision 5a6a42f4d0f7e33bc079117b49c6e2ad4840ea1c)
+++ uspace/lib/softint/include/division.h	(revision 795448f8063376ee6a3c51df46d8ed2f4efaf83e)
@@ -29,5 +29,5 @@
 /** @addtogroup softint
  * @{
- */ 
+ */
 /**
  * @file
@@ -49,5 +49,8 @@
 extern unsigned long long __umoddi3(unsigned long long, unsigned long long);
 
+extern int __divmodsi3(int, int, int *);
 extern unsigned int __udivmodsi3(unsigned int, unsigned int, unsigned int *);
+
+extern long long __divmoddi3(long long, long long, long long *);
 extern unsigned long long __udivmoddi3(unsigned long long, unsigned long long,
     unsigned long long *);
Index: uspace/lib/softint/include/lltype.h
===================================================================
--- uspace/lib/softint/include/lltype.h	(revision 5a6a42f4d0f7e33bc079117b49c6e2ad4840ea1c)
+++ uspace/lib/softint/include/lltype.h	(revision 795448f8063376ee6a3c51df46d8ed2f4efaf83e)
@@ -39,6 +39,6 @@
 #include <stdint.h>
 
-#define HALF_BIT_CNT (sizeof(int32_t) * sizeof(char))
-#define WHOLE_BIT_CNT (sizeof(int64_t) * sizeof(char))
+#define HALF_BIT_CNT   (sizeof(int32_t) * sizeof(char))
+#define WHOLE_BIT_CNT  (sizeof(int64_t) * sizeof(char))
 
 #ifdef __BE__
Index: uspace/lib/softint/include/multiplication.h
===================================================================
--- uspace/lib/softint/include/multiplication.h	(revision 5a6a42f4d0f7e33bc079117b49c6e2ad4840ea1c)
+++ uspace/lib/softint/include/multiplication.h	(revision 795448f8063376ee6a3c51df46d8ed2f4efaf83e)
@@ -29,5 +29,5 @@
 /** @addtogroup softint
  * @{
- */ 
+ */
 /**
  * @file
@@ -38,5 +38,5 @@
 
 /* 64 bit multiplication */
-long long __muldi3(long long a, long long b);
+extern long long __muldi3(long long, long long);
 
 #endif
Index: uspace/lib/softint/include/shift.h
===================================================================
--- uspace/lib/softint/include/shift.h	(revision 5a6a42f4d0f7e33bc079117b49c6e2ad4840ea1c)
+++ uspace/lib/softint/include/shift.h	(revision 795448f8063376ee6a3c51df46d8ed2f4efaf83e)
@@ -38,11 +38,11 @@
 
 /* Arithmetic/logical shift left. */
-long long __ashldi3 (long long val, int shift);
+extern long long __ashldi3(long long, int);
 
 /* Arithmetic shift right. */
-long long __ashrdi3 (long long val, int shift);
+extern long long __ashrdi3(long long, int);
 
 /* Logical shift right. */
-long long __lshrdi3 (long long val, int shift);
+extern long long __lshrdi3(long long, int);
 
 #endif
