[gegl] buffer: tile-backend-file replaced defines for file modes with constants



commit 147fd056216066467b0c5353a0e958ac8472724c
Author: �yvind Kolås <pippin gimp org>
Date:   Sat May 28 13:04:50 2011 +0100

    buffer: tile-backend-file replaced defines for file modes with constants
    
    When compiling on windows it seems like S_IRUSR|S_IWUSR|S_IRGRP|etc are not
    defined.

 gegl/buffer/gegl-tile-backend-file.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile-backend-file.c b/gegl/buffer/gegl-tile-backend-file.c
index 97b692c..294949a 100644
--- a/gegl/buffer/gegl-tile-backend-file.c
+++ b/gegl/buffer/gegl-tile-backend-file.c
@@ -867,7 +867,7 @@ gegl_tile_backend_file_constructor (GType                  type,
                         G_CALLBACK (gegl_tile_backend_file_file_changed),
                         self);
 
-      self->o = open (self->path, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+      self->o = open (self->path, O_RDWR|O_CREAT, 0770);
       if (self->o == -1)
         {
           /* Try again but this time with only read access. This is
@@ -875,7 +875,7 @@ gegl_tile_backend_file_constructor (GType                  type,
            * when it opens a GeglBuffer file in the source tree
            * (which is read-only).
            */
-          self->o = open (self->path, O_RDONLY, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+          self->o = open (self->path, O_RDONLY, 0770);
 
           if (self->o == -1)
             g_warning ("%s: Could not open '%s': %s", G_STRFUNC, self->path, g_strerror (errno));
@@ -931,7 +931,7 @@ gegl_tile_backend_file_ensure_exist (GeglTileBackendFile *self)
 
       GEGL_NOTE (GEGL_DEBUG_TILE_BACKEND, "creating swapfile  %s", self->path);
 
-      self->o = open (self->path, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+      self->o = open (self->path, O_RDWR|O_CREAT, 0770);
       if (self->o == -1)
         g_warning ("%s: Could not open '%s': %s", G_STRFUNC, self->path, g_strerror (errno));
 



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