glib r6518 - trunk/gio



Author: alexl
Date: Thu Feb 14 16:47:56 2008
New Revision: 6518
URL: http://svn.gnome.org/viewvc/glib?rev=6518&view=rev

Log:
2008-02-14  Alexander Larsson  <alexl redhat com>

        * glocalfileoutputstream.c:
	Correctly check for HAVE_FCHMOD and HAVE_FCHOWN




Modified:
   trunk/gio/ChangeLog
   trunk/gio/glocalfileoutputstream.c

Modified: trunk/gio/glocalfileoutputstream.c
==============================================================================
--- trunk/gio/glocalfileoutputstream.c	(original)
+++ trunk/gio/glocalfileoutputstream.c	Thu Feb 14 16:47:56 2008
@@ -716,10 +716,10 @@
       /* 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 @@
        * 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,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]