Fix a compilation error on Cygwin with g++ >= 4.3.
authorBruno Haible <bruno@clisp.org>
Sat, 27 Mar 2010 13:30:20 +0000 (14:30 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 27 Mar 2010 13:30:20 +0000 (14:30 +0100)
ChangeLog
lib/sys_stat.in.h

index 945954a..2be3ce1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2010-03-27  Bruno Haible  <bruno@clisp.org>
 
+       Fix a compilation error on Cygwin with g++ >= 4.3.
+       * lib/sys_stat.in.h (lchmod): Don't warn about the use of this function
+       if it is undefined or if we alias it to chmod.
+       (lstat): Don't warn about the use of this function if it is undefined
+       or if we alias it to stat.
+       Reported by Simon Josefsson.
+
+2010-03-27  Bruno Haible  <bruno@clisp.org>
+
        * m4/getlogin.m4 (gl_FUNC_GETLOGIN): Renamed from gl_GETLOGIN.
        * modules/getlogin (configure.ac): Update.
 
index 3156ee6..89724c3 100644 (file)
@@ -398,7 +398,9 @@ _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode)
 #  endif
 _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode));
 # endif
+# if @HAVE_LCHMOD@
 _GL_CXXALIASWARN (lchmod);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef lchmod
 # if HAVE_RAW_DECL_LCHMOD
@@ -427,7 +429,9 @@ _GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf));
 # else
 _GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf));
 # endif
+# if @HAVE_LSTAT@
 _GL_CXXALIASWARN (lstat);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef lstat
 # if HAVE_RAW_DECL_LSTAT