changeset 13201:44c840887cad

fchownat: Fix a C++ test error on Solaris 8.
author Bruno Haible <bruno@clisp.org>
date Sat, 10 Apr 2010 22:30:16 +0200
parents 69f672943274
children 69a6d1611d1b
files ChangeLog m4/openat.m4
diffstat 2 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-10  Bruno Haible  <address@hidden>
+
+	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.
+
 2010-04-10  Bruno Haible  <bruno@clisp.org>
 
 	vasnprintf: Add more tests.
--- a/m4/openat.m4
+++ b/m4/openat.m4
@@ -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