Correctly check for HAVE_FCHMOD and HAVE_FCHOWN
authorAlexander Larsson <alexl@redhat.com>
Thu, 14 Feb 2008 16:47:56 +0000 (16:47 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Thu, 14 Feb 2008 16:47:56 +0000 (16:47 +0000)
2008-02-14  Alexander Larsson  <alexl@redhat.com>

        * glocalfileoutputstream.c:
Correctly check for HAVE_FCHMOD and HAVE_FCHOWN

svn path=/trunk/; revision=6518

gio/ChangeLog
gio/glocalfileoutputstream.c

index ebb1f880017946c51d248e64fe2d117da7b15127..0ffa8f59485a5d257b948204333d7fadfd18fa64 100644 (file)
@@ -1,3 +1,8 @@
+2008-02-14  Alexander Larsson  <alexl@redhat.com>
+
+        * glocalfileoutputstream.c:
+       Correctly check for HAVE_FCHMOD and HAVE_FCHOWN
+
 2008-02-14  Alexander Larsson  <alexl@redhat.com>
 
         * glocalfile.c:
index bd394093b2e05750dc8a2809bd8a6d95c2fc171f..7f0d65fa66cb92d7d281820a25969a87a304f187 100644 (file)
@@ -716,10 +716,10 @@ handle_overwrite_open (const char    *filename,
       /* try to keep permissions */
 
       if (
-#ifdef F_CHOWN
+#ifdef HAVE_FCHOWN
          fchown (tmpfd, original_stat.st_uid, original_stat.st_gid) == -1 ||
 #endif
-#ifdef F_CHMOD
+#ifdef HAVE_FCHMOD
          fchmod (tmpfd, original_stat.st_mode) == -1 ||
 #endif
          0
@@ -783,7 +783,7 @@ handle_overwrite_open (const char    *filename,
        * original file. If this fails, set the protection
        * bits for the group same as the protection bits for
        * others. */
-#ifdef HAVE_FCHOWN
+#if defined(HAVE_FCHOWN) && defined(HAVE_FCHMOD)
       if (fstat (bfd, &tmp_statbuf) != 0)
        {
          g_set_error (error,