linkat: Make implementation robust against system behaviour variations.
authorBruno Haible <bruno@clisp.org>
Tue, 28 Dec 2010 11:18:54 +0000 (12:18 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 28 Dec 2010 11:18:54 +0000 (12:18 +0100)
commit37da693c0a2d4d84369d1910d258370ce65552ce
tree49375929b29526c2896f02f7ece8e242f58e3d3a
parentdb6d3e6221185974c47f3123caaa962d26901838
linkat: Make implementation robust against system behaviour variations.

* m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Define
LINK_FOLLOWS_SYMLINKS to -1 if it needs a runtime test in the Solaris
way, and to -2 if it needs a generic runtime test.
* lib/linkat.c (solaris_optimized_link_immediate,
solaris_optimized_link_follow): New functions.
* tests/test-linkat.c (EXPECT_LINK_HARDLINKS_SYMLINKS): New macro.
(check_same_link): Use it.
ChangeLog
lib/linkat.c
m4/link-follow.m4
tests/test-linkat.c