mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15410 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -91,7 +91,7 @@ gncReadFile (const char * file, char ** data)
|
||||
if (!filename) return 0;
|
||||
|
||||
/* Open file: */
|
||||
fd = g_open( filename, O_RDONLY );
|
||||
fd = g_open( filename, O_RDONLY, 0 );
|
||||
|
||||
g_free(filename); filename = NULL;
|
||||
|
||||
|
||||
@@ -342,7 +342,7 @@ copy_file(const char *orig, const char *bkup)
|
||||
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;
|
||||
|
||||
@@ -1428,7 +1428,7 @@ static gboolean
|
||||
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;
|
||||
|
||||
@@ -58,8 +58,8 @@ files_compare(const gchar* f1, const gchar* f2)
|
||||
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
|
||||
{
|
||||
|
||||
@@ -533,7 +533,7 @@ on_aqhbci_button (GtkButton *button,
|
||||
|
||||
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
|
||||
|
||||
@@ -169,7 +169,7 @@ void gnc_file_aqbanking_import (const gchar *aqbanking_importername,
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user