Remove stat module & update lstat.
authorDerek R. Price <derek@ximbiot.com>
Fri, 24 Jun 2005 14:53:03 +0000 (14:53 +0000)
committerDerek R. Price <derek@ximbiot.com>
Fri, 24 Jun 2005 14:53:03 +0000 (14:53 +0000)
* MODULES.html.sh (stat): Remove.
* MODULES.html: Regenerated.
* config/srclist.txt (GLIBC sources): Remove stat.
* lib/stat.c: Remove this file...
(slash_aware_lstat): ...moving this content and its support...
* lib/lstat.c (rpl_lstat): ...into here.
* lib/lstat.h: New file.
* m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
* m4/stat.m4: Remove this file.
* modules/lstat (Description): Correct function name.
(Files): Add "lstat.h".
(Depends-on): Remove stat, add xalloc, stat-macros.
* modules/stat: Remove this file.
(Include): Add "lstat.h", remove <sys/stat.h>.

14 files changed:
ChangeLog
MODULES.html
MODULES.html.sh
config/ChangeLog
config/srclist.txt
lib/ChangeLog
lib/lstat.c
lib/lstat.h [new file with mode: 0644]
lib/stat.c [deleted file]
m4/ChangeLog
m4/lstat.m4
m4/stat.m4 [deleted file]
modules/lstat
modules/stat [deleted file]

index 2abdac1cb1df2705b8fc453122eb390618ddd7a4..7485517d3f84c31e2b4f56667a7aa95a0bf86e3a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-06-24  Derek Price  <derek@ximbiot.com>
+       and Bruno Haible  <bruno@clisp.org>
+
+       Remove stat module & update lstat.
+       * MODULES.html.sh (stat): Remove.
+       * MODULES.html: Regenerated.
+       * modules/lstat (Description): Correct function name.
+       (Files): Add "lstat.h".
+       (Depends-on): Remove stat, add xalloc, stat-macros.
+       * modules/stat: Remove this file.
+       (Include): Add "lstat.h", remove <sys/stat.h>.
+
 2005-06-08  Bruno Haible  <bruno@clisp.org>
 
        * modules/csharpcomp: New file.
index e974afe3d2a5e1a5ac3fd31b19aa0a1a7980c6d2..ac141ab34d7d1b80a9ee16edc149647a606b94ea 100644 (file)
@@ -2,7 +2,7 @@
 <HTML>
   <HEAD>
     <TITLE>Gnulib Module List</TITLE>
-    <META NAME="keywords" CONTENT="acl, alloca, alloca-opt, allocsa, argmatch, argp, argz, assert, atexit, backupfile, base64, bcopy, binary-io, byteswap, c-bs-a, c-ctype, c-stack, c-strtod, c-strtold, calloc, canon-host, canonicalize, chdir-long, chown, classpath, cloexec, closeout, copy-file, csharpcomp, csharpexec, cycle-check, diacrit, dirfd, dirname, dummy, dup2, eealloc, error, euidaccess, exclude, execute, exit, exitfail, extensions, fatal-signal, file-type, fileblocks, filemode, filenamecat, findprog, fnmatch, fnmatch-gnu, fnmatch-posix, fpending, free, fsusage, ftruncate, fts, fts-lgpl, full-read, full-write, fwriteerror, gcd, getaddrinfo, getcwd, getdate, getdomainname, getgroups, gethostname, gethrxtime, getline, getloadavg, getlogin_r, getndelim2, getnline, getopt, getpagesize, getpass, getpass-gnu, getsubopt, gettext, gettime, gettimeofday, getugroups, getusershell, glob, group-member, hard-locale, hash, hash-pjw, human, iconv, iconvme, idcache, inet_ntop, inttostr, isdir, javacomp, javaexec, lchown, linebreak, linebuffer, localcharset, long-options, lstat, malloc, mathl, mbswidth, md5, memcasecmp, memchr, memcmp, memcoll, memcpy, memmem, memmove, mempcpy, memrchr, memset, minmax, mkdir, mkdir-p, mkdtemp, mkstemp, mktime, modechange, mountlist, nanosleep, obstack, openat, pagealign_alloc, pathmax, pathname, physmem, pipe, poll, posixtm, posixver, progname, putenv, quote, quotearg, raise, readlink, readtokens, readtokens0, readutmp, realloc, regex, rename, restrict, rmdir, rpmatch, safe-read, safe-write, same, save-cwd, savedir, setenv, settime, sh-quote, sha1, sig2str, snprintf, stat, stat-macros, stdbool, stdint, stdio-safer, stpcpy, stpncpy, strcase, strchrnul, strcspn, strdup, strerror, strftime, strndup, strnlen, strpbrk, strsep, strstr, strtod, strtoimax, strtok_r, strtol, strtoll, strtoul, strtoull, strtoumax, strverscmp, sysexits, time_r, timegm, timespec, tzset, ucs4-utf16, ucs4-utf8, ullong_max, unicodeio, unistd-safer, unlinkdir, unlocked-io, userspec, utf16-ucs4, utf8-ucs4, utime, utimecmp, utimens, vasnprintf, vasprintf, version-etc, version-etc-fsf, vsnprintf, wait-process, xalloc, xalloc-die, xallocsa, xgetcwd, xgetdomainname, xgethostname, xmemcoll, xnanosleep, xreadlink, xsetenv, xsize, xstrndup, xstrtod, xstrtoimax, xstrtol, xstrtoumax, xvasprintf, yesno">
+    <META NAME="keywords" CONTENT="acl, alloca, alloca-opt, allocsa, argmatch, argp, argz, assert, atexit, backupfile, base64, bcopy, binary-io, byteswap, calloc, canon-host, canonicalize, c-bs-a, c-ctype, chdir-long, chown, classpath, cloexec, closeout, copy-file, csharpcomp, csharpexec, c-stack, c-strtod, c-strtold, cycle-check, diacrit, dirfd, dirname, dummy, dup2, eealloc, error, euidaccess, exclude, execute, exit, exitfail, extensions, fatal-signal, fileblocks, filemode, filenamecat, file-type, findprog, fnmatch, fnmatch-gnu, fnmatch-posix, fpending, free, fsusage, ftruncate, fts, fts-lgpl, full-read, full-write, fwriteerror, gcd, getaddrinfo, getcwd, getdate, getdomainname, getgroups, gethostname, gethrxtime, getline, getloadavg, getlogin_r, getndelim2, getnline, getopt, getpagesize, getpass, getpass-gnu, getsubopt, gettext, gettime, gettimeofday, getugroups, getusershell, glob, group-member, hard-locale, hash, hash-pjw, human, iconv, iconvme, idcache, inet_ntop, inttostr, isdir, javacomp, javaexec, lchown, linebreak, linebuffer, localcharset, long-options, lstat, malloc, mathl, mbswidth, md5, memcasecmp, memchr, memcmp, memcoll, memcpy, memmem, memmove, mempcpy, memrchr, memset, minmax, mkdir, mkdir-p, mkdtemp, mkstemp, mktime, modechange, mountlist, nanosleep, obstack, openat, pagealign_alloc, pathmax, pathname, physmem, pipe, poll, posixtm, posixver, progname, putenv, quote, quotearg, raise, readlink, readtokens, readtokens0, readutmp, realloc, regex, rename, restrict, rmdir, rpmatch, safe-read, safe-write, same, save-cwd, savedir, setenv, settime, sha1, sh-quote, sig2str, snprintf, stat-macros, stdbool, stdint, stdio-safer, stpcpy, stpncpy, strcase, strchrnul, strcspn, strdup, strerror, strftime, strndup, strnlen, strpbrk, strsep, strstr, strtod, strtoimax, strtok_r, strtol, strtoll, strtoul, strtoull, strtoumax, strverscmp, sysexits, timegm, time_r, timespec, tzset, ucs4-utf16, ucs4-utf8, ullong_max, unicodeio, unistd-safer, unlinkdir, unlocked-io, userspec, utf16-ucs4, utf8-ucs4, utime, utimecmp, utimens, vasnprintf, vasprintf, version-etc, version-etc-fsf, vsnprintf, wait-process, xalloc, xalloc-die, xallocsa, xgetcwd, xgetdomainname, xgethostname, xmemcoll, xnanosleep, xreadlink, xsetenv, xsize, xstrndup, xstrtod, xstrtoimax, xstrtol, xstrtoumax, xvasprintf, yesno">
   </HEAD>
   <BODY>
     <H1>Gnulib Module List</H1>
@@ -550,13 +550,9 @@ to a fixed length string
         <TD ALIGN=LEFT VALIGN=TOP WIDTH="20%"><A HREF="#module=readlink">readlink</A>
         <TD ALIGN=LEFT VALIGN=TOP WIDTH="80%"><A HREF="http://www.opengroup.org/onlinepubs/007904975/functions/readlink.html">readlink</A>() function: read the value of a symbolic link.
       </TR>
-      <TR WIDTH="100%">
-        <TD ALIGN=LEFT VALIGN=TOP WIDTH="20%"><A HREF="#module=stat">stat</A>
-        <TD ALIGN=LEFT VALIGN=TOP WIDTH="80%"><A HREF="http://www.opengroup.org/onlinepubs/007904975/functions/stat.html">stat</A>() function: return information about a file, following symbolic links.
-      </TR>
       <TR WIDTH="100%">
         <TD ALIGN=LEFT VALIGN=TOP WIDTH="20%"><A HREF="#module=lstat">lstat</A>
-        <TD ALIGN=LEFT VALIGN=TOP WIDTH="80%"><A HREF="http://www.opengroup.org/onlinepubs/007904975/functions/stat.html">stat</A>() function: return information about a file or symbolic link.
+        <TD ALIGN=LEFT VALIGN=TOP WIDTH="80%"><A HREF="http://www.opengroup.org/onlinepubs/007904975/functions/lstat.html">lstat</A>() function: return information about a file or symbolic link.
       </TR>
       <TR WIDTH="100%">
         <TD ALIGN=LEFT VALIGN=TOP WIDTH="20%"><A HREF="#module=time_r">time_r</A>
@@ -2302,19 +2298,12 @@ variables.
         <TD ALIGN=LEFT VALIGN=TOP><A HREF="m4/readlink.m4">readlink.m4</A><BR>gl_FUNC_READLINK
         <TD ALIGN=LEFT VALIGN=TOP>---
       </TR>
-      <TR>
-        <TD ALIGN=LEFT VALIGN=TOP><A NAME="module=stat"></A><A HREF="modules/stat">stat</A>
-        <TD ALIGN=LEFT VALIGN=TOP>#include &lt;<A HREF="http://www.opengroup.org/onlinepubs/007904975/basedefs/sys/stat.h.html">sys/stat.h</A>&gt;
-        <TD ALIGN=LEFT VALIGN=TOP><A HREF="lib/stat.c">stat.c</A>
-        <TD ALIGN=LEFT VALIGN=TOP><A HREF="m4/stat.m4">stat.m4</A><BR>gl_FUNC_STAT
-        <TD ALIGN=LEFT VALIGN=TOP>xalloc<BR>stat-macros
-      </TR>
       <TR>
         <TD ALIGN=LEFT VALIGN=TOP><A NAME="module=lstat"></A><A HREF="modules/lstat">lstat</A>
-        <TD ALIGN=LEFT VALIGN=TOP>#include &lt;<A HREF="http://www.opengroup.org/onlinepubs/007904975/basedefs/sys/stat.h.html">sys/stat.h</A>&gt;
+        <TD ALIGN=LEFT VALIGN=TOP>#include "<A HREF="lib/lstat.h">lstat.h</A>"
         <TD ALIGN=LEFT VALIGN=TOP><A HREF="lib/lstat.c">lstat.c</A>
         <TD ALIGN=LEFT VALIGN=TOP><A HREF="m4/lstat.m4">lstat.m4</A><BR>gl_FUNC_LSTAT
-        <TD ALIGN=LEFT VALIGN=TOP>stat
+        <TD ALIGN=LEFT VALIGN=TOP>xalloc<BR>stat-macros
       </TR>
       <TR>
         <TD ALIGN=LEFT VALIGN=TOP><A NAME="module=time_r"></A><A HREF="modules/time_r">time_r</A>
@@ -3411,6 +3400,6 @@ variables.
       <LI>A testsuite
     </UL>
     <HR>
-    Generated from <CODE>MODULES.html.sh</CODE> on  9 June 2005.
+    Generated from <CODE>MODULES.html.sh</CODE> on 24 June 2005.
   </BODY>
 </HTML>
index 7de240d001152f024cf574f1a5c3bbe16eebaa1b..96370c4aedf9b08301169e4bebe177d0679cc2fb 100755 (executable)
@@ -1063,7 +1063,6 @@ srand
 srand48
 srandom
 sscanf
-stat
 statvfs
 stdin
 strcasecmp
@@ -1756,7 +1755,6 @@ func_all_modules ()
   func_module mkdtemp
   func_module poll
   func_module readlink
-  func_module stat
   func_module lstat
   func_module time_r
   func_module timespec
index ebcc25c2e74c6316cd5025e9dbc217ca57d266dc..65fe7280e77a97c04a28cb188ca56a60f2b0c951 100644 (file)
@@ -1,3 +1,9 @@
+2005-06-24  Derek Price  <derek@ximbiot.com>
+       and Bruno Haible  <bruno@clisp.org>
+
+       Remove stat module & update lstat.
+       * srclist.txt (libc sources): Remove stat.
+
 2005-05-29  Derek Price  <derek@ximbiot.com>
 
        * srclist.txt (glob_.h, glob.c): Add these files.
index d2b3a03fecf179f35d52498f5fddb4579fb6518a..531acb0c81f8e3e1561d407a18fe823e6659fca4 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: srclist.txt,v 1.63 2005-05-29 16:56:02 dprice Exp $
+# $Id: srclist.txt,v 1.64 2005-06-24 14:53:03 dprice Exp $
 # Files for which we are not the source.  See ./srclistvars.sh for the
 # variable definitions.
 
@@ -143,7 +143,6 @@ $LIBCSRC/sysdeps/generic/memmem.c   lib gpl
 #
 # These implementations are quite different.
 #$LIBCSRC/io/lstat.c                           lib gpl
-#$LIBCSRC/io/stat.c                            lib gpl
 #$LIBCSRC/libio/__fpending.c                   lib gpl
 #$LIBCSRC/malloc/malloc.c                      lib gpl
 #$LIBCSRC/misc/dirname.c                       lib gpl
index 32c5859388a06bf3b43d6c16d95c0caad1c1a6c6..3e684232f1e095aece3248c94491d162bc995935 100644 (file)
@@ -1,3 +1,12 @@
+2005-06-24  Derek Price  <derek@ximbiot.com>
+       and Bruno Haible  <bruno@clisp.org>
+
+       Remove stat module & update lstat.
+       * stat.c: Remove this file...
+       (slash_aware_lstat): ...moving this content and its support...
+       * lstat.c (rpl_lstat): ...into here.
+       * lstat.h: New file.
+
 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
 
        * mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
index ef274b09e5c7f697bce20b72cb7bd6a2dc17d473..0d539fe4a64ff4cafe68734f86f04a04d53dca81 100644 (file)
@@ -1,8 +1,6 @@
-/* Work around the bug in some systems whereby lstat succeeds when
-   given the zero-length file name argument.  The lstat from SunOS 4.1.4
-   has this bug.
+/* Work around a bug of lstat on some systems
 
-   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free
+   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free
    Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#define LSTAT
-#include "stat.c"
+/* written by Jim Meyering */
+
+#include <config.h>
+
+/* The specification of these functions is in sys_stat.h.  But we cannot
+   include this include file here, because on some systems, a
+   "#define lstat lstat64" is being used, and sys_stat.h deletes this
+   definition.  */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "stat-macros.h"
+#include "xalloc.h"
+
+/* lstat works differently on Linux and Solaris systems.  POSIX (see
+   `pathname resolution' in the glossary) requires that programs like `ls'
+   take into consideration the fact that FILE has a trailing slash when
+   FILE is a symbolic link.  On Linux systems, the lstat function already
+   has the desired semantics (in treating `lstat("symlink/",sbuf)' just like
+   `lstat("symlink/.",sbuf)', but on Solaris it does not.
+
+   If FILE has a trailing slash and specifies a symbolic link,
+   then append a `.' to FILE and call lstat a second time.  */
+
+int
+rpl_lstat (const char *file, struct stat *sbuf)
+{
+  size_t len;
+  char *new_file;
+
+  int lstat_result = lstat (file, sbuf);
+
+  if (lstat_result != 0 || !S_ISLNK (sbuf->st_mode))
+    return lstat_result;
+
+  len = strlen (file);
+  if (len == 0 || file[len - 1] != '/')
+    return lstat_result;
+
+  /* FILE refers to a symbolic link and the name ends with a slash.
+     Append a `.' to FILE and repeat the lstat call.  */
+
+  /* Add one for the `.' we'll append, and one more for the trailing NUL.  */
+  new_file = xmalloc (len + 1 + 1);
+  memcpy (new_file, file, len);
+  new_file[len] = '.';
+  new_file[len + 1] = 0;
+
+  lstat_result = lstat (new_file, sbuf);
+  free (new_file);
+
+  return lstat_result;
+}
diff --git a/lib/lstat.h b/lib/lstat.h
new file mode 100644 (file)
index 0000000..6a83fbf
--- /dev/null
@@ -0,0 +1,24 @@
+/* Retrieving information about files.
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <sys/stat.h>
+
+#if !LSTAT_FOLLOWS_SLASHED_SYMLINK
+extern int rpl_lstat (const char *name, struct stat *buf);
+# undef lstat
+# define lstat rpl_lstat
+#endif
diff --git a/lib/stat.c b/lib/stat.c
deleted file mode 100644 (file)
index b06926f..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Work around the bug in some systems whereby stat/lstat succeeds when
-   given the zero-length file name argument.  The stat/lstat from SunOS 4.1.4
-   has this bug.  Also work around a deficiency in Solaris systems (up to at
-   least Solaris 9) regarding the semantics of `lstat ("symlink/", sbuf).'
-
-   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
-   Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-/* written by Jim Meyering */
-
-#include <config.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#if defined LSTAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK
-# include <stdlib.h>
-# include <string.h>
-
-# include "stat-macros.h"
-# include "xalloc.h"
-
-/* lstat works differently on Linux and Solaris systems.  POSIX (see
-   `pathname resolution' in the glossary) requires that programs like `ls'
-   take into consideration the fact that FILE has a trailing slash when
-   FILE is a symbolic link.  On Linux systems, the lstat function already
-   has the desired semantics (in treating `lstat("symlink/",sbuf)' just like
-   `lstat("symlink/.",sbuf)', but on Solaris it does not.
-
-   If FILE has a trailing slash and specifies a symbolic link,
-   then append a `.' to FILE and call lstat a second time.  */
-
-static int
-slash_aware_lstat (const char *file, struct stat *sbuf)
-{
-  size_t len;
-  char *new_file;
-
-  int lstat_result = lstat (file, sbuf);
-
-  if (lstat_result != 0 || !S_ISLNK (sbuf->st_mode))
-    return lstat_result;
-
-  len = strlen (file);
-  if (file[len - 1] != '/')
-    return lstat_result;
-
-  /* FILE refers to a symbolic link and the name ends with a slash.
-     Append a `.' to FILE and repeat the lstat call.  */
-
-  /* Add one for the `.' we'll append, and one more for the trailing NUL.  */
-  new_file = xmalloc (len + 1 + 1);
-  memcpy (new_file, file, len);
-  new_file[len] = '.';
-  new_file[len + 1] = 0;
-
-  lstat_result = lstat (new_file, sbuf);
-  free (new_file);
-
-  return lstat_result;
-}
-#endif /* LSTAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK */
-
-/* This is a wrapper for stat/lstat.
-   If FILE is the empty string, fail with errno == ENOENT.
-   Otherwise, return the result of calling the real stat/lstat.
-
-   This works around the bug in some systems whereby stat/lstat succeeds when
-   given the zero-length file name argument.  The stat/lstat from SunOS 4.1.4
-   has this bug.  */
-
-/* This function also provides a version of lstat with consistent semantics
-   when FILE specifies a symbolic link and has a trailing slash.  */
-
-#ifdef LSTAT
-# define rpl_xstat rpl_lstat
-# if ! LSTAT_FOLLOWS_SLASHED_SYMLINK
-#  define xstat_return_val(F, S) slash_aware_lstat (F, S)
-# else
-#  define xstat_return_val(F, S) lstat (F, S)
-# endif
-#else
-# define rpl_xstat rpl_stat
-# define xstat_return_val(F, S) stat (F, S)
-#endif
-
-int
-rpl_xstat (const char *file, struct stat *sbuf)
-{
-  if (file && *file == 0)
-    {
-      errno = ENOENT;
-      return -1;
-    }
-
-  return xstat_return_val (file, sbuf);
-}
index 5563e7f0510f09540e3e27dd3d54551a120a2e36..b7bffee3c325e1b2a79dc426eb6dffbe26dc3a99 100644 (file)
@@ -1,3 +1,11 @@
+2005-06-24  Derek Price  <derek@ximbiot.com>
+       and Bruno Haible  <bruno@clisp.org>
+
+       Remove stat module & update lstat.
+       * lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
+       AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
+       * stat.m4: Remove this file.
+
 2005-06-20  Derek Price  <derek@ximbiot.com>
 
        * bison.m4: Note that precious decls of YACC & YFLAGS will be
index 3af1fdff073f911b28127bc1e18e9edb156fdfc5..59d7191f68a90a748fe4007fe8f2409af6b4382a 100644 (file)
@@ -18,7 +18,7 @@ dnl
 
 AC_DEFUN([gl_FUNC_LSTAT],
 [
-  AC_REQUIRE([AC_FUNC_LSTAT])
-  dnl Note: AC_FUNC_LSTAT does AC_LIBOBJ(lstat).
+  AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
+  dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ(lstat).
   :
 ])
diff --git a/m4/stat.m4 b/m4/stat.m4
deleted file mode 100644 (file)
index d870645..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#serial 11
-
-# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004 Free Software
-# Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-dnl From Jim Meyering.
-dnl Determine whether stat has the bug that it succeeds when given the
-dnl zero-length file name argument.  The stat from SunOS 4.1.4 and the Hurd
-dnl (as of 1998-11-01) do this.
-dnl
-dnl If it does, then define HAVE_STAT_EMPTY_STRING_BUG and arrange to
-dnl compile the wrapper function.
-dnl
-
-AC_DEFUN([gl_FUNC_STAT],
-[
-  AC_FUNC_STAT
-  dnl Note: AC_FUNC_STAT does AC_LIBOBJ(stat).
-  if test $ac_cv_func_stat_empty_string_bug = yes; then
-    gl_PREREQ_STAT
-  fi
-])
-
-# Prerequisites of lib/stat.c.
-AC_DEFUN([gl_PREREQ_STAT],
-[
-  :
-])
index f703aef964d493186ebe93c413575d819c191b4c..d26e9646c41db961ee57be61a992ee57a190039a 100644 (file)
@@ -1,12 +1,14 @@
 Description:
-stat() function: return information about a file or symbolic link.
+lstat() function: return information about a file or symbolic link.
 
 Files:
 lib/lstat.c
+lib/lstat.h
 m4/lstat.m4
 
 Depends-on:
-stat
+xalloc
+stat-macros
 
 configure.ac:
 gl_FUNC_LSTAT
@@ -14,7 +16,7 @@ gl_FUNC_LSTAT
 Makefile.am:
 
 Include:
-<sys/stat.h>
+"lstat.h"
 
 License:
 GPL
diff --git a/modules/stat b/modules/stat
deleted file mode 100644 (file)
index f9425d9..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-Description:
-stat() function: return information about a file, following symbolic links.
-
-Files:
-lib/stat.c
-m4/stat.m4
-
-Depends-on:
-xalloc
-stat-macros
-
-configure.ac:
-gl_FUNC_STAT
-
-Makefile.am:
-
-Include:
-<sys/stat.h>
-
-License:
-GPL
-
-Maintainer:
-Jim Meyering