lstat: avoid mingw compilation error
authorEric Blake <ebb9@byu.net>
Wed, 23 Sep 2009 20:13:00 +0000 (14:13 -0600)
committerEric Blake <ebb9@byu.net>
Thu, 24 Sep 2009 01:34:33 +0000 (19:34 -0600)
commite97114feaa74c5f0516d76dcde67601e26462e95
treecfb175adad6f1d761299014435dee5a6951a05f4
parentc5ff417604d203d72360908d8daafefeb4f36812
lstat: avoid mingw compilation error

The openat module required lstat, but then repeated the checks
for whether lstat worked.  When cross-compiling to mingw, this
led to a wrong answer and tried compiling lstat.c, even though it
was not necessary, with a result of a compiler warning about
undeclared lstat.

* m4/lstat.m4 (gl_FUNC_LSTAT): Avoid duplicate calls to
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, and deal with missing
lstat ourselves.
* lib/lstat.c [!HAVE_LSTAT]: Do nothing if <sys/stat.h> override
was adequate.
* m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Let lstat module handle
the checks for lstat.
(gl_SYS_STAT_H_DEFAULTS): Set default for HAVE_LSTAT.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/lstat.c
m4/lstat.m4
m4/sys_stat_h.m4