Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset ec18957a in mainline for uspace/lib/posix/string.c


Ignore:
Timestamp:
2011-07-08T00:54:24Z (11 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master
Children:
9c1984f
Parents:
3f466c33
Message:

Added errno.h (see commentary inside).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/string.c

    r3f466c33 rec18957a  
    510510char *posix_strerror(int errnum)
    511511{
    512         /* uses function from libc, we just have to negate errno
    513          * (POSIX uses positive errorcodes, HelenOS has negative)
     512        /* Uses function from libc, we just have to negate errno
     513         * (POSIX uses positive errorcodes, HelenOS has negative).
    514514         */
    515         return (char *) str_error(-errnum);
     515        // FIXME: not all POSIX error codes are in libc
     516        return (char *) str_error(-posix_abs(errnum));
    516517}
    517518
Note: See TracChangeset for help on using the changeset viewer.