mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-21 14:49:16 +02:00
Correctly check for HAVE_FCHMOD and HAVE_FCHOWN
2008-02-14 Alexander Larsson <alexl@redhat.com> * glocalfileoutputstream.c: Correctly check for HAVE_FCHMOD and HAVE_FCHOWN svn path=/trunk/; revision=6518
This commit is contained in:
parent
e4b716ae25
commit
66ca14e807
@ -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>
|
2008-02-14 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
* glocalfile.c:
|
* glocalfile.c:
|
||||||
|
@ -716,10 +716,10 @@ handle_overwrite_open (const char *filename,
|
|||||||
/* try to keep permissions */
|
/* try to keep permissions */
|
||||||
|
|
||||||
if (
|
if (
|
||||||
#ifdef F_CHOWN
|
#ifdef HAVE_FCHOWN
|
||||||
fchown (tmpfd, original_stat.st_uid, original_stat.st_gid) == -1 ||
|
fchown (tmpfd, original_stat.st_uid, original_stat.st_gid) == -1 ||
|
||||||
#endif
|
#endif
|
||||||
#ifdef F_CHMOD
|
#ifdef HAVE_FCHMOD
|
||||||
fchmod (tmpfd, original_stat.st_mode) == -1 ||
|
fchmod (tmpfd, original_stat.st_mode) == -1 ||
|
||||||
#endif
|
#endif
|
||||||
0
|
0
|
||||||
@ -783,7 +783,7 @@ handle_overwrite_open (const char *filename,
|
|||||||
* original file. If this fails, set the protection
|
* original file. If this fails, set the protection
|
||||||
* bits for the group same as the protection bits for
|
* bits for the group same as the protection bits for
|
||||||
* others. */
|
* others. */
|
||||||
#ifdef HAVE_FCHOWN
|
#if defined(HAVE_FCHOWN) && defined(HAVE_FCHMOD)
|
||||||
if (fstat (bfd, &tmp_statbuf) != 0)
|
if (fstat (bfd, &tmp_statbuf) != 0)
|
||||||
{
|
{
|
||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user