From: Simon Josefsson Date: Mon, 27 Oct 2008 11:40:45 +0000 (+0100) Subject: lib/sys_stat.in.h (lstat): Fix declaration for mingw. X-Git-Tag: v0.1~6757 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=eb8ac3795cc12977019ba84f18f8b461f8b3d7c5;p=gnulib.git lib/sys_stat.in.h (lstat): Fix declaration for mingw. --- diff --git a/ChangeLog b/ChangeLog index ddd8f8251..f1d6f7884 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-10-27 Simon Josefsson + + * lib/sys_stat.in.h (lstat): Fix declaration for mingw. + 2008-10-27 Bruno Haible * tests/test-lstat.c: Include . diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index aeca760ec..cb31f44e4 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -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@ -# 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