[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnulib] lstat/stat

From: Derek Robert Price
Subject: Re: [Bug-gnulib] lstat/stat
Date: Sun, 20 Jul 2003 08:14:59 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1

Jim Meyering wrote:

Regarding this:

Do you know if it'd solve the problem to make the prerequisite tests
unconditional?  I really hope so, because using cache variable names
from other tests makes the code very fragile -- I've been burned by
that too many times.  Even using cache variables defined in the same
file has been known to throw me :-)

I do see why that prerequisite-testing is conditional,
and agree in principle with the general goal.
However, it'd be much better if macros like AC_FUNC_LSTAT and
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK took optional `run-if-true'
and `run-if-false' arguments.  Then we wouldn't need to rely on
fragile cache variable names.


I was trying to sync CVS with these changes in GNULIB and I noticed that gl_PREREQ_LSTAT still wasn't being called in all the cases it needed to be. I've attached a patch to implement your suggestion to make the prerequisite test unconditional as well as comments to update the call when autoconf catches up. :)

Index: m4/lstat.m4
RCS file: /cvsroot/gnulib/gnulib/m4/lstat.m4,v
retrieving revision 1.14
diff -u -r1.14 lstat.m4
--- m4/lstat.m4 31 Dec 2002 13:43:06 -0000      1.14
+++ m4/lstat.m4 20 Jul 2003 12:06:42 -0000
@@ -13,9 +13,12 @@
  dnl Note: AC_FUNC_LSTAT does AC_LIBOBJ(lstat).
-  if test $ac_cv_func_lstat_empty_string_bug = yes; then
-  fi
+  dnl The call below is unconditional, but should really depend on
+  dnl [run-if-true] & [run-if-false] arguments to AC_FUNC_LSTAT &
+  dnl AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINKS.  Unfortunately, as of
+  dnl version 2.57, autoconf doesn't support these arguments.

# Prerequisites of lib/lstat.c.



Email: address@hidden

Get CVS support at <>!
HAMLET                  No, not I.
 I never gave you aught.
 My honoured lord, you know right well you did,
 And with them words of so sweet breath composed
 As made the things more rich.  Their perfume lost,
 Take these again.  For to the noble mind
 Rich gifts wax poor when givers prove unkind.
 There, my lord.

    - Hamlet, Act III, Scene 1, Lines 96-102

reply via email to

[Prev in Thread] Current Thread [Next in Thread]