Index: abi/include/abi/errno.in
===================================================================
--- abi/include/abi/errno.in	(revision 10de84286f36c6e4f3f92d59c073639668ffe9a1)
+++ abi/include/abi/errno.in	(revision 0d0b3197a149bb5e5c53d21136df5b8c283cdc4a)
@@ -1,43 +1,114 @@
 __errno_entry(EOK            ,      0, "No error")
-__errno_entry(ENOENT         ,     -1, "No such entry")
-__errno_entry(ENOMEM         ,     -2, "Not enough memory")
-__errno_entry(ELIMIT         ,     -3, "Limit exceeded")
-__errno_entry(EREFUSED       ,     -4, "Connection refused")
-__errno_entry(EFORWARD       ,     -5, "Forwarding error")
-__errno_entry(EPERM          ,     -6, "Permission denied")
-__errno_entry(EHANGUP        ,     -7, "Answerbox closed connection")
-__errno_entry(EPARTY         ,     -8, "Other party encountered an error")
-__errno_entry(EEXIST         ,     -9, "Entry already exists")
-__errno_entry(EBADMEM        ,    -10, "Bad memory pointer")
-__errno_entry(ENOTSUP        ,    -11, "Operation not supported")
-__errno_entry(EADDRNOTAVAIL  ,    -12, "Address not available")
-__errno_entry(ETIMEOUT       ,    -13, "Timeout expired")
-__errno_entry(EINVAL         ,    -14, "Invalid value")
-__errno_entry(EBUSY          ,    -15, "Resource is busy")
-__errno_entry(EOVERFLOW      ,    -16, "Result does not fit its size")
-__errno_entry(EINTR          ,    -17, "Operation interrupted")
-__errno_entry(EMFILE         ,    -18, "Too many open files")
-__errno_entry(ENAMETOOLONG   ,   -256, "Name is too long")
-__errno_entry(EISDIR         ,   -257, "Entry is a directory")
-__errno_entry(ENOTDIR        ,   -258, "Entry is not a directory")
-__errno_entry(ENOSPC         ,   -259, "No space left")
-__errno_entry(ENOTEMPTY      ,   -261, "Directory is not empty")
-__errno_entry(EBADF          ,   -262, "Bad object handle")
-__errno_entry(EDOM           ,   -263, "Domain error")
-__errno_entry(ERANGE         ,   -264, "Value out of range")
-__errno_entry(EXDEV          ,   -265, "Prohibited cross-device link")
-__errno_entry(EIO            ,   -266, "Input/output error")
-__errno_entry(EMLINK         ,   -267, "Too many links")
-__errno_entry(ENXIO          ,   -268, "Device or address does not exist")
-__errno_entry(ENOFS          ,   -269, "No such file system type")
-__errno_entry(EBADCHECKSUM   ,   -300, "Bad checksum")
-__errno_entry(ESTALL         ,   -301, "USB: Operation stalled")
-__errno_entry(EEMPTY         ,   -302, "Resource is empty")
-__errno_entry(ENAK           ,   -303, "Negative acknowledgement")
-__errno_entry(EAGAIN         , -11002, "Operation could not proceed, try again")
+__errno_entry(ENOENT         ,      1, "No such entry")
+__errno_entry(ENOMEM         ,      2, "Not enough memory")
+__errno_entry(ELIMIT         ,      3, "Limit exceeded")
+__errno_entry(EREFUSED       ,      4, "Connection refused")
+__errno_entry(EFORWARD       ,      5, "Forwarding error")
+__errno_entry(EPERM          ,      6, "Permission denied")
+__errno_entry(EHANGUP        ,      7, "Answerbox closed connection")
+__errno_entry(EPARTY         ,      8, "Other party encountered an error")
+__errno_entry(EEXIST         ,      9, "Entry already exists")
+__errno_entry(EBADMEM        ,     10, "Bad memory pointer")
+__errno_entry(ENOTSUP        ,     11, "Operation not supported")
+__errno_entry(EADDRNOTAVAIL  ,     12, "Address not available")
+__errno_entry(ETIMEOUT       ,     13, "Timeout expired")
+__errno_entry(EINVAL         ,     14, "Invalid value")
+__errno_entry(EBUSY          ,     15, "Resource is busy")
+__errno_entry(EOVERFLOW      ,     16, "Result does not fit its size")
+__errno_entry(EINTR          ,     17, "Operation interrupted")
+__errno_entry(EMFILE         ,     18, "Too many open files")
+__errno_entry(ENAMETOOLONG   ,     19, "Name is too long")
+__errno_entry(EISDIR         ,     20, "Entry is a directory")
+__errno_entry(ENOTDIR        ,     21, "Entry is not a directory")
+__errno_entry(ENOSPC         ,     22, "No space left")
+__errno_entry(ENOTEMPTY      ,     23, "Directory is not empty")
+__errno_entry(EBADF          ,     24, "Bad object handle")
+__errno_entry(EDOM           ,     25, "Mathematics argument out of domain of function")
+__errno_entry(ERANGE         ,     26, "Value out of range")
+__errno_entry(EXDEV          ,     27, "Prohibited cross-device link")
+__errno_entry(EIO            ,     28, "Input/output error")
+__errno_entry(EMLINK         ,     29, "Too many links")
+__errno_entry(ENXIO          ,     30, "Device or address does not exist")
+__errno_entry(ENOFS          ,     31, "No such file system type")
+__errno_entry(EBADCHECKSUM   ,     32, "Bad checksum")
+__errno_entry(ESTALL         ,     33, "USB: Operation stalled")
+__errno_entry(EEMPTY         ,     34, "Resource is empty")
+__errno_entry(ENAK           ,     35, "Negative acknowledgement")
+__errno_entry(EAGAIN         ,     36, "Operation could not proceed, try again")
 
-__errno_entry(HTTP_EMULTIPLE_HEADERS , -20001, "HTTP: Multiple headers")  // libhttp error codes. Defining them here is a temporary hack.
-__errno_entry(HTTP_EMISSING_HEADER   , -20002, "HTTP: Missing header")
-__errno_entry(HTTP_EPARSE            , -20003, "HTTP: Parse error")
+/* libhttp error codes. Defining them here is a temporary hack. */
 
-__errno_entry(EXT4_ERR_BAD_DX_DIR    , -75000, "EXT4: Filesystem corrupted")  // libext4
+__errno_entry(HTTP_EMULTIPLE_HEADERS ,  50, "HTTP: Multiple headers")
+__errno_entry(HTTP_EMISSING_HEADER   ,  51, "HTTP: Missing header")
+__errno_entry(HTTP_EPARSE            ,  52, "HTTP: Parse error")
+
+/* libext4 error codes. Same as above. */
+
+__errno_entry(EXT4_ERR_BAD_DX_DIR    ,  60, "EXT4: Filesystem corrupted")
+
+
+/* POSIX error codes + whatever nonstandard names crop up in third-party
+ * software. These are not used in HelenOS code, but are defined here in
+ * order to avoid nasty hacks in libposix.
+ *
+ * If you decide to use one of these in native HelenOS code,
+ * move it up to the first group.
+ */
+
+__errno_entry(E2BIG            ,  101, "Argument list too long")
+__errno_entry(EACCES           ,  102, "Permission denied")
+__errno_entry(EADDRINUSE       ,  103, "Address in use")
+__errno_entry(EAFNOSUPPORT     ,  105, "Address family not supported")
+__errno_entry(EALREADY         ,  107, "Connection already in progress")
+__errno_entry(EBADMSG          ,  109, "Bad message")
+__errno_entry(ECANCELED        ,  111, "Operation canceled")
+__errno_entry(ECHILD           ,  112, "No child processes")
+__errno_entry(ECONNABORTED     ,  113, "Connection aborted")
+__errno_entry(ECONNREFUSED     ,  114, "Connection refused")
+__errno_entry(ECONNRESET       ,  115, "Connection reset")
+__errno_entry(EDEADLK          ,  116, "Resource deadlock would occur")
+__errno_entry(EDESTADDRREQ     ,  117, "Destination address required")
+__errno_entry(EDQUOT           ,  119, "Reserved")
+__errno_entry(EFAULT           ,  121, "Bad address")
+__errno_entry(EFBIG            ,  122, "File too large")
+__errno_entry(EHOSTUNREACH     ,  123, "Host is unreachable")
+__errno_entry(EIDRM            ,  124, "Identifier removed")
+__errno_entry(EILSEQ           ,  125, "Illegal byte sequence")
+__errno_entry(EINPROGRESS      ,  126, "Operation in progress")
+__errno_entry(EISCONN          ,  130, "Socket is connected")
+__errno_entry(ELOOP            ,  132, "Too many levels of symbolic links")
+__errno_entry(EMSGSIZE         ,  135, "Message too large")
+__errno_entry(EMULTIHOP        ,  136, "Reserved")
+__errno_entry(ENETDOWN         ,  138, "Network is down")
+__errno_entry(ENETRESET        ,  139, "Connection aborted by network")
+__errno_entry(ENETUNREACH      ,  140, "Network unreachable")
+__errno_entry(ENFILE           ,  141, "Too many files open in system")
+__errno_entry(ENOBUFS          ,  142, "No buffer space available")
+__errno_entry(ENODATA          ,  143, "No message is available on the STREAM head read queue")
+__errno_entry(ENODEV           ,  144, "No such device")
+__errno_entry(ENOEXEC          ,  146, "Executable file format error")
+__errno_entry(ENOLCK           ,  147, "No locks available")
+__errno_entry(ENOLINK          ,  148, "Reserved")
+__errno_entry(ENOMSG           ,  150, "No message of the desired type")
+__errno_entry(ENOPROTOOPT      ,  151, "Protocol not available")
+__errno_entry(ENOSR            ,  153, "No STREAM resources.")
+__errno_entry(ENOSTR           ,  154, "Not a STREAM")
+__errno_entry(ENOSYS           ,  155, "Function not supported")
+__errno_entry(ENOTCONN         ,  156, "The socket is not connected")
+__errno_entry(ENOTRECOVERABLE  ,  159, "State not recoverable")
+__errno_entry(ENOTSOCK         ,  160, "Not a socket")
+__errno_entry(ENOTTY           ,  162, "Inappropriate I/O control operation")
+__errno_entry(EOPNOTSUPP       ,  164, "Operation not supported")
+__errno_entry(EOWNERDEAD       ,  166, "Previous owned died")
+__errno_entry(EPIPE            ,  168, "Broken pipe")
+__errno_entry(EPROTO           ,  169, "Protocol error")
+__errno_entry(EPROTONOSUPPORT  ,  170, "Protocol not supported")
+__errno_entry(EPROTOTYPE       ,  171, "Protocol wrong type for socket")
+__errno_entry(EROFS            ,  173, "Read-only file system")
+__errno_entry(ESPIPE           ,  174, "Invalid seek")
+__errno_entry(ESRCH            ,  175, "No such process")
+__errno_entry(ESTALE           ,  176, "Reserved")
+__errno_entry(ETIME            ,  177, "Stream ioctl() timeout")
+__errno_entry(ETIMEDOUT        ,  178, "Connection timed out")
+__errno_entry(ETXTBSY          ,  179, "Text file busy")
+__errno_entry(EWOULDBLOCK      ,  180, "Operation would block")
