fchownat: Fix a C++ test error on Solaris 8.
authorBruno Haible <bruno@clisp.org>
Sat, 10 Apr 2010 20:30:16 +0000 (22:30 +0200)
committerIan Beckwith <ianb@erislabs.net>
Mon, 19 Apr 2010 15:30:23 +0000 (16:30 +0100)
(cherry picked from commit 15a0c625accdd9f8ff6b71ab62af36b8b3f408f8)

ChangeLog
m4/openat.m4

index 3fdaaa4..686fc8f 100644 (file)
--- 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.
index 7975efb..cfde8f9 100644 (file)
@@ -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_DEFUN([gl_FUNC_FCHOWNAT],
   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