readlink
========

POSIX specification: http://www.opengroup.org/onlinepubs/9699919799/functions/readlink.html

Gnulib module: readlink

Portability problems fixed by Gnulib:

  * Some platforms mistakenly succeed on readlink("link/",buf,len): Solaris 9.

  * On some platforms, readlink returns int instead of ssize_t: FreeBSD 6.0, OpenBSD 3.8, Cygwin 1.5.x.

  * This function is missing on some platforms: mingw.

Portability problems not fixed by Gnulib:

  * When readlink is called on a directory: In the case of NFS mounted directories, Cygwin sets errno to ENOENT or EIO instead of EINVAL.  To avoid this problem, check for a directory before calling readlink.

  * When readlink is called on a file that is not a symbolic link: Irix may set errno to ENXIO instead of EINVAL.  Cygwin may set errno to EACCES instead of EINVAL.