readlink: detect FreeBSD bug
authorEric Blake <ebb9@byu.net>
Wed, 11 Nov 2009 13:34:02 +0000 (06:34 -0700)
committerEric Blake <ebb9@byu.net>
Wed, 11 Nov 2009 13:34:02 +0000 (06:34 -0700)
commitdfd4d11c50dd4729bf46c26a3bbdda0c6031409d
treef5c31bfeca49a0ccd1d1e5b27bf89f73ad5fc14a
parent24a6037afaa234252b05719df819e6645ec92697
readlink: detect FreeBSD bug

readlink("link-to-symlink/",buf,len) mistakenly read the contents
of "symlink", rather than failing.

* m4/readlink.m4 (gl_FUNC_READLINK): Also detect FreeBSD bug with
slash on symlink.
* doc/posix-functions/readlink.texi (readlink): Document the bug.
* tests/test-readlink.h (test_readlink): Enhance test.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
doc/posix-functions/readlink.texi
m4/readlink.m4
tests/test-readlink.h