lib/sys_stat.in.h (lstat): Fix declaration for mingw.
authorSimon Josefsson <simon@josefsson.org>
Mon, 27 Oct 2008 11:40:45 +0000 (12:40 +0100)
committerSimon Josefsson <simon@josefsson.org>
Mon, 27 Oct 2008 11:40:45 +0000 (12:40 +0100)
ChangeLog
lib/sys_stat.in.h

index ddd8f82518517a370b13b989412a828a3930dbba..f1d6f78847ab3f3f1ff115f187950b066481d6d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>.
index aeca760ecbffa2e64efbd42765cf8388ee9f6201..cb31f44e463b548df87b1affe80e9fd71b50c666 100644 (file)
 # 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@
-# undef lstat
-# define lstat rpl_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(p,b)                                                    \
+  (GL_LINK_WARNING ("lstat is unportable - "                           \
+                   "use gnulib module lstat for portability"),         \
+   lstat (p, b))
 #endif