portability

  1. J

    C strerror_r best practices, POSIX vs GNU

    In many C programs, I have the need to convert an errno into a printable string. Since strerror is not thread-safe and perror only works with stderr, I resort to using strerror_r, see strerror_r. However, there are two different definitions of this function: int strerror_r(int errnum, char...
Back
Top