changeset 10728:ec6c57a9af4b

lib/sys_stat.in.h (lstat): Fix declaration for mingw.
author Simon Josefsson <simon@josefsson.org>
date Mon, 27 Oct 2008 12:40:45 +0100
parents 0b1453918646
children 5f26cbc4994d
files ChangeLog lib/sys_stat.in.h
diffstat 2 files changed, 17 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Oct 27 12:22:13 2008 +0100
+++ b/ChangeLog	Mon Oct 27 12:40:45 2008 +0100
@@ -1,3 +1,7 @@
+2008-10-27  Simon Josefsson  <simon@josefsson.org>
+
+	* lib/sys_stat.in.h (lstat): Fix declaration for mingw.
+
 2008-10-27  Bruno Haible  <bruno@clisp.org>
 
 	* tests/test-lstat.c: Include <stdio.h>.
--- a/lib/sys_stat.in.h	Mon Oct 27 12:22:13 2008 +0100
+++ b/lib/sys_stat.in.h	Mon Oct 27 12:40:45 2008 +0100
@@ -275,15 +275,22 @@
 # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
 #endif
 
+#if @GNULIB_LSTAT@
+# if ! @HAVE_LSTAT@
 /* mingw does not support symlinks, therefore it does not have lstat.  But
    without links, stat does just fine.  */
-#if ! @HAVE_LSTAT@
-# define lstat stat
-#endif
-#if @GNULIB_LSTAT@ && @REPLACE_LSTAT@
+#  define lstat stat
+# elif @REPLACE_LSTAT@
+#  undef lstat
+#  define lstat rpl_lstat
+extern int rpl_lstat (const char *name, struct stat *buf);
+# endif
+#elif define GNULIB_POSIXCHECK
 # undef lstat
-# define lstat rpl_lstat
-extern int rpl_lstat (const char *name, struct stat *buf);
+# define lstat(p,b)							\
+  (GL_LINK_WARNING ("lstat is unportable - "				\
+		    "use gnulib module lstat for portability"),		\
+   lstat (p, b))
 #endif