changeset 13065:c403aa0e7497

Fix a compilation error on Cygwin with g++ >= 4.3.
author Bruno Haible <bruno@clisp.org>
date Sat, 27 Mar 2010 14:30:20 +0100
parents 8bce2115594d
children fc8c984b0733
files ChangeLog lib/sys_stat.in.h
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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.
--- a/lib/sys_stat.in.h
+++ b/lib/sys_stat.in.h
@@ -398,7 +398,9 @@
 #  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 @@
 # 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