On Solaris 8, I'm seeing this error: In file included from test-unistd-c++.cc:22: ../gllib/unistd.h:750: error: 'fchownat' was not declared in this scope
The problem is that REPLACE_FCHOWNAT is set to 1 although HAVE_FCHOWNAT is already set to 0. Here is a proposed fix. Jim, is this OK to commit? Btw, you are free to add proper indentation to the gl_FUNC_FCHOWNAT code before I commit this. 2010-04-05 Bruno Haible <br...@clisp.org> fchownat: Fix a C++ test error on Solaris 8. * m4/openat.m4 (gl_FUNC_FCHOWNAT): Don't set REPLACE_FCHOWNAT to 1 if the function does not exist. --- m4/openat.m4.orig Mon Apr 5 16:07:59 2010 +++ m4/openat.m4 Mon Apr 5 16:06:21 2010 @@ -1,4 +1,4 @@ -# serial 27 +# serial 28 # See if we need to use our replacement for Solaris' openat et al functions. dnl Copyright (C) 2004-2010 Free Software Foundation, Inc. @@ -106,11 +106,11 @@ AC_CHECK_FUNC([fchownat], [gl_FUNC_FCHOWNAT_DEREF_BUG([REPLACE_FCHOWNAT=1 AC_DEFINE([FCHOWNAT_NOFOLLOW_BUG], [1], [Define to 1 if your - platform has fchownat, but it cannot perform lchown tasks.])])], + platform has fchownat, but it cannot perform lchown tasks.]) + if test $REPLACE_CHOWN = 1; then + REPLACE_FCHOWNAT=1 + fi])], [HAVE_FCHOWNAT=0]) - if test $REPLACE_CHOWN = 1; then - REPLACE_FCHOWNAT=1 - fi if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then AC_LIBOBJ([fchownat]) fi