Index: uspace/lib/c/generic/ipc.c
===================================================================
--- uspace/lib/c/generic/ipc.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/ipc.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -93,5 +93,5 @@
  * @param call     Structure returned by ipc_prepare_async().
  */
-static inline void ipc_finish_async(int rc, async_call_t *call)
+static inline void ipc_finish_async(errno_t rc, async_call_t *call)
 {
 	if (!call) {
@@ -136,5 +136,5 @@
 		return;
 	
-	int rc = (int) __SYSCALL6(SYS_IPC_CALL_ASYNC_FAST, phandle, imethod, arg1,
+	errno_t rc = (errno_t) __SYSCALL6(SYS_IPC_CALL_ASYNC_FAST, phandle, imethod, arg1,
 	    arg2, arg3, (sysarg_t) call);
 	
@@ -175,5 +175,5 @@
 	IPC_SET_ARG5(call->msg.data, arg5);
 	
-	int rc = (int) __SYSCALL3(SYS_IPC_CALL_ASYNC_SLOW, phandle,
+	errno_t rc = (errno_t) __SYSCALL3(SYS_IPC_CALL_ASYNC_SLOW, phandle,
 	    (sysarg_t) &call->msg.data, (sysarg_t) call);
 	
@@ -197,8 +197,8 @@
  *
  */
-int ipc_answer_fast(cap_handle_t chandle, int retval, sysarg_t arg1,
+errno_t ipc_answer_fast(cap_handle_t chandle, errno_t retval, sysarg_t arg1,
     sysarg_t arg2, sysarg_t arg3, sysarg_t arg4)
 {
-	return (int) __SYSCALL6(SYS_IPC_ANSWER_FAST, chandle, (sysarg_t) retval, arg1, arg2,
+	return (errno_t) __SYSCALL6(SYS_IPC_ANSWER_FAST, chandle, (sysarg_t) retval, arg1, arg2,
 	    arg3, arg4);
 }
@@ -218,5 +218,5 @@
  *
  */
-int ipc_answer_slow(cap_handle_t chandle, int retval, sysarg_t arg1,
+errno_t ipc_answer_slow(cap_handle_t chandle, errno_t retval, sysarg_t arg1,
     sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5)
 {
@@ -230,5 +230,5 @@
 	IPC_SET_ARG5(data, arg5);
 	
-	return (int) __SYSCALL2(SYS_IPC_ANSWER_SLOW, chandle, (sysarg_t) &data);
+	return (errno_t) __SYSCALL2(SYS_IPC_ANSWER_SLOW, chandle, (sysarg_t) &data);
 }
 
@@ -258,7 +258,7 @@
  * @return  Error code.
  */
-int ipc_wait_cycle(ipc_call_t *call, sysarg_t usec, unsigned int flags)
-{
-	int rc = (int) __SYSCALL3(SYS_IPC_WAIT, (sysarg_t) call, usec, flags);
+errno_t ipc_wait_cycle(ipc_call_t *call, sysarg_t usec, unsigned int flags)
+{
+	errno_t rc = (errno_t) __SYSCALL3(SYS_IPC_WAIT, (sysarg_t) call, usec, flags);
 	
 	/* Handle received answers */
@@ -289,7 +289,7 @@
  *
  */
-int ipc_wait_for_call_timeout(ipc_call_t *call, sysarg_t usec)
-{
-	int rc;
+errno_t ipc_wait_for_call_timeout(ipc_call_t *call, sysarg_t usec)
+{
+	errno_t rc;
 	
 	do {
@@ -309,7 +309,7 @@
  *
  */
-int ipc_trywait_for_call(ipc_call_t *call)
-{
-	int rc;
+errno_t ipc_trywait_for_call(ipc_call_t *call)
+{
+	errno_t rc;
 	
 	do {
@@ -328,7 +328,7 @@
  *
  */
-int ipc_hangup(cap_handle_t phandle)
-{
-	return (int) __SYSCALL1(SYS_IPC_HANGUP, phandle);
+errno_t ipc_hangup(cap_handle_t phandle)
+{
+	return (errno_t) __SYSCALL1(SYS_IPC_HANGUP, phandle);
 }
 
@@ -350,12 +350,12 @@
  *
  */
-int ipc_forward_fast(cap_handle_t chandle, cap_handle_t phandle,
+errno_t ipc_forward_fast(cap_handle_t chandle, cap_handle_t phandle,
     sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, unsigned int mode)
 {
-	return (int) __SYSCALL6(SYS_IPC_FORWARD_FAST, chandle, phandle, imethod, arg1,
+	return (errno_t) __SYSCALL6(SYS_IPC_FORWARD_FAST, chandle, phandle, imethod, arg1,
 	    arg2, mode);
 }
 
-int ipc_forward_slow(cap_handle_t chandle, cap_handle_t phandle,
+errno_t ipc_forward_slow(cap_handle_t chandle, cap_handle_t phandle,
     sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3,
     sysarg_t arg4, sysarg_t arg5, unsigned int mode)
@@ -370,5 +370,5 @@
 	IPC_SET_ARG5(data, arg5);
 	
-	return (int) __SYSCALL4(SYS_IPC_FORWARD_SLOW, chandle, phandle,
+	return (errno_t) __SYSCALL4(SYS_IPC_FORWARD_SLOW, chandle, phandle,
 	    (sysarg_t) &data, mode);
 }
@@ -377,7 +377,7 @@
  *
  */
-int ipc_connect_kbox(task_id_t id, cap_handle_t *phone)
-{
-	return (int) __SYSCALL2(SYS_IPC_CONNECT_KBOX, (sysarg_t) &id, (sysarg_t) phone);
+errno_t ipc_connect_kbox(task_id_t id, cap_handle_t *phone)
+{
+	return (errno_t) __SYSCALL2(SYS_IPC_CONNECT_KBOX, (sysarg_t) &id, (sysarg_t) phone);
 }
 
