33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
2007-05-20 Jim Meyering <jim@meyering.net>
|
|
|
|
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.
|
|
|
|
--- m4/openat.m4
|
|
+++ m4/openat.m4
|
|
@@ -38,6 +38,7 @@
|
|
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(
|
|
[[
|
|
@@ -74,10 +75,7 @@
|
|
|
|
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
|