From e91c50784067e76b10113c7845473a3fe6f96c88 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 18 Dec 1999 23:00:58 +0000 Subject: [PATCH] *** empty log message *** --- m4/lstat-slash.m4 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/m4/lstat-slash.m4 b/m4/lstat-slash.m4 index 8f753dadf..935f19a9a 100644 --- a/m4/lstat-slash.m4 +++ b/m4/lstat-slash.m4 @@ -20,20 +20,31 @@ AC_DEFUN(jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, main () { struct stat sbuf; + /* Linux will dereference the symlink and fail. + That is better in the sense that it means we will not + have to compile and use the lstat wrapper. */ exit (lstat ("conftest.sym/", &sbuf) ? 0 : 1); } ], jm_cv_func_lstat_dereferences_slashed_symlink=yes, jm_cv_func_lstat_dereferences_slashed_symlink=no, - dnl When crosscompiling, be pessimistic so we'll end up using the + dnl When crosscompiling, be pessimistic so we will end up using the dnl replacement version of lstat that checkes for trailing slashes dnl and calls lstat a second time when necessary. jm_cv_func_lstat_dereferences_slashed_symlink=no ) + else + jm_cv_func_lstat_dereferences_slashed_symlink=no + fi ]) - if test $jm_cv_func_lstat_dereferences_slashed_symlink = yes; then + # FIXME: convert to 0 or 1. + AC_DEFINE_UNQUOTED(LSTAT_FOLLOWS_SLASHED_SYMLINK, FIXME, + [Define if lstat dereferences a symlink specified with a trailing slash]) + + if test $jm_cv_func_lstat_dereferences_slashed_symlink = no; then AC_SUBST(LIBOBJS) +# FIXME: append to LIBOBJS only if it's not there already. LIBOBJS="$LIBOBJS lstat.$ac_objext" AC_DEFINE_UNQUOTED(LSTAT_FOLLOWS_SLASHED_SYMLINK, 1, [Define if lstat dereferences a symlink specified with a trailing slash]) -- 2.11.0