* m4/linkat.m4 (gl_FUNC_LINKAT): The compile check for AT_SYMLINK_FOLLOW was rundundant for a few reasons. It was present to support compiling on new systems but running on the old narrow window of Linux 2.6.1[67]. It setup and cleaned up test files which weren't actually used. On non __linux__ it compile tested AT_SYMLINK_FOLLOW, but that is implicit in the following check. --- ChangeLog | 10 ++++++++++ m4/linkat.m4 | 21 +-------------------- 2 files changed, 11 insertions(+), 20 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 7676634..d49c69a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2014-10-31 Pádraig Brady <p...@draigbrady.com> + linkat: remove a redundant configure time check + * m4/linkat.m4 (gl_FUNC_LINKAT): The compile check for AT_SYMLINK_FOLLOW + was rundundant for a few reasons. It was present to support compiling + on new systems but running on the old narrow window of Linux 2.6.1[67]. + It setup and cleaned up test files which weren't actually used. + On non __linux__ it compile tested AT_SYMLINK_FOLLOW, but that is + implicit in the following check. + +2014-10-31 Pádraig Brady <p...@draigbrady.com> + linkat: replace on OS X 10.10 * m4/linkat.m4 (gl_FUNC_LINKAT): linkat() is available on Yosemite but not usable because it doesn't support creating hardlinks diff --git a/m4/linkat.m4 b/m4/linkat.m4 index c9463b1..50ce445 100644 --- a/m4/linkat.m4 +++ b/m4/linkat.m4 @@ -39,24 +39,6 @@ AC_DEFUN([gl_FUNC_LINKAT], [gl_cv_func_linkat_nofollow=no]) rm -rf conftest.l1 conftest.l2]) - AC_CACHE_CHECK([whether linkat(,AT_SYMLINK_FOLLOW) works], - [gl_cv_func_linkat_follow], - [rm -rf conftest.f1 conftest.f2 - touch conftest.f1 - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include <fcntl.h> -#include <unistd.h> -#ifdef __linux__ -/* Linux added linkat in 2.6.16, but did not add AT_SYMLINK_FOLLOW - until 2.6.18. Always replace linkat to support older kernels. */ -choke me -#endif -]], [return linkat (AT_FDCWD, "conftest.f1", AT_FDCWD, "conftest.f2", - AT_SYMLINK_FOLLOW);])], - [gl_cv_func_linkat_follow=yes], - [gl_cv_func_linkat_follow="need runtime check"]) - rm -rf conftest.f1 conftest.f2]) - AC_CACHE_CHECK([whether linkat handles trailing slash correctly], [gl_cv_func_linkat_slash], [rm -rf conftest.a conftest.b conftest.c conftest.d @@ -106,8 +88,7 @@ choke me *) gl_linkat_slash_bug=1 ;; esac - if test "$gl_cv_func_linkat_follow" != yes \ - || test "$gl_cv_func_linkat_nofollow" != yes \ + if test "$gl_cv_func_linkat_nofollow" != yes \ || test $gl_linkat_slash_bug = 1; then REPLACE_LINKAT=1 AC_DEFINE_UNQUOTED([LINKAT_TRAILING_SLASH_BUG], [$gl_linkat_slash_bug], -- 1.7.7.6