From 70f8dfe9abc726d786e13a202bb41a6cb5db95c0 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 20 May 2007 07:33:32 +0000 Subject: [PATCH] Fix buggy test for the fchownat-deref bug. * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling symlink required for the run-test. Without it, this test would always declare that fchownat doesn't work, and client code would unnecessarily use the replacement function with fixed libc. (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized. Reported by Greg Schafer. --- ChangeLog | 10 ++++++++++ m4/openat.m4 | 6 ++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c2803fafb..611a09ade 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-05-20 Jim Meyering + + Fix buggy test for the fchownat-deref bug. + * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling + symlink required for the run-test. Without it, this test would + always declare that fchownat doesn't work, and client code would + unnecessarily use the replacement function with fixed libc. + (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized. + Reported by Greg Schafer. + 2007-05-19 Bruno Haible * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro. diff --git a/m4/openat.m4 b/m4/openat.m4 index 30750579e..43f46d08b 100644 --- a/m4/openat.m4 +++ b/m4/openat.m4 @@ -37,6 +37,7 @@ AC_DEFUN([gl_FUNC_FCHOWNAT_DEREF_BUG], rm -f $gl_dangle # Arrange for deletion of the temporary file this test creates. ac_clean_files="$ac_clean_files $gl_dangle" + ln -s conftest.no-such $gl_dangle AC_RUN_IFELSE( [AC_LANG_SOURCE( [[ @@ -73,10 +74,7 @@ AC_DEFUN([gl_FUNC_FCHOWNAT], AC_CHECK_FUNC([fchownat], [have_fchownat=yes], [have_fchownat=no]) if test $have_fchownat = yes; then - gl_FUNC_FCHOWNAT_DEREF_BUG([have_fchownat_bug=yes]) - if test $have_fchownat_bug = no; then - use_replacement_fchownat=no - fi + gl_FUNC_FCHOWNAT_DEREF_BUG([], [use_replacement_fchownat=no]) fi if test $use_replacement_fchownat = yes; then -- 2.11.0