r15410 - gnucash/trunk/src - Always supply three arguments to g_open.

Andreas Köhler andi5 at cvs.gnucash.org
Sun Jan 21 14:28:33 EST 2007


Author: andi5
Date: 2007-01-21 14:28:31 -0500 (Sun, 21 Jan 2007)
New Revision: 15410
Trac: http://svn.gnucash.org/trac/changeset/15410

Modified:
   gnucash/trunk/src/app-utils/file-utils.c
   gnucash/trunk/src/backend/file/gnc-backend-file.c
   gnucash/trunk/src/backend/file/io-gncxml-v2.c
   gnucash/trunk/src/backend/file/test/test-file-stuff.c
   gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c
   gnucash/trunk/src/import-export/hbci/gnc-file-aqb-import.c
Log:
Always supply three arguments to g_open.

g_open is not #defined as open on Windows and always needs three
arguments. Use 0 where missing.


Modified: gnucash/trunk/src/app-utils/file-utils.c
===================================================================
--- gnucash/trunk/src/app-utils/file-utils.c	2007-01-21 17:51:12 UTC (rev 15409)
+++ gnucash/trunk/src/app-utils/file-utils.c	2007-01-21 19:28:31 UTC (rev 15410)
@@ -91,7 +91,7 @@
   if (!filename) return 0;
 
   /* Open file: */
-  fd = g_open( filename, O_RDONLY );
+  fd = g_open( filename, O_RDONLY, 0 );
 
   g_free(filename); filename = NULL;
 

Modified: gnucash/trunk/src/backend/file/gnc-backend-file.c
===================================================================
--- gnucash/trunk/src/backend/file/gnc-backend-file.c	2007-01-21 17:51:12 UTC (rev 15409)
+++ gnucash/trunk/src/backend/file/gnc-backend-file.c	2007-01-21 19:28:31 UTC (rev 15410)
@@ -342,7 +342,7 @@
     ssize_t count_write;
     ssize_t count_read;
 
-    orig_fd = g_open(orig, O_RDONLY);
+    orig_fd = g_open(orig, O_RDONLY, 0);
     if(orig_fd == -1)
     {
         return FALSE;

Modified: gnucash/trunk/src/backend/file/io-gncxml-v2.c
===================================================================
--- gnucash/trunk/src/backend/file/io-gncxml-v2.c	2007-01-21 17:51:12 UTC (rev 15409)
+++ gnucash/trunk/src/backend/file/io-gncxml-v2.c	2007-01-21 19:28:31 UTC (rev 15410)
@@ -1428,7 +1428,7 @@
 is_gzipped_file(const gchar *name)
 {
     unsigned char buf[2];
-    int fd = g_open(name, O_RDONLY);
+    int fd = g_open(name, O_RDONLY, 0);
 
     if (fd == -1) {
         return FALSE;

Modified: gnucash/trunk/src/backend/file/test/test-file-stuff.c
===================================================================
--- gnucash/trunk/src/backend/file/test/test-file-stuff.c	2007-01-21 17:51:12 UTC (rev 15409)
+++ gnucash/trunk/src/backend/file/test/test-file-stuff.c	2007-01-21 19:28:31 UTC (rev 15410)
@@ -58,8 +58,8 @@
     int fd1, fd2;
     int amount_read1, amount_read2;
 
-    fd1 = g_open(f1, O_RDONLY);
-    fd2 = g_open(f2, O_RDONLY);
+    fd1 = g_open(f1, O_RDONLY, 0);
+    fd2 = g_open(f2, O_RDONLY, 0);
 
     do
     {

Modified: gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c
===================================================================
--- gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c	2007-01-21 17:51:12 UTC (rev 15409)
+++ gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c	2007-01-21 19:28:31 UTC (rev 15410)
@@ -533,7 +533,7 @@
 
   if (wizard_exists) {
     /* Really check whether the file exists */
-    int fd = g_open( wizard_path, O_RDONLY );
+    int fd = g_open( wizard_path, O_RDONLY, 0 );
     if ( fd == -1)
       wizard_exists = FALSE;
     else

Modified: gnucash/trunk/src/import-export/hbci/gnc-file-aqb-import.c
===================================================================
--- gnucash/trunk/src/import-export/hbci/gnc-file-aqb-import.c	2007-01-21 17:51:12 UTC (rev 15409)
+++ gnucash/trunk/src/import-export/hbci/gnc-file-aqb-import.c	2007-01-21 19:28:31 UTC (rev 15410)
@@ -169,7 +169,7 @@
     DEBUG("Filename found: %s",selected_filename);
 
     DEBUG("Opening selected file");
-    dtaus_fd = g_open(selected_filename, O_RDONLY);
+    dtaus_fd = g_open(selected_filename, O_RDONLY, 0);
     if (dtaus_fd == -1) {
       DEBUG("Could not open file %s", selected_filename);
       return;



More information about the gnucash-changes mailing list