# HG changeset patch # User Eric Blake # Date 1252100422 21600 # Node ID 245de403ed193af1e6574681e16c1bfbf513faef # Parent 325a0b28c47e2321bb3dfa7d1d64bf9e22c8cbec link-follow: fix logic bug in prior patch * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Fix bug that reversed sense of yes and no in prior patch. Avoid confusing compilation failure with desired semantics. Signed-off-by: Eric Blake diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-09-04 Eric Blake + link-follow: fix logic bug in prior patch + * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Fix bug that + reversed sense of yes and no in prior patch. Avoid confusing + compilation failure with desired semantics. + link-follow: accomodate mingw and cross-compilation * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Rename... (gl_FUNC_LINK_FOLLOWS_SYMLINK): ...to this. Change diff --git a/m4/link-follow.m4 b/m4/link-follow.m4 --- a/m4/link-follow.m4 +++ b/m4/link-follow.m4 @@ -1,4 +1,4 @@ -# serial 13 +# serial 14 dnl Run a program to determine whether link(2) follows symlinks. dnl Set LINK_FOLLOWS_SYMLINKS accordingly. @@ -60,17 +60,17 @@ /* If the dev/inode of hard and file are the same, then the link call followed the symlink. */ - return SAME_INODE (sb_hard, sb_file) ? 0 : 1; + return SAME_INODE (sb_hard, sb_file) ? 1 : 0; } ]])], - [gl_cv_func_link_follows_symlink=yes], - [gl_cv_func_link_follows_symlink=no], + [gl_cv_func_link_follows_symlink=no], dnl GNU behavior + [gl_cv_func_link_follows_symlink=yes], dnl Followed link/compile failed [gl_cv_func_link_follows_symlink=unknown] dnl We're cross compiling. ) ]) case $gl_cv_func_link_follows_symlink in - yes) ;; - no) gl_link_follows_symlinks=1 ;; + yes) gl_link_follows_symlinks=1 ;; + no) ;; # already defaulted to 0 *) gl_link_follows_symlinks=-1 ;; esac fi